Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSFormCell.d @ 1:8b48be5454ce
The internal cocoa classes compile now
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Tue, 19 Aug 2008 17:35:17 +0200 |
parents | 380af2bdd8e5 |
children | f565d3a95c0a |
comparison
equal
deleted
inserted
replaced
0:380af2bdd8e5 | 1:8b48be5454ce |
---|---|
13 *******************************************************************************/ | 13 *******************************************************************************/ |
14 module dwt.internal.cocoa.NSFormCell; | 14 module dwt.internal.cocoa.NSFormCell; |
15 | 15 |
16 import dwt.internal.cocoa.CGFloat; | 16 import dwt.internal.cocoa.CGFloat; |
17 import dwt.internal.cocoa.NSActionCell; | 17 import dwt.internal.cocoa.NSActionCell; |
18 import dwt.internal.cocoa.NSAttributedString; | |
19 import dwt.internal.cocoa.NSFont; | |
20 import dwt.internal.cocoa.NSSize; | |
21 import dwt.internal.cocoa.NSString; | |
18 import dwt.internal.cocoa.NSText : NSTextAlignment, NSWritingDirection; | 22 import dwt.internal.cocoa.NSText : NSTextAlignment, NSWritingDirection; |
19 import dwt.internal.cocoa.OS; | 23 import dwt.internal.cocoa.OS; |
20 import objc = dwt.internal.objc.runtime; | 24 import objc = dwt.internal.objc.runtime; |
21 | 25 |
22 public class NSFormCell : NSActionCell | 26 public class NSFormCell : NSActionCell |
32 super(id); | 36 super(id); |
33 } | 37 } |
34 | 38 |
35 public NSAttributedString attributedTitle () | 39 public NSAttributedString attributedTitle () |
36 { | 40 { |
37 objc.id result = OS.objc_msgSend(this.id, OS.sel_attributedTitle); | 41 objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributedTitle); |
38 return result !is null ? new NSAttributedString(result) : null; | 42 return result !is null ? new NSAttributedString(result) : null; |
39 } | 43 } |
40 | 44 |
41 public bool isOpaque () | 45 public bool isOpaque () |
42 { | 46 { |
43 return OS.objc_msgSend(this.id, OS.sel_isOpaque) !is null; | 47 return OS.objc_msgSend(this.id_, OS.sel_isOpaque) !is null; |
44 } | 48 } |
45 | 49 |
46 public NSAttributedString placeholderAttributedString () | 50 public NSAttributedString placeholderAttributedString () |
47 { | 51 { |
48 objc.id result = OS.objc_msgSend(this.id, OS.sel_placeholderAttributedString); | 52 objc.id result = OS.objc_msgSend(this.id_, OS.sel_placeholderAttributedString); |
49 return result !is null ? new NSAttributedString(result) : null; | 53 return result !is null ? new NSAttributedString(result) : null; |
50 } | 54 } |
51 | 55 |
52 public NSString placeholderString () | 56 public NSString placeholderString () |
53 { | 57 { |
54 objc.id result = OS.objc_msgSend(this.id, OS.sel_placeholderString); | 58 objc.id result = OS.objc_msgSend(this.id_, OS.sel_placeholderString); |
55 return result !is null ? new NSString(result) : null; | 59 return result !is null ? new NSString(result) : null; |
56 } | 60 } |
57 | 61 |
58 public void setAttributedTitle (NSAttributedString obj) | 62 public void setAttributedTitle (NSAttributedString obj) |
59 { | 63 { |
60 OS.objc_msgSend(this.id, OS.sel_setAttributedTitle_1, obj !is null ? obj.id : null); | 64 OS.objc_msgSend(this.id_, OS.sel_setAttributedTitle_1, obj !is null ? obj.id_ : null); |
61 } | 65 } |
62 | 66 |
63 public void setPlaceholderAttributedString (NSAttributedString string) | 67 public void setPlaceholderAttributedString (NSAttributedString string) |
64 { | 68 { |
65 OS.objc_msgSend(this.id, OS.sel_setPlaceholderAttributedString_1, string !is null ? string.id : null); | 69 OS.objc_msgSend(this.id_, OS.sel_setPlaceholderAttributedString_1, string !is null ? string.id_ : null); |
66 } | 70 } |
67 | 71 |
68 public void setPlaceholderString (NSString string) | 72 public void setPlaceholderString (NSString string) |
69 { | 73 { |
70 OS.objc_msgSend(this.id, OS.sel_setPlaceholderString_1, string !is null ? string.id : null); | 74 OS.objc_msgSend(this.id_, OS.sel_setPlaceholderString_1, string !is null ? string.id_ : null); |
71 } | 75 } |
72 | 76 |
73 public void setTitle (NSString aString) | 77 public void setTitle (NSString aString) |
74 { | 78 { |
75 OS.objc_msgSend(this.id, OS.sel_setTitle_1, aString !is null ? aString.id : null); | 79 OS.objc_msgSend(this.id_, OS.sel_setTitle_1, aString !is null ? aString.id_ : null); |
76 } | 80 } |
77 | 81 |
78 public void setTitleAlignment (NSTextAlignment mode) | 82 public void setTitleAlignment (NSTextAlignment mode) |
79 { | 83 { |
80 OS.objc_msgSend(this.id, OS.sel_setTitleAlignment_1, mode); | 84 OS.objc_msgSend(this.id_, OS.sel_setTitleAlignment_1, mode); |
81 } | 85 } |
82 | 86 |
83 public void setTitleBaseWritingDirection (NSWritingDirection writingDirection) | 87 public void setTitleBaseWritingDirection (NSWritingDirection writingDirection) |
84 { | 88 { |
85 OS.objc_msgSend(this.id, OS.sel_setTitleBaseWritingDirection_1, writingDirection); | 89 OS.objc_msgSend(this.id_, OS.sel_setTitleBaseWritingDirection_1, writingDirection); |
86 } | 90 } |
87 | 91 |
88 public void setTitleFont (NSFont fontObj) | 92 public void setTitleFont (NSFont fontObj) |
89 { | 93 { |
90 OS.objc_msgSend(this.id, OS.sel_setTitleFont_1, fontObj !is null ? fontObj.id : null); | 94 OS.objc_msgSend(this.id_, OS.sel_setTitleFont_1, fontObj !is null ? fontObj.id_ : null); |
91 } | 95 } |
92 | 96 |
93 public void setTitleWidth (CGFloat width) | 97 public void setTitleWidth (CGFloat width) |
94 { | 98 { |
95 OS.objc_msgSend(this.id, OS.sel_setTitleWidth_1, width); | 99 OS.objc_msgSend(this.id_, OS.sel_setTitleWidth_1, width); |
96 } | 100 } |
97 | 101 |
98 public void setTitleWithMnemonic (NSString stringWithAmpersand) | 102 public void setTitleWithMnemonic (NSString stringWithAmpersand) |
99 { | 103 { |
100 OS.objc_msgSend(this.id, OS.sel_setTitleWithMnemonic_1, stringWithAmpersand !is null ? stringWithAmpersand.id : null); | 104 OS.objc_msgSend(this.id_, OS.sel_setTitleWithMnemonic_1, stringWithAmpersand !is null ? stringWithAmpersand.id_ : null); |
101 } | 105 } |
102 | 106 |
103 public NSString title () | 107 public NSString title () |
104 { | 108 { |
105 objc.id result = OS.objc_msgSend(this.id, OS.sel_title); | 109 objc.id result = OS.objc_msgSend(this.id_, OS.sel_title); |
106 return result !is null ? new NSString(result) : null; | 110 return result !is null ? new NSString(result) : null; |
107 } | 111 } |
108 | 112 |
109 public NSTextAlignment titleAlignment () | 113 public NSTextAlignment titleAlignment () |
110 { | 114 { |
111 return OS.objc_msgSend(this.id, OS.sel_titleAlignment); | 115 return cast(NSTextAlignment) OS.objc_msgSend(this.id_, OS.sel_titleAlignment); |
112 } | 116 } |
113 | 117 |
114 public NSWritingDirection titleBaseWritingDirection () | 118 public NSWritingDirection titleBaseWritingDirection () |
115 { | 119 { |
116 return OS.objc_msgSend(this.id, OS.sel_titleBaseWritingDirection); | 120 return cast(NSWritingDirection) OS.objc_msgSend(this.id_, OS.sel_titleBaseWritingDirection); |
117 } | 121 } |
118 | 122 |
119 public NSFont titleFont () | 123 public NSFont titleFont () |
120 { | 124 { |
121 objc.id result = OS.objc_msgSend(this.id, OS.sel_titleFont); | 125 objc.id result = OS.objc_msgSend(this.id_, OS.sel_titleFont); |
122 return result !is null ? new NSFont(result) : null; | 126 return result !is null ? new NSFont(result) : null; |
123 } | 127 } |
124 | 128 |
125 public CGFloat titleWidth () | 129 public CGFloat titleWidth () |
126 { | 130 { |
127 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_titleWidth); | 131 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_titleWidth); |
128 } | 132 } |
129 | 133 |
130 public CGFloat titleWidth_ (NSSize aSize) | 134 public CGFloat titleWidth_ (NSSize aSize) |
131 { | 135 { |
132 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_titleWidth_1, aSize); | 136 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_titleWidth_1, aSize); |
133 } | 137 } |
134 | 138 |
135 } | 139 } |