Mercurial > projects > dwt-win
diff dwt/widgets/Button.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 | 6f75fdfa1bcd |
children | 36f5cb12e1a2 |
line wrap: on
line diff
--- a/dwt/widgets/Button.d Sat Apr 26 10:01:48 2008 +0200 +++ b/dwt/widgets/Button.d Mon May 05 00:12:38 2008 +0200 @@ -60,7 +60,7 @@ alias Control.windowProc windowProc; alias extern(Windows) int function( HWND, uint, uint, int ) TWindowProc; - char[] text = "", message = ""; + String text = "", message = ""; Image image, image2, disabledImage; ImageList imageList; bool ignoreMouse; @@ -282,7 +282,7 @@ } } -void _setText (char[] text) { +void _setText (String text) { int oldBits = OS.GetWindowLong (handle, OS.GWL_STYLE), newBits = oldBits; if (OS.COMCTL32_MAJOR >= 6) { newBits &= ~(OS.BS_LEFT | OS.BS_CENTER | OS.BS_RIGHT); @@ -546,7 +546,7 @@ int bits = OS.GetWindowLong (handle, OS.GWL_STYLE); bool hasImage = (bits & (OS.BS_BITMAP | OS.BS_ICON)) !is 0; if (!hasImage) { - char[] string = enabled ? text : " " ~ text ~ " "; + String string = enabled ? text : " " ~ text ~ " "; TCHAR* buffer = StrToTCHARz (getCodePage (), string); OS.SetWindowText (handle, buffer); } @@ -654,12 +654,12 @@ * * @since 3.3 */ -/*public*/ char[] getMessage () { +/*public*/ String getMessage () { checkWidget (); return message; } -override char[] getNameText () { +override String getNameText () { return getText (); } @@ -698,7 +698,7 @@ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ -public char[] getText () { +public String getText () { checkWidget (); if ((style & DWT.ARROW) !is 0) return ""; return text; @@ -922,7 +922,7 @@ * * @since 3.3 */ -/*public*/ void setMessage (char[] message) { +/*public*/ void setMessage (String message) { checkWidget (); if (message is null) error (DWT.ERROR_NULL_ARGUMENT); this.message = message; @@ -1023,7 +1023,7 @@ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ -public void setText (char[] string) { +public void setText (String string) { checkWidget (); if (string is null) error (DWT.ERROR_NULL_ARGUMENT); if ((style & DWT.ARROW) !is 0) return; @@ -1053,7 +1053,7 @@ return bits | OS.BS_PUSHBUTTON | OS.WS_TABSTOP; } -override char[] windowClass () { +override String windowClass () { return TCHARzToStr( ButtonClass.ptr ); }