diff dwt/widgets/Decorations.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 205350493476
line wrap: on
line diff
--- a/dwt/widgets/Decorations.d	Sun Feb 03 15:48:14 2008 -0800
+++ b/dwt/widgets/Decorations.d	Mon Feb 04 10:05:20 2008 +0100
@@ -113,6 +113,10 @@
 
 public class Decorations : Canvas {
 
+    alias Canvas.setBounds setBounds;
+    alias Canvas.setParent setParent;
+    alias Canvas.setSavedFocus setSavedFocus;
+    alias Canvas.sort sort;
     alias Canvas.windowProc windowProc;
 
     Image image, smallImage, largeImage;
@@ -302,19 +306,19 @@
     return style;
 }
 
-void checkBorder () {
+override void checkBorder () {
     /* Do nothing */
 }
 
-void checkOpened () {
+override void checkOpened () {
     if (!opened) resized = false;
 }
 
-protected void checkSubclass () {
+override protected void checkSubclass () {
     if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS);
 }
 
-override LRESULT callWindowProc (HWND hwnd, int msg, int wParam, int lParam) {
+override override LRESULT callWindowProc (HWND hwnd, int msg, int wParam, int lParam) {
     if (handle is null) return LRESULT.ZERO;
     return cast(LRESULT) OS.DefMDIChildProc (hwnd, msg, wParam, lParam);
 }
@@ -347,15 +351,15 @@
     return value1 < value2 ? -1 : 1;
 }
 
-Control computeTabGroup () {
+override Control computeTabGroup () {
     return this;
 }
 
-Control computeTabRoot () {
+override Control computeTabRoot () {
     return this;
 }
 
-public Rectangle computeTrim (int x, int y, int width, int height) {
+override public Rectangle computeTrim (int x, int y, int width, int height) {
     checkWidget ();
 
     /* Get the size of the trimmings */
@@ -435,7 +439,7 @@
     if (nAccel !is 0) hAccel = OS.CreateAcceleratorTable ( cast(ACCEL*)buffer2.ptr, nAccel);
 }
 
-void createHandle () {
+override void createHandle () {
     super.createHandle ();
     if (parent !is null || ((style & DWT.TOOL) !is 0)) {
         setParent ();
@@ -459,7 +463,7 @@
     }
 }
 
-void createWidget () {
+override void createWidget () {
     super.createWidget ();
     swFlags = OS.IsWinCE ? OS.SW_SHOWMAXIMIZED : OS.SW_SHOWNOACTIVATE;
     hAccel = cast(HACCEL)-1;
@@ -470,7 +474,7 @@
     hAccel = cast(HACCEL)-1;
 }
 
-public void dispose () {
+override public void dispose () {
     if (isDisposed()) return;
     if (!isValidThread ()) error (DWT.ERROR_THREAD_INVALID_ACCESS);
     if (!(cast(Shell)this)) {
@@ -514,7 +518,7 @@
     }
 }
 
-public Rectangle getBounds () {
+override public Rectangle getBounds () {
     checkWidget ();
     if (!OS.IsWinCE) {
         if (OS.IsIconic (handle)) {
@@ -529,7 +533,7 @@
     return super.getBounds ();
 }
 
-public Rectangle getClientArea () {
+override public Rectangle getClientArea () {
     checkWidget ();
     /*
     * Note: The CommandBar is part of the client area,
@@ -658,7 +662,7 @@
     return result;
 }
 
-public Point getLocation () {
+override public Point getLocation () {
     checkWidget ();
     if (!OS.IsWinCE) {
         if (OS.IsIconic (handle)) {
@@ -729,11 +733,11 @@
     return swFlags is OS.SW_SHOWMINNOACTIVE;
 }
 
-char[] getNameText () {
+override char[] getNameText () {
     return getText ();
 }
 
-public Point getSize () {
+override public Point getSize () {
     checkWidget ();
     static if (!OS.IsWinCE) {
         if (OS.IsIconic (handle)) {
@@ -772,7 +776,7 @@
     return TCHARsToStr( buffer );
 }
 
-public bool isReparentable () {
+override public bool isReparentable () {
     checkWidget ();
     /*
     * Feature in Windows.  Calling SetParent() for a shell causes
@@ -783,25 +787,25 @@
     return false;
 }
 
-bool isTabGroup () {
+override bool isTabGroup () {
     /*
     * Can't test WS_TAB bits because they are the same as WS_MAXIMIZEBOX.
     */
     return true;
 }
 
-bool isTabItem () {
+override bool isTabItem () {
     /*
     * Can't test WS_TAB bits because they are the same as WS_MAXIMIZEBOX.
     */
     return false;
 }
 
-Decorations menuShell () {
+override Decorations menuShell () {
     return this;
 }
 
-void releaseChildren (bool destroy) {
+override void releaseChildren (bool destroy) {
     if (menuBar !is null) {
         menuBar.release (false);
         menuBar = null;
@@ -818,7 +822,7 @@
     }
 }
 
-void releaseWidget () {
+override void releaseWidget () {
     super.releaseWidget ();
     if (smallImage !is null) smallImage.dispose ();
     if (largeImage !is null) largeImage.dispose ();
@@ -862,7 +866,7 @@
     }
 }
 
-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) {
     if (OS.IsWinCE) {
         swFlags = OS.SW_RESTORE;
     } else {
@@ -1364,7 +1368,7 @@
     OS.SetWindowText (handle, StrToTCHARz(string));
 }
 
-public void setVisible (bool visible) {
+override public void setVisible (bool visible) {
     checkWidget ();
     if (drawCount !is 0) {
         if (((state & HIDDEN) is 0) is visible) return;
@@ -1464,7 +1468,7 @@
     }
 }
 
-bool translateAccelerator (MSG* msg) {
+override bool translateAccelerator (MSG* msg) {
     if (!isEnabled () || !isActive ()) return false;
     if (menuBar !is null && !menuBar.isEnabled ()) return false;
     if (translateMDIAccelerator (msg) || translateMenuAccelerator (msg)) return true;
@@ -1531,22 +1535,22 @@
     return false;
 }
 
-bool traverseItem (bool next) {
+override bool traverseItem (bool next) {
     return false;
 }
 
-bool traverseReturn () {
+override bool traverseReturn () {
     if (defaultButton is null || defaultButton.isDisposed ()) return false;
     if (!defaultButton.isVisible () || !defaultButton.isEnabled ()) return false;
     defaultButton.click ();
     return true;
 }
 
-CREATESTRUCT* widgetCreateStruct () {
+override CREATESTRUCT* widgetCreateStruct () {
     return new CREATESTRUCT ();
 }
 
-int widgetExtStyle () {
+override int widgetExtStyle () {
     int bits = super.widgetExtStyle () | OS.WS_EX_MDICHILD;
     bits &= ~OS.WS_EX_CLIENTEDGE;
     if ((style & DWT.NO_TRIM) !is 0) return bits;
@@ -1558,12 +1562,12 @@
     return bits;
 }
 
-HWND widgetParent () {
+override HWND widgetParent () {
     Shell shell = getShell ();
     return shell.hwndMDIClient ();
 }
 
-int widgetStyle () {
+override int widgetStyle () {
     /*
     * Clear WS_VISIBLE and WS_TABSTOP.  NOTE: In Windows, WS_TABSTOP
     * has the same value as WS_MAXIMIZEBOX so these bits cannot be
@@ -1610,7 +1614,7 @@
     return super.windowProc (hwnd, msg, wParam, lParam);
 }
 
-LRESULT WM_ACTIVATE (int wParam, int lParam) {
+override LRESULT WM_ACTIVATE (int wParam, int lParam) {
     LRESULT result = super.WM_ACTIVATE (wParam, lParam);
     if (result !is LRESULT.NULL) return result;
     /*
@@ -1671,14 +1675,14 @@
     return result;
 }
 
-LRESULT WM_CLOSE (int wParam, int lParam) {
+override LRESULT WM_CLOSE (int wParam, int lParam) {
     LRESULT result = super.WM_CLOSE (wParam, lParam);
     if (result !is LRESULT.NULL) return result;
     if (isEnabled () && isActive ()) closeWidget ();
     return LRESULT.ZERO;
 }
 
-LRESULT WM_HOTKEY (int wParam, int lParam) {
+override LRESULT WM_HOTKEY (int wParam, int lParam) {
     LRESULT result = super.WM_HOTKEY (wParam, lParam);
     if (result !is LRESULT.NULL) return result;
     static if( OS.IsWinCE ){
@@ -1706,13 +1710,13 @@
     return result;
 }
 
-LRESULT WM_KILLFOCUS (int wParam, int lParam) {
+override LRESULT WM_KILLFOCUS (int wParam, int lParam) {
     LRESULT result = super.WM_KILLFOCUS (wParam, lParam);
     saveFocus ();
     return result;
 }
 
-LRESULT WM_MOVE (int wParam, int lParam) {
+override LRESULT WM_MOVE (int wParam, int lParam) {
     if (moved) {
         Point location = getLocation ();
         if (location.x is oldX && location.y is oldY) {
@@ -1724,7 +1728,7 @@
     return super.WM_MOVE (wParam, lParam);
 }
 
-LRESULT WM_NCACTIVATE (int wParam, int lParam) {
+override LRESULT WM_NCACTIVATE (int wParam, int lParam) {
     LRESULT result = super.WM_NCACTIVATE (wParam, lParam);
     if (result !is LRESULT.NULL) return result;
     if (wParam is 0) {
@@ -1750,7 +1754,7 @@
     return result;
 }
 
-LRESULT WM_QUERYOPEN (int wParam, int lParam) {
+override LRESULT WM_QUERYOPEN (int wParam, int lParam) {
     LRESULT result = super.WM_QUERYOPEN (wParam, lParam);
     if (result !is LRESULT.NULL) return result;
     sendEvent (DWT.Deiconify);
@@ -1758,13 +1762,13 @@
     return result;
 }
 
-LRESULT WM_SETFOCUS (int wParam, int lParam) {
+override LRESULT WM_SETFOCUS (int wParam, int lParam) {
     LRESULT result = super.WM_SETFOCUS (wParam, lParam);
     if (savedFocus !is this) restoreFocus ();
     return result;
 }
 
-LRESULT WM_SIZE (int wParam, int lParam) {
+override LRESULT WM_SIZE (int wParam, int lParam) {
     LRESULT result = LRESULT.NULL;
     bool changed = true;
     if (resized) {
@@ -1798,7 +1802,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;
     if (!(cast(Shell)this)) {
@@ -1817,7 +1821,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;
     if (display.lockActiveWindow) {