comparison dstep/appkit/NSForm.d @ 16:19885b43130e

Huge update, the bridge actually works now
author Jacob Carlborg <doob@me.com>
date Sun, 03 Jan 2010 22:06:11 +0100
parents
children b9de51448c6b
comparison
equal deleted inserted replaced
15:7ff919f595d5 16:19885b43130e
1 /**
2 * Copyright: Copyright (c) 2009 Jacob Carlborg.
3 * Authors: Jacob Carlborg
4 * Version: Initial created: Sep 24, 2009
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
6 */
7 module dstep.appkit.NSForm;
8
9 import dstep.appkit.NSFont;
10 import dstep.appkit.NSFormCell;
11 import dstep.appkit.NSMatrix;
12 import dstep.applicationservices.coregraphics.CGBase;
13 import dstep.foundation.NSGeometry;
14 import dstep.foundation.NSObjCRuntime;
15 import dstep.foundation.NSString;
16 import dstep.objc.bridge.Bridge;
17 import dstep.objc.objc;
18
19 class NSForm : NSMatrix
20 {
21 mixin (ObjcWrap);
22
23 NSInteger indexOfSelectedItem ()
24 {
25 return invokeObjcSelf!(NSInteger, "indexOfSelectedItem");
26 }
27
28 void setEntryWidth (CGFloat width)
29 {
30 return invokeObjcSelf!(void, "setEntryWidth:", CGFloat)(width);
31 }
32
33 void setInterlineSpacing (CGFloat spacing)
34 {
35 return invokeObjcSelf!(void, "setInterlineSpacing:", CGFloat)(spacing);
36 }
37
38 void setBordered (bool flag)
39 {
40 return invokeObjcSelf!(void, "setBordered:", bool)(flag);
41 }
42
43 void setBezeled (bool flag)
44 {
45 return invokeObjcSelf!(void, "setBezeled:", bool)(flag);
46 }
47
48 void setTitleAlignment (uint mode)
49 {
50 return invokeObjcSelf!(void, "setTitleAlignment:", uint)(mode);
51 }
52
53 void setTextAlignment (uint mode)
54 {
55 return invokeObjcSelf!(void, "setTextAlignment:", uint)(mode);
56 }
57
58 void setTitleFont (NSFont fontObj)
59 {
60 return invokeObjcSelf!(void, "setTitleFont:", NSFont)(fontObj);
61 }
62
63 void setTextFont (NSFont fontObj)
64 {
65 return invokeObjcSelf!(void, "setTextFont:", NSFont)(fontObj);
66 }
67
68 Object cellAtIndex (NSInteger index)
69 {
70 return invokeObjcSelf!(Object, "cellAtIndex:", NSInteger)(index);
71 }
72
73 void drawCellAtIndex (NSInteger index)
74 {
75 return invokeObjcSelf!(void, "drawCellAtIndex:", NSInteger)(index);
76 }
77
78 NSFormCell addEntry (NSString title)
79 {
80 return invokeObjcSelf!(NSFormCell, "addEntry:", NSString)(title);
81 }
82
83 NSFormCell insertEntry (NSString title, NSInteger index)
84 {
85 return invokeObjcSelf!(NSFormCell, "insertEntry:atIndex:", NSString, NSInteger)(title, index);
86 }
87
88 void removeEntryAtIndex (NSInteger index)
89 {
90 return invokeObjcSelf!(void, "removeEntryAtIndex:", NSInteger)(index);
91 }
92
93 NSInteger indexOfCellWithTag (NSInteger aTag)
94 {
95 return invokeObjcSelf!(NSInteger, "indexOfCellWithTag:", NSInteger)(aTag);
96 }
97
98 void selectTextAtIndex (NSInteger index)
99 {
100 return invokeObjcSelf!(void, "selectTextAtIndex:", NSInteger)(index);
101 }
102
103 void setFrameSize (NSSize newSize)
104 {
105 return invokeObjcSelf!(void, "setFrameSize:", NSSize)(newSize);
106 }
107
108 void setTitleBaseWritingDirection (int writingDirection)
109 {
110 return invokeObjcSelf!(void, "setTitleBaseWritingDirection:", int)(writingDirection);
111 }
112
113 void setTextBaseWritingDirection (int writingDirection)
114 {
115 return invokeObjcSelf!(void, "setTextBaseWritingDirection:", int)(writingDirection);
116 }
117 }
118