Mercurial > projects > dwt-linux
comparison dwt/widgets/Label.d @ 238:380bad9f6852
reverted char[] to String
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 05 May 2008 00:42:55 +0200 |
parents | 12feeed18183 |
children | ce446666f5a2 |
comparison
equal
deleted
inserted
replaced
237:98b80b00af79 | 238:380bad9f6852 |
---|---|
55 alias Control.setForegroundColor setForegroundColor; | 55 alias Control.setForegroundColor setForegroundColor; |
56 | 56 |
57 GtkWidget* frameHandle, labelHandle, imageHandle; | 57 GtkWidget* frameHandle, labelHandle, imageHandle; |
58 ImageList imageList; | 58 ImageList imageList; |
59 Image image; | 59 Image image; |
60 char[] text; | 60 String text; |
61 | 61 |
62 /** | 62 /** |
63 * Constructs a new instance of this class given its parent | 63 * Constructs a new instance of this class given its parent |
64 * and a style value describing its behavior and appearance. | 64 * and a style value describing its behavior and appearance. |
65 * <p> | 65 * <p> |
296 public Image getImage () { | 296 public Image getImage () { |
297 checkWidget (); | 297 checkWidget (); |
298 return image; | 298 return image; |
299 } | 299 } |
300 | 300 |
301 override char[] getNameText () { | 301 override String getNameText () { |
302 return getText (); | 302 return getText (); |
303 } | 303 } |
304 | 304 |
305 /** | 305 /** |
306 * Returns the receiver's text, which will be an empty | 306 * Returns the receiver's text, which will be an empty |
312 * @exception DWTException <ul> | 312 * @exception DWTException <ul> |
313 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> | 313 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
314 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> | 314 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
315 * </ul> | 315 * </ul> |
316 */ | 316 */ |
317 public char[] getText () { | 317 public String getText () { |
318 checkWidget (); | 318 checkWidget (); |
319 if ((style & DWT.SEPARATOR) !is 0) return ""; | 319 if ((style & DWT.SEPARATOR) !is 0) return ""; |
320 return text; | 320 return text; |
321 } | 321 } |
322 | 322 |
563 * @exception DWTException <ul> | 563 * @exception DWTException <ul> |
564 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> | 564 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
565 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> | 565 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
566 * </ul> | 566 * </ul> |
567 */ | 567 */ |
568 public void setText (char[] string) { | 568 public void setText (String string) { |
569 checkWidget (); | 569 checkWidget (); |
570 // DWT extension: allow null for zero length string | 570 // DWT extension: allow null for zero length string |
571 //if (string is null) error (DWT.ERROR_NULL_ARGUMENT); | 571 //if (string is null) error (DWT.ERROR_NULL_ARGUMENT); |
572 if ((style & DWT.SEPARATOR) !is 0) return; | 572 if ((style & DWT.SEPARATOR) !is 0) return; |
573 text = string; | 573 text = string; |