comparison dwt/widgets/Group.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.Group; 13 module dwt.widgets.Group;
14
15 import dwt.dwthelper.utils;
14 16
15 17
16 import dwt.DWT; 18 import dwt.DWT;
17 import dwt.internal.gtk.OS; 19 import dwt.internal.gtk.OS;
18 import dwt.graphics.Point; 20 import dwt.graphics.Point;
50 alias Composite.mnemonicMatch mnemonicMatch; 52 alias Composite.mnemonicMatch mnemonicMatch;
51 alias Composite.setBackgroundColor setBackgroundColor; 53 alias Composite.setBackgroundColor setBackgroundColor;
52 alias Composite.setForegroundColor setForegroundColor; 54 alias Composite.setForegroundColor setForegroundColor;
53 55
54 GtkWidget* clientHandle_, labelHandle; 56 GtkWidget* clientHandle_, labelHandle;
55 char[] text = ""; 57 String text = "";
56 58
57 /** 59 /**
58 * Constructs a new instance of this class given its parent 60 * Constructs a new instance of this class given its parent
59 * and a style value describing its behavior and appearance. 61 * and a style value describing its behavior and appearance.
60 * <p> 62 * <p>
169 171
170 override GtkWidget* eventHandle () { 172 override GtkWidget* eventHandle () {
171 return fixedHandle; 173 return fixedHandle;
172 } 174 }
173 175
174 override char[] getNameText () { 176 override String getNameText () {
175 return getText (); 177 return getText ();
176 } 178 }
177 179
178 /** 180 /**
179 * Returns the receiver's text, which is the string that the 181 * Returns the receiver's text, which is the string that the
185 * @exception DWTException <ul> 187 * @exception DWTException <ul>
186 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 188 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
187 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 189 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
188 * </ul> 190 * </ul>
189 */ 191 */
190 public char[] getText () { 192 public String getText () {
191 checkWidget(); 193 checkWidget();
192 return text; 194 return text;
193 } 195 }
194 196
195 override void hookEvents () { 197 override void hookEvents () {
276 * @exception DWTException <ul> 278 * @exception DWTException <ul>
277 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 279 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
278 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 280 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
279 * </ul> 281 * </ul>
280 */ 282 */
281 public void setText (char[] string) { 283 public void setText (String string) {
282 checkWidget(); 284 checkWidget();
283 if (string is null) error (DWT.ERROR_NULL_ARGUMENT); 285 if (string is null) error (DWT.ERROR_NULL_ARGUMENT);
284 text = string; 286 text = string;
285 char [] chars = fixMnemonic (string); 287 char [] chars = fixMnemonic (string);
286 OS.gtk_label_set_text_with_mnemonic (cast(GtkLabel*)labelHandle, toStringz(chars)); 288 OS.gtk_label_set_text_with_mnemonic (cast(GtkLabel*)labelHandle, toStringz(chars));