comparison dwt/widgets/TabItem.d @ 212:ab60f3309436

reverted the char[] to String and use the an alias.
author Frank Benoit <benoit@tionex.de>
date Mon, 05 May 2008 00:12:38 +0200
parents 205350493476
children 36f5cb12e1a2
comparison
equal deleted inserted replaced
211:ff59aeb96cac 212:ab60f3309436
39 */ 39 */
40 40
41 public class TabItem : Item { 41 public class TabItem : Item {
42 TabFolder parent; 42 TabFolder parent;
43 Control control; 43 Control control;
44 char[] toolTipText; 44 String toolTipText;
45 45
46 /** 46 /**
47 * Constructs a new instance of this class given its parent 47 * Constructs a new instance of this class given its parent
48 * (which must be a <code>TabFolder</code>) and a style value 48 * (which must be a <code>TabFolder</code>) and a style value
49 * describing its behavior and appearance. The item is added 49 * describing its behavior and appearance. The item is added
115 super (parent, style); 115 super (parent, style);
116 this.parent = parent; 116 this.parent = parent;
117 parent.createItem (this, index); 117 parent.createItem (this, index);
118 } 118 }
119 119
120 void _setText (int index, char[] string) { 120 void _setText (int index, String string) {
121 /* 121 /*
122 * Bug in Windows. In version 6.00 of COMCTL32.DLL, tab 122 * Bug in Windows. In version 6.00 of COMCTL32.DLL, tab
123 * items with an image and a label that includes '&' cause 123 * items with an image and a label that includes '&' cause
124 * the tab to draw incorrectly (even when doubled '&&'). 124 * the tab to draw incorrectly (even when doubled '&&').
125 * The image overlaps the label. The fix is to remove 125 * The image overlaps the label. The fix is to remove
200 * @exception DWTException <ul> 200 * @exception DWTException <ul>
201 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 201 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
202 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 202 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
203 * </ul> 203 * </ul>
204 */ 204 */
205 public char[] getToolTipText () { 205 public String getToolTipText () {
206 checkWidget(); 206 checkWidget();
207 return toolTipText; 207 return toolTipText;
208 } 208 }
209 209
210 override void releaseHandle () { 210 override void releaseHandle () {
309 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 309 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
310 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 310 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
311 * </ul> 311 * </ul>
312 * 312 *
313 */ 313 */
314 override public void setText (char[] string) { 314 override public void setText (String string) {
315 checkWidget(); 315 checkWidget();
316 if (string is null) error (DWT.ERROR_NULL_ARGUMENT); 316 if (string is null) error (DWT.ERROR_NULL_ARGUMENT);
317 if (string ==/*eq*/text ) return; 317 if (string ==/*eq*/text ) return;
318 int index = parent.indexOf (this); 318 int index = parent.indexOf (this);
319 if (index is -1) return; 319 if (index is -1) return;
330 * @exception DWTException <ul> 330 * @exception DWTException <ul>
331 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 331 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
332 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 332 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
333 * </ul> 333 * </ul>
334 */ 334 */
335 public void setToolTipText (char[] string) { 335 public void setToolTipText (String string) {
336 checkWidget(); 336 checkWidget();
337 toolTipText = string; 337 toolTipText = string;
338 } 338 }
339 339
340 } 340 }