comparison dwt/widgets/Label.d @ 46:cfa563df4fdd

Updated Widget and Display to 3.514
author Jacob Carlborg <doob@me.com>
date Fri, 05 Dec 2008 16:00:41 +0100
parents d8635bb48c7c
children 2d5ef909b21d
comparison
equal deleted inserted replaced
45:d8635bb48c7c 46:cfa563df4fdd
208 return new Point (width, height); 208 return new Point (width, height);
209 } 209 }
210 210
211 void createHandle () { 211 void createHandle () {
212 NSBox widget = cast(NSBox)(new SWTBox()).alloc(); 212 NSBox widget = cast(NSBox)(new SWTBox()).alloc();
213 widget.initWithFrame(new NSRect()); 213 widget.initWithFrame(NSRect());
214 widget.setTitle(NSString.stringWith("")); 214 widget.setTitle(NSString.stringWith(""));
215 if ((style & DWT.SEPARATOR) !is 0) { 215 if ((style & DWT.SEPARATOR) !is 0) {
216 widget.setBoxType(OS.NSBoxSeparator); 216 widget.setBoxType(OS.NSBoxSeparator);
217 NSView child = (NSView) new NSView().alloc().init().autorelease(); 217 NSView child = (NSView) new NSView().alloc().init().autorelease();
218 widget.setContentView(child); 218 widget.setContentView(child);
226 NSImageView imageWidget = cast(NSImageView) new SWTImageView ().alloc (); 226 NSImageView imageWidget = cast(NSImageView) new SWTImageView ().alloc ();
227 imageWidget.initWithFrame(new NSRect ()); 227 imageWidget.initWithFrame(new NSRect ());
228 imageWidget.setImageScaling (OS.NSScaleNone); 228 imageWidget.setImageScaling (OS.NSScaleNone);
229 229
230 NSTextField textWidget = cast(NSTextField)(new SWTTextField()).alloc(); 230 NSTextField textWidget = cast(NSTextField)(new SWTTextField()).alloc();
231 textWidget.initWithFrame(new NSRect()); 231 textWidget.initWithFrame(NSRect());
232 textWidget.setBordered(false); 232 textWidget.setBordered(false);
233 textWidget.setEditable(false); 233 textWidget.setEditable(false);
234 textWidget.setDrawsBackground(false); 234 textWidget.setDrawsBackground(false);
235 NSTextFieldCell cell = new NSTextFieldCell(textWidget.cell()); 235 NSTextFieldCell cell = new NSTextFieldCell(textWidget.cell());
236 cell.setWraps ((style & DWT.WRAP) !is 0); 236 cell.setWraps ((style & DWT.WRAP) !is 0);