Changeset 238:380bad9f6852 for dwt/widgets/MessageBox.d
- Timestamp:
- 05/04/08 18:42:55 (4 years ago)
- Files:
-
- dwt/widgets/MessageBox.d (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
dwt/widgets/MessageBox.d
r210 r238 12 12 *******************************************************************************/ 13 13 module dwt.widgets.MessageBox; 14 15 import dwt.dwthelper.utils; 14 16 15 17 … … 46 48 public class MessageBox : Dialog { 47 49 48 char[]message = "";50 String message = ""; 49 51 GtkWidget* handle; 50 52 private bool allowNullParent = false; … … 117 119 * @return the message 118 120 */ 119 public char[]getMessage () {121 public String getMessage () { 120 122 return message; 121 123 } … … 132 134 * </ul> 133 135 */ 134 public void setMessage ( char[]string) {136 public void setMessage (String string) { 135 137 if (string is null) error (DWT.ERROR_NULL_ARGUMENT); 136 138 message = string; … … 201 203 } 202 204 203 char[] fixPercent ( char[]string) {205 char[] fixPercent (String string) { 204 206 int i = 0, j = 0; 205 char [] result = new char[]( string.length * 2 );207 char [] result = new String( string.length * 2 ); 206 208 while (i < string.length) { 207 209 switch (string [i]) { … … 220 222 + DWT extension 221 223 +/ 222 public static int showMessageBox( char[] str, char[]title, Shell shell, int style) {224 public static int showMessageBox(String str, String title, Shell shell, int style) { 223 225 MessageBox msgBox = (shell is null ) ? new MessageBox( style ) : new MessageBox(shell, style); 224 226 msgBox.setMessage(str); … … 230 232 231 233 /// DWT extension 232 public static int showInfo( char[] str, char[]title = null, Shell shell = null) {234 public static int showInfo(String str, String title = null, Shell shell = null) { 233 235 return showMessageBox( str, title, shell, DWT.OK | DWT.ICON_INFORMATION ); 234 236 } … … 237 239 238 240 /// DWT extension 239 public static int showWarning( char[] str, char[]title = null, Shell shell = null) {241 public static int showWarning(String str, String title = null, Shell shell = null) { 240 242 return showMessageBox( str, title, shell, DWT.OK | DWT.ICON_WARNING ); 241 243 } 242 244 /// DWT extension 243 public static int showError( char[] str, char[]title = null, Shell shell = null) {245 public static int showError(String str, String title = null, Shell shell = null) { 244 246 return showMessageBox( str, title, shell, DWT.OK | DWT.ICON_ERROR ); 245 247 }
