Mercurial > projects > dwt-win
changeset 54:0f25be5cbe6f
Added aliases and overrides from generated file, remaining widgets. Thanks torhu for doing this job.
line wrap: on
line diff
--- a/dwt/widgets/Canvas.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/Canvas.d Mon Feb 04 10:05:20 2008 +0100 @@ -125,7 +125,7 @@ return caret; } -void releaseChildren (bool destroy) { +override void releaseChildren (bool destroy) { if (caret !is null) { caret.release (false); caret = null; @@ -288,7 +288,7 @@ } } -public void setFont (Font font) { +override public void setFont (Font font) { checkWidget (); if (caret !is null) caret.setFont (font); super.setFont (font); @@ -307,7 +307,7 @@ return super.windowProc (hwnd, msg, wParam, lParam); } -LRESULT WM_IME_COMPOSITION (int wParam, int lParam) { +override LRESULT WM_IME_COMPOSITION (int wParam, int lParam) { LRESULT result = super.WM_IME_COMPOSITION (wParam, lParam); /* * Bug in Windows. On Korean Windows XP, the IME window @@ -340,7 +340,7 @@ return result; } -LRESULT WM_INPUTLANGCHANGE (int wParam, int lParam) { +override LRESULT WM_INPUTLANGCHANGE (int wParam, int lParam) { LRESULT result = super.WM_INPUTLANGCHANGE (wParam, lParam); if (caret !is null && caret.isFocusCaret ()) { caret.setIMEFont (); @@ -349,25 +349,25 @@ return result; } -LRESULT WM_KILLFOCUS (int wParam, int lParam) { +override LRESULT WM_KILLFOCUS (int wParam, int lParam) { LRESULT result = super.WM_KILLFOCUS (wParam, lParam); if (caret !is null) caret.killFocus (); 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 (caret !is null) caret.setFocus (); return result; } -LRESULT WM_SIZE (int wParam, int lParam) { +override LRESULT WM_SIZE (int wParam, int lParam) { LRESULT result = super.WM_SIZE (wParam, lParam); if (caret !is null && caret.isFocusCaret ()) caret.resizeIME (); return result; } -LRESULT WM_WINDOWPOSCHANGED (int wParam, int lParam) { +override LRESULT WM_WINDOWPOSCHANGED (int wParam, int lParam) { LRESULT result = super.WM_WINDOWPOSCHANGED (wParam, lParam); if (result !is LRESULT.NULL) return result; /* @@ -382,7 +382,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; /*
--- a/dwt/widgets/Caret.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/Caret.d Mon Feb 04 10:05:20 2008 +0100 @@ -290,12 +290,12 @@ OS.ImmReleaseContext (hwnd, hIMC); } -void releaseParent () { +override void releaseParent () { super.releaseParent (); if (this is parent.getCaret ()) parent.setCaret (null); } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); parent = null; image = null;
--- a/dwt/widgets/Combo.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/Combo.d Mon Feb 04 10:05:20 2008 +0100 @@ -70,7 +70,12 @@ public class Combo : Composite { + alias Composite.computeSize computeSize; + alias Composite.dragDetect dragDetect; alias Composite.sendKeyEvent sendKeyEvent; + alias Composite.setBackgroundImage setBackgroundImage; + alias Composite.setBounds setBounds; + alias Composite.setToolTipText setToolTipText; alias extern(Windows) int function( HWND, uint, uint, int ) TWindowProc; private static Combo pThis; @@ -336,11 +341,11 @@ return OS.CallNextHookEx (cbtHook, nCode, wParam, lParam); } -bool checkHandle (HWND hwnd) { +override bool checkHandle (HWND hwnd) { return hwnd is handle || hwnd is OS.GetDlgItem (handle, CBID_EDIT) || hwnd is OS.GetDlgItem (handle, CBID_LIST); } -protected void checkSubclass () { +override protected void checkSubclass () { if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); } @@ -394,7 +399,7 @@ OS.SendMessage (handle, OS.CB_SETEDITSEL, 0, -1); } -public Point computeSize (int wHint, int hHint, bool changed) { +override public Point computeSize (int wHint, int hHint, bool changed) { checkWidget (); int width = 0, height = 0; if (wHint is DWT.DEFAULT) { @@ -491,7 +496,7 @@ OS.SendMessage (handle, OS.WM_COPY, 0, 0); } -void createHandle () { +override void createHandle () { /* * Feature in Windows. When the selection changes in a combo box, * Windows draws the selection, even when the combo box does not @@ -562,11 +567,11 @@ OS.SendMessage (handle, OS.WM_CUT, 0, 0); } -int defaultBackground () { +override int defaultBackground () { return OS.GetSysColor (OS.COLOR_WINDOW); } -void deregister () { +override void deregister () { super.deregister (); auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); if (hwndText !is null) display.removeControl (hwndText); @@ -616,7 +621,7 @@ // widget could be disposed at this point } -bool dragDetect (HWND hwnd, int x, int y, bool filter, bool [] detect, bool [] consume) { +override bool dragDetect (HWND hwnd, int x, int y, bool filter, bool [] detect, bool [] consume) { if (filter && (style & DWT.READ_ONLY) is 0) { auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); if (hwndText !is null) { @@ -754,7 +759,7 @@ return true; } -char[] getNameText () { +override char[] getNameText () { return getText (); } @@ -912,7 +917,7 @@ return visibleCount; } -bool hasFocus () { +override bool hasFocus () { auto hwndFocus = OS.GetFocus (); if (hwndFocus is handle) return true; if (hwndFocus is null) return false; @@ -1027,7 +1032,7 @@ OS.SendMessage (handle, OS.WM_PASTE, 0, 0); } -void register () { +override void register () { super.register (); auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); if (hwndText !is null) display.addControl (hwndText, this); @@ -1286,7 +1291,7 @@ eventTable.unhook (DWT.Verify, listener); } -bool sendKeyEvent (int type, int msg, int wParam, int lParam, Event event) { +override bool sendKeyEvent (int type, int msg, int wParam, int lParam, Event event) { if (!super.sendKeyEvent (type, msg, wParam, lParam, event)) { return false; } @@ -1396,7 +1401,7 @@ } } -void setBackgroundImage (HBITMAP hBitmap) { +override void setBackgroundImage (HBITMAP hBitmap) { super.setBackgroundImage (hBitmap); auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); if (hwndText !is null) OS.InvalidateRect (hwndText, null, true); @@ -1404,7 +1409,7 @@ if (hwndList !is null) OS.InvalidateRect (hwndList, null, true); } -void setBackgroundPixel (int pixel) { +override void setBackgroundPixel (int pixel) { super.setBackgroundPixel (pixel); auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); if (hwndText !is null) OS.InvalidateRect (hwndText, null, true); @@ -1412,7 +1417,7 @@ if (hwndList !is null) OS.InvalidateRect (hwndList, null, true); } -void setBounds (int x, int y, int width, int height, int flags) { +override void setBounds (int x, int y, int width, int height, int flags) { /* * Feature in Windows. If the combo box has the CBS_DROPDOWN * or CBS_DROPDOWNLIST style, Windows uses the height that the @@ -1459,13 +1464,13 @@ } } -public void setFont (Font font) { +override public void setFont (Font font) { checkWidget (); super.setFont (font); if ((style & DWT.H_SCROLL) !is 0) setScrollWidth (); } -void setForegroundPixel (int pixel) { +override void setForegroundPixel (int pixel) { super.setForegroundPixel (pixel); auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); if (hwndText !is null) OS.InvalidateRect (hwndText, null, true); @@ -1834,7 +1839,7 @@ OS.SendMessage (handle, OS.CB_LIMITTEXT, limit, 0); } -void setToolTipText (Shell shell, char[] string) { +override void setToolTipText (Shell shell, char[] string) { auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); auto hwndList = OS.GetDlgItem (handle, CBID_LIST); if (hwndText !is null) shell.setToolTipText (hwndText, string); @@ -1872,7 +1877,7 @@ } } -void subclass () { +override void subclass () { super.subclass (); auto newProc = display.windowProc; auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); @@ -1885,7 +1890,7 @@ } } -bool translateTraversal (MSG* msg) { +override bool translateTraversal (MSG* msg) { /* * When the combo box is dropped down, allow return * to select an item in the list and escape to close @@ -1903,7 +1908,7 @@ return super.translateTraversal (msg); } -bool traverseEscape () { +override bool traverseEscape () { if ((style & DWT.DROP_DOWN) !is 0) { if (OS.SendMessage (handle, OS.CB_GETDROPPEDSTATE, 0, 0) !is 0) { OS.SendMessage (handle, OS.CB_SHOWDROPDOWN, 0, 0); @@ -1913,7 +1918,7 @@ return super.traverseEscape (); } -bool traverseReturn () { +override bool traverseReturn () { if ((style & DWT.DROP_DOWN) !is 0) { if (OS.SendMessage (handle, OS.CB_GETDROPPEDSTATE, 0, 0) !is 0) { OS.SendMessage (handle, OS.CB_SHOWDROPDOWN, 0, 0); @@ -1923,7 +1928,7 @@ return super.traverseReturn (); } -void unsubclass () { +override void unsubclass () { super.unsubclass (); auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); if (hwndText !is null && EditProc !is null) { @@ -1978,22 +1983,22 @@ return mbcsPos; } -int widgetExtStyle () { +override int widgetExtStyle () { return super.widgetExtStyle () & ~OS.WS_EX_NOINHERITLAYOUT; } -int widgetStyle () { +override int widgetStyle () { int bits = super.widgetStyle () | OS.CBS_AUTOHSCROLL | OS.CBS_NOINTEGRALHEIGHT | OS.WS_HSCROLL |OS.WS_VSCROLL; if ((style & DWT.SIMPLE) !is 0) return bits | OS.CBS_SIMPLE; if ((style & DWT.READ_ONLY) !is 0) return bits | OS.CBS_DROPDOWNLIST; return bits | OS.CBS_DROPDOWN; } -char[] windowClass () { +override char[] windowClass () { return TCHARzToStr( ComboClass ); } -int windowProc () { +override int windowProc () { return cast(int) ComboProc; } @@ -2084,16 +2089,16 @@ return super.windowProc (hwnd, msg, wParam, lParam); } -LRESULT WM_CTLCOLOR (int wParam, int lParam) { +override LRESULT WM_CTLCOLOR (int wParam, int lParam) { return wmColorChild (wParam, lParam); } -LRESULT WM_GETDLGCODE (int wParam, int lParam) { +override LRESULT WM_GETDLGCODE (int wParam, int lParam) { int code = callWindowProc (handle, OS.WM_GETDLGCODE, wParam, lParam); return cast( LRESULT )(code | OS.DLGC_WANTARROWS); } -LRESULT WM_KILLFOCUS (int wParam, int lParam) { +override LRESULT WM_KILLFOCUS (int wParam, int lParam) { /* * Bug in Windows. When a combo box that is read only * is disposed in CBN_KILLFOCUS, Windows segment faults. @@ -2113,7 +2118,7 @@ return LRESULT.NULL; } -LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { +override LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { /* * Feature in Windows. When an editable combo box is dropped * down and the text in the entry field partially matches an @@ -2136,7 +2141,7 @@ return result; } -LRESULT WM_SETFOCUS (int wParam, int lParam) { +override LRESULT WM_SETFOCUS (int wParam, int lParam) { /* * Return NULL - Focus notification is * done by WM_COMMAND with CBN_SETFOCUS. @@ -2144,7 +2149,7 @@ return LRESULT.NULL; } -LRESULT WM_SIZE (int wParam, int lParam) { +override LRESULT WM_SIZE (int wParam, int lParam) { /* * Bug in Windows. If the combo box has the CBS_SIMPLE style, * the list portion of the combo box is not redrawn when the @@ -2218,7 +2223,7 @@ return result; } -LRESULT wmChar (HWND hwnd, int wParam, int lParam) { +override LRESULT wmChar (HWND hwnd, int wParam, int lParam) { if (ignoreCharacter) return LRESULT.NULL; LRESULT result = super.wmChar (hwnd, wParam, lParam); if (result !is LRESULT.NULL) return result; @@ -2324,7 +2329,7 @@ return LRESULT.NULL; } -LRESULT wmCommandChild (int wParam, int lParam) { +override LRESULT wmCommandChild (int wParam, int lParam) { int code = wParam >> 16; switch (code) { case OS.CBN_EDITCHANGE: @@ -2389,7 +2394,7 @@ return super.wmCommandChild (wParam, lParam); } -LRESULT wmIMEChar (HWND hwnd, int wParam, int lParam) { +override LRESULT wmIMEChar (HWND hwnd, int wParam, int lParam) { /* Process a DBCS character */ Display display = this.display; @@ -2423,7 +2428,7 @@ return cast( LRESULT )(result); } -LRESULT wmKeyDown (HWND hwnd, int wParam, int lParam) { +override LRESULT wmKeyDown (HWND hwnd, int wParam, int lParam) { if (ignoreCharacter) return LRESULT.NULL; LRESULT result = super.wmKeyDown (hwnd, wParam, lParam); if (result !is LRESULT.NULL) return result; @@ -2438,7 +2443,7 @@ return result; } -LRESULT wmSysKeyDown (HWND hwnd, int wParam, int lParam) { +override LRESULT wmSysKeyDown (HWND hwnd, int wParam, int lParam) { /* * Feature in Windows. When an editable combo box is dropped * down using Alt+Down and the text in the entry field partially
--- a/dwt/widgets/Composite.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/Composite.d Mon Feb 04 10:05:20 2008 +0100 @@ -66,6 +66,10 @@ */ public class Composite : Scrollable { + + alias Scrollable.computeSize computeSize; + alias Scrollable.translateMnemonic translateMnemonic; + Layout layout_; HFONT font; WINDOWPOS* [] lpwp; @@ -201,17 +205,17 @@ } } -void checkBuffered () { +override void checkBuffered () { if (OS.IsWinCE || (state & CANVAS) is 0) { super.checkBuffered (); } } -protected void checkSubclass () { +override protected void checkSubclass () { /* Do nothing - Subclassing is allowed */ } -Control [] computeTabList () { +override Control [] computeTabList () { Control result [] = super.computeTabList (); if (result.length is 0) return result; Control [] list = tabList !is null ? _getTabList () : _getChildren (); @@ -228,7 +232,7 @@ return result; } -public Point computeSize (int wHint, int hHint, bool changed) { +override public Point computeSize (int wHint, int hHint, bool changed) { checkWidget (); Point size; if (layout_ !is null) { @@ -250,7 +254,7 @@ return new Point (trim.width, trim.height); } -void createHandle () { +override void createHandle () { super.createHandle (); state |= CANVAS; if ((style & (DWT.H_SCROLL | DWT.V_SCROLL)) is 0) { @@ -262,7 +266,7 @@ return layoutCount > 0 ? this : parent.findDeferredControl (); } -Menu [] findMenus (Control control) { +override Menu [] findMenus (Control control) { if (control is this) return new Menu [0]; Menu result [] = super.findMenus (control); Control [] children = _getChildren (); @@ -279,7 +283,7 @@ return result; } -void fixChildren (Shell newShell, Shell oldShell, Decorations newDecorations, Decorations oldDecorations, Menu [] menus) { +override void fixChildren (Shell newShell, Shell oldShell, Decorations newDecorations, Decorations oldDecorations, Menu [] menus) { super.fixChildren (newShell, oldShell, newDecorations, oldDecorations, menus); Control [] children = _getChildren (); for (int i=0; i<children.length; i++) { @@ -640,7 +644,7 @@ } } -void markLayout (bool changed, bool all) { +override void markLayout (bool changed, bool all) { if (layout_ !is null) { state |= LAYOUT_NEEDED; if (changed) state |= LAYOUT_CHANGED; @@ -664,7 +668,7 @@ return new Point (width, height); } -bool redrawChildren () { +override bool redrawChildren () { if (!super.redrawChildren ()) return false; Control [] children = _getChildren (); for (int i=0; i<children.length; i++) { @@ -673,7 +677,7 @@ return true; } -void releaseChildren (bool destroy) { +override void releaseChildren (bool destroy) { Control [] children = _getChildren (); for (int i=0; i<children.length; i++) { Control child = children [i]; @@ -684,7 +688,7 @@ super.releaseChildren (destroy); } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); if ((state & CANVAS) !is 0 && (style & DWT.EMBEDDED) !is 0) { auto hwndChild = OS.GetWindow (handle, OS.GW_CHILD); @@ -807,7 +811,7 @@ } } -bool setFixedFocus () { +override bool setFixedFocus () { checkWidget (); Control [] children = _getChildren (); for (int i=0; i<children.length; i++) { @@ -821,7 +825,7 @@ return super.setFixedFocus (); } -public bool setFocus () { +override public bool setFocus () { checkWidget (); Control [] children = _getChildren (); for (int i=0; i<children.length; i++) { @@ -926,7 +930,7 @@ } } -bool setTabGroupFocus () { +override bool setTabGroupFocus () { if (isTabItem ()) return setTabItemFocus (); bool takeFocus = (style & DWT.NO_FOCUS) is 0; if ((state & CANVAS) !is 0) { @@ -963,7 +967,7 @@ return control !is null ? control.toolTipText_ : null; } -bool translateMnemonic (Event event, Control control) { +override bool translateMnemonic (Event event, Control control) { if (super.translateMnemonic (event, control)) return true; if (control !is null) { Control [] children = _getChildren (); @@ -975,7 +979,7 @@ return false; } -bool translateTraversal (MSG* msg) { +override bool translateTraversal (MSG* msg) { if ((state & CANVAS) !is 0 ) { if ((style & DWT.EMBEDDED) !is 0) return false; switch (msg.wParam) { @@ -992,7 +996,7 @@ return super.translateTraversal (msg); } -void updateBackgroundColor () { +override void updateBackgroundColor () { super.updateBackgroundColor (); Control [] children = _getChildren (); for (int i=0; i<children.length; i++) { @@ -1002,7 +1006,7 @@ } } -void updateBackgroundImage () { +override void updateBackgroundImage () { super.updateBackgroundImage (); Control [] children = _getChildren (); for (int i=0; i<children.length; i++) { @@ -1012,7 +1016,7 @@ } } -void updateBackgroundMode () { +override void updateBackgroundMode () { super.updateBackgroundMode (); Control [] children = _getChildren (); for (int i = 0; i < children.length; i++) { @@ -1020,7 +1024,7 @@ } } -void updateFont (Font oldFont, Font newFont) { +override void updateFont (Font oldFont, Font newFont) { super.updateFont (oldFont, newFont); Control [] children = _getChildren (); for (int i=0; i<children.length; i++) { @@ -1031,7 +1035,7 @@ } } -void updateLayout (bool resize, bool all) { +override void updateLayout (bool resize, bool all) { Composite parent = findDeferredControl (); if (parent !is null) { parent.state |= LAYOUT_CHILD; @@ -1053,12 +1057,12 @@ } } -int widgetStyle () { +override int widgetStyle () { /* Force clipping of children by setting WS_CLIPCHILDREN */ return super.widgetStyle () | OS.WS_CLIPCHILDREN; } -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; if ((state & CANVAS) !is 0) { @@ -1068,7 +1072,7 @@ return result; } -LRESULT WM_GETDLGCODE (int wParam, int lParam) { +override LRESULT WM_GETDLGCODE (int wParam, int lParam) { LRESULT result = super.WM_GETDLGCODE (wParam, lParam); if (result !is LRESULT.NULL) return result; if ((state & CANVAS) !is 0) { @@ -1083,7 +1087,7 @@ return result; } -LRESULT WM_GETFONT (int wParam, int lParam) { +override LRESULT WM_GETFONT (int wParam, int lParam) { LRESULT result = super.WM_GETFONT (wParam, lParam); if (result !is LRESULT.NULL) return result; int code = callWindowProc (handle, OS.WM_GETFONT, wParam, lParam); @@ -1092,7 +1096,7 @@ return cast( LRESULT )(font); } -LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { +override LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam); if (result is LRESULT.ZERO) return result; @@ -1105,7 +1109,7 @@ return result; } -LRESULT WM_NCPAINT (int wParam, int lParam) { +override LRESULT WM_NCPAINT (int wParam, int lParam) { LRESULT result = super.WM_NCPAINT (wParam, lParam); if (result !is LRESULT.NULL) return result; if ((state & CANVAS) !is 0) { @@ -1114,7 +1118,7 @@ return result; } -LRESULT WM_PARENTNOTIFY (int wParam, int lParam) { +override LRESULT WM_PARENTNOTIFY (int wParam, int lParam) { if ((state & CANVAS) !is 0 && (style & DWT.EMBEDDED) !is 0) { if ((wParam & 0xFFFF) is OS.WM_CREATE) { RECT rect; @@ -1125,7 +1129,7 @@ return super.WM_PARENTNOTIFY (wParam, lParam); } -LRESULT WM_PAINT (int wParam, int lParam) { +override LRESULT WM_PAINT (int wParam, int lParam) { if ((state & CANVAS) is 0 || (state & FOREIGN_HANDLE) !is 0) { return super.WM_PAINT (wParam, lParam); } @@ -1328,7 +1332,7 @@ return LRESULT.ZERO; } -LRESULT WM_PRINTCLIENT (int wParam, int lParam) { +override LRESULT WM_PRINTCLIENT (int wParam, int lParam) { LRESULT result = super.WM_PRINTCLIENT (wParam, lParam); if (result !is LRESULT.NULL) return result; if ((state & CANVAS) !is 0) { @@ -1364,13 +1368,13 @@ return result; } -LRESULT WM_SETFONT (int wParam, int lParam) { +override LRESULT WM_SETFONT (int wParam, int lParam) { if (lParam !is 0) OS.InvalidateRect (handle, null, true); font = cast(HFONT)wParam; return super.WM_SETFONT (wParam, lParam); } -LRESULT WM_SIZE (int wParam, int lParam) { +override LRESULT WM_SIZE (int wParam, int lParam) { /* Begin deferred window positioning */ setResizeChildren (false); @@ -1414,7 +1418,7 @@ return result; } -LRESULT WM_SYSCOLORCHANGE (int wParam, int lParam) { +override LRESULT WM_SYSCOLORCHANGE (int wParam, int lParam) { LRESULT result = super.WM_SYSCOLORCHANGE (wParam, lParam); if (result !is LRESULT.NULL) return result; auto hwndChild = OS.GetWindow (handle, OS.GW_CHILD); @@ -1425,7 +1429,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; @@ -1463,7 +1467,7 @@ return result; } -LRESULT WM_UPDATEUISTATE (int wParam, int lParam) { +override LRESULT WM_UPDATEUISTATE (int wParam, int lParam) { LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam); if (result !is LRESULT.NULL) return result; if ((state & CANVAS) !is 0) OS.InvalidateRect (handle, null, false); @@ -1495,7 +1499,7 @@ return LRESULT.NULL; } -LRESULT wmNotify (NMHDR* hdr, int wParam, int lParam) { +override LRESULT wmNotify (NMHDR* hdr, int wParam, int lParam) { if (!OS.IsWinCE) { switch (hdr.code) { /*
--- a/dwt/widgets/Control.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/Control.d Mon Feb 04 10:05:20 2008 +0100 @@ -685,7 +685,7 @@ display.removeControl (handle); } -void destroyWidget () { +override void destroyWidget () { auto hwnd = topHandle (); releaseHandle (); if (hwnd !is null) { @@ -1317,7 +1317,7 @@ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ -public Menu getMenu () { +override public Menu getMenu () { checkWidget (); return menu; } @@ -1744,7 +1744,7 @@ return getVisible () && parent.isVisible (); } -void mapEvent (HWND hwnd, Event event) { +override void mapEvent (HWND hwnd, Event event) { if (hwnd !is handle) { POINT point; point.x = event.x; @@ -1882,7 +1882,7 @@ return Accessible.internal_new_Accessible (this); } -GC new_GC (GCData data) { +override GC new_GC (GCData data) { return GC.win32_new (this, data); } @@ -2032,17 +2032,17 @@ display.addControl (handle, this); } -void releaseHandle () { +override void releaseHandle () { super.releaseHandle (); handle = null; parent = null; } -void releaseParent () { +override void releaseParent () { parent.removeControl (this); } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); if (OS.IsDBLocale) { OS.ImmAssociateContext (handle, null); @@ -2374,7 +2374,7 @@ if (handle !is topHandle_) OS.ShowWindow (handle, visible ? OS.SW_SHOW : OS.SW_HIDE); } -bool sendFocusEvent (int type) { +override bool sendFocusEvent (int type) { Shell shell = getShell (); /*
--- a/dwt/widgets/CoolBar.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/CoolBar.d Mon Feb 04 10:05:20 2008 +0100 @@ -54,6 +54,9 @@ public class CoolBar : Composite { + alias Composite.computeSize computeSize; + alias Composite.windowProc windowProc; + CoolItem [] items; CoolItem [] originalItems; bool locked; @@ -124,7 +127,7 @@ } } -LRESULT callWindowProc (HWND hwnd, int msg, int wParam, int lParam) { +override LRESULT callWindowProc (HWND hwnd, int msg, int wParam, int lParam) { if (handle is null) return LRESULT.NULL; return cast(LRESULT) OS.CallWindowProc (ReBarProc, hwnd, msg, wParam, lParam); } @@ -141,11 +144,11 @@ return style & ~(DWT.H_SCROLL | DWT.V_SCROLL); } -protected void checkSubclass () { +override protected void checkSubclass () { if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); } -public Point computeSize (int wHint, int hHint, bool changed) { +override public Point computeSize (int wHint, int hHint, bool changed) { checkWidget (); int width = 0, height = 0; int border = getBorderWidth (); @@ -214,7 +217,7 @@ return new Point (width, height); } -void createHandle () { +override void createHandle () { super.createHandle (); state &= ~(CANVAS | THEME_BACKGROUND); @@ -302,7 +305,7 @@ originalItems = newOriginals; } -void createWidget () { +override void createWidget () { super.createWidget (); items = new CoolItem [4]; originalItems = new CoolItem [0]; @@ -374,7 +377,7 @@ originalItems = newOriginals; } -void drawThemeBackground (HDC hDC, HWND hwnd, RECT* rect) { +override void drawThemeBackground (HDC hDC, HWND hwnd, RECT* rect) { if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) { if (background is -1 && (style & DWT.FLAT) !is 0) { Control control = findBackgroundControl (); @@ -393,7 +396,7 @@ OS.SetWindowOrgEx (hDC, lpPoint.x, lpPoint.y, null); } -Control findThemeControl () { +override Control findThemeControl () { if ((style & DWT.FLAT) !is 0) return this; return background is -1 && backgroundImage is null ? this : super.findThemeControl (); } @@ -710,7 +713,7 @@ OS.SendMessage (handle, OS.RB_SETBANDINFO, index, &rbBand); } -void releaseChildren (bool destroy) { +override void releaseChildren (bool destroy) { if (items !is null) { for (int i=0; i<items.length; i++) { CoolItem item = items [i]; @@ -723,7 +726,7 @@ super.releaseChildren (destroy); } -void removeControl (Control control) { +override void removeControl (Control control) { super.removeControl (control); for (int i=0; i<items.length; i++) { CoolItem item = items [i]; @@ -733,7 +736,7 @@ } } -void setBackgroundPixel (int pixel) { +override void setBackgroundPixel (int pixel) { if (pixel is -1) pixel = defaultBackground (); OS.SendMessage (handle, OS.RB_SETBKCOLOR, 0, pixel); setItemColors (OS.SendMessage (handle, OS.RB_GETTEXTCOLOR, 0, 0), pixel); @@ -752,7 +755,7 @@ } } -void setForegroundPixel (int pixel) { +override void setForegroundPixel (int pixel) { if (pixel is -1) pixel = defaultForeground (); OS.SendMessage (handle, OS.RB_SETTEXTCOLOR, 0, pixel); setItemColors (pixel, OS.SendMessage (handle, OS.RB_GETBKCOLOR, 0, 0)); @@ -977,22 +980,22 @@ setRedraw (true); } -int widgetStyle () { +override int widgetStyle () { int bits = super.widgetStyle () | OS.CCS_NODIVIDER | OS.CCS_NORESIZE; bits |= OS.RBS_VARHEIGHT | OS.RBS_DBLCLKTOGGLE; if ((style & DWT.FLAT) is 0) bits |= OS.RBS_BANDBORDERS; return bits; } -char[] windowClass () { +override char[] windowClass () { return TCHARzToStr( ReBarClass ); } -int windowProc () { +override int windowProc () { return cast(int) ReBarProc; } -LRESULT WM_COMMAND (int wParam, int lParam) { +override LRESULT WM_COMMAND (int wParam, int lParam) { /* * Feature in Windows. When the coolbar window * proc processes WM_COMMAND, it forwards this @@ -1016,7 +1019,7 @@ return LRESULT.ZERO; } -LRESULT WM_ERASEBKGND (int wParam, int lParam) { +override LRESULT WM_ERASEBKGND (int wParam, int lParam) { LRESULT result = super.WM_ERASEBKGND (wParam, lParam); /* * Feature in Windows. For some reason, Windows @@ -1038,7 +1041,7 @@ return result; } -LRESULT WM_NOTIFY (int wParam, int lParam) { +override LRESULT WM_NOTIFY (int wParam, int lParam) { /* * Feature in Windows. When the cool bar window * proc processes WM_NOTIFY, it forwards this @@ -1062,7 +1065,7 @@ return LRESULT.ZERO; } -LRESULT WM_SETREDRAW (int wParam, int lParam) { +override LRESULT WM_SETREDRAW (int wParam, int lParam) { LRESULT result = super.WM_SETREDRAW (wParam, lParam); if (result !is LRESULT.NULL) return result; /* @@ -1094,7 +1097,7 @@ return cast( LRESULT )(code); } -LRESULT WM_SIZE (int wParam, int lParam) { +override LRESULT WM_SIZE (int wParam, int lParam) { if (ignoreResize) { int code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam); if (code is 0) return LRESULT.ZERO; @@ -1109,7 +1112,7 @@ return super.WM_SIZE (wParam, lParam); } -LRESULT wmNotifyChild (NMHDR* hdr, int wParam, int lParam) { +override LRESULT wmNotifyChild (NMHDR* hdr, int wParam, int lParam) { switch (hdr.code) { case OS.RBN_BEGINDRAG: { int pos = OS.GetMessagePos ();
--- a/dwt/widgets/CoolItem.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/CoolItem.d Mon Feb 04 10:05:20 2008 +0100 @@ -161,7 +161,7 @@ addListener (DWT.DefaultSelection,typedListener); } -protected void checkSubclass () { +override protected void checkSubclass () { if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); } @@ -207,7 +207,7 @@ return new Point (width, height); } -void destroyWidget () { +override void destroyWidget () { parent.destroyItem (this); releaseHandle (); } @@ -305,7 +305,7 @@ return parent; } -void releaseHandle () { +override void releaseHandle () { super.releaseHandle (); parent = null; id = -1;
--- a/dwt/widgets/DateTime.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/DateTime.d Mon Feb 04 10:05:20 2008 +0100 @@ -59,6 +59,10 @@ */ public class DateTime extends Composite { + + alias Composite.computeSize computeSize; + alias Composite.windowProc windowProc; + static final int DateTimeProc; static final TCHAR DateTimeClass = new TCHAR (0, OS.DATETIMEPICK_CLASS, true); static final int CalendarProc; @@ -165,7 +169,7 @@ addListener (DWT.DefaultSelection, typedListener); } -int callWindowProc (int hwnd, int msg, int wParam, int lParam) { +override int callWindowProc (int hwnd, int msg, int wParam, int lParam) { if (handle is 0) return 0; return OS.CallWindowProc (windowProc (), hwnd, msg, wParam, lParam); } @@ -183,11 +187,11 @@ return checkBits (style, DWT.MEDIUM, DWT.SHORT, DWT.LONG, 0, 0, 0); } -protected void checkSubclass () { +override protected void checkSubclass () { if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); } -public Point computeSize (int wHint, int hHint, bool changed) { +override public Point computeSize (int wHint, int hHint, bool changed) { checkWidget (); int width = 0, height = 0; if (wHint is DWT.DEFAULT || hHint is DWT.DEFAULT) { @@ -340,12 +344,12 @@ return new Point (width, height); } -void createHandle () { +override void createHandle () { super.createHandle (); state &= ~(CANVAS | THEME_BACKGROUND); } -int defaultBackground () { +override int defaultBackground () { return OS.GetSysColor (OS.COLOR_WINDOW); } @@ -552,7 +556,7 @@ return systime.wMonth - 1; } -String getNameText () { +override String getNameText () { return "DateTime"; } @@ -761,7 +765,7 @@ OS.SendMessage (handle, msg, 0, systime); } -int widgetStyle () { +override int widgetStyle () { int bits = super.widgetStyle () | OS.WS_TABSTOP; if ((style & DWT.CALENDAR) !is 0) return bits | OS.MCS_NOTODAY; /* @@ -775,15 +779,15 @@ return bits; } -TCHAR windowClass () { +override TCHAR windowClass () { return (style & DWT.CALENDAR) !is 0 ? CalendarClass : DateTimeClass; } -int windowProc () { +override int windowProc () { return (style & DWT.CALENDAR) !is 0 ? CalendarProc : DateTimeProc; } -LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) { +override LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) { switch (hdr.code) { case OS.MCN_SELCHANGE: //SENT WHEN YOU SET IT? case OS.DTN_DATETIMECHANGE:
--- 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) {
--- a/dwt/widgets/Display.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/Display.d Mon Feb 04 10:05:20 2008 +0100 @@ -747,7 +747,7 @@ //if (!isValidClass (getClass ())) error (DWT.ERROR_INVALID_SUBCLASS); } -protected void checkDevice () { +override protected void checkDevice () { if (thread is null) error (DWT.ERROR_WIDGET_DISPOSED); if (thread !is Thread.getThis ()) error (DWT.ERROR_THREAD_INVALID_ACCESS); if (isDisposed ()) error (DWT.ERROR_DEVICE_DISPOSED); @@ -816,7 +816,7 @@ * * @see #init */ -protected void create (DeviceData data) { +override protected void create (DeviceData data) { checkSubclass (); checkDisplay (thread = Thread.getThis (), true); createDisplay (data); @@ -1142,7 +1142,7 @@ * @see Device#dispose * @see #release */ -protected void destroy () { +override protected void destroy () { if (this is Default) Default = null; deregister (this); destroyDisplay (); @@ -1402,7 +1402,7 @@ * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> */ -public Rectangle getBounds () { +override public Rectangle getBounds () { checkDevice (); if (OS.GetSystemMetrics (OS.SM_CMONITORS) < 2) { int width = OS.GetSystemMetrics (OS.SM_CXSCREEN); @@ -1470,7 +1470,7 @@ * * @see #getBounds */ -public Rectangle getClientArea () { +override public Rectangle getClientArea () { checkDevice (); if (OS.GetSystemMetrics (OS.SM_CMONITORS) < 2) { RECT rect; @@ -2211,7 +2211,7 @@ * * @see DWT */ -public Color getSystemColor (int id) { +override public Color getSystemColor (int id) { checkDevice (); int pixel = 0x00000000; switch (id) { @@ -2318,7 +2318,7 @@ * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> */ -public Font getSystemFont () { +override public Font getSystemFont () { checkDevice (); if (systemFont !is null) return systemFont; HFONT hFont; @@ -2468,7 +2468,7 @@ * <li>ERROR_NO_HANDLES if a handle could not be obtained for gc creation</li> * </ul> */ -public HDC internal_new_GC (GCData data) { +override public HDC internal_new_GC (GCData data) { if (isDisposed()) DWT.error(DWT.ERROR_DEVICE_DISPOSED); auto hDC = OS.GetDC (null); if (hDC is null) DWT.error (DWT.ERROR_NO_HANDLES); @@ -2494,7 +2494,7 @@ * * @see #create */ -protected void init () { +override protected void init () { super.init (); /* Create the callbacks */ @@ -2597,7 +2597,7 @@ * @param hDC the platform specific GC handle * @param data the platform specific GC data */ -public void internal_dispose_GC (HDC hDC, GCData data) { +override public void internal_dispose_GC (HDC hDC, GCData data) { OS.ReleaseDC (null, hDC); } @@ -3438,7 +3438,7 @@ * @see Device#dispose * @see #destroy */ -protected void release () { +override protected void release () { sendEvent (DWT.Dispose, new Event ()); Shell [] shells = getShells (); for (int i=0; i<shells.length; i++) {
--- a/dwt/widgets/Event.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/Event.d Mon Feb 04 10:05:20 2008 +0100 @@ -221,7 +221,7 @@ * * @return a string representation of the event */ -public char[] toString () { +override public char[] toString () { return Format( "Event {type={} {} time={} data={} x={} y={} width={} height={} detail={}}", type, widget, time, data, x, y, width, height, detail ); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ }
--- a/dwt/widgets/ExpandBar.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/ExpandBar.d Mon Feb 04 10:05:20 2008 +0100 @@ -61,6 +61,10 @@ * @since 3.2 */ public class ExpandBar : Composite { + + alias Composite.computeSize computeSize; + alias Composite.windowProc windowProc; + ExpandItem[] items; int itemCount; ExpandItem focusItem; @@ -127,12 +131,12 @@ addListener (DWT.Collapse, typedListener); } -LRESULT callWindowProc (HWND hwnd, int msg, int wParam, int lParam) { +override LRESULT callWindowProc (HWND hwnd, int msg, int wParam, int lParam) { if (handle is null) return LRESULT.ZERO; return cast(LRESULT) OS.DefWindowProc (hwnd, msg, wParam, lParam); } -protected void checkSubclass () { +override protected void checkSubclass () { if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); } @@ -141,7 +145,7 @@ return style | DWT.NO_BACKGROUND; } -public Point computeSize (int wHint, int hHint, bool changed) { +override public Point computeSize (int wHint, int hHint, bool changed) { checkWidget (); int height = 0, width = 0; if (wHint is DWT.DEFAULT || hHint is DWT.DEFAULT) { @@ -192,7 +196,7 @@ return new Point (trim.width, trim.height); } -void createHandle () { +override void createHandle () { super.createHandle (); state &= ~CANVAS; state |= TRACK_MOUSE; @@ -216,7 +220,7 @@ layoutItems (index, true); } -void createWidget () { +override void createWidget () { super.createWidget (); items = new ExpandItem [4]; if (!isAppThemed ()) { @@ -224,7 +228,7 @@ } } -int defaultBackground() { +override int defaultBackground() { if (!isAppThemed ()) { return OS.GetSysColor (OS.COLOR_WINDOW); } @@ -253,7 +257,7 @@ layoutItems (index, true); } -void drawThemeBackground (HDC hDC, HWND hwnd, RECT* rect) { +override void drawThemeBackground (HDC hDC, HWND hwnd, RECT* rect) { RECT rect2; OS.GetClientRect (handle, &rect2); OS.MapWindowPoints (handle, hwnd, cast(POINT*) &rect2, 2); @@ -299,7 +303,7 @@ } } -Control findBackgroundControl () { +override Control findBackgroundControl () { Control control = super.findBackgroundControl (); if (!isAppThemed ()) { if (control is null) control = this; @@ -307,7 +311,7 @@ return control; } -Control findThemeControl () { +override Control findThemeControl () { return isAppThemed () ? this : super.findThemeControl (); } @@ -448,7 +452,7 @@ if (setScrollbar_) setScrollbar (); } -void releaseChildren (bool destroy) { +override void releaseChildren (bool destroy) { if (items !is null) { for (int i=0; i<items.length; i++) { ExpandItem item = items [i]; @@ -487,7 +491,7 @@ eventTable.unhook (DWT.Collapse, listener); } -void setBackgroundPixel (int pixel) { +override void setBackgroundPixel (int pixel) { super.setBackgroundPixel (pixel); if (!OS.IsWinCE) { int flags = OS.RDW_ERASE | OS.RDW_FRAME | OS.RDW_INVALIDATE | OS.RDW_ALLCHILDREN; @@ -495,13 +499,13 @@ } } -public void setFont (Font font) { +override public void setFont (Font font) { super.setFont (font); hFont = font !is null ? font.handle : null; layoutItems (0, true); } -void setForegroundPixel (int pixel) { +override void setForegroundPixel (int pixel) { super.setForegroundPixel (pixel); if (!OS.IsWinCE) { int flags = OS.RDW_ERASE | OS.RDW_FRAME | OS.RDW_INVALIDATE | OS.RDW_ALLCHILDREN; @@ -572,15 +576,15 @@ layoutItems (index + 1, true); } -char[] windowClass () { +override char[] windowClass () { return display.windowClass(); } -int windowProc () { +override int windowProc () { return cast(int) display.windowProc; } -LRESULT WM_KEYDOWN (int wParam, int lParam) { +override LRESULT WM_KEYDOWN (int wParam, int lParam) { LRESULT result = super.WM_KEYDOWN (wParam, lParam); if (result !is LRESULT.NULL) return result; if (focusItem is null) return result; @@ -617,13 +621,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); if (focusItem !is null) focusItem.redraw (true); return result; } -LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { +override LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam); if (result is LRESULT.ZERO) return result; int x = cast(short) (lParam & 0xFFFF); @@ -642,7 +646,7 @@ return result; } -LRESULT WM_LBUTTONUP (int wParam, int lParam) { +override LRESULT WM_LBUTTONUP (int wParam, int lParam) { LRESULT result = super.WM_LBUTTONUP (wParam, lParam); if (result is LRESULT.ZERO) return result; if (focusItem is null) return result; @@ -659,7 +663,7 @@ return result; } -LRESULT WM_MOUSELEAVE (int wParam, int lParam) { +override LRESULT WM_MOUSELEAVE (int wParam, int lParam) { LRESULT result = super.WM_MOUSELEAVE (wParam, lParam); if (result !is LRESULT.NULL) return result; for (int i = 0; i < itemCount; i++) { @@ -673,7 +677,7 @@ return result; } -LRESULT WM_MOUSEMOVE (int wParam, int lParam) { +override LRESULT WM_MOUSEMOVE (int wParam, int lParam) { LRESULT result = super.WM_MOUSEMOVE (wParam, lParam); if (result is LRESULT.ZERO) return result; int x = cast(short) (lParam & 0xFFFF); @@ -689,7 +693,7 @@ return result; } -LRESULT WM_PAINT (int wParam, int lParam) { +override LRESULT WM_PAINT (int wParam, int lParam) { PAINTSTRUCT ps; GCData data = new GCData (); data.ps = &ps; @@ -718,7 +722,7 @@ return LRESULT.ZERO; } -LRESULT WM_PRINTCLIENT (int wParam, int lParam) { +override LRESULT WM_PRINTCLIENT (int wParam, int lParam) { LRESULT result = super.WM_PRINTCLIENT (wParam, lParam); RECT rect; OS.GetClientRect (handle, &rect); @@ -731,7 +735,7 @@ return result; } -LRESULT WM_SETCURSOR (int wParam, int lParam) { +override LRESULT WM_SETCURSOR (int wParam, int lParam) { LRESULT result = super.WM_SETCURSOR (wParam, lParam); if (result !is LRESULT.NULL) return result; int hitTest = lParam & 0xFFFF; @@ -748,13 +752,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 (focusItem !is null) focusItem.redraw (true); return result; } -LRESULT WM_SIZE (int wParam, int lParam) { +override LRESULT WM_SIZE (int wParam, int lParam) { LRESULT result = super.WM_SIZE (wParam, lParam); RECT rect; OS.GetClientRect (handle, &rect); @@ -768,7 +772,7 @@ return result; } -LRESULT wmScroll (ScrollBar bar, bool update, HWND hwnd, int msg, int wParam, int lParam) { +override LRESULT wmScroll (ScrollBar bar, bool update, HWND hwnd, int msg, int wParam, int lParam) { LRESULT result = super.wmScroll (bar, true, hwnd, msg, wParam, lParam); SCROLLINFO info; info.cbSize = SCROLLINFO.sizeof;
--- a/dwt/widgets/ExpandItem.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/ExpandItem.d Mon Feb 04 10:05:20 2008 +0100 @@ -252,7 +252,7 @@ } } -void destroyWidget () { +override void destroyWidget () { parent.destroyItem (this); releaseHandle (); } @@ -374,12 +374,12 @@ } } -void releaseHandle () { +override void releaseHandle () { super.releaseHandle (); parent = null; } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); control = null; } @@ -480,7 +480,7 @@ if (expanded) parent.layoutItems (parent.indexOf (this) + 1, true); } -public void setImage (Image image) { +override public void setImage (Image image) { super.setImage (image); int oldImageHeight = imageHeight; if (image !is null) { @@ -497,7 +497,7 @@ } } -public void setText (char[] string) { +override public void setText (char[] string) { super.setText (string); redraw (true); }
--- a/dwt/widgets/Group.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/Group.d Mon Feb 04 10:05:20 2008 +0100 @@ -45,6 +45,10 @@ */ public class Group : Composite { + + alias Composite.computeSize computeSize; + alias Composite.windowProc windowProc; + char[] text = ""; static const int CLIENT_INSET = 3; static const WNDPROC GroupProc; @@ -127,7 +131,7 @@ super (parent, checkStyle (style)); } -LRESULT callWindowProc (HWND hwnd, int msg, int wParam, int lParam) { +override LRESULT callWindowProc (HWND hwnd, int msg, int wParam, int lParam) { if (handle is null) return LRESULT.NULL; /* * Feature in Windows. When the user clicks on the group @@ -154,11 +158,11 @@ return style & ~(DWT.H_SCROLL | DWT.V_SCROLL); } -protected void checkSubclass () { +override protected void checkSubclass () { if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); } -public Point computeSize (int wHint, int hHint, bool changed) { +override public Point computeSize (int wHint, int hHint, bool changed) { checkWidget (); Point size = super.computeSize (wHint, hHint, changed); int length = text.length; @@ -195,7 +199,7 @@ return size; } -public Rectangle computeTrim (int x, int y, int width, int height) { +override public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget (); Rectangle trim = super.computeTrim (x, y, width, height); HFONT newFont, oldFont; @@ -213,13 +217,13 @@ return trim; } -void createHandle () { +override void createHandle () { super.createHandle (); state |= DRAW_BACKGROUND; state &= ~CANVAS; } -void enableWidget (bool enabled) { +override void enableWidget (bool enabled) { super.enableWidget (enabled); /* * Bug in Windows. When a group control is right-to-left and @@ -235,7 +239,7 @@ } } -public Rectangle getClientArea () { +override public Rectangle getClientArea () { checkWidget (); forceResize (); RECT rect; @@ -254,7 +258,7 @@ return new Rectangle (x, y, width, height); } -char[] getNameText () { +override char[] getNameText () { return getText (); } @@ -275,22 +279,22 @@ return text; } -bool mnemonicHit (wchar key) { +override bool mnemonicHit (wchar key) { return setFocus (); } -bool mnemonicMatch (wchar key) { +override bool mnemonicMatch (wchar key) { wchar mnemonic = findMnemonic (getText ()); if (mnemonic is '\0') return false; return CharacterToUpper (key) is CharacterToUpper (mnemonic); } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); text = null; } -public void setFont (Font font) { +override public void setFont (Font font) { checkWidget (); Rectangle oldRect = getClientArea (); super.setFont (font); @@ -342,7 +346,7 @@ OS.SetWindowText (handle, buffer); } -int widgetStyle () { +override int widgetStyle () { /* * Bug in Windows. When GetDCEx() is called with DCX_INTERSECTUPDATE, * the HDC that is returned does not include the current update region. @@ -357,15 +361,15 @@ return super.widgetStyle () | OS.BS_GROUPBOX | OS.WS_CLIPCHILDREN | OS.WS_CLIPSIBLINGS; } -char[] windowClass () { +override char[] windowClass () { return TCHARsToStr( GroupClass ); } -int windowProc () { +override int windowProc () { return cast(int) GroupProc; } -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; /* @@ -377,7 +381,7 @@ return LRESULT.ONE; } -LRESULT WM_NCHITTEST (int wParam, int lParam) { +override LRESULT WM_NCHITTEST (int wParam, int lParam) { LRESULT result = super.WM_NCHITTEST (wParam, lParam); if (result !is LRESULT.NULL) return result; /* @@ -394,7 +398,7 @@ return cast(LRESULT) (code); } -LRESULT WM_MOUSEMOVE (int wParam, int lParam) { +override LRESULT WM_MOUSEMOVE (int wParam, int lParam) { LRESULT result = super.WM_MOUSEMOVE (wParam, lParam); if (result !is LRESULT.NULL) return result; /* @@ -406,7 +410,7 @@ return LRESULT.ZERO; } -LRESULT WM_PRINTCLIENT (int wParam, int lParam) { +override LRESULT WM_PRINTCLIENT (int wParam, int lParam) { LRESULT result = super.WM_PRINTCLIENT (wParam, lParam); if (result !is LRESULT.NULL) return result; /* @@ -428,7 +432,7 @@ return result; } -LRESULT WM_UPDATEUISTATE (int wParam, int lParam) { +override LRESULT WM_UPDATEUISTATE (int wParam, int lParam) { LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam); if (result !is LRESULT.NULL) return result; /* @@ -456,7 +460,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; /*
--- a/dwt/widgets/Item.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/Item.d Mon Feb 04 10:05:20 2008 +0100 @@ -99,7 +99,7 @@ this (parent, style); } -protected void checkSubclass () { +override protected void checkSubclass () { /* Do Nothing - Subclassing is allowed */ } @@ -119,7 +119,7 @@ return image; } -char[] getNameText () { +override char[] getNameText () { return getText (); } @@ -139,7 +139,7 @@ return text; } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); text = null; image = null;
--- a/dwt/widgets/Label.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/Label.d Mon Feb 04 10:05:20 2008 +0100 @@ -52,6 +52,10 @@ * </p> */ public class Label : Control { + + alias Control.computeSize computeSize; + alias Control.windowProc windowProc; + char[] text = ""; Image image; static const int MARGIN = 4; @@ -105,7 +109,7 @@ super (parent, checkStyle (style)); } -LRESULT callWindowProc (HWND hwnd, int msg, int wParam, int lParam) { +override LRESULT callWindowProc (HWND hwnd, int msg, int wParam, int lParam) { if (handle is null) return LRESULT.NULL; return cast(LRESULT) OS.CallWindowProc (LabelProc, hwnd, msg, wParam, lParam); } @@ -119,7 +123,7 @@ return checkBits (style, DWT.LEFT, DWT.CENTER, DWT.RIGHT, 0, 0, 0); } -public Point computeSize (int wHint, int hHint, bool changed) { +override public Point computeSize (int wHint, int hHint, bool changed) { checkWidget (); int width = 0, height = 0, border = getBorderWidth (); if ((style & DWT.SEPARATOR) !is 0) { @@ -188,7 +192,7 @@ return new Point (width, height); } -void createHandle () { +override void createHandle () { super.createHandle (); state |= THEME_BACKGROUND; } @@ -232,7 +236,7 @@ return image; } -char[] getNameText () { +override char[] getNameText () { return getText (); } @@ -254,7 +258,7 @@ return text; } -bool mnemonicHit (wchar key) { +override bool mnemonicHit (wchar key) { Composite control = this.parent; while (control !is null) { Control [] children = control._getChildren (); @@ -272,13 +276,13 @@ return false; } -bool mnemonicMatch (wchar key) { +override bool mnemonicMatch (wchar key) { wchar mnemonic = findMnemonic (getText ()); if (mnemonic is '\0') return false; return CharacterToUpper (key) is CharacterToUpper (mnemonic); } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); text = null; image = null; @@ -417,13 +421,13 @@ } } -int widgetExtStyle () { +override int widgetExtStyle () { int bits = super.widgetExtStyle () & ~OS.WS_EX_CLIENTEDGE; if ((style & DWT.BORDER) !is 0) return bits | OS.WS_EX_STATICEDGE; return bits; } -int widgetStyle () { +override int widgetStyle () { int bits = super.widgetStyle () | OS.SS_NOTIFY; if ((style & DWT.SEPARATOR) !is 0) return bits | OS.SS_OWNERDRAW; if (OS.WIN32_VERSION >= OS.VERSION (5, 0)) { @@ -435,15 +439,15 @@ return bits | OS.SS_LEFTNOWORDWRAP; } -char[] windowClass () { +override char[] windowClass () { return TCHARsToStr( LabelClass ); } -int windowProc () { +override int windowProc () { return cast(int) LabelProc; } -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; int bits = OS.GetWindowLong (handle, OS.GWL_STYLE); @@ -467,7 +471,7 @@ return result; } -LRESULT WM_SIZE (int wParam, int lParam) { +override LRESULT WM_SIZE (int wParam, int lParam) { LRESULT result = super.WM_SIZE (wParam, lParam); if (isDisposed ()) return result; if ((style & DWT.SEPARATOR) !is 0) { @@ -493,7 +497,7 @@ return result; } -LRESULT WM_UPDATEUISTATE (int wParam, int lParam) { +override LRESULT WM_UPDATEUISTATE (int wParam, int lParam) { LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam); /* * Feature in Windows. When WM_UPDATEUISTATE is sent to @@ -519,7 +523,7 @@ return result; } -LRESULT wmColorChild (int wParam, int lParam) { +override LRESULT wmColorChild (int wParam, int lParam) { /* * Bug in Windows. For some reason, the HBRUSH that * is returned from WM_CTRLCOLOR is misaligned when @@ -541,7 +545,7 @@ return result; } -LRESULT WM_PAINT (int wParam, int lParam) { +override LRESULT WM_PAINT (int wParam, int lParam) { if (OS.IsWinCE) { bool drawImage = image !is null; bool drawSeparator = (style & DWT.SEPARATOR) !is 0 && (style & DWT.SHADOW_NONE) is 0; @@ -605,7 +609,7 @@ return super.WM_PAINT(wParam, lParam); } -LRESULT wmDrawChild (int wParam, int lParam) { +override LRESULT wmDrawChild (int wParam, int lParam) { DRAWITEMSTRUCT* struct_ = cast(DRAWITEMSTRUCT*)lParam; drawBackground (struct_.hDC); if ((style & DWT.SEPARATOR) !is 0) {
--- a/dwt/widgets/Link.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/Link.d Mon Feb 04 10:05:20 2008 +0100 @@ -61,6 +61,10 @@ * @since 3.1 */ public class Link : Control { + + alias Control.computeSize computeSize; + alias Control.windowProc windowProc; + char[] text; TextLayout layout; Color linkColor, disabledColor; @@ -147,13 +151,13 @@ addListener (DWT.DefaultSelection, typedListener); } -LRESULT callWindowProc (HWND hwnd, int msg, int wParam, int lParam) { +override LRESULT callWindowProc (HWND hwnd, int msg, int wParam, int lParam) { if (handle is null) return LRESULT.NULL; if (LinkProc !is null) return cast(LRESULT) OS.CallWindowProc (LinkProc, hwnd, msg, wParam, lParam); return cast(LRESULT) OS.DefWindowProc (hwnd, msg, wParam, lParam); } -public Point computeSize (int wHint, int hHint, bool changed) { +override public Point computeSize (int wHint, int hHint, bool changed) { checkWidget (); if (wHint !is DWT.DEFAULT && wHint < 0) wHint = 0; if (hHint !is DWT.DEFAULT && hHint < 0) hHint = 0; @@ -198,7 +202,7 @@ return new Point (width, height); } -void createHandle () { +override void createHandle () { super.createHandle (); state |= THEME_BACKGROUND; if (OS.COMCTL32_MAJOR < 6) { @@ -217,7 +221,7 @@ } } -void createWidget () { +override void createWidget () { super.createWidget (); text = ""; if (OS.COMCTL32_MAJOR < 6) { @@ -259,7 +263,7 @@ } } -void enableWidget (bool enabled) { +override void enableWidget (bool enabled) { if (OS.COMCTL32_MAJOR >= 6) { LITEM item; item.mask = OS.LIF_ITEMINDEX | OS.LIF_STATE; @@ -335,7 +339,7 @@ }); } -char[] getNameText () { +override char[] getNameText () { return getText (); } @@ -533,7 +537,7 @@ return mnemonic; } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); if (layout !is null) layout.dispose (); layout = null; @@ -642,20 +646,20 @@ } } -int widgetStyle () { +override int widgetStyle () { int bits = super.widgetStyle (); return bits | OS.WS_TABSTOP; } -char[] windowClass () { +override char[] windowClass () { return OS.COMCTL32_MAJOR >= 6 ? TCHARsToStr(LinkClass) : display.windowClass(); } -int windowProc () { +override int windowProc () { return LinkProc !is null ? cast(int)LinkProc : display.windowProc(); } -LRESULT WM_CHAR (int wParam, int lParam) { +override LRESULT WM_CHAR (int wParam, int lParam) { LRESULT result = super.WM_CHAR (wParam, lParam); if (result !is LRESULT.NULL) return result; if (OS.COMCTL32_MAJOR < 6) { @@ -701,7 +705,7 @@ return result; } -LRESULT WM_GETDLGCODE (int wParam, int lParam) { +override LRESULT WM_GETDLGCODE (int wParam, int lParam) { LRESULT result = super.WM_GETDLGCODE (wParam, lParam); if (result !is LRESULT.NULL) return result; int index, count, code = 0; @@ -735,7 +739,7 @@ return result; } -LRESULT WM_GETFONT (int wParam, int lParam) { +override LRESULT WM_GETFONT (int wParam, int lParam) { LRESULT result = super.WM_GETFONT (wParam, lParam); if (result !is LRESULT.NULL) return result; int code = callWindowProc (handle, OS.WM_GETFONT, wParam, lParam); @@ -744,7 +748,7 @@ return cast(LRESULT) (font); } -LRESULT WM_KEYDOWN (int wParam, int lParam) { +override LRESULT WM_KEYDOWN (int wParam, int lParam) { LRESULT result = super.WM_KEYDOWN (wParam, lParam); if (result !is LRESULT.NULL) return result; if (OS.COMCTL32_MAJOR >= 6) { @@ -764,13 +768,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); if (OS.COMCTL32_MAJOR < 6) redraw (); return result; } -LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { +override LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam); if (result is LRESULT.ZERO) return result; if (OS.COMCTL32_MAJOR < 6) { @@ -808,7 +812,7 @@ return result; } -LRESULT WM_LBUTTONUP (int wParam, int lParam) { +override LRESULT WM_LBUTTONUP (int wParam, int lParam) { LRESULT result = super.WM_LBUTTONUP (wParam, lParam); if (result is LRESULT.ZERO) return result; if (OS.COMCTL32_MAJOR < 6) { @@ -830,7 +834,7 @@ return result; } -LRESULT WM_MOUSEMOVE (int wParam, int lParam) { +override LRESULT WM_MOUSEMOVE (int wParam, int lParam) { LRESULT result = super.WM_MOUSEMOVE (wParam, lParam); if (OS.COMCTL32_MAJOR < 6) { int x = lParam & 0xFFFF; @@ -865,7 +869,7 @@ return result; } -LRESULT WM_PAINT (int wParam, int lParam) { +override LRESULT WM_PAINT (int wParam, int lParam) { if (OS.COMCTL32_MAJOR >= 6) { return super.WM_PAINT (wParam, lParam); } @@ -887,7 +891,7 @@ return LRESULT.ZERO; } -LRESULT WM_PRINTCLIENT (int wParam, int lParam) { +override LRESULT WM_PRINTCLIENT (int wParam, int lParam) { LRESULT result = super.WM_PRINTCLIENT (wParam, lParam); if (OS.COMCTL32_MAJOR < 6) { RECT rect; @@ -902,13 +906,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 (OS.COMCTL32_MAJOR < 6) redraw (); return result; } -LRESULT WM_SETFONT (int wParam, int lParam) { +override LRESULT WM_SETFONT (int wParam, int lParam) { if (OS.COMCTL32_MAJOR < 6) { layout.setFont (Font.win32_new (display, cast(HANDLE)wParam)); } @@ -917,7 +921,7 @@ return super.WM_SETFONT (wParam, lParam); } -LRESULT WM_SIZE (int wParam, int lParam) { +override LRESULT WM_SIZE (int wParam, int lParam) { LRESULT result = super.WM_SIZE (wParam, lParam); if (OS.COMCTL32_MAJOR < 6) { RECT rect; @@ -928,7 +932,7 @@ return result; } -LRESULT wmColorChild (int wParam, int lParam) { +override LRESULT wmColorChild (int wParam, int lParam) { LRESULT result = super.wmColorChild (wParam, lParam); /* * Feature in Windows. When a SysLink is disabled, it does @@ -949,7 +953,7 @@ return result; } -LRESULT wmNotifyChild (NMHDR* hdr, int wParam, int lParam) { +override LRESULT wmNotifyChild (NMHDR* hdr, int wParam, int lParam) { if (OS.COMCTL32_MAJOR >= 6) { switch (hdr.code) { case OS.NM_RETURN:
--- a/dwt/widgets/List.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/List.d Mon Feb 04 10:05:20 2008 +0100 @@ -48,6 +48,10 @@ */ public class List extends Scrollable { + + alias Scrollable.computeSize computeSize; + alias Scrollable.windowProc windowProc; + static final int INSET = 3; static final int ListProc; static final TCHAR ListClass = new TCHAR (0, "LISTBOX", true); @@ -186,7 +190,7 @@ addListener (DWT.DefaultSelection,typedListener); } -int callWindowProc (int hwnd, int msg, int wParam, int lParam) { +override int callWindowProc (int hwnd, int msg, int wParam, int lParam) { if (handle is 0) return 0; return OS.CallWindowProc (ListProc, hwnd, msg, wParam, lParam); } @@ -195,7 +199,7 @@ return checkBits (style, DWT.SINGLE, DWT.MULTI, 0, 0, 0, 0); } -public Point computeSize (int wHint, int hHint, bool changed) { +override public Point computeSize (int wHint, int hHint, bool changed) { checkWidget (); int width = 0, height = 0; if (wHint is DWT.DEFAULT) { @@ -250,7 +254,7 @@ return new Point (width, height); } -int defaultBackground () { +override int defaultBackground () { return OS.GetSysColor (OS.COLOR_WINDOW); } @@ -1130,7 +1134,7 @@ OS.SendMessage (handle, OS.LB_SETCARETINDEX, index, 0); } -public void setFont (Font font) { +override public void setFont (Font font) { checkWidget (); super.setFont (font); if ((style & DWT.H_SCROLL) !is 0) setScrollWidth (); @@ -1492,7 +1496,7 @@ OS.SendMessage (handle, OS.LB_SETTOPINDEX, newTop, 0); } -int widgetStyle () { +override int widgetStyle () { int bits = super.widgetStyle () | OS.LBS_NOTIFY | OS.LBS_NOINTEGRALHEIGHT; if ((style & DWT.SINGLE) !is 0) return bits; if ((style & DWT.MULTI) !is 0) { @@ -1502,15 +1506,15 @@ return bits; } -TCHAR windowClass () { +override TCHAR windowClass () { return ListClass; } -int windowProc () { +override int windowProc () { return ListProc; } -LRESULT WM_SIZE (int wParam, int lParam) { +override LRESULT WM_SIZE (int wParam, int lParam) { /* * Bug in Windows. If the top index is changed while the * list is being resized, Windows does not redraw properly @@ -1538,7 +1542,7 @@ return result; } -LRESULT wmCommandChild (int wParam, int lParam) { +override LRESULT wmCommandChild (int wParam, int lParam) { int code = wParam >> 16; switch (code) { case OS.LBN_SELCHANGE:
--- a/dwt/widgets/Menu.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/Menu.d Mon Feb 04 10:05:20 2008 +0100 @@ -603,7 +603,7 @@ redraw (); } -void destroyWidget () { +override void destroyWidget () { int hMenu = handle, hCB = hwndCB; releaseHandle (); if (OS.IsWinCE && hCB !is 0) { @@ -897,7 +897,7 @@ return OS.GetMenuItemCount (handle); } -String getNameText () { +override String getNameText () { String result = ""; MenuItem [] items = getItems (); int length = items.length; @@ -1131,12 +1131,12 @@ } } -void releaseHandle () { +override void releaseHandle () { super.releaseHandle (); handle = hwndCB = 0; } -void releaseChildren (bool destroy) { +override void releaseChildren (bool destroy) { MenuItem [] items = getItems (); for (int i=0; i<items.length; i++) { MenuItem item = items [i]; @@ -1151,7 +1151,7 @@ super.releaseChildren (destroy); } -void releaseParent () { +override void releaseParent () { super.releaseParent (); if (cascade !is null) cascade.releaseMenu (); if ((style & DWT.BAR) !is 0) { @@ -1166,7 +1166,7 @@ } } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); backgroundImage = null; if (hBrush is 0) OS.DeleteObject (hBrush);
--- a/dwt/widgets/MenuItem.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/MenuItem.d Mon Feb 04 10:05:20 2008 +0100 @@ -260,7 +260,7 @@ addListener (DWT.DefaultSelection,typedListener); } -protected void checkSubclass () { +override protected void checkSubclass () { if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); } @@ -268,7 +268,7 @@ return checkBits (style, DWT.PUSH, DWT.CHECK, DWT.RADIO, DWT.SEPARATOR, DWT.CASCADE, 0); } -void destroyWidget () { +override void destroyWidget () { parent.destroyItem (this); releaseHandle (); } @@ -452,12 +452,12 @@ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ -public Menu getMenu () { +override public Menu getMenu () { checkWidget (); return menu; } -String getNameText () { +override String getNameText () { if ((style & DWT.SEPARATOR) !is 0) return "|"; return super.getNameText (); } @@ -523,7 +523,7 @@ return getEnabled () && parent.isEnabled (); } -void releaseChildren (bool destroy) { +override void releaseChildren (bool destroy) { if (menu !is null) { menu.release (false); menu = null; @@ -531,7 +531,7 @@ super.releaseChildren (destroy); } -void releaseHandle () { +override void releaseHandle () { super.releaseHandle (); parent = null; id = -1; @@ -542,13 +542,13 @@ menu = null; } -void releaseParent () { +override void releaseParent () { super.releaseParent (); if (menu !is null) menu.dispose (); menu = null; } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); if (hBitmap !is 0) OS.DeleteObject (hBitmap); hBitmap = 0; @@ -744,7 +744,7 @@ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ -public void setImage (Image image) { +override public void setImage (Image image) { checkWidget (); if ((style & DWT.SEPARATOR) !is 0) return; super.setImage (image); @@ -1037,7 +1037,7 @@ * * @see #setAccelerator */ -public void setText (String string) { +override public void setText (String string) { checkWidget (); if (string is null) error (DWT.ERROR_NULL_ARGUMENT); if ((style & DWT.SEPARATOR) !is 0) return;
--- a/dwt/widgets/ProgressBar.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/ProgressBar.d Mon Feb 04 10:05:20 2008 +0100 @@ -41,6 +41,10 @@ * </p> */ public class ProgressBar extends Control { + + alias Control.computeSize computeSize; + alias Control.windowProc windowProc; + static final int DELAY = 100; static final int TIMER_ID = 100; static final int MINIMUM_WIDTH = 100; @@ -114,7 +118,7 @@ super (parent, checkStyle (style)); } -int callWindowProc (int hwnd, int msg, int wParam, int lParam) { +override int callWindowProc (int hwnd, int msg, int wParam, int lParam) { if (handle is 0) return 0; return OS.CallWindowProc (ProgressBarProc, hwnd, msg, wParam, lParam); } @@ -124,7 +128,7 @@ return checkBits (style, DWT.HORIZONTAL, DWT.VERTICAL, 0, 0, 0, 0); } -public Point computeSize (int wHint, int hHint, bool changed) { +override public Point computeSize (int wHint, int hHint, bool changed) { checkWidget (); int border = getBorderWidth (); int width = border * 2, height = border * 2; @@ -140,12 +144,12 @@ return new Point (width, height); } -void createHandle () { +override void createHandle () { super.createHandle (); startTimer (); } -int defaultForeground () { +override int defaultForeground () { return OS.GetSysColor (OS.COLOR_HIGHLIGHT); } @@ -194,7 +198,7 @@ return OS.SendMessage (handle, OS.PBM_GETPOS, 0, 0); } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); stopTimer (); } @@ -221,12 +225,12 @@ } } -void setBackgroundPixel (int pixel) { +override void setBackgroundPixel (int pixel) { if (pixel is -1) pixel = OS.CLR_DEFAULT; OS.SendMessage (handle, OS.PBM_SETBKCOLOR, 0, pixel); } -void setForegroundPixel (int pixel) { +override void setForegroundPixel (int pixel) { if (pixel is -1) pixel = OS.CLR_DEFAULT; OS.SendMessage (handle, OS.PBM_SETBARCOLOR, 0, pixel); } @@ -290,7 +294,7 @@ OS.SendMessage (handle, OS.PBM_SETPOS, value, 0); } -int widgetStyle () { +override int widgetStyle () { int bits = super.widgetStyle (); if ((style & DWT.SMOOTH) !is 0) bits |= OS.PBS_SMOOTH; if ((style & DWT.VERTICAL) !is 0) bits |= OS.PBS_VERTICAL; @@ -298,15 +302,15 @@ return bits; } -TCHAR windowClass () { +override TCHAR windowClass () { return ProgressBarClass; } -int windowProc () { +override int windowProc () { return ProgressBarProc; } -LRESULT WM_GETDLGCODE (int wParam, int lParam) { +override LRESULT WM_GETDLGCODE (int wParam, int lParam) { LRESULT result = super.WM_GETDLGCODE (wParam, lParam); if (result !is null) return result; /* @@ -321,7 +325,7 @@ return new LRESULT (OS.DLGC_STATIC); } -LRESULT WM_SIZE (int wParam, int lParam) { +override LRESULT WM_SIZE (int wParam, int lParam) { LRESULT result = super.WM_SIZE (wParam, lParam); if (result !is null) return result; /* @@ -357,7 +361,7 @@ return result; } -LRESULT WM_TIMER (int wParam, int lParam) { +override LRESULT WM_TIMER (int wParam, int lParam) { LRESULT result = super.WM_TIMER (wParam, lParam); if (result !is null) return result; if ((style & DWT.INDETERMINATE) !is 0) {
--- a/dwt/widgets/Sash.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/Sash.d Mon Feb 04 10:05:20 2008 +0100 @@ -43,6 +43,10 @@ * </p> */ public class Sash extends Control { + + alias Control.computeSize computeSize; + alias Control.windowProc windowProc; + bool dragging; int startX, startY, lastX, lastY; final static int INCREMENT = 1; @@ -114,12 +118,12 @@ addListener (DWT.DefaultSelection,typedListener); } -int callWindowProc (int hwnd, int msg, int wParam, int lParam) { +override int callWindowProc (int hwnd, int msg, int wParam, int lParam) { if (handle is 0) return 0; return OS.DefWindowProc (hwnd, msg, wParam, lParam); } -void createHandle () { +override void createHandle () { super.createHandle (); state |= THEME_BACKGROUND; } @@ -128,7 +132,7 @@ return checkBits (style, DWT.HORIZONTAL, DWT.VERTICAL, 0, 0, 0, 0); } -public Point computeSize (int wHint, int hHint, bool changed) { +override public Point computeSize (int wHint, int hHint, bool changed) { checkWidget (); int border = getBorderWidth (); int width = border * 2, height = border * 2; @@ -182,21 +186,21 @@ eventTable.unhook (DWT.DefaultSelection,listener); } -TCHAR windowClass () { +override TCHAR windowClass () { return display.windowClass; } -int windowProc () { +override int windowProc () { return display.windowProc; } -LRESULT WM_ERASEBKGND (int wParam, int lParam) { +override LRESULT WM_ERASEBKGND (int wParam, int lParam) { super.WM_ERASEBKGND (wParam, lParam); drawBackground (wParam); return LRESULT.ONE; } -LRESULT WM_KEYDOWN (int wParam, int lParam) { +override LRESULT WM_KEYDOWN (int wParam, int lParam) { LRESULT result = super.WM_KEYDOWN (wParam, lParam); if (result !is null) return result; switch (wParam) { @@ -262,11 +266,11 @@ return result; } -LRESULT WM_GETDLGCODE (int wParam, int lParam) { +override LRESULT WM_GETDLGCODE (int wParam, int lParam) { return new LRESULT (OS.DLGC_STATIC); } -LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { +override LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam); if (result is LRESULT.ZERO) return result; @@ -320,7 +324,7 @@ return result; } -LRESULT WM_LBUTTONUP (int wParam, int lParam) { +override LRESULT WM_LBUTTONUP (int wParam, int lParam) { LRESULT result = super.WM_LBUTTONUP (wParam, lParam); if (result is LRESULT.ZERO) return result; @@ -350,7 +354,7 @@ return result; } -LRESULT WM_MOUSEMOVE (int wParam, int lParam) { +override LRESULT WM_MOUSEMOVE (int wParam, int lParam) { LRESULT result = super.WM_MOUSEMOVE (wParam, lParam); if (result !is null) return result; if (!dragging || (wParam & OS.MK_LBUTTON) is 0) return result; @@ -406,7 +410,7 @@ return result; } -LRESULT WM_SETCURSOR (int wParam, int lParam) { +override LRESULT WM_SETCURSOR (int wParam, int lParam) { LRESULT result = super.WM_SETCURSOR (wParam, lParam); if (result !is null) return result; int hitTest = lParam & 0xFFFF;
--- a/dwt/widgets/Scale.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/Scale.d Mon Feb 04 10:05:20 2008 +0100 @@ -47,6 +47,11 @@ */ public class Scale extends Control { + + alias Control.computeSize computeSize; + alias Control.setBackgroundImage setBackgroundImage; + alias Control.windowProc windowProc; + bool ignoreResize; static final int TrackBarProc; static final TCHAR TrackBarClass = new TCHAR (0, OS.TRACKBAR_CLASS, true); @@ -148,7 +153,7 @@ addListener (DWT.DefaultSelection,typedListener); } -int callWindowProc (int hwnd, int msg, int wParam, int lParam) { +override int callWindowProc (int hwnd, int msg, int wParam, int lParam) { if (handle is 0) return 0; return OS.CallWindowProc (TrackBarProc, hwnd, msg, wParam, lParam); } @@ -157,7 +162,7 @@ return checkBits (style, DWT.HORIZONTAL, DWT.VERTICAL, 0, 0, 0, 0); } -public Point computeSize (int wHint, int hHint, bool changed) { +override public Point computeSize (int wHint, int hHint, bool changed) { checkWidget (); int border = getBorderWidth (); int width = border * 2, height = border * 2; @@ -177,7 +182,7 @@ return new Point (width, height); } -void createHandle () { +override void createHandle () { super.createHandle (); state |= THEME_BACKGROUND | DRAW_BACKGROUND; OS.SendMessage (handle, OS.TBM_SETRANGEMAX, 0, 100); @@ -185,7 +190,7 @@ OS.SendMessage (handle, OS.TBM_SETTICFREQ, 10, 0); } -int defaultForeground () { +override int defaultForeground () { return OS.GetSysColor (OS.COLOR_BTNFACE); } @@ -293,7 +298,7 @@ eventTable.unhook (DWT.DefaultSelection,listener); } -void setBackgroundImage (int hImage) { +override void setBackgroundImage (int hImage) { super.setBackgroundImage (hImage); /* * Bug in Windows. Changing the background color of the Scale @@ -306,7 +311,7 @@ ignoreResize = false; } -void setBackgroundPixel (int pixel) { +override void setBackgroundPixel (int pixel) { super.setBackgroundPixel (pixel); /* * Bug in Windows. Changing the background color of the Scale @@ -422,21 +427,21 @@ OS.SendMessage (handle, OS.TBM_SETPOS, 1, value); } -int widgetStyle () { +override int widgetStyle () { int bits = super.widgetStyle () | OS.WS_TABSTOP | OS.TBS_BOTH | OS.TBS_AUTOTICKS; if ((style & DWT.HORIZONTAL) !is 0) return bits | OS.TBS_HORZ | OS.TBS_DOWNISLEFT; return bits | OS.TBS_VERT; } -TCHAR windowClass () { +override TCHAR windowClass () { return TrackBarClass; } -int windowProc () { +override int windowProc () { return TrackBarProc; } -LRESULT WM_PAINT (int wParam, int lParam) { +override LRESULT WM_PAINT (int wParam, int lParam) { /* * Bug in Windows. For some reason, when WM_CTLCOLORSTATIC * is used to implement transparency and returns a NULL brush, @@ -468,12 +473,12 @@ return super.WM_PAINT (wParam, lParam); } -LRESULT WM_SIZE (int wParam, int lParam) { +override LRESULT WM_SIZE (int wParam, int lParam) { if (ignoreResize) return null; return super.WM_SIZE (wParam, lParam); } -LRESULT wmScrollChild (int wParam, int lParam) { +override LRESULT wmScrollChild (int wParam, int lParam) { /* Do nothing when scrolling is ending */ int code = wParam & 0xFFFF;
--- a/dwt/widgets/ScrollBar.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/ScrollBar.d Mon Feb 04 10:05:20 2008 +0100 @@ -197,7 +197,7 @@ */ } -void destroyWidget () { +override void destroyWidget () { int hwnd = hwndScrollBar (), type = scrollBarType (); if (OS.IsWinCE) { SCROLLINFO info = new SCROLLINFO (); @@ -482,12 +482,12 @@ return getVisible () && parent.isVisible (); } -void releaseHandle () { +override void releaseHandle () { super.releaseHandle (); parent = null; } -void releaseParent () { +override void releaseParent () { super.releaseParent (); if (parent.horizontalBar is this) parent.horizontalBar = null; if (parent.verticalBar is this) parent.verticalBar = null;
--- a/dwt/widgets/Scrollable.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/Scrollable.d Mon Feb 04 10:05:20 2008 +0100 @@ -137,7 +137,7 @@ return bar; } -void createWidget () { +override void createWidget () { super.createWidget (); if ((style & DWT.H_SCROLL) !is 0) horizontalBar = createScrollBar (DWT.H_SCROLL); if ((style & DWT.V_SCROLL) !is 0) verticalBar = createScrollBar (DWT.V_SCROLL); @@ -207,7 +207,7 @@ return verticalBar; } -void releaseChildren (bool destroy) { +override void releaseChildren (bool destroy) { if (horizontalBar !is null) { horizontalBar.release (false); horizontalBar = null; @@ -223,7 +223,7 @@ return handle; } -int widgetExtStyle () { +override int widgetExtStyle () { return super.widgetExtStyle (); /* * This code is intentionally commented. In future, @@ -237,7 +237,7 @@ // return super.widgetExtStyle (); } -int widgetStyle () { +override int widgetStyle () { int bits = super.widgetStyle () | OS.WS_TABSTOP; if ((style & DWT.H_SCROLL) !is 0) bits |= OS.WS_HSCROLL; if ((style & DWT.V_SCROLL) !is 0) bits |= OS.WS_VSCROLL;
--- 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;
--- a/dwt/widgets/Slider.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/Slider.d Mon Feb 04 10:05:20 2008 +0100 @@ -76,6 +76,11 @@ * @see ScrollBar */ public class Slider extends Control { + + alias Control.computeSize computeSize; + alias Control.setBounds setBounds; + alias Control.windowProc windowProc; + int increment, pageIncrement; bool ignoreFocus; static final int ScrollBarProc; @@ -159,7 +164,7 @@ addListener (DWT.DefaultSelection,typedListener); } -int callWindowProc (int hwnd, int msg, int wParam, int lParam) { +override int callWindowProc (int hwnd, int msg, int wParam, int lParam) { if (handle is 0) return 0; /* * Feature in Windows. Windows runs a modal message @@ -181,7 +186,7 @@ return checkBits (style, DWT.HORIZONTAL, DWT.VERTICAL, 0, 0, 0, 0); } -public Point computeSize (int wHint, int hHint, bool changed) { +override public Point computeSize (int wHint, int hHint, bool changed) { checkWidget (); int border = getBorderWidth (); int width = border * 2, height = border * 2; @@ -197,7 +202,7 @@ return new Point (width, height); } -void createWidget () { +override void createWidget () { super.createWidget (); increment = 1; pageIncrement = 10; @@ -215,15 +220,15 @@ OS.SetScrollInfo (handle, OS.SB_CTL, info, true); } -int defaultBackground () { +override int defaultBackground () { return OS.GetSysColor (OS.COLOR_SCROLLBAR); } -int defaultForeground () { +override int defaultForeground () { return OS.GetSysColor (OS.COLOR_BTNFACE); } -void enableWidget (bool enabled) { +override void enableWidget (bool enabled) { super.enableWidget (enabled); if (!OS.IsWinCE) { int flags = enabled ? OS.ESB_ENABLE_BOTH : OS.ESB_DISABLE_BOTH; @@ -236,7 +241,7 @@ } } -public bool getEnabled () { +override public bool getEnabled () { checkWidget (); return (state & DISABLED) is 0; } @@ -378,7 +383,7 @@ eventTable.unhook (DWT.DefaultSelection,listener); } -void setBounds (int x, int y, int width, int height, int flags) { +override void setBounds (int x, int y, int width, int height, int flags) { super.setBounds (x, y, width, height, flags); /* * Bug in Windows. If the scroll bar is resized when it has focus, @@ -602,7 +607,7 @@ SetScrollInfo (handle, OS.SB_CTL, info, true); } -int widgetExtStyle () { +override int widgetExtStyle () { /* * Bug in Windows. If a scroll bar control is given a border, * dragging the scroll bar thumb eats away parts of the border @@ -614,7 +619,7 @@ return bits; } -int widgetStyle () { +override int widgetStyle () { int bits = super.widgetStyle () | OS.WS_TABSTOP; /* * Bug in Windows. If a scroll bar control is given a border, @@ -626,15 +631,15 @@ return bits | OS.SBS_VERT; } -TCHAR windowClass () { +override TCHAR windowClass () { return ScrollBarClass; } -int windowProc () { +override int windowProc () { return ScrollBarProc; } -LRESULT WM_KEYDOWN (int wParam, int lParam) { +override LRESULT WM_KEYDOWN (int wParam, int lParam) { LRESULT result = super.WM_KEYDOWN (wParam, lParam); if (result !is null) return result; if ((style & DWT.VERTICAL) !is 0) return result; @@ -660,7 +665,7 @@ return result; } -LRESULT WM_LBUTTONDBLCLK (int wParam, int lParam) { +override LRESULT WM_LBUTTONDBLCLK (int wParam, int lParam) { /* * Feature in Windows. Windows uses the WS_TABSTOP * style for the scroll bar to decide that focus @@ -693,7 +698,7 @@ return result; } -LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { +override LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { /* * Feature in Windows. Windows uses the WS_TABSTOP * style for the scroll bar to decide that focus @@ -726,12 +731,12 @@ return result; } -LRESULT WM_SETFOCUS (int wParam, int lParam) { +override LRESULT WM_SETFOCUS (int wParam, int lParam) { if (ignoreFocus) return null; return super.WM_SETFOCUS (wParam, lParam); } -LRESULT wmScrollChild (int wParam, int lParam) { +override LRESULT wmScrollChild (int wParam, int lParam) { /* Do nothing when scrolling is ending */ int code = wParam & 0xFFFF;
--- a/dwt/widgets/Spinner.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/Spinner.d Mon Feb 04 10:05:20 2008 +0100 @@ -55,6 +55,13 @@ * @since 3.1 */ public class Spinner extends Composite { + + alias Composite.computeSize computeSize; + alias Composite.sendKeyEvent sendKeyEvent; + alias Composite.setBackgroundImage setBackgroundImage; + alias Composite.setToolTipText setToolTipText; + alias Composite.windowProc windowProc; + int hwndText, hwndUpDown; bool ignoreModify; int pageIncrement, digits; @@ -103,7 +110,7 @@ super (parent, checkStyle (style)); } -int callWindowProc (int hwnd, int msg, int wParam, int lParam) { +override int callWindowProc (int hwnd, int msg, int wParam, int lParam) { if (handle is 0) return 0; if (hwnd is hwndText) { return OS.CallWindowProc (EditProc, hwnd, msg, wParam, lParam); @@ -125,15 +132,15 @@ return style & ~(DWT.H_SCROLL | DWT.V_SCROLL); } -bool checkHandle (int hwnd) { +override bool checkHandle (int hwnd) { return hwnd is handle || hwnd is hwndText || hwnd is hwndUpDown; } -protected void checkSubclass () { +override protected void checkSubclass () { if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); } -void createHandle () { +override void createHandle () { super.createHandle (); state &= ~(CANVAS | THEME_BACKGROUND); int hInstance = OS.GetModuleHandle (null); @@ -276,11 +283,11 @@ addListener (DWT.Verify, typedListener); } -int borderHandle () { +override int borderHandle () { return hwndText; } -public Point computeSize (int wHint, int hHint, bool changed) { +override public Point computeSize (int wHint, int hHint, bool changed) { checkWidget (); int width = 0, height = 0; if (wHint is DWT.DEFAULT || hHint is DWT.DEFAULT) { @@ -328,7 +335,7 @@ return new Point (trim.width, trim.height); } -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 trim of the text control */ @@ -393,23 +400,23 @@ OS.SendMessage (hwndText, OS.WM_CUT, 0, 0); } -int defaultBackground () { +override int defaultBackground () { return OS.GetSysColor (OS.COLOR_WINDOW); } -void enableWidget (bool enabled) { +override void enableWidget (bool enabled) { super.enableWidget (enabled); OS.EnableWindow (hwndText, enabled); OS.EnableWindow (hwndUpDown, enabled); } -void deregister () { +override void deregister () { super.deregister (); display.removeControl (hwndText); display.removeControl (hwndUpDown); } -bool hasFocus () { +override bool hasFocus () { int hwndFocus = OS.GetFocus (); if (hwndFocus is handle) return true; if (hwndFocus is hwndText) return true; @@ -593,13 +600,13 @@ OS.SendMessage (hwndText, OS.WM_PASTE, 0, 0); } -void register () { +override void register () { super.register (); display.addControl (hwndText, this); display.addControl (hwndUpDown, this); } -void releaseHandle () { +override void releaseHandle () { super.releaseHandle (); hwndText = hwndUpDown = 0; } @@ -677,7 +684,7 @@ eventTable.unhook (DWT.Verify, listener); } -bool sendKeyEvent (int type, int msg, int wParam, int lParam, Event event) { +override bool sendKeyEvent (int type, int msg, int wParam, int lParam, Event event) { if (!super.sendKeyEvent (type, msg, wParam, lParam, event)) { return false; } @@ -760,12 +767,12 @@ return false; } -void setBackgroundImage (int hBitmap) { +override void setBackgroundImage (int hBitmap) { super.setBackgroundImage (hBitmap); OS.InvalidateRect (hwndText, null, true); } -void setBackgroundPixel (int pixel) { +override void setBackgroundPixel (int pixel) { super.setBackgroundPixel (pixel); OS.InvalidateRect (hwndText, null, true); } @@ -804,7 +811,7 @@ setSelection (pos, false, true, false); } -void setForegroundPixel (int pixel) { +override void setForegroundPixel (int pixel) { super.setForegroundPixel (pixel); OS.InvalidateRect (hwndText, null, true); } @@ -971,7 +978,7 @@ if (notify) postEvent (DWT.Selection); } -void setToolTipText (Shell shell, String string) { +override void setToolTipText (Shell shell, String string) { shell.setToolTipText (hwndText, string); shell.setToolTipText (hwndUpDown, string); } @@ -1014,14 +1021,14 @@ setSelection (selection, true, true, false); } -void subclass () { +override void subclass () { super.subclass (); int newProc = display.windowProc; OS.SetWindowLong (hwndText, OS.GWL_WNDPROC, newProc); OS.SetWindowLong (hwndUpDown, OS.GWL_WNDPROC, newProc); } -void unsubclass () { +override void unsubclass () { super.unsubclass (); OS.SetWindowLong (hwndText, OS.GWL_WNDPROC, EditProc); OS.SetWindowLong (hwndUpDown, OS.GWL_WNDPROC, UpDownProc); @@ -1060,11 +1067,11 @@ return event.text; } -int widgetExtStyle () { +override int widgetExtStyle () { return super.widgetExtStyle () & ~OS.WS_EX_CLIENTEDGE; } -int windowProc (int hwnd, int msg, int wParam, int lParam) { +override int windowProc (int hwnd, int msg, int wParam, int lParam) { if (hwnd is hwndText || hwnd is hwndUpDown) { LRESULT result = null; switch (msg) { @@ -1124,29 +1131,29 @@ return super.windowProc (hwnd, msg, wParam, lParam); } -LRESULT WM_ERASEBKGND (int wParam, int lParam) { +override LRESULT WM_ERASEBKGND (int wParam, int lParam) { super.WM_ERASEBKGND (wParam, lParam); drawBackground (wParam); return LRESULT.ONE; } -LRESULT WM_KILLFOCUS (int wParam, int lParam) { +override LRESULT WM_KILLFOCUS (int wParam, int lParam) { return null; } -LRESULT WM_SETFOCUS (int wParam, int lParam) { +override LRESULT WM_SETFOCUS (int wParam, int lParam) { OS.SetFocus (hwndText); return null; } -LRESULT WM_SETFONT (int wParam, int lParam) { +override LRESULT WM_SETFONT (int wParam, int lParam) { LRESULT result = super.WM_SETFONT (wParam, lParam); if (result !is null) return result; OS.SendMessage (hwndText, OS.WM_SETFONT, wParam, lParam); return result; } -LRESULT WM_SIZE (int wParam, int lParam) { +override LRESULT WM_SIZE (int wParam, int lParam) { LRESULT result = super.WM_SIZE (wParam, lParam); if (isDisposed ()) return result; int width = lParam & 0xFFFF, height = lParam >> 16; @@ -1159,7 +1166,7 @@ return result; } -LRESULT wmChar (int hwnd, int wParam, int lParam) { +override LRESULT wmChar (int hwnd, int wParam, int lParam) { LRESULT result = super.wmChar (hwnd, wParam, lParam); if (result !is null) return result; /* @@ -1245,7 +1252,7 @@ return null; } -LRESULT wmCommandChild (int wParam, int lParam) { +override LRESULT wmCommandChild (int wParam, int lParam) { int code = wParam >> 16; switch (code) { case OS.EN_CHANGE: @@ -1267,7 +1274,7 @@ return super.wmCommandChild (wParam, lParam); } -LRESULT wmKeyDown (int hwnd, int wParam, int lParam) { +override LRESULT wmKeyDown (int hwnd, int wParam, int lParam) { LRESULT result = super.wmKeyDown (hwnd, wParam, lParam); if (result !is null) return result; @@ -1310,7 +1317,7 @@ return result; } -LRESULT wmKillFocus (int hwnd, int wParam, int lParam) { +override LRESULT wmKillFocus (int hwnd, int wParam, int lParam) { int value = getSelectionText (); if (value is -1) { if (OS.IsWinCE) { @@ -1323,7 +1330,7 @@ return super.wmKillFocus (hwnd, wParam, lParam); } -LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) { +override LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) { switch (hdr.code) { case OS.UDN_DELTAPOS: NMUPDOWN lpnmud = new NMUPDOWN (); @@ -1352,7 +1359,7 @@ return super.wmNotifyChild (hdr, wParam, lParam); } -LRESULT wmScrollChild (int wParam, int lParam) { +override LRESULT wmScrollChild (int wParam, int lParam) { int code = wParam & 0xFFFF; switch (code) { case OS.SB_THUMBPOSITION:
--- a/dwt/widgets/TabFolder.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/TabFolder.d Mon Feb 04 10:05:20 2008 +0100 @@ -60,6 +60,10 @@ * </p> */ public class TabFolder extends Composite { + + alias Composite.computeSize computeSize; + alias Composite.windowProc windowProc; + TabItem [] items; ImageList imageList; static final int TabFolderProc; @@ -171,7 +175,7 @@ addListener(DWT.DefaultSelection,typedListener); } -int callWindowProc (int hwnd, int msg, int wParam, int lParam) { +override int callWindowProc (int hwnd, int msg, int wParam, int lParam) { if (handle is 0) return 0; return OS.CallWindowProc (TabFolderProc, hwnd, msg, wParam, lParam); } @@ -196,11 +200,11 @@ return style & ~(DWT.H_SCROLL | DWT.V_SCROLL); } -protected void checkSubclass () { +override protected void checkSubclass () { if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); } -public Point computeSize (int wHint, int hHint, bool changed) { +override public Point computeSize (int wHint, int hHint, bool changed) { checkWidget (); Point size = super.computeSize (wHint, hHint, changed); RECT insetRect = new RECT (), itemRect = new RECT (); @@ -221,7 +225,7 @@ return size; } -public Rectangle computeTrim (int x, int y, int width, int height) { +override public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget (); RECT rect = new RECT (); OS.SetRect (rect, x, y, x + width, y + height); @@ -262,7 +266,7 @@ } } -void createHandle () { +override void createHandle () { super.createHandle (); state &= ~(CANVAS | THEME_BACKGROUND); @@ -282,7 +286,7 @@ OS.SendMessage (hwndToolTip, OS.TTM_SETMAXTIPWIDTH, 0, 0x7FFF); } -void createWidget () { +override void createWidget () { super.createWidget (); items = new TabItem [4]; } @@ -314,7 +318,7 @@ } } -void drawThemeBackground (int hDC, int hwnd, RECT rect) { +override void drawThemeBackground (int hDC, int hwnd, RECT rect) { RECT rect2 = new RECT (); OS.GetClientRect (handle, rect2); OS.MapWindowPoints (handle, hwnd, rect2, 2); @@ -323,12 +327,12 @@ } } -Control findThemeControl () { +override Control findThemeControl () { /* It is not possible to change the background of this control */ return this; } -public Rectangle getClientArea () { +override public Rectangle getClientArea () { checkWidget (); forceResize (); RECT rect = new RECT (); @@ -485,7 +489,7 @@ return -1; } -Point minimumSize (int wHint, int hHint, bool flushCache) { +override Point minimumSize (int wHint, int hHint, bool flushCache) { Control [] children = _getChildren (); int width = 0, height = 0; for (int i=0; i<children.length; i++) { @@ -509,7 +513,7 @@ return new Point (width, height); } -bool mnemonicHit (char key) { +override bool mnemonicHit (char key) { for (int i=0; i<items.length; i++) { TabItem item = items [i]; if (item !is null) { @@ -525,7 +529,7 @@ return false; } -bool mnemonicMatch (char key) { +override bool mnemonicMatch (char key) { for (int i=0; i<items.length; i++) { TabItem item = items [i]; if (item !is null) { @@ -538,7 +542,7 @@ return false; } -void releaseChildren (bool destroy) { +override void releaseChildren (bool destroy) { if (items !is null) { int count = OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0); for (int i=0; i<count; i++) { @@ -552,7 +556,7 @@ super.releaseChildren (destroy); } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); if (imageList !is null) { OS.SendMessage (handle, OS.TCM_SETIMAGELIST, 0, 0); @@ -561,7 +565,7 @@ imageList = null; } -void removeControl (Control control) { +override void removeControl (Control control) { super.removeControl (control); int count = OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0); for (int i=0; i<count; i++) { @@ -646,7 +650,7 @@ } } -public void setFont (Font font) { +override public void setFont (Font font) { checkWidget (); Rectangle oldRect = getClientArea (); super.setFont (font); @@ -711,7 +715,7 @@ } } -String toolTipText (NMTTDISPINFO hdr) { +override String toolTipText (NMTTDISPINFO hdr) { if ((hdr.uFlags & OS.TTF_IDISHWND) !is 0) { return null; } @@ -727,7 +731,7 @@ return super.toolTipText (hdr); } -bool traversePage (bool next) { +override bool traversePage (bool next) { int count = getItemCount (); if (count <= 1) return false; int index = getSelectionIndex (); @@ -745,7 +749,7 @@ return false; } -int widgetStyle () { +override int widgetStyle () { /* * Bug in Windows. Under certain circumstances, * when TCM_SETITEM is used to change the text @@ -759,15 +763,15 @@ return bits | OS.TCS_TABS | OS.TCS_TOOLTIPS; } -TCHAR windowClass () { +override TCHAR windowClass () { return TabFolderClass; } -int windowProc () { +override int windowProc () { return TabFolderProc; } -LRESULT WM_GETDLGCODE (int wParam, int lParam) { +override LRESULT WM_GETDLGCODE (int wParam, int lParam) { LRESULT result = super.WM_GETDLGCODE (wParam, lParam); /* * Return DLGC_BUTTON so that mnemonics will be @@ -778,7 +782,7 @@ return new LRESULT (OS.DLGC_BUTTON); } -LRESULT WM_MOUSELEAVE (int wParam, int lParam) { +override LRESULT WM_MOUSELEAVE (int wParam, int lParam) { LRESULT result = super.WM_MOUSELEAVE (wParam, lParam); if (result !is null) return result; /* @@ -806,7 +810,7 @@ return result; } -LRESULT WM_NCHITTEST (int wParam, int lParam) { +override LRESULT WM_NCHITTEST (int wParam, int lParam) { LRESULT result = super.WM_NCHITTEST (wParam, lParam); if (result !is null) return result; /* @@ -825,7 +829,7 @@ return new LRESULT (hittest); } -LRESULT WM_NOTIFY (int wParam, int lParam) { +override LRESULT WM_NOTIFY (int wParam, int lParam) { /* * Feature in Windows. When the tab folder window * proc processes WM_NOTIFY, it forwards this @@ -849,7 +853,7 @@ return LRESULT.ZERO; } -LRESULT WM_PARENTNOTIFY (int wParam, int lParam) { +override LRESULT WM_PARENTNOTIFY (int wParam, int lParam) { LRESULT result = super.WM_PARENTNOTIFY (wParam, lParam); if (result !is null) return result; /* @@ -879,7 +883,7 @@ return result; } -LRESULT WM_SIZE (int wParam, int lParam) { +override LRESULT WM_SIZE (int wParam, int lParam) { LRESULT result = super.WM_SIZE (wParam, lParam); /* * It is possible (but unlikely), that application @@ -900,7 +904,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 null) return result; if (!OS.IsWindowVisible (handle)) return result; @@ -949,7 +953,7 @@ return result; } -LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) { +override LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) { int code = hdr.code; switch (code) { case OS.TCN_SELCHANGE:
--- a/dwt/widgets/TabItem.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/TabItem.d Mon Feb 04 10:05:20 2008 +0100 @@ -153,11 +153,11 @@ OS.HeapFree (hHeap, 0, pszText); } -protected void checkSubclass () { +override protected void checkSubclass () { if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); } -void destroyWidget () { +override void destroyWidget () { parent.destroyItem (this); releaseHandle (); } @@ -210,12 +210,12 @@ return toolTipText; } -void releaseHandle () { +override void releaseHandle () { super.releaseHandle (); parent = null; } -void releaseParent () { +override void releaseParent () { super.releaseParent (); int index = parent.indexOf (this); if (index is parent.getSelectionIndex ()) { @@ -223,7 +223,7 @@ } } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); control = null; } @@ -266,7 +266,7 @@ if (oldControl !is null) oldControl.setVisible (false); } -public void setImage (Image image) { +override public void setImage (Image image) { checkWidget(); int index = parent.indexOf (this); if (index is -1) return; @@ -314,7 +314,7 @@ * </ul> * */ -public void setText (String string) { +override public void setText (String string) { checkWidget(); if (string is null) error (DWT.ERROR_NULL_ARGUMENT); if (string.equals (text)) return;
--- a/dwt/widgets/Table.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/Table.d Mon Feb 04 10:05:20 2008 +0100 @@ -101,6 +101,13 @@ */ public class Table extends Composite { + + alias Composite.computeSize computeSize; + alias Composite.setBackgroundImage setBackgroundImage; + alias Composite.setBounds setBounds; + alias Composite.sort sort; + alias Composite.update update; + TableItem [] items; TableColumn [] columns; int columnCount, customCount; @@ -165,7 +172,7 @@ super (parent, checkStyle (style)); } -void _addListener (int eventType, Listener listener) { +override void _addListener (int eventType, Listener listener) { super._addListener (eventType, listener); switch (eventType) { case DWT.MeasureItem: @@ -221,7 +228,7 @@ addListener (DWT.DefaultSelection,typedListener); } -int callWindowProc (int hwnd, int msg, int wParam, int lParam) { +override int callWindowProc (int hwnd, int msg, int wParam, int lParam) { return callWindowProc (hwnd, msg, wParam, lParam, false); } @@ -825,7 +832,7 @@ return new LRESULT (code); } -void checkBuffered () { +override void checkBuffered () { super.checkBuffered (); if (OS.COMCTL32_MAJOR >= 6) style |= DWT.DOUBLE_BUFFERED; if ((style & DWT.VIRTUAL) !is 0) style |= DWT.DOUBLE_BUFFERED; @@ -857,12 +864,12 @@ return true; } -bool checkHandle (int hwnd) { +override bool checkHandle (int hwnd) { if (hwnd is handle) return true; return hwnd is OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0); } -protected void checkSubclass () { +override protected void checkSubclass () { if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); } @@ -1125,7 +1132,7 @@ } } -public Point computeSize (int wHint, int hHint, bool changed) { +override public Point computeSize (int wHint, int hHint, bool changed) { checkWidget (); if (fixScrollWidth) setScrollWidth (null, true); //This code is intentionally commented @@ -1186,7 +1193,7 @@ return new Point (width, height); } -void createHandle () { +override void createHandle () { super.createHandle (); state &= ~(CANVAS | THEME_BACKGROUND); @@ -1515,18 +1522,18 @@ if (count is 0) setScrollWidth (item, false); } -void createWidget () { +override void createWidget () { super.createWidget (); itemHeight = hotIndex = -1; items = new TableItem [4]; columns = new TableColumn [4]; } -int defaultBackground () { +override int defaultBackground () { return OS.GetSysColor (OS.COLOR_WINDOW); } -void deregister () { +override void deregister () { super.deregister (); int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0); if (hwndHeader !is 0) display.removeControl (hwndHeader); @@ -2629,13 +2636,13 @@ return (result !is 0) && ((lvItem.state & OS.LVIS_SELECTED) !is 0); } -void register () { +override void register () { super.register (); int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0); if (hwndHeader !is 0) display.addControl (hwndHeader, this); } -void releaseChildren (bool destroy) { +override void releaseChildren (bool destroy) { if (items !is null) { int itemCount = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0); /* @@ -2681,7 +2688,7 @@ super.releaseChildren (destroy); } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); customDraw = false; currentItem = null; @@ -3483,12 +3490,12 @@ OS.RestoreDC (hDC, nSavedDC); } -void setBackgroundImage (int hBitmap) { +override void setBackgroundImage (int hBitmap) { super.setBackgroundImage (hBitmap); if (!customDraw) setBackgroundTransparent (hBitmap !is 0); } -void setBackgroundPixel (int newPixel) { +override void setBackgroundPixel (int newPixel) { if (!customDraw) { if (findImageControl () !is null) return; if (newPixel is -1) newPixel = defaultBackground (); @@ -3588,7 +3595,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) { /* * Bug in Windows. If the table column widths are adjusted * in WM_SIZE or WM_POSITIONCHANGED using LVM_SETCOLUMNWIDTH @@ -3857,7 +3864,7 @@ OS.SendMessage (handle, OS.LVM_SETSELECTIONMARK, 0, index); } -public void setFont (Font font) { +override public void setFont (Font font) { checkWidget (); /* * Bug in Windows. Making any change to an item that @@ -3897,7 +3904,7 @@ OS.InvalidateRect (hwndHeader, null, true); } -void setForegroundPixel (int pixel) { +override void setForegroundPixel (int pixel) { /* * The Windows table control uses CLR_DEFAULT to indicate * that it is using the default foreground color. This @@ -4126,7 +4133,7 @@ } } -public void setRedraw (bool redraw) { +override public void setRedraw (bool redraw) { checkWidget (); /* * Feature in Windows. When WM_SETREDRAW is used to turn @@ -4852,7 +4859,7 @@ // redraw (); } -void subclass () { +override void subclass () { super.subclass (); if (HeaderProc !is 0) { int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0); @@ -4860,7 +4867,7 @@ } } -String toolTipText (NMTTDISPINFO hdr) { +override String toolTipText (NMTTDISPINFO hdr) { int hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0); if (hwndToolTip is hdr.hwndFrom && toolTipText !is null) return ""; //$NON-NLS-1$ if (headerToolTipHandle is hdr.hwndFrom) { @@ -4872,7 +4879,7 @@ return super.toolTipText (hdr); } -void unsubclass () { +override void unsubclass () { super.unsubclass (); if (HeaderProc !is 0) { int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0); @@ -4880,7 +4887,7 @@ } } -void update (bool all) { +override void update (bool all) { // checkWidget (); /* * When there are many columns in a table, scrolling performance @@ -4929,7 +4936,7 @@ } } -void updateImages () { +override void updateImages () { if (sortColumn !is null && !sortColumn.isDisposed ()) { if (OS.COMCTL32_MAJOR < 6) { switch (sortDirection) { @@ -4952,7 +4959,7 @@ OS.SendMessage (handle, OS.LVM_SETEXTENDEDLISTVIEWSTYLE, OS.LVS_EX_HEADERDRAGDROP, newBits); } -int widgetStyle () { +override int widgetStyle () { int bits = super.widgetStyle () | OS.LVS_SHAREIMAGELISTS; if ((style & DWT.HIDE_SELECTION) is 0) bits |= OS.LVS_SHOWSELALWAYS; if ((style & DWT.SINGLE) !is 0) bits |= OS.LVS_SINGLESEL; @@ -4967,15 +4974,15 @@ return bits; } -TCHAR windowClass () { +override TCHAR windowClass () { return TableClass; } -int windowProc () { +override int windowProc () { return TableProc; } -int windowProc (int hwnd, int msg, int wParam, int lParam) { +override int windowProc (int hwnd, int msg, int wParam, int lParam) { if (handle is 0) return 0; if (hwnd !is handle) { switch (msg) { @@ -5061,7 +5068,7 @@ return super.windowProc (hwnd, msg, wParam, lParam); } -LRESULT WM_CHAR (int wParam, int lParam) { +override LRESULT WM_CHAR (int wParam, int lParam) { LRESULT result = super.WM_CHAR (wParam, lParam); if (result !is null) return result; switch (wParam) { @@ -5103,7 +5110,7 @@ return result; } -LRESULT WM_CONTEXTMENU (int wParam, int lParam) { +override LRESULT WM_CONTEXTMENU (int wParam, int lParam) { /* * Feature in Windows. For some reason, when the right * mouse button is pressed over an item, Windows sends @@ -5120,7 +5127,7 @@ return super.WM_CONTEXTMENU (wParam, lParam); } -LRESULT WM_ERASEBKGND (int wParam, int lParam) { +override LRESULT WM_ERASEBKGND (int wParam, int lParam) { LRESULT result = super.WM_ERASEBKGND (wParam, lParam); if (findImageControl () !is null) return LRESULT.ONE; if (OS.COMCTL32_MAJOR < 6) { @@ -5132,7 +5139,7 @@ return result; } -LRESULT WM_GETOBJECT (int wParam, int lParam) { +override LRESULT WM_GETOBJECT (int wParam, int lParam) { /* * Ensure that there is an accessible object created for this * control because support for checked item accessibility is @@ -5144,7 +5151,7 @@ return super.WM_GETOBJECT (wParam, lParam); } -LRESULT WM_KEYDOWN (int wParam, int lParam) { +override LRESULT WM_KEYDOWN (int wParam, int lParam) { LRESULT result = super.WM_KEYDOWN (wParam, lParam); if (result !is null) return result; switch (wParam) { @@ -5212,7 +5219,7 @@ return result; } -LRESULT WM_KILLFOCUS (int wParam, int lParam) { +override LRESULT WM_KILLFOCUS (int wParam, int lParam) { LRESULT result = super.WM_KILLFOCUS (wParam, lParam); /* * Bug in Windows. When focus is lost, Windows does not @@ -5226,7 +5233,7 @@ return result; } -LRESULT WM_LBUTTONDBLCLK (int wParam, int lParam) { +override LRESULT WM_LBUTTONDBLCLK (int wParam, int lParam) { /* * Feature in Windows. When the user selects outside of @@ -5274,7 +5281,7 @@ return LRESULT.ZERO; } -LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { +override LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { /* * Feature in Windows. For some reason, capturing * the mouse after processing the mouse event for the @@ -5310,7 +5317,7 @@ return result; } -LRESULT WM_MOUSEHOVER (int wParam, int lParam) { +override LRESULT WM_MOUSEHOVER (int wParam, int lParam) { /* * Feature in Windows. Despite the fact that hot * tracking is not enabled, the hot tracking code @@ -5325,7 +5332,7 @@ return LRESULT.ZERO; } -LRESULT WM_PAINT (int wParam, int lParam) { +override LRESULT WM_PAINT (int wParam, int lParam) { if (!ignoreShrink) { /* Resize the item array to match the item count */ int count = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0); @@ -5399,7 +5406,7 @@ return super.WM_PAINT (wParam, lParam); } -LRESULT WM_RBUTTONDBLCLK (int wParam, int lParam) { +override LRESULT WM_RBUTTONDBLCLK (int wParam, int lParam) { /* * Feature in Windows. When the user selects outside of * a table item, Windows deselects all the items, even @@ -5423,7 +5430,7 @@ return LRESULT.ZERO; } -LRESULT WM_RBUTTONDOWN (int wParam, int lParam) { +override LRESULT WM_RBUTTONDOWN (int wParam, int lParam) { /* * Feature in Windows. For some reason, capturing * the mouse after processing the mouse event for the @@ -5434,7 +5441,7 @@ return sendMouseDownEvent (DWT.MouseDown, 3, OS.WM_RBUTTONDOWN, wParam, lParam); } -LRESULT WM_SETFOCUS (int wParam, int lParam) { +override LRESULT WM_SETFOCUS (int wParam, int lParam) { LRESULT result = super.WM_SETFOCUS (wParam, lParam); /* * Bug in Windows. When focus is gained after the @@ -5469,7 +5476,7 @@ return result; } -LRESULT WM_SETFONT (int wParam, int lParam) { +override LRESULT WM_SETFONT (int wParam, int lParam) { LRESULT result = super.WM_SETFONT (wParam, lParam); if (result !is null) return result; @@ -5493,7 +5500,7 @@ return result; } -LRESULT WM_SIZE (int wParam, int lParam) { +override LRESULT WM_SIZE (int wParam, int lParam) { if (ignoreResize) return null; if (hooks (DWT.EraseItem) || hooks (DWT.PaintItem)) { OS.InvalidateRect (handle, null, true); @@ -5505,7 +5512,7 @@ return super.WM_SIZE (wParam, lParam); } -LRESULT WM_SYSCOLORCHANGE (int wParam, int lParam) { +override LRESULT WM_SYSCOLORCHANGE (int wParam, int lParam) { LRESULT result = super.WM_SYSCOLORCHANGE (wParam, lParam); if (result !is null) return result; if (findBackgroundControl () is null) { @@ -5518,7 +5525,7 @@ return result; } -LRESULT WM_HSCROLL (int wParam, int lParam) { +override LRESULT WM_HSCROLL (int wParam, int lParam) { /* * Bug in Windows. When a table that is drawing grid lines * is slowly scrolled horizontally to the left, the table does @@ -5583,7 +5590,7 @@ return result; } -LRESULT WM_VSCROLL (int wParam, int lParam) { +override LRESULT WM_VSCROLL (int wParam, int lParam) { /* * When there are many columns in a table, scrolling performance * can be improved by temporarily unsubclassing the window proc @@ -5651,7 +5658,7 @@ return result; } -LRESULT wmMeasureChild (int wParam, int lParam) { +override LRESULT wmMeasureChild (int wParam, int lParam) { MEASUREITEMSTRUCT struct = new MEASUREITEMSTRUCT (); OS.MoveMemory (struct, lParam, MEASUREITEMSTRUCT.sizeof); if (itemHeight is -1) { @@ -5665,7 +5672,7 @@ return null; } -LRESULT wmNotify (NMHDR hdr, int wParam, int lParam) { +override LRESULT wmNotify (NMHDR hdr, int wParam, int lParam) { int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0); if (hdr.hwndFrom is hwndHeader) { /* @@ -5855,7 +5862,7 @@ return result; } -LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) { +override LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) { switch (hdr.code) { case OS.LVN_ODFINDITEMA: case OS.LVN_ODFINDITEMW: {
--- a/dwt/widgets/TableColumn.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/TableColumn.d Mon Feb 04 10:05:20 2008 +0100 @@ -197,11 +197,11 @@ return checkBits (style, DWT.LEFT, DWT.CENTER, DWT.RIGHT, 0, 0, 0); } -protected void checkSubclass () { +override protected void checkSubclass () { if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); } -void destroyWidget () { +override void destroyWidget () { parent.destroyItem (this); releaseHandle (); } @@ -226,7 +226,7 @@ return DWT.LEFT; } -String getNameText () { +override String getNameText () { return getText (); } @@ -481,12 +481,12 @@ } } -void releaseHandle () { +override void releaseHandle () { super.releaseHandle (); parent = null; } -void releaseParent () { +override void releaseParent () { super.releaseParent (); if (parent.sortColumn is this) { parent.sortColumn = null; @@ -592,7 +592,7 @@ } } -public void setImage (Image image) { +override public void setImage (Image image) { checkWidget(); if (image !is null && image.isDisposed ()) { error (DWT.ERROR_INVALID_ARGUMENT); @@ -772,7 +772,7 @@ } } -public void setText (String string) { +override public void setText (String string) { checkWidget (); if (string is null) error (DWT.ERROR_NULL_ARGUMENT); if (string.equals (text)) return;
--- a/dwt/widgets/TableItem.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/TableItem.d Mon Feb 04 10:05:20 2008 +0100 @@ -134,7 +134,7 @@ return control; } -protected void checkSubclass () { +override protected void checkSubclass () { if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); } @@ -150,7 +150,7 @@ if ((parent.style & DWT.VIRTUAL) !is 0) cached = false; } -void destroyWidget () { +override void destroyWidget () { parent.destroyItem (this); releaseHandle (); } @@ -531,7 +531,7 @@ return grayed; } -public Image getImage () { +override public Image getImage () { checkWidget(); if (!parent.checkData (this, true)) error (DWT.ERROR_WIDGET_DISPOSED); return super.getImage (); @@ -599,7 +599,7 @@ return imageIndent; } -String getNameText () { +override String getNameText () { if ((parent.style & DWT.VIRTUAL) !is 0) { if (!cached) return "*virtual*"; //$NON-NLS-1$ } @@ -621,7 +621,7 @@ return parent; } -public String getText () { +override public String getText () { checkWidget(); if (!parent.checkData (this, true)) error (DWT.ERROR_WIDGET_DISPOSED); return super.getText (); @@ -702,12 +702,12 @@ OS.InvalidateRect (hwnd, rect, true); } -void releaseHandle () { +override void releaseHandle () { super.releaseHandle (); parent = null; } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); strings = null; images = null; @@ -1054,7 +1054,7 @@ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ -public void setImage (Image [] images) { +override public void setImage (Image [] images) { checkWidget(); if (images is null) error (DWT.ERROR_NULL_ARGUMENT); for (int i=0; i<images.length; i++) { @@ -1165,7 +1165,7 @@ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ -public void setText (String [] strings) { +override public void setText (String [] strings) { checkWidget(); if (strings is null) error (DWT.ERROR_NULL_ARGUMENT); for (int i=0; i<strings.length; i++) {
--- a/dwt/widgets/Text.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/Text.d Mon Feb 04 10:05:20 2008 +0100 @@ -54,6 +54,12 @@ * </p> */ public class Text extends Scrollable { + + alias Scrollable.computeSize computeSize; + alias Scrollable.dragDetect dragDetect; + alias Scrollable.sendKeyEvent sendKeyEvent; + alias Scrollable.setBounds setBounds; + int tabs, oldStart, oldEnd; bool doubleClick, ignoreModify, ignoreVerify, ignoreCharacter; String message; @@ -148,12 +154,12 @@ super (parent, checkStyle (style)); } -int callWindowProc (int hwnd, int msg, int wParam, int lParam) { +override int callWindowProc (int hwnd, int msg, int wParam, int lParam) { if (handle is 0) return 0; return OS.CallWindowProc (EditProc, hwnd, msg, wParam, lParam); } -void createHandle () { +override void createHandle () { super.createHandle (); OS.SendMessage (handle, OS.EM_LIMITTEXT, 0, 0); if ((style & DWT.READ_ONLY) !is 0) { @@ -341,7 +347,7 @@ } } -public Point computeSize (int wHint, int hHint, bool changed) { +override public Point computeSize (int wHint, int hHint, bool changed) { checkWidget (); int height = 0, width = 0; if (wHint is DWT.DEFAULT || hHint is DWT.DEFAULT) { @@ -395,7 +401,7 @@ return new Point (trim.width, trim.height); } -public Rectangle computeTrim (int x, int y, int width, int height) { +override public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget (); Rectangle rect = super.computeTrim (x, y, width, height); /* @@ -433,7 +439,7 @@ OS.SendMessage (handle, OS.WM_COPY, 0, 0); } -void createWidget () { +override void createWidget () { super.createWidget (); message = ""; doubleClick = true; @@ -459,12 +465,12 @@ OS.SendMessage (handle, OS.WM_CUT, 0, 0); } -int defaultBackground () { +override int defaultBackground () { int bits = OS.GetWindowLong (handle, OS.GWL_STYLE); return OS.GetSysColor ((bits & OS.ES_READONLY) !is 0 ? OS.COLOR_3DFACE : OS.COLOR_WINDOW); } -bool dragDetect (int hwnd, int x, int y, bool filter, bool [] detect, bool [] consume) { +override bool dragDetect (int hwnd, int x, int y, bool filter, bool [] detect, bool [] consume) { if (filter) { int [] start = new int [1], end = new int [1]; OS.SendMessage (handle, OS.EM_GETSEL, start, end); @@ -536,7 +542,7 @@ OS.SetWindowLong (handle, OS.GWL_STYLE, bits2); } -public int getBorderWidth () { +override public int getBorderWidth () { checkWidget (); /* * Feature in Windows 2000 and XP. Despite the fact that WS_BORDER @@ -1224,7 +1230,7 @@ OS.SendMessage (handle, OS.WM_PASTE, 0, 0); } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); message = null; } @@ -1315,7 +1321,7 @@ OS.SendMessage (handle, OS.EM_SETSEL, 0, -1); } -bool sendKeyEvent (int type, int msg, int wParam, int lParam, Event event) { +override bool sendKeyEvent (int type, int msg, int wParam, int lParam, Event event) { if (!super.sendKeyEvent (type, msg, wParam, lParam, event)) { return false; } @@ -1429,7 +1435,7 @@ return false; } -void setBounds (int x, int y, int width, int height, int flags) { +override void setBounds (int x, int y, int width, int height, int flags) { /* * Feature in Windows. When the caret is moved, * the text widget scrolls to show the new location. @@ -1464,7 +1470,7 @@ super.setBounds (x, y, width, height, flags); } -void setDefaultFont () { +override void setDefaultFont () { super.setDefaultFont (); setMargins (); } @@ -1545,7 +1551,7 @@ OS.SendMessage (handle, OS.EM_SETREADONLY, editable ? 0 : 1, 0); } -public void setFont (Font font) { +override public void setFont (Font font) { checkWidget (); super.setFont (font); setTabStops (tabs); @@ -1705,7 +1711,7 @@ OS.SendMessage (handle, OS.EM_SCROLLCARET, 0, 0); } -public void setRedraw (bool redraw) { +override public void setRedraw (bool redraw) { checkWidget (); super.setRedraw (redraw); /* @@ -1978,7 +1984,7 @@ return mbcsTotal; } -int widgetStyle () { +override int widgetStyle () { int bits = super.widgetStyle () | OS.ES_AUTOHSCROLL; if ((style & DWT.PASSWORD) !is 0) bits |= OS.ES_PASSWORD; if ((style & DWT.CENTER) !is 0) bits |= OS.ES_CENTER; @@ -2008,15 +2014,15 @@ return bits; } -TCHAR windowClass () { +override TCHAR windowClass () { return EditClass; } -int windowProc () { +override int windowProc () { return EditProc; } -int windowProc (int hwnd, int msg, int wParam, int lParam) { +override int windowProc (int hwnd, int msg, int wParam, int lParam) { if (msg is OS.EM_UNDO) { int bits = OS.GetWindowLong (handle, OS.GWL_STYLE); if ((bits & OS.ES_MULTILINE) is 0) { @@ -2033,7 +2039,7 @@ return super.windowProc (hwnd, msg, wParam, lParam); } -LRESULT WM_CHAR (int wParam, int lParam) { +override LRESULT WM_CHAR (int wParam, int lParam) { if (ignoreCharacter) return null; LRESULT result = super.WM_CHAR (wParam, lParam); if (result !is null) return result; @@ -2071,19 +2077,19 @@ return result; } -LRESULT WM_CLEAR (int wParam, int lParam) { +override LRESULT WM_CLEAR (int wParam, int lParam) { LRESULT result = super.WM_CLEAR (wParam, lParam); if (result !is null) return result; return wmClipboard (OS.WM_CLEAR, wParam, lParam); } -LRESULT WM_CUT (int wParam, int lParam) { +override LRESULT WM_CUT (int wParam, int lParam) { LRESULT result = super.WM_CUT (wParam, lParam); if (result !is null) return result; return wmClipboard (OS.WM_CUT, wParam, lParam); } -LRESULT WM_ERASEBKGND (int wParam, int lParam) { +override LRESULT WM_ERASEBKGND (int wParam, int lParam) { LRESULT result = super.WM_ERASEBKGND (wParam, lParam); if ((style & DWT.READ_ONLY) !is 0) { if ((style & (DWT.BORDER | DWT.H_SCROLL | DWT.V_SCROLL)) is 0) { @@ -2109,7 +2115,7 @@ return result; } -LRESULT WM_GETDLGCODE (int wParam, int lParam) { +override LRESULT WM_GETDLGCODE (int wParam, int lParam) { LRESULT result = super.WM_GETDLGCODE (wParam, lParam); if (result !is null) return result; @@ -2142,7 +2148,7 @@ return null; } -LRESULT WM_IME_CHAR (int wParam, int lParam) { +override LRESULT WM_IME_CHAR (int wParam, int lParam) { /* Process a DBCS character */ Display display = this.display; @@ -2176,7 +2182,7 @@ return new LRESULT (result); } -LRESULT WM_LBUTTONDBLCLK (int wParam, int lParam) { +override LRESULT WM_LBUTTONDBLCLK (int wParam, int lParam) { /* * Prevent Windows from processing WM_LBUTTONDBLCLK * when double clicking behavior is disabled by not @@ -2214,7 +2220,7 @@ return result; } -LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { +override LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { if (OS.IsPPC) { LRESULT result = null; Display display = this.display; @@ -2258,13 +2264,13 @@ return super.WM_LBUTTONDOWN (wParam, lParam); } -LRESULT WM_PASTE (int wParam, int lParam) { +override LRESULT WM_PASTE (int wParam, int lParam) { LRESULT result = super.WM_PASTE (wParam, lParam); if (result !is null) return result; return wmClipboard (OS.WM_PASTE, wParam, lParam); } -LRESULT WM_UNDO (int wParam, int lParam) { +override LRESULT WM_UNDO (int wParam, int lParam) { LRESULT result = super.WM_UNDO (wParam, lParam); if (result !is null) return result; return wmClipboard (OS.WM_UNDO, wParam, lParam); @@ -2346,7 +2352,7 @@ return null; } -LRESULT wmColorChild (int wParam, int lParam) { +override LRESULT wmColorChild (int wParam, int lParam) { if ((style & DWT.READ_ONLY) !is 0) { if ((style & (DWT.BORDER | DWT.H_SCROLL | DWT.V_SCROLL)) is 0) { int bits = OS.GetWindowLong (handle, OS.GWL_STYLE); @@ -2371,7 +2377,7 @@ return super.wmColorChild (wParam, lParam); } -LRESULT wmCommandChild (int wParam, int lParam) { +override LRESULT wmCommandChild (int wParam, int lParam) { int code = wParam >> 16; switch (code) { case OS.EN_CHANGE:
--- a/dwt/widgets/ToolBar.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/ToolBar.d Mon Feb 04 10:05:20 2008 +0100 @@ -60,6 +60,12 @@ * </p> */ public class ToolBar extends Composite { + + alias Composite.computeSize computeSize; + alias Composite.setBackgroundImage setBackgroundImage; + alias Composite.setBounds setBounds; + alias Composite.windowProc windowProc; + int lastFocusId; ToolItem [] items; bool ignoreResize, ignoreMouse; @@ -153,7 +159,7 @@ } } -int callWindowProc (int hwnd, int msg, int wParam, int lParam) { +override int callWindowProc (int hwnd, int msg, int wParam, int lParam) { if (handle is 0) return 0; /* * Bug in Windows. For some reason, during the processing @@ -190,16 +196,16 @@ return style & ~(DWT.H_SCROLL | DWT.V_SCROLL); } -void checkBuffered () { +override void checkBuffered () { super.checkBuffered (); if (OS.COMCTL32_MAJOR >= 6) style |= DWT.DOUBLE_BUFFERED; } -protected void checkSubclass () { +override protected void checkSubclass () { if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); } -public Point computeSize (int wHint, int hHint, bool changed) { +override public Point computeSize (int wHint, int hHint, bool changed) { checkWidget (); int width = 0, height = 0; if ((style & DWT.VERTICAL) !is 0) { @@ -261,7 +267,7 @@ return new Point (width, height); } -public Rectangle computeTrim (int x, int y, int width, int height) { +override public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget (); Rectangle trim = super.computeTrim (x, y, width, height); int bits = OS.GetWindowLong (handle, OS.GWL_STYLE); @@ -269,7 +275,7 @@ return trim; } -void createHandle () { +override void createHandle () { super.createHandle (); state &= ~CANVAS; @@ -369,13 +375,13 @@ layoutItems (); } -void createWidget () { +override void createWidget () { super.createWidget (); items = new ToolItem [4]; lastFocusId = -1; } -int defaultBackground () { +override int defaultBackground () { if (OS.IsWinCE) return OS.GetSysColor (OS.COLOR_BTNFACE); return super.defaultBackground (); } @@ -425,7 +431,7 @@ layoutItems (); } -void enableWidget (bool enabled) { +override void enableWidget (bool enabled) { super.enableWidget (enabled); /* * Bug in Windows. When a tool item with the style @@ -687,7 +693,7 @@ } } -bool mnemonicHit (char ch) { +override bool mnemonicHit (char ch) { int key = Display.wcsToMbcs (ch); int [] id = new int [1]; if (OS.SendMessage (handle, OS.TB_MAPACCELERATOR, key, id) is 0) { @@ -701,7 +707,7 @@ return true; } -bool mnemonicMatch (char ch) { +override bool mnemonicMatch (char ch) { int key = Display.wcsToMbcs (ch); int [] id = new int [1]; if (OS.SendMessage (handle, OS.TB_MAPACCELERATOR, key, id) is 0) { @@ -718,7 +724,7 @@ return findMnemonic (items [id [0]].text) !is '\0'; } -void releaseChildren (bool destroy) { +override void releaseChildren (bool destroy) { if (items !is null) { for (int i=0; i<items.length; i++) { ToolItem item = items [i]; @@ -731,7 +737,7 @@ super.releaseChildren (destroy); } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); if (imageList !is null) { OS.SendMessage (handle, OS.TB_SETIMAGELIST, 0, 0); @@ -748,7 +754,7 @@ imageList = hotImageList = disabledImageList = null; } -void removeControl (Control control) { +override void removeControl (Control control) { super.removeControl (control); for (int i=0; i<items.length; i++) { ToolItem item = items [i]; @@ -758,12 +764,12 @@ } } -void setBackgroundImage (int hBitmap) { +override void setBackgroundImage (int hBitmap) { super.setBackgroundImage (hBitmap); setBackgroundTransparent (hBitmap !is 0); } -void setBackgroundPixel (int pixel) { +override void setBackgroundPixel (int pixel) { super.setBackgroundPixel (pixel); setBackgroundTransparent (pixel !is -1); } @@ -793,7 +799,7 @@ } } -void setBounds (int x, int y, int width, int height, int flags) { +override void setBounds (int x, int y, int width, int height, int flags) { /* * Feature in Windows. For some reason, when a tool bar is * repositioned more than once using DeferWindowPos () into @@ -812,7 +818,7 @@ super.setBounds (x, y, width, height, flags); } -void setDefaultFont () { +override void setDefaultFont () { super.setDefaultFont (); OS.SendMessage (handle, OS.TB_SETBITMAPSIZE, 0, 0); OS.SendMessage (handle, OS.TB_SETBUTTONSIZE, 0, 0); @@ -871,7 +877,7 @@ setDropDownItems (true); } -public void setFont (Font font) { +override public void setFont (Font font) { checkWidget (); setDropDownItems (false); super.setFont (font); @@ -918,14 +924,14 @@ setDropDownItems (true); } -public bool setParent (Composite parent) { +override public bool setParent (Composite parent) { checkWidget (); if (!super.setParent (parent)) return false; OS.SendMessage (handle, OS.TB_SETPARENT, parent.handle, 0); return true; } -public void setRedraw (bool redraw) { +override public void setRedraw (bool redraw) { checkWidget (); setDropDownItems (false); super.setRedraw (redraw); @@ -967,7 +973,7 @@ } } -bool setTabItemFocus () { +override bool setTabItemFocus () { int index = 0; while (index < items.length) { ToolItem item = items [index]; @@ -980,7 +986,7 @@ return super.setTabItemFocus (); } -String toolTipText (NMTTDISPINFO hdr) { +override String toolTipText (NMTTDISPINFO hdr) { if ((hdr.uFlags & OS.TTF_IDISHWND) !is 0) { return null; } @@ -1004,7 +1010,7 @@ return super.toolTipText (hdr); } -int widgetStyle () { +override int widgetStyle () { int bits = super.widgetStyle () | OS.CCS_NORESIZE | OS.TBSTYLE_TOOLTIPS | OS.TBSTYLE_CUSTOMERASE; if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) bits |= OS.TBSTYLE_TRANSPARENT; if ((style & DWT.SHADOW_OUT) is 0) bits |= OS.CCS_NODIVIDER; @@ -1029,15 +1035,15 @@ return bits; } -TCHAR windowClass () { +override TCHAR windowClass () { return ToolBarClass; } -int windowProc () { +override int windowProc () { return ToolBarProc; } -LRESULT WM_CAPTURECHANGED (int wParam, int lParam) { +override LRESULT WM_CAPTURECHANGED (int wParam, int lParam) { LRESULT result = super.WM_CAPTURECHANGED (wParam, lParam); if (result !is null) return result; /* @@ -1058,7 +1064,7 @@ return result; } -LRESULT WM_CHAR (int wParam, int lParam) { +override LRESULT WM_CHAR (int wParam, int lParam) { LRESULT result = super.WM_CHAR (wParam, lParam); if (result !is null) return result; switch (wParam) { @@ -1076,7 +1082,7 @@ return result; } -LRESULT WM_COMMAND (int wParam, int lParam) { +override LRESULT WM_COMMAND (int wParam, int lParam) { /* * Feature in Windows. When the toolbar window * proc processes WM_COMMAND, it forwards this @@ -1100,7 +1106,7 @@ return LRESULT.ZERO; } -LRESULT WM_ERASEBKGND (int wParam, int lParam) { +override LRESULT WM_ERASEBKGND (int wParam, int lParam) { LRESULT result = super.WM_ERASEBKGND (wParam, lParam); /* * Bug in Windows. For some reason, NM_CUSTOMDRAW with @@ -1117,7 +1123,7 @@ return result; } -LRESULT WM_GETDLGCODE (int wParam, int lParam) { +override LRESULT WM_GETDLGCODE (int wParam, int lParam) { LRESULT result = super.WM_GETDLGCODE (wParam, lParam); /* * Return DLGC_BUTTON so that mnemonics will be @@ -1128,7 +1134,7 @@ return new LRESULT (OS.DLGC_BUTTON); } -LRESULT WM_KEYDOWN (int wParam, int lParam) { +override LRESULT WM_KEYDOWN (int wParam, int lParam) { LRESULT result = super.WM_KEYDOWN (wParam, lParam); if (result !is null) return result; switch (wParam) { @@ -1143,7 +1149,7 @@ return result; } -LRESULT WM_KILLFOCUS (int wParam, int lParam) { +override LRESULT WM_KILLFOCUS (int wParam, int lParam) { int index = OS.SendMessage (handle, OS.TB_GETHOTITEM, 0, 0); TBBUTTON lpButton = new TBBUTTON (); int code = OS.SendMessage (handle, OS.TB_GETBUTTON, index, lpButton); @@ -1151,17 +1157,17 @@ return super.WM_KILLFOCUS (wParam, lParam); } -LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { +override LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { if (ignoreMouse) return null; return super.WM_LBUTTONDOWN (wParam, lParam); } -LRESULT WM_LBUTTONUP (int wParam, int lParam) { +override LRESULT WM_LBUTTONUP (int wParam, int lParam) { if (ignoreMouse) return null; return super.WM_LBUTTONUP (wParam, lParam); } -LRESULT WM_MOUSELEAVE (int wParam, int lParam) { +override LRESULT WM_MOUSELEAVE (int wParam, int lParam) { LRESULT result = super.WM_MOUSELEAVE (wParam, lParam); if (result !is null) return result; /* @@ -1189,7 +1195,7 @@ return result; } -LRESULT WM_NOTIFY (int wParam, int lParam) { +override LRESULT WM_NOTIFY (int wParam, int lParam) { /* * Feature in Windows. When the toolbar window * proc processes WM_NOTIFY, it forwards this @@ -1213,7 +1219,7 @@ return LRESULT.ZERO; } -LRESULT WM_SETFOCUS (int wParam, int lParam) { +override LRESULT WM_SETFOCUS (int wParam, int lParam) { LRESULT result = super.WM_SETFOCUS (wParam, lParam); if (lastFocusId !is -1 && handle is OS.GetFocus ()) { int index = OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, lastFocusId, 0); @@ -1222,7 +1228,7 @@ return result; } -LRESULT WM_SIZE (int wParam, int lParam) { +override LRESULT WM_SIZE (int wParam, int lParam) { if (ignoreResize) { int code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam); if (code is 0) return LRESULT.ZERO; @@ -1264,7 +1270,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 null) return result; if (ignoreResize) return result; @@ -1306,13 +1312,13 @@ return result; } -LRESULT wmCommandChild (int wParam, int lParam) { +override LRESULT wmCommandChild (int wParam, int lParam) { ToolItem child = items [wParam & 0xFFFF]; if (child is null) return null; return child.wmCommandChild (wParam, lParam); } -LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) { +override LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) { switch (hdr.code) { case OS.TBN_DROPDOWN: NMTOOLBAR lpnmtb = new NMTOOLBAR ();
--- a/dwt/widgets/ToolItem.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/ToolItem.d Mon Feb 04 10:05:20 2008 +0100 @@ -175,7 +175,7 @@ return checkBits (style, DWT.PUSH, DWT.CHECK, DWT.RADIO, DWT.SEPARATOR, DWT.DROP_DOWN, 0); } -protected void checkSubclass () { +override protected void checkSubclass () { if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); } @@ -206,7 +206,7 @@ } } -void destroyWidget () { +override void destroyWidget () { parent.destroyItem (this); releaseHandle (); } @@ -406,7 +406,7 @@ return getEnabled () && parent.isEnabled (); } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); releaseImages (); control = null; @@ -416,7 +416,7 @@ disabledImage2 = null; } -void releaseHandle () { +override void releaseHandle () { super.releaseHandle (); parent = null; id = -1; @@ -677,7 +677,7 @@ updateImages (getEnabled () && parent.getEnabled ()); } -public void setImage (Image image) { +override public void setImage (Image image) { checkWidget(); if ((style & DWT.SEPARATOR) !is 0) return; if (image !is null && image.isDisposed()) error(DWT.ERROR_INVALID_ARGUMENT); @@ -770,7 +770,7 @@ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ -public void setText (String string) { +override public void setText (String string) { checkWidget(); if (string is null) error (DWT.ERROR_NULL_ARGUMENT); if ((style & DWT.SEPARATOR) !is 0) return;
--- a/dwt/widgets/ToolTip.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/ToolTip.d Mon Feb 04 10:05:20 2008 +0100 @@ -136,7 +136,7 @@ addListener (DWT.DefaultSelection,typedListener); } -void destroyWidget () { +override void destroyWidget () { if (parent !is null) parent.destroyToolTip (this); releaseHandle (); } @@ -261,14 +261,14 @@ return getVisible (); } -void releaseHandle () { +override void releaseHandle () { super.releaseHandle (); parent = null; item = null; id = -1; } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); if (item is null) { if (autoHide) {
--- a/dwt/widgets/Tracker.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/Tracker.d Mon Feb 04 10:05:20 2008 +0100 @@ -599,7 +599,7 @@ return !cancelled; } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); parent = null; rectangles = proportions = null; @@ -905,7 +905,7 @@ } } -LRESULT wmKeyDown (int hwnd, int wParam, int lParam) { +override LRESULT wmKeyDown (int hwnd, int wParam, int lParam) { LRESULT result = super.wmKeyDown (hwnd, wParam, lParam); if (result !is null) return result; bool isMirrored = parent !is null && (parent.style & DWT.MIRRORED) !is 0; @@ -1039,7 +1039,7 @@ return result; } -LRESULT wmSysKeyDown (int hwnd, int wParam, int lParam) { +override LRESULT wmSysKeyDown (int hwnd, int wParam, int lParam) { LRESULT result = super.wmSysKeyDown (hwnd, wParam, lParam); if (result !is null) return result; cancelled = true;
--- a/dwt/widgets/Tray.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/Tray.d Mon Feb 04 10:05:20 2008 +0100 @@ -131,7 +131,7 @@ return result; } -void releaseChildren (bool destroy) { +override void releaseChildren (bool destroy) { if (items !is null) { for (int i=0; i<items.length; i++) { TrayItem item = items [i]; @@ -144,7 +144,7 @@ super.releaseChildren (destroy); } -void releaseParent () { +override void releaseParent () { super.releaseParent (); if (display.tray is this) display.tray = null; }
--- a/dwt/widgets/TrayItem.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/TrayItem.d Mon Feb 04 10:05:20 2008 +0100 @@ -157,7 +157,7 @@ addListener (DWT.MenuDetect, typedListener); } -protected void checkSubclass () { +override protected void checkSubclass () { if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); } @@ -171,7 +171,7 @@ OS.Shell_NotifyIcon (OS.NIM_ADD, iconData); } -void destroyWidget () { +override void destroyWidget () { parent.destroyItem (this); releaseHandle (); } @@ -325,12 +325,12 @@ if (toolTipText !is null) setToolTipText (toolTipText); } -void releaseHandle () { +override void releaseHandle () { super.releaseHandle (); parent = null; } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); if (toolTip !is null) toolTip.item = null; toolTip = null; @@ -409,7 +409,7 @@ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ -public void setImage (Image image) { +override public void setImage (Image image) { checkWidget (); if (image !is null && image.isDisposed ()) error (DWT.ERROR_INVALID_ARGUMENT); super.setImage (image);
--- a/dwt/widgets/Tree.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/Tree.d Mon Feb 04 10:05:20 2008 +0100 @@ -110,6 +110,13 @@ * </p> */ public class Tree extends Composite { + + alias Composite.computeSize computeSize; + alias Composite.setBackgroundImage setBackgroundImage; + alias Composite.setBounds setBounds; + alias Composite.setCursor setCursor; + alias Composite.sort sort; + TreeItem [] items; TreeColumn [] columns; ImageList imageList, headerImageList; @@ -192,7 +199,7 @@ return checkBits (style, DWT.SINGLE, DWT.MULTI, 0, 0, 0, 0); } -void _addListener (int eventType, Listener listener) { +override void _addListener (int eventType, Listener listener) { super._addListener (eventType, listener); switch (eventType) { case DWT.DragDetect: { @@ -258,7 +265,7 @@ return id !is -1 ? items [id] : new TreeItem (this, DWT.NONE, -1, -1, hItem); } -void _setBackgroundPixel (int newPixel) { +override void _setBackgroundPixel (int newPixel) { int oldPixel = OS.SendMessage (handle, OS.TVM_GETBKCOLOR, 0, 0); if (oldPixel !is newPixel) { /* @@ -358,7 +365,7 @@ addListener (DWT.Collapse, typedListener); } -int borderHandle () { +override int borderHandle () { return hwndParent !is 0 ? hwndParent : handle; } @@ -1484,7 +1491,7 @@ return new LRESULT (OS.CDRF_NOTIFYITEMDRAW | OS.CDRF_NOTIFYPOSTPAINT); } -int callWindowProc (int hwnd, int msg, int wParam, int lParam) { +override int callWindowProc (int hwnd, int msg, int wParam, int lParam) { if (handle is 0) return 0; if (hwndParent !is 0 && hwnd is hwndParent) { return OS.DefWindowProc (hwnd, msg, wParam, lParam); @@ -1644,7 +1651,7 @@ return code; } -void checkBuffered () { +override void checkBuffered () { super.checkBuffered (); if ((style & DWT.VIRTUAL) !is 0) { style |= DWT.DOUBLE_BUFFERED; @@ -1682,7 +1689,7 @@ return true; } -bool checkHandle (int hwnd) { +override bool checkHandle (int hwnd) { return hwnd is handle || (hwndParent !is 0 && hwnd is hwndParent) || (hwndHeader !is 0 && hwnd is hwndHeader); } @@ -1707,7 +1714,7 @@ return hParent is 0; } -protected void checkSubclass () { +override protected void checkSubclass () { if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); } @@ -1804,7 +1811,7 @@ return sortDirection is DWT.UP ? text1.compareTo (text2) : text2.compareTo (text1); } -public Point computeSize (int wHint, int hHint, bool changed) { +override public Point computeSize (int wHint, int hHint, bool changed) { checkWidget (); int width = 0, height = 0; if (hwndHeader !is 0) { @@ -1854,7 +1861,7 @@ return new Point (width, height); } -void createHandle () { +override void createHandle () { super.createHandle (); state &= ~(CANVAS | THEME_BACKGROUND); @@ -2308,18 +2315,18 @@ createItemToolTips (); } -void createWidget () { +override void createWidget () { super.createWidget (); items = new TreeItem [4]; columns = new TreeColumn [4]; itemCount = -1; } -int defaultBackground () { +override int defaultBackground () { return OS.GetSysColor (OS.COLOR_WINDOW); } -void deregister () { +override void deregister () { super.deregister (); if (hwndParent !is 0) display.removeControl (hwndParent); if (hwndHeader !is 0) display.removeControl (hwndHeader); @@ -2606,7 +2613,7 @@ updateScrollBar (); } -void enableDrag (bool enabled) { +override void enableDrag (bool enabled) { int bits = OS.GetWindowLong (handle, OS.GWL_STYLE); if (enabled && hooks (DWT.DragDetect)) { bits &= ~OS.TVS_DISABLEDRAGDROP; @@ -2616,7 +2623,7 @@ OS.SetWindowLong (handle, OS.GWL_STYLE, bits); } -void enableWidget (bool enabled) { +override void enableWidget (bool enabled) { super.enableWidget (enabled); /* * Feature in Windows. When a tree is given a background color @@ -2706,7 +2713,7 @@ return -1; } -Widget findItem (int hItem) { +override Widget findItem (int hItem) { return _getItem (hItem); } @@ -3696,7 +3703,7 @@ } } -void register () { +override void register () { super.register (); if (hwndParent !is 0) display.addControl (hwndParent, this); if (hwndHeader !is 0) display.addControl (hwndHeader, this); @@ -3727,12 +3734,12 @@ } } -void releaseHandle () { +override void releaseHandle () { super.releaseHandle (); hwndParent = hwndHeader = 0; } -void releaseChildren (bool destroy) { +override void releaseChildren (bool destroy) { if (items !is null) { for (int i=0; i<items.length; i++) { TreeItem item = items [i]; @@ -3754,7 +3761,7 @@ super.releaseChildren (destroy); } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); /* * Feature in Windows. For some reason, when TVM_GETIMAGELIST @@ -4026,7 +4033,7 @@ OS.InvalidateRect (handle, null, true); } -int scrolledHandle () { +override int scrolledHandle () { if (hwndHeader is 0) return handle; int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0); return count is 0 ? handle : hwndParent; @@ -4077,7 +4084,7 @@ OS.SetWindowLong (handle, OS.GWL_WNDPROC, oldProc); } -void setBackgroundImage (int hBitmap) { +override void setBackgroundImage (int hBitmap) { super.setBackgroundImage (hBitmap); if (hBitmap !is 0) { /* @@ -4139,7 +4146,7 @@ updateFullSelection (); } -void setBounds (int x, int y, int width, int height, int flags) { +override void setBounds (int x, int y, int width, int height, int flags) { /* * Ensure that the selection is visible when the tree is resized * from a zero size to a size that can show the selection. @@ -4157,7 +4164,7 @@ } } -void setCursor () { +override void setCursor () { /* * Bug in Windows. Under certain circumstances, when WM_SETCURSOR * is sent from SendMessage(), Windows GP's in the window proc for @@ -4338,13 +4345,13 @@ if (hOldStateList !is 0) OS.ImageList_Destroy (hOldStateList); } -public void setFont (Font font) { +override public void setFont (Font font) { checkWidget (); super.setFont (font); if ((style & DWT.CHECK) !is 0) setCheckboxImageList (); } -void setForegroundPixel (int pixel) { +override void setForegroundPixel (int pixel) { /* * Bug in Windows. When the tree is using the explorer * theme, it does not use COLOR_WINDOW_TEXT for the @@ -4399,7 +4406,7 @@ updateScrollBar (); } -public void setRedraw (bool redraw) { +override public void setRedraw (bool redraw) { checkWidget (); /* * Feature in Windows. When WM_SETREDRAW is used to @@ -5034,14 +5041,14 @@ } } -void subclass () { +override void subclass () { super.subclass (); if (hwndHeader !is 0) { OS.SetWindowLong (hwndHeader, OS.GWL_WNDPROC, display.windowProc); } } -String toolTipText (NMTTDISPINFO hdr) { +override String toolTipText (NMTTDISPINFO hdr) { int hwndToolTip = OS.SendMessage (handle, OS.TVM_GETTOOLTIPS, 0, 0); if (hwndToolTip is hdr.hwndFrom && toolTipText !is null) return ""; //$NON-NLS-1$ if (headerToolTipHandle is hdr.hwndFrom) { @@ -5107,7 +5114,7 @@ return super.toolTipText (hdr); } -int topHandle () { +override int topHandle () { return hwndParent !is 0 ? hwndParent : handle; } @@ -5184,7 +5191,7 @@ } } -void updateImages () { +override void updateImages () { if (sortColumn !is null && !sortColumn.isDisposed ()) { if (OS.COMCTL32_MAJOR < 6) { switch (sortDirection) { @@ -5218,14 +5225,14 @@ } } -void unsubclass () { +override void unsubclass () { super.unsubclass (); if (hwndHeader !is 0) { OS.SetWindowLong (hwndHeader, OS.GWL_WNDPROC, HeaderProc); } } -int widgetStyle () { +override int widgetStyle () { int bits = super.widgetStyle () | OS.TVS_SHOWSELALWAYS | OS.TVS_LINESATROOT | OS.TVS_HASBUTTONS | OS.TVS_NONEVENHEIGHT; if (EXPLORER_THEME && !OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) { bits |= OS.TVS_TRACKSELECT; @@ -5241,15 +5248,15 @@ return bits | OS.TVS_DISABLEDRAGDROP; } -TCHAR windowClass () { +override TCHAR windowClass () { return TreeClass; } -int windowProc () { +override int windowProc () { return TreeProc; } -int windowProc (int hwnd, int msg, int wParam, int lParam) { +override int windowProc (int hwnd, int msg, int wParam, int lParam) { if (hwndHeader !is 0 && hwnd is hwndHeader) { switch (msg) { /* This code is intentionally commented */ @@ -5410,7 +5417,7 @@ return super.windowProc (hwnd, msg, wParam, lParam); } -LRESULT WM_CHAR (int wParam, int lParam) { +override LRESULT WM_CHAR (int wParam, int lParam) { LRESULT result = super.WM_CHAR (wParam, lParam); if (result !is null) return result; /* @@ -5496,14 +5503,14 @@ 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 ((style & DWT.DOUBLE_BUFFERED) !is 0) return LRESULT.ONE; if (findImageControl () !is null) return LRESULT.ONE; return result; } -LRESULT WM_GETOBJECT (int wParam, int lParam) { +override LRESULT WM_GETOBJECT (int wParam, int lParam) { /* * Ensure that there is an accessible object created for this * control because support for checked item and tree column @@ -5516,7 +5523,7 @@ return super.WM_GETOBJECT (wParam, lParam); } -LRESULT WM_KEYDOWN (int wParam, int lParam) { +override LRESULT WM_KEYDOWN (int wParam, int lParam) { LRESULT result = super.WM_KEYDOWN (wParam, lParam); if (result !is null) return result; switch (wParam) { @@ -5694,7 +5701,7 @@ return result; } -LRESULT WM_KILLFOCUS (int wParam, int lParam) { +override LRESULT WM_KILLFOCUS (int wParam, int lParam) { /* * Bug in Windows. When a tree item that has an image * with alpha is expanded or collapsed, the area where @@ -5724,7 +5731,7 @@ return super.WM_KILLFOCUS (wParam, lParam); } -LRESULT WM_LBUTTONDBLCLK (int wParam, int lParam) { +override LRESULT WM_LBUTTONDBLCLK (int wParam, int lParam) { TVHITTESTINFO lpht = new TVHITTESTINFO (); lpht.x = (short) (lParam & 0xFFFF); lpht.y = (short) (lParam >> 16); @@ -5785,7 +5792,7 @@ return result; } -LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { +override LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { /* * In a multi-select tree, if the user is collapsing a subtree that * contains selected items, clear the selection from these items and @@ -6144,7 +6151,7 @@ return new LRESULT (code); } -LRESULT WM_MOUSEMOVE (int wParam, int lParam) { +override LRESULT WM_MOUSEMOVE (int wParam, int lParam) { Display display = this.display; LRESULT result = super.WM_MOUSEMOVE (wParam, lParam); if (result !is null) return result; @@ -6210,12 +6217,12 @@ return result; } -LRESULT WM_MOVE (int wParam, int lParam) { +override LRESULT WM_MOVE (int wParam, int lParam) { if (ignoreResize) return null; return super.WM_MOVE (wParam, lParam); } -LRESULT WM_RBUTTONDOWN (int wParam, int lParam) { +override LRESULT WM_RBUTTONDOWN (int wParam, int lParam) { /* * Feature in Windows. The receiver uses WM_RBUTTONDOWN * to initiate a drag/drop operation depending on how the @@ -6276,7 +6283,7 @@ return LRESULT.ZERO; } -LRESULT WM_PAINT (int wParam, int lParam) { +override LRESULT WM_PAINT (int wParam, int lParam) { if (shrink && !ignoreShrink) { /* Resize the item array to fit the last item */ int count = items.length - 1; @@ -6357,7 +6364,7 @@ return super.WM_PAINT (wParam, lParam); } -LRESULT WM_PRINTCLIENT (int wParam, int lParam) { +override LRESULT WM_PRINTCLIENT (int wParam, int lParam) { LRESULT result = super.WM_PRINTCLIENT (wParam, lParam); if (result !is null) return result; /* @@ -6376,7 +6383,7 @@ return new LRESULT (code); } -LRESULT WM_SETFOCUS (int wParam, int lParam) { +override LRESULT WM_SETFOCUS (int wParam, int lParam) { /* * Bug in Windows. When a tree item that has an image * with alpha is expanded or collapsed, the area where @@ -6406,7 +6413,7 @@ return super.WM_SETFOCUS (wParam, lParam); } -LRESULT WM_SETFONT (int wParam, int lParam) { +override LRESULT WM_SETFONT (int wParam, int lParam) { LRESULT result = super.WM_SETFONT (wParam, lParam); if (result !is null) return result; if (hwndHeader !is 0) { @@ -6429,7 +6436,7 @@ return result; } -LRESULT WM_SETREDRAW (int wParam, int lParam) { +override LRESULT WM_SETREDRAW (int wParam, int lParam) { LRESULT result = super.WM_SETREDRAW (wParam, lParam); if (result !is null) return result; /* @@ -6450,7 +6457,7 @@ return result; } -LRESULT WM_SIZE (int wParam, int lParam) { +override LRESULT WM_SIZE (int wParam, int lParam) { /* * Bug in Windows. When TVS_NOHSCROLL is set when the * size of the tree is zero, the scroll bar is shown the @@ -6479,7 +6486,7 @@ return super.WM_SIZE (wParam, lParam); } -LRESULT WM_SYSCOLORCHANGE (int wParam, int lParam) { +override LRESULT WM_SYSCOLORCHANGE (int wParam, int lParam) { LRESULT result = super.WM_SYSCOLORCHANGE (wParam, lParam); if (result !is null) return result; /* @@ -6495,7 +6502,7 @@ return result; } -LRESULT wmColorChild (int wParam, int lParam) { +override LRESULT wmColorChild (int wParam, int lParam) { if (findImageControl () !is null) { if (OS.COMCTL32_MAJOR < 6) { return super.wmColorChild (wParam, lParam); @@ -6512,7 +6519,7 @@ return null; } -LRESULT wmNotify (NMHDR hdr, int wParam, int lParam) { +override LRESULT wmNotify (NMHDR hdr, int wParam, int lParam) { if (hdr.hwndFrom is itemToolTipHandle && hwndHeader !is 0) { if (!OS.IsWinCE) { switch (hdr.code) { @@ -6782,7 +6789,7 @@ return super.wmNotify (hdr, wParam, lParam); } -LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) { +override LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) { switch (hdr.code) { case OS.TVN_GETDISPINFOA: case OS.TVN_GETDISPINFOW: {
--- a/dwt/widgets/TreeColumn.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/TreeColumn.d Mon Feb 04 10:05:20 2008 +0100 @@ -200,11 +200,11 @@ return checkBits (style, DWT.LEFT, DWT.CENTER, DWT.RIGHT, 0, 0, 0); } -protected void checkSubclass () { +override protected void checkSubclass () { if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); } -void destroyWidget () { +override void destroyWidget () { parent.destroyItem (this); releaseHandle (); } @@ -254,7 +254,7 @@ return moveable; } -String getNameText () { +override String getNameText () { return getText (); } @@ -426,12 +426,12 @@ setWidth (Math.max (headerWidth, columnWidth + gridWidth)); } -void releaseHandle () { +override void releaseHandle () { super.releaseHandle (); parent = null; } -void releaseParent () { +override void releaseParent () { super.releaseParent (); if (parent.sortColumn is this) { parent.sortColumn = null; @@ -529,7 +529,7 @@ } } -public void setImage (Image image) { +override public void setImage (Image image) { checkWidget(); if (image !is null && image.isDisposed ()) { error (DWT.ERROR_INVALID_ARGUMENT); @@ -665,7 +665,7 @@ } } -public void setText (String string) { +override public void setText (String string) { checkWidget (); if (string is null) error (DWT.ERROR_NULL_ARGUMENT); if (string.equals (text)) return;
--- a/dwt/widgets/TreeItem.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/TreeItem.d Mon Feb 04 10:05:20 2008 +0100 @@ -241,7 +241,7 @@ return hItem; } -protected void checkSubclass () { +override protected void checkSubclass () { if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); } @@ -332,7 +332,7 @@ parent.clearAll (hItem, tvItem, all); } -void destroyWidget () { +override void destroyWidget () { TVITEM tvItem = new TVITEM (); tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM; parent.releaseItem (handle, tvItem, false); @@ -793,7 +793,7 @@ return parent.getItems (hItem); } -public Image getImage () { +override public Image getImage () { checkWidget(); if (!parent.checkData (this, true)) error (DWT.ERROR_WIDGET_DISPOSED); return super.getImage (); @@ -880,7 +880,7 @@ return hItem !is 0 ? parent._getItem (hItem) : null; } -public String getText () { +override public String getText () { checkWidget(); if (!parent.checkData (this, true)) error (DWT.ERROR_WIDGET_DISPOSED); return super.getText (); @@ -1006,7 +1006,7 @@ OS.InvalidateRect (hwnd, rect, true); } -void releaseChildren (bool destroy) { +override void releaseChildren (bool destroy) { if (destroy) { TVITEM tvItem = new TVITEM (); tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM; @@ -1015,13 +1015,13 @@ super.releaseChildren (destroy); } -void releaseHandle () { +override void releaseHandle () { super.releaseHandle (); handle = 0; parent = null; } -void releaseWidget () { +override void releaseWidget () { super.releaseWidget (); strings = null; images = null; @@ -1726,7 +1726,7 @@ } } -public void setImage (Image image) { +override public void setImage (Image image) { checkWidget (); setImage (0, image); } @@ -1766,7 +1766,7 @@ * * @since 3.1 */ -public void setText (String [] strings) { +override public void setText (String [] strings) { checkWidget(); if (strings is null) error (DWT.ERROR_NULL_ARGUMENT); for (int i=0; i<strings.length; i++) {
--- a/dwt/widgets/Widget.d Sun Feb 03 15:48:14 2008 -0800 +++ b/dwt/widgets/Widget.d Mon Feb 04 10:05:20 2008 +0100 @@ -1280,7 +1280,7 @@ * * @return a string representation of the receiver */ -public char[] toString () { +override public char[] toString () { char[] string = "*Disposed*"; //$NON-NLS-1$ if (!isDisposed ()) { string = "*Wrong Thread*"; //$NON-NLS-1$