Mercurial > projects > dwt-win
diff dwt/widgets/Composite.d @ 54:0f25be5cbe6f
Added aliases and overrides from generated file, remaining widgets. Thanks torhu for doing this job.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 04 Feb 2008 10:05:20 +0100 |
parents | e3a5d61b33cd |
children | f824f1836871 |
line wrap: on
line diff
--- 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) { /*