Changeset 131:2ea6488981d8

Show
Ignore:
Timestamp:
02/12/08 19:33:29 (1 year ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

Add convinience methods to show MessageBox? as info,warning,error

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dwt/widgets/MessageBox.d

    r130 r131  
    273273 * DWT extension 
    274274 */ 
    275 public static int showMessage(char[] str, char[] title = null, Shell shell = null, int style = DWT.OK | DWT.ICON_WARNING) { 
     275public static int showMessageBox(char[] str, char[] title = null, Shell shell = null, int style = DWT.OK | DWT.ICON_WARNING) { 
    276276    MessageBox msgBox = (shell is null ) ? new MessageBox( style ) : new MessageBox(shell, style); 
    277277    msgBox.setMessage(str); 
     
    283283 
    284284/// DWT extension 
    285 alias showMessage showMsg; 
    286  
    287  
    288 
    289  
     285public static int showInfo(char[] str, char[] title = null, Shell shell = null) { 
     286    return showMessageBox( str, title, shell, DWT.OK | DWT.ICON_INFORMATION ); 
     287
     288/// DWT extension 
     289public static int showWarning(char[] str, char[] title = null, Shell shell = null) { 
     290    return showMessageBox( str, title, shell, DWT.OK | DWT.ICON_WARNING ); 
     291
     292/// DWT extension 
     293public static int showError(char[] str, char[] title = null, Shell shell = null) { 
     294    return showMessageBox( str, title, shell, DWT.OK | DWT.ICON_ERROR ); 
     295
     296 
     297
     298