Mercurial > projects > dwt-linux
comparison dwt/widgets/TabItem.d @ 238:380bad9f6852
reverted char[] to String
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 05 May 2008 00:42:55 +0200 |
parents | 17f8449522fd |
children | ce446666f5a2 |
comparison
equal
deleted
inserted
replaced
237:98b80b00af79 | 238:380bad9f6852 |
---|---|
9 * IBM Corporation - initial API and implementation | 9 * IBM Corporation - initial API and implementation |
10 * Port to the D programming language: | 10 * Port to the D programming language: |
11 * Frank Benoit <benoit@tionex.de> | 11 * Frank Benoit <benoit@tionex.de> |
12 *******************************************************************************/ | 12 *******************************************************************************/ |
13 module dwt.widgets.TabItem; | 13 module dwt.widgets.TabItem; |
14 | |
15 import dwt.dwthelper.utils; | |
14 | 16 |
15 | 17 |
16 | 18 |
17 import dwt.DWT; | 19 import dwt.DWT; |
18 import dwt.DWTException; | 20 import dwt.DWTException; |
43 alias Item.setForegroundColor setForegroundColor; | 45 alias Item.setForegroundColor setForegroundColor; |
44 | 46 |
45 GtkWidget* labelHandle, imageHandle, pageHandle; | 47 GtkWidget* labelHandle, imageHandle, pageHandle; |
46 Control control; | 48 Control control; |
47 TabFolder parent; | 49 TabFolder parent; |
48 char[] toolTipText; | 50 String toolTipText; |
49 | 51 |
50 /** | 52 /** |
51 * Constructs a new instance of this class given its parent | 53 * Constructs a new instance of this class given its parent |
52 * (which must be a <code>TabFolder</code>) and a style value | 54 * (which must be a <code>TabFolder</code>) and a style value |
53 * describing its behavior and appearance. The item is added | 55 * describing its behavior and appearance. The item is added |
184 * @exception DWTException <ul> | 186 * @exception DWTException <ul> |
185 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> | 187 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
186 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> | 188 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
187 * </ul> | 189 * </ul> |
188 */ | 190 */ |
189 public char[] getToolTipText () { | 191 public String getToolTipText () { |
190 checkWidget (); | 192 checkWidget (); |
191 return toolTipText; | 193 return toolTipText; |
192 } | 194 } |
193 | 195 |
194 override int gtk_enter_notify_event (GtkWidget* widget, GdkEventCrossing* event) { | 196 override int gtk_enter_notify_event (GtkWidget* widget, GdkEventCrossing* event) { |
325 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> | 327 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
326 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> | 328 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
327 * </ul> | 329 * </ul> |
328 * | 330 * |
329 */ | 331 */ |
330 public override void setText (char[] string) { | 332 public override void setText (String string) { |
331 checkWidget (); | 333 checkWidget (); |
332 if (string is null) error (DWT.ERROR_NULL_ARGUMENT); | 334 if (string is null) error (DWT.ERROR_NULL_ARGUMENT); |
333 super.setText (string); | 335 super.setText (string); |
334 char [] chars = fixMnemonic (string); | 336 char [] chars = fixMnemonic (string); |
335 char* buffer = tango.stdc.stringz.toStringz( chars); | 337 char* buffer = tango.stdc.stringz.toStringz( chars); |
350 * @exception DWTException <ul> | 352 * @exception DWTException <ul> |
351 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> | 353 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
352 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> | 354 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
353 * </ul> | 355 * </ul> |
354 */ | 356 */ |
355 public void setToolTipText (char[] string) { | 357 public void setToolTipText (String string) { |
356 checkWidget (); | 358 checkWidget (); |
357 toolTipText = string; | 359 toolTipText = string; |
358 } | 360 } |
359 | 361 |
360 } | 362 } |