Mercurial > projects > dwt-linux
comparison dwt/widgets/TreeColumn.d @ 238:380bad9f6852
reverted char[] to String
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 05 May 2008 00:42:55 +0200 |
parents | f2e04420fd6c |
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.TreeColumn; | 13 module dwt.widgets.TreeColumn; |
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; |
49 public class TreeColumn : Item { | 51 public class TreeColumn : Item { |
50 GtkWidget* labelHandle, imageHandle, buttonHandle; | 52 GtkWidget* labelHandle, imageHandle, buttonHandle; |
51 Tree parent; | 53 Tree parent; |
52 int modelIndex, lastButton, lastTime, lastX, lastWidth; | 54 int modelIndex, lastButton, lastTime, lastX, lastWidth; |
53 bool customDraw, useFixedWidth; | 55 bool customDraw, useFixedWidth; |
54 char[] toolTipText; | 56 String toolTipText; |
55 | 57 |
56 /** | 58 /** |
57 * Constructs a new instance of this class given its parent | 59 * Constructs a new instance of this class given its parent |
58 * (which must be a <code>Tree</code>) and a style value | 60 * (which must be a <code>Tree</code>) and a style value |
59 * describing its behavior and appearance. The item is added | 61 * describing its behavior and appearance. The item is added |
305 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> | 307 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
306 * </ul> | 308 * </ul> |
307 * | 309 * |
308 * @since 3.2 | 310 * @since 3.2 |
309 */ | 311 */ |
310 public char[] getToolTipText () { | 312 public String getToolTipText () { |
311 checkWidget(); | 313 checkWidget(); |
312 return toolTipText; | 314 return toolTipText; |
313 } | 315 } |
314 | 316 |
315 /** | 317 /** |
589 public void setResizable (bool resizable) { | 591 public void setResizable (bool resizable) { |
590 checkWidget(); | 592 checkWidget(); |
591 OS.gtk_tree_view_column_set_resizable (handle, resizable); | 593 OS.gtk_tree_view_column_set_resizable (handle, resizable); |
592 } | 594 } |
593 | 595 |
594 public override void setText (char[] string) { | 596 public override void setText (String string) { |
595 checkWidget(); | 597 checkWidget(); |
596 if (string is null) error (DWT.ERROR_NULL_ARGUMENT); | 598 if (string is null) error (DWT.ERROR_NULL_ARGUMENT); |
597 super.setText (string); | 599 super.setText (string); |
598 char [] chars = fixMnemonic (string); | 600 char [] chars = fixMnemonic (string); |
599 char* buffer = tango.stdc.stringz.toStringz(chars); | 601 char* buffer = tango.stdc.stringz.toStringz(chars); |
616 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> | 618 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
617 * </ul> | 619 * </ul> |
618 * | 620 * |
619 * @since 3.2 | 621 * @since 3.2 |
620 */ | 622 */ |
621 public void setToolTipText (char[] string) { | 623 public void setToolTipText (String string) { |
622 checkWidget(); | 624 checkWidget(); |
623 Shell shell = parent._getShell (); | 625 Shell shell = parent._getShell (); |
624 setToolTipText (shell, string); | 626 setToolTipText (shell, string); |
625 toolTipText = string; | 627 toolTipText = string; |
626 } | 628 } |
627 | 629 |
628 void setToolTipText (Shell shell, char[] newString) { | 630 void setToolTipText (Shell shell, String newString) { |
629 shell.setToolTipText (buttonHandle, newString); | 631 shell.setToolTipText (buttonHandle, newString); |
630 } | 632 } |
631 | 633 |
632 /** | 634 /** |
633 * Sets the width of the receiver. | 635 * Sets the width of the receiver. |