diff dwt/widgets/Shell.d @ 54:0f25be5cbe6f

Added aliases and overrides from generated file, remaining widgets. Thanks torhu for doing this job.
author Frank Benoit <benoit@tionex.de>
date Mon, 04 Feb 2008 10:05:20 +0100
parents 3052439af4b5
children 3f4e6a4ecc09
line wrap: on
line diff
--- a/dwt/widgets/Shell.d	Sun Feb 03 15:48:14 2008 -0800
+++ b/dwt/widgets/Shell.d	Mon Feb 04 10:05:20 2008 +0100
@@ -126,6 +126,11 @@
  * @see DWT
  */
 public class Shell : Decorations {
+
+    alias Decorations.setBounds setBounds;
+    alias Decorations.setParent setParent;
+    alias Decorations.setToolTipText setToolTipText;
+
     Menu activeMenu;
     ToolTip [] toolTips;
     HIMC hIMC;
@@ -529,7 +534,7 @@
     OS.SetWindowLong (balloonTipHandle_, OS.GWL_WNDPROC, display.windowProc);
 }
 
-void createHandle () {
+override void createHandle () {
     bool embedded = handle !is null && (state & FOREIGN_HANDLE) is 0;
 
     /*
@@ -637,7 +642,7 @@
     OS.SetWindowLong (toolTipHandle_, OS.GWL_WNDPROC, display.windowProc);
 }
 
-void deregister () {
+override void deregister () {
     super.deregister ();
     if (toolTipHandle_ !is null) display.removeControl (toolTipHandle_);
     if (balloonTipHandle_ !is null) display.removeControl (balloonTipHandle_);
@@ -657,12 +662,12 @@
     toolTip.id = -1;
 }
 
-void destroyWidget () {
+override void destroyWidget () {
     fixActiveShell ();
     super.destroyWidget ();
 }
 
-public void dispose () {
+override public void dispose () {
     /*
     * This code is intentionally commented.  On some
     * platforms, the owner window is repainted right
@@ -681,7 +686,7 @@
 //  if (oldDisplay !is null) oldDisplay.update ();
 }
 
-void enableWidget (bool enabled) {
+override void enableWidget (bool enabled) {
     if (enabled) {
         state &= ~DISABLED;
     } else {
@@ -694,7 +699,7 @@
     }
 }
 
-HBRUSH findBrush (int value, int lbStyle) {
+override HBRUSH findBrush (int value, int lbStyle) {
     if (lbStyle is OS.BS_SOLID) {
         for (int i=0; i<SYSTEM_COLORS.length; i++) {
             if (value is OS.GetSysColor (SYSTEM_COLORS [i])) {
@@ -736,15 +741,15 @@
     return brushes [0] = hBrush;
 }
 
-Control findBackgroundControl () {
+override Control findBackgroundControl () {
     return background !is -1 || backgroundImage !is null ? this : null;
 }
 
-Cursor findCursor () {
+override Cursor findCursor () {
     return cursor;
 }
 
-Control findThemeControl () {
+override Control findThemeControl () {
     return null;
 }
 
@@ -834,11 +839,11 @@
     OS.SetForegroundWindow (handle);
 }
 
-void forceResize () {
+override void forceResize () {
     /* Do nothing */
 }
 
-public Rectangle getBounds () {
+override public Rectangle getBounds () {
     checkWidget ();
     if (!OS.IsWinCE) {
         if (OS.IsIconic (handle)) return super.getBounds ();
@@ -874,7 +879,7 @@
     return null;
 }
 
-public bool getEnabled () {
+override public bool getEnabled () {
     checkWidget ();
     return (state & DISABLED) is 0;
 }
@@ -913,7 +918,7 @@
     return result | DWT.ALPHA;
 }
 
-public Point getLocation () {
+override public Point getLocation () {
     checkWidget ();
     static if (!OS.IsWinCE) {
         if (OS.IsIconic (handle)) {
@@ -981,12 +986,12 @@
     return region;
 }
 
-public Shell getShell () {
+override public Shell getShell () {
     checkWidget ();
     return this;
 }
 
-public Point getSize () {
+override public Point getSize () {
     checkWidget ();
     if (!OS.IsWinCE) {
         if (OS.IsIconic (handle)) return super.getSize ();
@@ -1034,16 +1039,16 @@
     return result;
 }
 
-Composite findDeferredControl () {
+override Composite findDeferredControl () {
     return layoutCount > 0 ? this : null;
 }
 
-public bool isEnabled () {
+override public bool isEnabled () {
     checkWidget ();
     return getEnabled ();
 }
 
-public bool isVisible () {
+override public bool isVisible () {
     checkWidget ();
     return getVisible ();
 }
@@ -1125,7 +1130,7 @@
     if (!restoreFocus () && !traverseGroup (true)) setFocus ();
 }
 
-void register () {
+override void register () {
     super.register ();
     if (toolTipHandle_ !is null) display.addControl (toolTipHandle_, this);
     if (balloonTipHandle_ !is null) display.addControl (balloonTipHandle_, this);
@@ -1140,7 +1145,7 @@
     brushes = null;
 }
 
-void releaseChildren (bool destroy) {
+override void releaseChildren (bool destroy) {
     Shell [] shells = getShells ();
     for (int i=0; i<shells.length; i++) {
         Shell shell = shells [i];
@@ -1160,16 +1165,16 @@
     super.releaseChildren (destroy);
 }
 
-void releaseHandle () {
+override void releaseHandle () {
     super.releaseHandle ();
     hwndMDIClient_ = null;
 }
 
-void releaseParent () {
+override void releaseParent () {
     /* Do nothing */
 }
 
-void releaseWidget () {
+override void releaseWidget () {
     super.releaseWidget ();
     releaseBrushes ();
     activeMenu = null;
@@ -1189,7 +1194,7 @@
     lockToolTipControl = null;
 }
 
-void removeMenu (Menu menu) {
+override void removeMenu (Menu menu) {
     super.removeMenu (menu);
     if (menu is activeMenu) activeMenu = null;
 }
@@ -1301,11 +1306,11 @@
     }
 }
 
-void setBounds (int x, int y, int width, int height, int flags, bool defer) {
+override void setBounds (int x, int y, int width, int height, int flags, bool defer) {
     super.setBounds (x, y, width, height, flags, false);
 }
 
-public void setEnabled (bool enabled) {
+override public void setEnabled (bool enabled) {
     checkWidget ();
     if (((state & DISABLED) is 0) is enabled) return;
     super.setEnabled (enabled);
@@ -1439,7 +1444,7 @@
     OS.EnableMenuItem (hMenu, cmd, OS.MF_BYCOMMAND | flags);
 }
 
-void setParent () {
+override void setParent () {
     /* Do nothing.  Not necessary for Shells */
 }
 
@@ -1578,7 +1583,7 @@
     }
 }
 
-public void setVisible (bool visible) {
+override public void setVisible (bool visible) {
     checkWidget ();
     if (drawCount !is 0) {
         if (((state & HIDDEN) is 0) is visible) return;
@@ -1638,7 +1643,7 @@
     }
 }
 
-void subclass () {
+override void subclass () {
     super.subclass ();
     if (ToolTipProc !is null) {
         int newProc = display.windowProc;
@@ -1656,20 +1661,20 @@
     return toolTipHandle_;
 }
 
-bool translateAccelerator (MSG* msg) {
+override bool translateAccelerator (MSG* msg) {
     if (!isEnabled () || !isActive ()) return false;
     if (menuBar !is null && !menuBar.isEnabled ()) return false;
     return translateMDIAccelerator (msg) || translateMenuAccelerator (msg);
 }
 
-bool traverseEscape () {
+override bool traverseEscape () {
     if (parent is null) return false;
     if (!isVisible () || !isEnabled ()) return false;
     close ();
     return true;
 }
 
-void unsubclass () {
+override void unsubclass () {
     super.unsubclass ();
     if (ToolTipProc !is null) {
         if (toolTipHandle_ !is null) {
@@ -1689,16 +1694,16 @@
     }
 }
 
-CREATESTRUCT* widgetCreateStruct () {
+override CREATESTRUCT* widgetCreateStruct () {
     return null;
 }
 
-HWND widgetParent () {
+override HWND widgetParent () {
     if (handle !is null) return handle;
     return parent !is null ? parent.handle : null;
 }
 
-int widgetExtStyle () {
+override int widgetExtStyle () {
     int bits = super.widgetExtStyle () & ~OS.WS_EX_MDICHILD;
     if ((style & DWT.TOOL) !is 0) bits |= OS.WS_EX_TOOLWINDOW;
 
@@ -1741,7 +1746,7 @@
     return bits;
 }
 
-char[] windowClass () {
+override char[] windowClass () {
     static if (OS.IsSP_) return DialogClass;
     if ((style & DWT.TOOL) !is 0) {
         int trim = DWT.TITLE | DWT.CLOSE | DWT.MIN | DWT.MAX | DWT.BORDER | DWT.RESIZE;
@@ -1786,7 +1791,7 @@
     return super.windowProc (hwnd, msg, wParam, lParam);
 }
 
-int widgetStyle () {
+override int widgetStyle () {
     int bits = super.widgetStyle ();
     if (handle !is null) return bits | OS.WS_CHILD;
     bits &= ~OS.WS_CHILD;
@@ -1825,7 +1830,7 @@
     return bits | OS.WS_OVERLAPPED | OS.WS_CAPTION;
 }
 
-LRESULT WM_ACTIVATE (int wParam, int lParam) {
+override LRESULT WM_ACTIVATE (int wParam, int lParam) {
     static if (OS.IsPPC_) {
         /*
         * Note: this does not work when we get WM_ACTIVATE prior
@@ -1873,7 +1878,7 @@
     return parent !is null ? LRESULT.ZERO : result;
 }
 
-LRESULT WM_COMMAND (int wParam, int lParam) {
+override LRESULT WM_COMMAND (int wParam, int lParam) {
     static if (OS.IsPPC_) {
         /*
         * Note in WinCE PPC:  Close the Shell when the "Done Button" has
@@ -1912,7 +1917,7 @@
     return super.WM_COMMAND (wParam, lParam);
 }
 
-LRESULT WM_DESTROY (int wParam, int lParam) {
+override LRESULT WM_DESTROY (int wParam, int lParam) {
     LRESULT result = super.WM_DESTROY (wParam, lParam);
     /*
     * When the shell is a WS_CHILD window of a non-DWT
@@ -1928,7 +1933,7 @@
     return result;
 }
 
-LRESULT WM_ERASEBKGND (int wParam, int lParam) {
+override LRESULT WM_ERASEBKGND (int wParam, int lParam) {
     LRESULT result = super.WM_ERASEBKGND (wParam, lParam);
     if (result !is LRESULT.NULL) return result;
     /*
@@ -1946,7 +1951,7 @@
     return result;
 }
 
-LRESULT WM_ENTERIDLE (int wParam, int lParam) {
+override LRESULT WM_ENTERIDLE (int wParam, int lParam) {
     LRESULT result = super.WM_ENTERIDLE (wParam, lParam);
     if (result !is LRESULT.NULL) return result;
     if (OS.IsWinCE && display.runMessages) {
@@ -1955,7 +1960,7 @@
     return result;
 }
 
-LRESULT WM_GETMINMAXINFO (int wParam, int lParam) {
+override LRESULT WM_GETMINMAXINFO (int wParam, int lParam) {
     LRESULT result = super.WM_GETMINMAXINFO (wParam, lParam);
     if (result !is LRESULT.NULL) return result;
     if (minWidth !is DWT.DEFAULT || minHeight !is DWT.DEFAULT) {
@@ -1969,7 +1974,7 @@
     return result;
 }
 
-LRESULT WM_MOUSEACTIVATE (int wParam, int lParam) {
+override LRESULT WM_MOUSEACTIVATE (int wParam, int lParam) {
     LRESULT result = super.WM_MOUSEACTIVATE (wParam, lParam);
     if (result !is LRESULT.NULL) return result;
 
@@ -2049,7 +2054,7 @@
     return LRESULT.NULL;
 }
 
-LRESULT WM_MOVE (int wParam, int lParam) {
+override LRESULT WM_MOVE (int wParam, int lParam) {
     LRESULT result = super.WM_MOVE (wParam, lParam);
     if (result !is LRESULT.NULL) return result;
     ToolTip tip = getCurrentToolTip ();
@@ -2057,7 +2062,7 @@
     return result;
 }
 
-LRESULT WM_NCACTIVATE (int wParam, int lParam) {
+override LRESULT WM_NCACTIVATE (int wParam, int lParam) {
     Display display = this.display;
     LRESULT result = super.WM_NCACTIVATE (wParam, lParam);
     if (display.isXMouseActive ()) {
@@ -2073,7 +2078,7 @@
     return result;
 }
 
-LRESULT WM_NCHITTEST (int wParam, int lParam) {
+override LRESULT WM_NCHITTEST (int wParam, int lParam) {
     if (!OS.IsWindowEnabled (handle)) return LRESULT.NULL;
     if (!isEnabled () || !isActive ()) {
         if (!Display.TrimEnabled) return cast( LRESULT )(OS.HTNOWHERE);
@@ -2089,7 +2094,7 @@
     return LRESULT.NULL;
 }
 
-LRESULT WM_NCLBUTTONDOWN (int wParam, int lParam) {
+override LRESULT WM_NCLBUTTONDOWN (int wParam, int lParam) {
     LRESULT result = super.WM_NCLBUTTONDOWN (wParam, lParam);
     if (result !is LRESULT.NULL) return result;
     /*
@@ -2117,7 +2122,7 @@
     return cast( LRESULT )(code);
 }
 
-LRESULT WM_PALETTECHANGED (int wParam, int lParam) {
+override LRESULT WM_PALETTECHANGED (int wParam, int lParam) {
     if ( cast(HANDLE)wParam !is handle) {
         auto hPalette = display.hPalette;
         if (hPalette !is null) return selectPalette (hPalette);
@@ -2125,13 +2130,13 @@
     return super.WM_PALETTECHANGED (wParam, lParam);
 }
 
-LRESULT WM_QUERYNEWPALETTE (int wParam, int lParam) {
+override LRESULT WM_QUERYNEWPALETTE (int wParam, int lParam) {
     auto hPalette = display.hPalette;
     if (hPalette !is null) return selectPalette (hPalette);
     return super.WM_QUERYNEWPALETTE (wParam, lParam);
 }
 
-LRESULT WM_SETCURSOR (int wParam, int lParam) {
+override LRESULT WM_SETCURSOR (int wParam, int lParam) {
     /*
     * Feature in Windows.  When the shell is disabled
     * by a Windows standard dialog (like a MessageBox
@@ -2204,7 +2209,7 @@
     return super.WM_SETCURSOR (wParam, lParam);
 }
 
-LRESULT WM_SETTINGCHANGE (int wParam, int lParam) {
+override LRESULT WM_SETTINGCHANGE (int wParam, int lParam) {
     LRESULT result = super.WM_SETTINGCHANGE (wParam, lParam);
     if (result !is LRESULT.NULL) return result;
     static if (OS.IsPPC_) {
@@ -2229,7 +2234,7 @@
     return result;
 }
 
-LRESULT WM_SHOWWINDOW (int wParam, int lParam) {
+override LRESULT WM_SHOWWINDOW (int wParam, int lParam) {
     LRESULT result = super.WM_SHOWWINDOW (wParam, lParam);
     if (result !is LRESULT.NULL) return result;
     /*
@@ -2251,7 +2256,7 @@
     return result;
 }
 
-LRESULT WM_SYSCOMMAND (int wParam, int lParam) {
+override LRESULT WM_SYSCOMMAND (int wParam, int lParam) {
     LRESULT result = super.WM_SYSCOMMAND (wParam, lParam);
     if (result !is LRESULT.NULL) return result;
     /*
@@ -2285,7 +2290,7 @@
     return result;
 }
 
-LRESULT WM_WINDOWPOSCHANGING (int wParam, int lParam) {
+override LRESULT WM_WINDOWPOSCHANGING (int wParam, int lParam) {
     LRESULT result = super.WM_WINDOWPOSCHANGING (wParam,lParam);
     if (result !is LRESULT.NULL) return result;
     auto lpwp = cast(WINDOWPOS*)lParam;