Mercurial > projects > dwt-win
diff dwt/widgets/MessageBox.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 | 72ef824d4983 |
children | 36f5cb12e1a2 |
line wrap: on
line diff
--- a/dwt/widgets/MessageBox.d Sat Apr 26 10:01:48 2008 +0200 +++ b/dwt/widgets/MessageBox.d Mon May 05 00:12:38 2008 +0200 @@ -19,6 +19,7 @@ import dwt.widgets.Dialog; import dwt.widgets.Shell; import dwt.widgets.Display; +import dwt.dwthelper.utils; /** * Instances of this class are used to inform or warn the user. @@ -41,7 +42,7 @@ * </p> */ public class MessageBox : Dialog { - char[] message = ""; + String message = ""; private bool allowNullParent = false; /** @@ -123,7 +124,7 @@ * * @return the message */ -public char[] getMessage () { +public String getMessage () { return message; } @@ -264,7 +265,7 @@ * <li>ERROR_NULL_ARGUMENT - if the string is null</li> * </ul> */ -public void setMessage (char[] string) { +public void setMessage (String string) { if (string is null) error (DWT.ERROR_NULL_ARGUMENT); message = string; } @@ -272,7 +273,7 @@ /++ + DWT extension +/ -public static int showMessageBox(char[] str, char[] title, Shell shell, int style) { +public static int showMessageBox(String str, String title, Shell shell, int style) { MessageBox msgBox = (shell is null ) ? new MessageBox( style ) : new MessageBox(shell, style); msgBox.setMessage(str); if(title !is null){ @@ -282,18 +283,18 @@ } /// DWT extension -public static int showInfo(char[] str, char[] title = null, Shell shell = null) { +public static int showInfo(String str, String title = null, Shell shell = null) { return showMessageBox( str, title, shell, DWT.OK | DWT.ICON_INFORMATION ); } /// DWT extension alias showInfo showInformation; /// DWT extension -public static int showWarning(char[] str, char[] title = null, Shell shell = null) { +public static int showWarning(String str, String title = null, Shell shell = null) { return showMessageBox( str, title, shell, DWT.OK | DWT.ICON_WARNING ); } /// DWT extension -public static int showError(char[] str, char[] title = null, Shell shell = null) { +public static int showError(String str, String title = null, Shell shell = null) { return showMessageBox( str, title, shell, DWT.OK | DWT.ICON_ERROR ); }