comparison dwt/internal/cocoa/NSSlider.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
42 super(id); 42 super(id);
43 } 43 }
44 44
45 public bool acceptsFirstMouse (NSEvent theEvent) 45 public bool acceptsFirstMouse (NSEvent theEvent)
46 { 46 {
47 return OS.objc_msgSend(this.id, OS.sel_acceptsFirstMouse_1, theEvent !is null ? theEvent.id : null) !is null; 47 return OS.objc_msgSend(this.id_, OS.sel_acceptsFirstMouse_1, theEvent !is null ? theEvent.id_ : null) !is null;
48 } 48 }
49 49
50 public bool allowsTickMarkValuesOnly () 50 public bool allowsTickMarkValuesOnly ()
51 { 51 {
52 return OS.objc_msgSend(this.id, OS.sel_allowsTickMarkValuesOnly) !is null; 52 return OS.objc_msgSend(this.id_, OS.sel_allowsTickMarkValuesOnly) !is null;
53 } 53 }
54 54
55 public double altIncrementValue () 55 public double altIncrementValue ()
56 { 56 {
57 return cast(double) OS.objc_msgSend_fpret(this.id, OS.sel_altIncrementValue); 57 return cast(double) OS.objc_msgSend_fpret(this.id_, OS.sel_altIncrementValue);
58 } 58 }
59 59
60 public double closestTickMarkValueToValue (double value) 60 public double closestTickMarkValueToValue (double value)
61 { 61 {
62 return cast(double) OS.objc_msgSend_fpret(this.id, OS.sel_closestTickMarkValueToValue_1, value); 62 return cast(double) OS.objc_msgSend_fpret(this.id_, OS.sel_closestTickMarkValueToValue_1, value);
63 } 63 }
64 64
65 public NSImage image () 65 public NSImage image ()
66 { 66 {
67 objc.id result = OS.objc_msgSend(this.id, OS.sel_image); 67 objc.id result = OS.objc_msgSend(this.id_, OS.sel_image);
68 return result !is null ? new NSImage(result) : null; 68 return result !is null ? new NSImage(result) : null;
69 } 69 }
70 70
71 public NSInteger indexOfTickMarkAtPoint (NSPoint point) 71 public NSInteger indexOfTickMarkAtPoint (NSPoint point)
72 { 72 {
73 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_indexOfTickMarkAtPoint_1, point); 73 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfTickMarkAtPoint_1, point);
74 } 74 }
75 75
76 public NSInteger isVertical () 76 public NSInteger isVertical ()
77 { 77 {
78 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_isVertical); 78 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_isVertical);
79 } 79 }
80 80
81 public CGFloat knobThickness () 81 public CGFloat knobThickness ()
82 { 82 {
83 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_knobThickness); 83 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_knobThickness);
84 } 84 }
85 85
86 public double maxValue () 86 public double maxValue ()
87 { 87 {
88 return cast(double) OS.objc_msgSend_fpret(this.id, OS.sel_maxValue); 88 return cast(double) OS.objc_msgSend_fpret(this.id_, OS.sel_maxValue);
89 } 89 }
90 90
91 public double minValue () 91 public double minValue ()
92 { 92 {
93 return cast(double) OS.objc_msgSend_fpret(this.id, OS.sel_minValue); 93 return cast(double) OS.objc_msgSend_fpret(this.id_, OS.sel_minValue);
94 } 94 }
95 95
96 public NSInteger numberOfTickMarks () 96 public NSInteger numberOfTickMarks ()
97 { 97 {
98 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_numberOfTickMarks); 98 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfTickMarks);
99 } 99 }
100 100
101 public NSRect rectOfTickMarkAtIndex (NSInteger index) 101 public NSRect rectOfTickMarkAtIndex (NSInteger index)
102 { 102 {
103 NSRect result; 103 NSRect result;
104 OS.objc_msgSend_stret(result, this.id, OS.sel_rectOfTickMarkAtIndex_1, index); 104 OS.objc_msgSend_stret(&result, this.id_, OS.sel_rectOfTickMarkAtIndex_1, index);
105 return result; 105 return result;
106 } 106 }
107 107
108 public void setAllowsTickMarkValuesOnly (bool yorn) 108 public void setAllowsTickMarkValuesOnly (bool yorn)
109 { 109 {
110 OS.objc_msgSend(this.id, OS.sel_setAllowsTickMarkValuesOnly_1, yorn); 110 OS.objc_msgSend(this.id_, OS.sel_setAllowsTickMarkValuesOnly_1, yorn);
111 } 111 }
112 112
113 public void setAltIncrementValue (double incValue) 113 public void setAltIncrementValue (double incValue)
114 { 114 {
115 OS.objc_msgSend(this.id, OS.sel_setAltIncrementValue_1, incValue); 115 OS.objc_msgSend(this.id_, OS.sel_setAltIncrementValue_1, incValue);
116 } 116 }
117 117
118 public void setImage (NSImage backgroundImage) 118 public void setImage (NSImage backgroundImage)
119 { 119 {
120 OS.objc_msgSend(this.id, OS.sel_setImage_1, backgroundImage !is null ? backgroundImage.id : null); 120 OS.objc_msgSend(this.id_, OS.sel_setImage_1, backgroundImage !is null ? backgroundImage.id_ : null);
121 } 121 }
122 122
123 public void setKnobThickness (CGFloat aFloat) 123 public void setKnobThickness (CGFloat aFloat)
124 { 124 {
125 OS.objc_msgSend(this.id, OS.sel_setKnobThickness_1, aFloat); 125 OS.objc_msgSend(this.id_, OS.sel_setKnobThickness_1, aFloat);
126 } 126 }
127 127
128 public void setMaxValue (double aDouble) 128 public void setMaxValue (double aDouble)
129 { 129 {
130 OS.objc_msgSend(this.id, OS.sel_setMaxValue_1, aDouble); 130 OS.objc_msgSend(this.id_, OS.sel_setMaxValue_1, aDouble);
131 } 131 }
132 132
133 public void setMinValue (double aDouble) 133 public void setMinValue (double aDouble)
134 { 134 {
135 OS.objc_msgSend(this.id, OS.sel_setMinValue_1, aDouble); 135 OS.objc_msgSend(this.id_, OS.sel_setMinValue_1, aDouble);
136 } 136 }
137 137
138 public void setNumberOfTickMarks (NSInteger count) 138 public void setNumberOfTickMarks (NSInteger count)
139 { 139 {
140 OS.objc_msgSend(this.id, OS.sel_setNumberOfTickMarks_1, count); 140 OS.objc_msgSend(this.id_, OS.sel_setNumberOfTickMarks_1, count);
141 } 141 }
142 142
143 public void setTickMarkPosition (NSTickMarkPosition position) 143 public void setTickMarkPosition (NSTickMarkPosition position)
144 { 144 {
145 OS.objc_msgSend(this.id, OS.sel_setTickMarkPosition_1, position); 145 OS.objc_msgSend(this.id_, OS.sel_setTickMarkPosition_1, position);
146 } 146 }
147 147
148 public void setTitle (NSString aString) 148 public void setTitle (NSString aString)
149 { 149 {
150 OS.objc_msgSend(this.id, OS.sel_setTitle_1, aString !is null ? aString.id : null); 150 OS.objc_msgSend(this.id_, OS.sel_setTitle_1, aString !is null ? aString.id_ : null);
151 } 151 }
152 152
153 public void setTitleCell (NSCell aCell) 153 public void setTitleCell (NSCell aCell)
154 { 154 {
155 OS.objc_msgSend(this.id, OS.sel_setTitleCell_1, aCell !is null ? aCell.id : null); 155 OS.objc_msgSend(this.id_, OS.sel_setTitleCell_1, aCell !is null ? aCell.id_ : null);
156 } 156 }
157 157
158 public void setTitleColor (NSColor newColor) 158 public void setTitleColor (NSColor newColor)
159 { 159 {
160 OS.objc_msgSend(this.id, OS.sel_setTitleColor_1, newColor !is null ? newColor.id : null); 160 OS.objc_msgSend(this.id_, OS.sel_setTitleColor_1, newColor !is null ? newColor.id_ : null);
161 } 161 }
162 162
163 public void setTitleFont (NSFont fontObj) 163 public void setTitleFont (NSFont fontObj)
164 { 164 {
165 OS.objc_msgSend(this.id, OS.sel_setTitleFont_1, fontObj !is null ? fontObj.id : null); 165 OS.objc_msgSend(this.id_, OS.sel_setTitleFont_1, fontObj !is null ? fontObj.id_ : null);
166 } 166 }
167 167
168 public NSTickMarkPosition tickMarkPosition () 168 public NSTickMarkPosition tickMarkPosition ()
169 { 169 {
170 return cast(NSTickMarkPosition) OS.objc_msgSend(this.id, OS.sel_tickMarkPosition); 170 return cast(NSTickMarkPosition) OS.objc_msgSend(this.id_, OS.sel_tickMarkPosition);
171 } 171 }
172 172
173 public double tickMarkValueAtIndex (NSInteger index) 173 public double tickMarkValueAtIndex (NSInteger index)
174 { 174 {
175 return cast(double) OS.objc_msgSend_fpret(this.id, OS.sel_tickMarkValueAtIndex_1, index); 175 return cast(double) OS.objc_msgSend_fpret(this.id_, OS.sel_tickMarkValueAtIndex_1, index);
176 } 176 }
177 177
178 public NSString title () 178 public NSString title ()
179 { 179 {
180 objc.id result = OS.objc_msgSend(this.id, OS.sel_title); 180 objc.id result = OS.objc_msgSend(this.id_, OS.sel_title);
181 return result !is null ? new NSString(result) : null; 181 return result !is null ? new NSString(result) : null;
182 } 182 }
183 183
184 public id titleCell () 184 public id titleCell ()
185 { 185 {
186 objc.id result = OS.objc_msgSend(this.id, OS.sel_titleCell); 186 objc.id result = OS.objc_msgSend(this.id_, OS.sel_titleCell);
187 return result !is null ? new id(result) : null; 187 return result !is null ? new id(result) : null;
188 } 188 }
189 189
190 public NSColor titleColor () 190 public NSColor titleColor ()
191 { 191 {
192 objc.id result = OS.objc_msgSend(this.id, OS.sel_titleColor); 192 objc.id result = OS.objc_msgSend(this.id_, OS.sel_titleColor);
193 return result !is null ? new NSColor(result) : null; 193 return result !is null ? new NSColor(result) : null;
194 } 194 }
195 195
196 public NSFont titleFont () 196 public NSFont titleFont ()
197 { 197 {
198 objc.id result = OS.objc_msgSend(this.id, OS.sel_titleFont); 198 objc.id result = OS.objc_msgSend(this.id_, OS.sel_titleFont);
199 return result !is null ? new NSFont(result) : null; 199 return result !is null ? new NSFont(result) : null;
200 } 200 }
201 201
202 } 202 }