comparison dwt/widgets/TableColumn.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 34409a2fc053
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.TableColumn; 13 module dwt.widgets.TableColumn;
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;
47 public class TableColumn : Item { 49 public class TableColumn : Item {
48 GtkWidget* labelHandle, imageHandle, buttonHandle; 50 GtkWidget* labelHandle, imageHandle, buttonHandle;
49 Table parent; 51 Table parent;
50 int modelIndex, lastButton, lastTime, lastX, lastWidth; 52 int modelIndex, lastButton, lastTime, lastX, lastWidth;
51 bool customDraw, useFixedWidth; 53 bool customDraw, useFixedWidth;
52 char[] toolTipText; 54 String toolTipText;
53 55
54 /** 56 /**
55 * Constructs a new instance of this class given its parent 57 * Constructs a new instance of this class given its parent
56 * (which must be a <code>Table</code>) and a style value 58 * (which must be a <code>Table</code>) and a style value
57 * describing its behavior and appearance. The item is added 59 * describing its behavior and appearance. The item is added
304 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 306 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
305 * </ul> 307 * </ul>
306 * 308 *
307 * @since 3.2 309 * @since 3.2
308 */ 310 */
309 public char[] getToolTipText () { 311 public String getToolTipText () {
310 checkWidget(); 312 checkWidget();
311 return toolTipText; 313 return toolTipText;
312 } 314 }
313 315
314 /** 316 /**
604 display.doSetDirectionProc( buttonHandle, OS.GTK_TEXT_DIR_RTL); 606 display.doSetDirectionProc( buttonHandle, OS.GTK_TEXT_DIR_RTL);
605 } 607 }
606 } 608 }
607 } 609 }
608 610
609 public override void setText (char[] string) { 611 public override void setText (String string) {
610 checkWidget(); 612 checkWidget();
611 if (string is null) error (DWT.ERROR_NULL_ARGUMENT); 613 if (string is null) error (DWT.ERROR_NULL_ARGUMENT);
612 super.setText (string); 614 super.setText (string);
613 char [] chars = fixMnemonic (string); 615 char [] chars = fixMnemonic (string);
614 char* buffer = tango.stdc.stringz.toStringz( chars ); 616 char* buffer = tango.stdc.stringz.toStringz( chars );
631 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 633 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
632 * </ul> 634 * </ul>
633 * 635 *
634 * @since 3.2 636 * @since 3.2
635 */ 637 */
636 public void setToolTipText (char[] string) { 638 public void setToolTipText (String string) {
637 checkWidget(); 639 checkWidget();
638 Shell shell = parent._getShell (); 640 Shell shell = parent._getShell ();
639 setToolTipText (shell, string); 641 setToolTipText (shell, string);
640 toolTipText = string; 642 toolTipText = string;
641 } 643 }
642 644
643 void setToolTipText (Shell shell, char[] newString) { 645 void setToolTipText (Shell shell, String newString) {
644 shell.setToolTipText (buttonHandle, newString); 646 shell.setToolTipText (buttonHandle, newString);
645 } 647 }
646 648
647 /** 649 /**
648 * Sets the width of the receiver. 650 * Sets the width of the receiver.