Ticket #1: torhu2.diff

File torhu2.diff, 207.6 kB (added by torhu, 1 year ago)

the rest of it

  • a/dwt/widgets/Canvas.d

    old new  
    125125    return caret; 
    126126} 
    127127 
    128 void releaseChildren (bool destroy) { 
     128override void releaseChildren (bool destroy) { 
    129129    if (caret !is null) { 
    130130        caret.release (false); 
    131131        caret = null; 
     
    288288    } 
    289289} 
    290290 
    291 public void setFont (Font font) { 
     291override public void setFont (Font font) { 
    292292    checkWidget (); 
    293293    if (caret !is null) caret.setFont (font); 
    294294    super.setFont (font); 
     
    307307    return super.windowProc (hwnd, msg, wParam, lParam); 
    308308} 
    309309 
    310 LRESULT WM_IME_COMPOSITION (int wParam, int lParam) { 
     310override LRESULT WM_IME_COMPOSITION (int wParam, int lParam) { 
    311311    LRESULT result  = super.WM_IME_COMPOSITION (wParam, lParam); 
    312312    /* 
    313313    * Bug in Windows.  On Korean Windows XP, the IME window 
     
    340340    return result; 
    341341} 
    342342 
    343 LRESULT WM_INPUTLANGCHANGE (int wParam, int lParam) { 
     343override LRESULT WM_INPUTLANGCHANGE (int wParam, int lParam) { 
    344344    LRESULT result  = super.WM_INPUTLANGCHANGE (wParam, lParam); 
    345345    if (caret !is null && caret.isFocusCaret ()) { 
    346346        caret.setIMEFont (); 
     
    349349    return result; 
    350350} 
    351351 
    352 LRESULT WM_KILLFOCUS (int wParam, int lParam) { 
     352override LRESULT WM_KILLFOCUS (int wParam, int lParam) { 
    353353    LRESULT result  = super.WM_KILLFOCUS (wParam, lParam); 
    354354    if (caret !is null) caret.killFocus (); 
    355355    return result; 
    356356} 
    357357 
    358 LRESULT WM_SETFOCUS (int wParam, int lParam) { 
     358override LRESULT WM_SETFOCUS (int wParam, int lParam) { 
    359359    LRESULT result  = super.WM_SETFOCUS (wParam, lParam); 
    360360    if (caret !is null) caret.setFocus (); 
    361361    return result; 
    362362} 
    363363 
    364 LRESULT WM_SIZE (int wParam, int lParam) { 
     364override LRESULT WM_SIZE (int wParam, int lParam) { 
    365365    LRESULT result  = super.WM_SIZE (wParam, lParam); 
    366366    if (caret !is null && caret.isFocusCaret ()) caret.resizeIME (); 
    367367    return result; 
    368368} 
    369369 
    370 LRESULT WM_WINDOWPOSCHANGED (int wParam, int lParam) { 
     370override LRESULT WM_WINDOWPOSCHANGED (int wParam, int lParam) { 
    371371    LRESULT result  = super.WM_WINDOWPOSCHANGED (wParam, lParam); 
    372372    if (result !is LRESULT.NULL) return result; 
    373373    /* 
     
    382382    return result; 
    383383} 
    384384 
    385 LRESULT WM_WINDOWPOSCHANGING (int wParam, int lParam) { 
     385override LRESULT WM_WINDOWPOSCHANGING (int wParam, int lParam) { 
    386386    LRESULT result  = super.WM_WINDOWPOSCHANGING (wParam, lParam); 
    387387    if (result !is LRESULT.NULL) return result; 
    388388    /* 
  • a/dwt/widgets/Caret.d

    old new  
    290290    OS.ImmReleaseContext (hwnd, hIMC); 
    291291} 
    292292 
    293 void releaseParent () { 
     293override void releaseParent () { 
    294294    super.releaseParent (); 
    295295    if (this is parent.getCaret ()) parent.setCaret (null); 
    296296} 
    297297 
    298 void releaseWidget () { 
     298override void releaseWidget () { 
    299299    super.releaseWidget (); 
    300300    parent = null; 
    301301    image = null; 
  • a/dwt/widgets/Combo.d

    old new  
    7070 
    7171public class Combo : Composite { 
    7272 
     73    alias Composite.computeSize computeSize; 
     74    alias Composite.dragDetect dragDetect; 
    7375    alias Composite.sendKeyEvent sendKeyEvent; 
     76    alias Composite.setBackgroundImage setBackgroundImage; 
     77    alias Composite.setBounds setBounds; 
     78    alias Composite.setToolTipText setToolTipText; 
    7479 
    7580    alias extern(Windows) int function( HWND, uint, uint, int ) TWindowProc; 
    7681    private static Combo pThis; 
     
    336341    return OS.CallNextHookEx (cbtHook, nCode, wParam, lParam); 
    337342} 
    338343 
    339 bool checkHandle (HWND hwnd) { 
     344override bool checkHandle (HWND hwnd) { 
    340345    return hwnd is handle || hwnd is OS.GetDlgItem (handle, CBID_EDIT) || hwnd is OS.GetDlgItem (handle, CBID_LIST); 
    341346} 
    342347 
    343 protected void checkSubclass () { 
     348override protected void checkSubclass () { 
    344349    if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); 
    345350} 
    346351 
     
    394399    OS.SendMessage (handle, OS.CB_SETEDITSEL, 0, -1); 
    395400} 
    396401 
    397 public Point computeSize (int wHint, int hHint, bool changed) { 
     402override public Point computeSize (int wHint, int hHint, bool changed) { 
    398403    checkWidget (); 
    399404    int width = 0, height = 0; 
    400405    if (wHint is DWT.DEFAULT) { 
     
    491496    OS.SendMessage (handle, OS.WM_COPY, 0, 0); 
    492497} 
    493498 
    494 void createHandle () { 
     499override void createHandle () { 
    495500    /* 
    496501    * Feature in Windows.  When the selection changes in a combo box, 
    497502    * Windows draws the selection, even when the combo box does not 
     
    562567    OS.SendMessage (handle, OS.WM_CUT, 0, 0); 
    563568} 
    564569 
    565 int defaultBackground () { 
     570override int defaultBackground () { 
    566571    return OS.GetSysColor (OS.COLOR_WINDOW); 
    567572} 
    568573 
    569 void deregister () { 
     574override void deregister () { 
    570575    super.deregister (); 
    571576    auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); 
    572577    if (hwndText !is null) display.removeControl (hwndText); 
     
    616621    // widget could be disposed at this point 
    617622} 
    618623 
    619 bool dragDetect (HWND hwnd, int x, int y, bool filter, bool [] detect, bool [] consume) { 
     624override bool dragDetect (HWND hwnd, int x, int y, bool filter, bool [] detect, bool [] consume) { 
    620625    if (filter && (style & DWT.READ_ONLY) is 0) { 
    621626        auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); 
    622627        if (hwndText !is null) { 
     
    754759    return true; 
    755760} 
    756761 
    757 char[] getNameText () { 
     762override char[] getNameText () { 
    758763    return getText (); 
    759764} 
    760765 
     
    912917    return visibleCount; 
    913918} 
    914919 
    915 bool hasFocus () { 
     920override bool hasFocus () { 
    916921    auto hwndFocus = OS.GetFocus (); 
    917922    if (hwndFocus is handle) return true; 
    918923    if (hwndFocus is null) return false; 
     
    10271032    OS.SendMessage (handle, OS.WM_PASTE, 0, 0); 
    10281033} 
    10291034 
    1030 void register () { 
     1035override void register () { 
    10311036    super.register (); 
    10321037    auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); 
    10331038    if (hwndText !is null) display.addControl (hwndText, this); 
     
    12861291    eventTable.unhook (DWT.Verify, listener); 
    12871292} 
    12881293 
    1289 bool sendKeyEvent (int type, int msg, int wParam, int lParam, Event event) { 
     1294override bool sendKeyEvent (int type, int msg, int wParam, int lParam, Event event) { 
    12901295    if (!super.sendKeyEvent (type, msg, wParam, lParam, event)) { 
    12911296        return false; 
    12921297    } 
     
    13961401    } 
    13971402} 
    13981403 
    1399 void setBackgroundImage (HBITMAP hBitmap) { 
     1404override void setBackgroundImage (HBITMAP hBitmap) { 
    14001405    super.setBackgroundImage (hBitmap); 
    14011406    auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); 
    14021407    if (hwndText !is null) OS.InvalidateRect (hwndText, null, true); 
     
    14041409    if (hwndList !is null) OS.InvalidateRect (hwndList, null, true); 
    14051410} 
    14061411 
    1407 void setBackgroundPixel (int pixel) { 
     1412override void setBackgroundPixel (int pixel) { 
    14081413    super.setBackgroundPixel (pixel); 
    14091414    auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); 
    14101415    if (hwndText !is null) OS.InvalidateRect (hwndText, null, true); 
     
    14121417    if (hwndList !is null) OS.InvalidateRect (hwndList, null, true); 
    14131418} 
    14141419 
    1415 void setBounds (int x, int y, int width, int height, int flags) { 
     1420override void setBounds (int x, int y, int width, int height, int flags) { 
    14161421    /* 
    14171422    * Feature in Windows.  If the combo box has the CBS_DROPDOWN 
    14181423    * or CBS_DROPDOWNLIST style, Windows uses the height that the 
     
    14591464    } 
    14601465} 
    14611466 
    1462 public void setFont (Font font) { 
     1467override public void setFont (Font font) { 
    14631468    checkWidget (); 
    14641469    super.setFont (font); 
    14651470    if ((style & DWT.H_SCROLL) !is 0) setScrollWidth (); 
    14661471} 
    14671472 
    1468 void setForegroundPixel (int pixel) { 
     1473override void setForegroundPixel (int pixel) { 
    14691474    super.setForegroundPixel (pixel); 
    14701475    auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); 
    14711476    if (hwndText !is null) OS.InvalidateRect (hwndText, null, true); 
     
    18341839    OS.SendMessage (handle, OS.CB_LIMITTEXT, limit, 0); 
    18351840} 
    18361841 
    1837 void setToolTipText (Shell shell, char[] string) { 
     1842override void setToolTipText (Shell shell, char[] string) { 
    18381843    auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); 
    18391844    auto hwndList = OS.GetDlgItem (handle, CBID_LIST); 
    18401845    if (hwndText !is null) shell.setToolTipText (hwndText, string); 
     
    18721877    } 
    18731878} 
    18741879 
    1875 void subclass () { 
     1880override void subclass () { 
    18761881    super.subclass (); 
    18771882    auto newProc = display.windowProc; 
    18781883    auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); 
     
    18851890    } 
    18861891} 
    18871892 
    1888 bool translateTraversal (MSG* msg) { 
     1893override bool translateTraversal (MSG* msg) { 
    18891894    /* 
    18901895    * When the combo box is dropped down, allow return 
    18911896    * to select an item in the list and escape to close 
     
    19031908    return super.translateTraversal (msg); 
    19041909} 
    19051910 
    1906 bool traverseEscape () { 
     1911override bool traverseEscape () { 
    19071912    if ((style & DWT.DROP_DOWN) !is 0) { 
    19081913        if (OS.SendMessage (handle, OS.CB_GETDROPPEDSTATE, 0, 0) !is 0) { 
    19091914            OS.SendMessage (handle, OS.CB_SHOWDROPDOWN, 0, 0); 
     
    19131918    return super.traverseEscape (); 
    19141919} 
    19151920 
    1916 bool traverseReturn () { 
     1921override bool traverseReturn () { 
    19171922    if ((style & DWT.DROP_DOWN) !is 0) { 
    19181923        if (OS.SendMessage (handle, OS.CB_GETDROPPEDSTATE, 0, 0) !is 0) { 
    19191924            OS.SendMessage (handle, OS.CB_SHOWDROPDOWN, 0, 0); 
     
    19231928    return super.traverseReturn (); 
    19241929} 
    19251930 
    1926 void unsubclass () { 
     1931override void unsubclass () { 
    19271932    super.unsubclass (); 
    19281933    auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); 
    19291934    if (hwndText !is null && EditProc !is null) { 
     
    19781983    return mbcsPos; 
    19791984} 
    19801985 
    1981 int widgetExtStyle () { 
     1986override int widgetExtStyle () { 
    19821987    return super.widgetExtStyle () & ~OS.WS_EX_NOINHERITLAYOUT; 
    19831988} 
    19841989 
    1985 int widgetStyle () { 
     1990override int widgetStyle () { 
    19861991    int bits = super.widgetStyle () | OS.CBS_AUTOHSCROLL | OS.CBS_NOINTEGRALHEIGHT | OS.WS_HSCROLL |OS.WS_VSCROLL; 
    19871992    if ((style & DWT.SIMPLE) !is 0) return bits | OS.CBS_SIMPLE; 
    19881993    if ((style & DWT.READ_ONLY) !is 0) return bits | OS.CBS_DROPDOWNLIST; 
    19891994    return bits | OS.CBS_DROPDOWN; 
    19901995} 
    19911996 
    1992 char[] windowClass () { 
     1997override char[] windowClass () { 
    19931998    return TCHARzToStr( ComboClass ); 
    19941999} 
    19952000 
    1996 int windowProc () { 
     2001override int windowProc () { 
    19972002    return cast(int) ComboProc; 
    19982003} 
    19992004 
     
    20842089    return super.windowProc (hwnd, msg, wParam, lParam); 
    20852090} 
    20862091 
    2087 LRESULT WM_CTLCOLOR (int wParam, int lParam) { 
     2092override LRESULT WM_CTLCOLOR (int wParam, int lParam) { 
    20882093    return wmColorChild (wParam, lParam); 
    20892094} 
    20902095 
    2091 LRESULT WM_GETDLGCODE (int wParam, int lParam) { 
     2096override LRESULT WM_GETDLGCODE (int wParam, int lParam) { 
    20922097    int code = callWindowProc (handle, OS.WM_GETDLGCODE, wParam, lParam); 
    20932098    return cast( LRESULT )(code | OS.DLGC_WANTARROWS); 
    20942099} 
    20952100 
    2096 LRESULT WM_KILLFOCUS (int wParam, int lParam) { 
     2101override LRESULT WM_KILLFOCUS (int wParam, int lParam) { 
    20972102    /* 
    20982103    * Bug in Windows.  When a combo box that is read only 
    20992104    * is disposed in CBN_KILLFOCUS, Windows segment faults. 
     
    21132118    return LRESULT.NULL; 
    21142119} 
    21152120 
    2116 LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { 
     2121override LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { 
    21172122    /* 
    21182123    * Feature in Windows.  When an editable combo box is dropped 
    21192124    * down and the text in the entry field partially matches an 
     
    21362141    return result; 
    21372142} 
    21382143 
    2139 LRESULT WM_SETFOCUS (int wParam, int lParam) { 
     2144override LRESULT WM_SETFOCUS (int wParam, int lParam) { 
    21402145    /* 
    21412146    * Return NULL - Focus notification is 
    21422147    * done by WM_COMMAND with CBN_SETFOCUS. 
     
    21442149    return LRESULT.NULL; 
    21452150} 
    21462151 
    2147 LRESULT WM_SIZE (int wParam, int lParam) { 
     2152override LRESULT WM_SIZE (int wParam, int lParam) { 
    21482153    /* 
    21492154    * Bug in Windows.  If the combo box has the CBS_SIMPLE style, 
    21502155    * the list portion of the combo box is not redrawn when the 
     
    22182223    return result; 
    22192224} 
    22202225 
    2221 LRESULT wmChar (HWND hwnd, int wParam, int lParam) { 
     2226override LRESULT wmChar (HWND hwnd, int wParam, int lParam) { 
    22222227    if (ignoreCharacter) return LRESULT.NULL; 
    22232228    LRESULT result = super.wmChar (hwnd, wParam, lParam); 
    22242229    if (result !is LRESULT.NULL) return result; 
     
    23242329    return LRESULT.NULL; 
    23252330} 
    23262331 
    2327 LRESULT wmCommandChild (int wParam, int lParam) { 
     2332override LRESULT wmCommandChild (int wParam, int lParam) { 
    23282333    int code = wParam >> 16; 
    23292334    switch (code) { 
    23302335        case OS.CBN_EDITCHANGE: 
     
    23892394    return super.wmCommandChild (wParam, lParam); 
    23902395} 
    23912396 
    2392 LRESULT wmIMEChar (HWND hwnd, int wParam, int lParam) { 
     2397override LRESULT wmIMEChar (HWND hwnd, int wParam, int lParam) { 
    23932398 
    23942399    /* Process a DBCS character */ 
    23952400    Display display = this.display; 
     
    24232428    return cast( LRESULT )(result); 
    24242429} 
    24252430 
    2426 LRESULT wmKeyDown (HWND hwnd, int wParam, int lParam) { 
     2431override LRESULT wmKeyDown (HWND hwnd, int wParam, int lParam) { 
    24272432    if (ignoreCharacter) return LRESULT.NULL; 
    24282433    LRESULT result = super.wmKeyDown (hwnd, wParam, lParam); 
    24292434    if (result !is LRESULT.NULL) return result; 
     
    24382443    return result; 
    24392444} 
    24402445 
    2441 LRESULT wmSysKeyDown (HWND hwnd, int wParam, int lParam) { 
     2446override LRESULT wmSysKeyDown (HWND hwnd, int wParam, int lParam) { 
    24422447    /* 
    24432448    * Feature in Windows.  When an editable combo box is dropped 
    24442449    * down using Alt+Down and the text in the entry field partially 
  • a/dwt/widgets/Composite.d

    old new  
    6666 */ 
    6767 
    6868public class Composite : Scrollable { 
     69 
     70    alias Scrollable.computeSize computeSize; 
     71    alias Scrollable.translateMnemonic translateMnemonic; 
     72 
    6973    Layout layout_; 
    7074    HFONT font; 
    7175    WINDOWPOS* [] lpwp; 
     
    201205    } 
    202206} 
    203207 
    204 void checkBuffered () { 
     208override void checkBuffered () { 
    205209    if (OS.IsWinCE || (state & CANVAS) is 0) { 
    206210        super.checkBuffered (); 
    207211    } 
    208212} 
    209213 
    210 protected void checkSubclass () { 
     214override protected void checkSubclass () { 
    211215    /* Do nothing - Subclassing is allowed */ 
    212216} 
    213217 
    214 Control [] computeTabList () { 
     218override Control [] computeTabList () { 
    215219    Control result [] = super.computeTabList (); 
    216220    if (result.length is 0) return result; 
    217221    Control [] list = tabList !is null ? _getTabList () : _getChildren (); 
     
    228232    return result; 
    229233} 
    230234 
    231 public Point computeSize (int wHint, int hHint, bool changed) { 
     235override public Point computeSize (int wHint, int hHint, bool changed) { 
    232236    checkWidget (); 
    233237    Point size; 
    234238    if (layout_ !is null) { 
     
    250254    return new Point (trim.width, trim.height); 
    251255} 
    252256 
    253 void createHandle () { 
     257override void createHandle () { 
    254258    super.createHandle (); 
    255259    state |= CANVAS; 
    256260    if ((style & (DWT.H_SCROLL | DWT.V_SCROLL)) is 0) { 
     
    262266    return layoutCount > 0 ? this : parent.findDeferredControl (); 
    263267} 
    264268 
    265 Menu [] findMenus (Control control) { 
     269override Menu [] findMenus (Control control) { 
    266270    if (control is this) return new Menu [0]; 
    267271    Menu result [] = super.findMenus (control); 
    268272    Control [] children = _getChildren (); 
     
    279283    return result; 
    280284} 
    281285 
    282 void fixChildren (Shell newShell, Shell oldShell, Decorations newDecorations, Decorations oldDecorations, Menu [] menus) { 
     286override void fixChildren (Shell newShell, Shell oldShell, Decorations newDecorations, Decorations oldDecorations, Menu [] menus) { 
    283287    super.fixChildren (newShell, oldShell, newDecorations, oldDecorations, menus); 
    284288    Control [] children = _getChildren (); 
    285289    for (int i=0; i<children.length; i++) { 
     
    640644    } 
    641645} 
    642646 
    643 void markLayout (bool changed, bool all) { 
     647override void markLayout (bool changed, bool all) { 
    644648    if (layout_ !is null) { 
    645649        state |= LAYOUT_NEEDED; 
    646650        if (changed) state |= LAYOUT_CHANGED; 
     
    664668    return new Point (width, height); 
    665669} 
    666670 
    667 bool redrawChildren () { 
     671override bool redrawChildren () { 
    668672    if (!super.redrawChildren ()) return false; 
    669673    Control [] children = _getChildren (); 
    670674    for (int i=0; i<children.length; i++) { 
     
    673677    return true; 
    674678} 
    675679 
    676 void releaseChildren (bool destroy) { 
     680override void releaseChildren (bool destroy) { 
    677681    Control [] children = _getChildren (); 
    678682    for (int i=0; i<children.length; i++) { 
    679683        Control child = children [i]; 
     
    684688    super.releaseChildren (destroy); 
    685689} 
    686690 
    687 void releaseWidget () { 
     691override void releaseWidget () { 
    688692    super.releaseWidget (); 
    689693    if ((state & CANVAS) !is 0 && (style & DWT.EMBEDDED) !is 0) { 
    690694        auto hwndChild = OS.GetWindow (handle, OS.GW_CHILD); 
     
    807811    } 
    808812} 
    809813 
    810 bool setFixedFocus () { 
     814override bool setFixedFocus () { 
    811815    checkWidget (); 
    812816    Control [] children = _getChildren (); 
    813817    for (int i=0; i<children.length; i++) { 
     
    821825    return super.setFixedFocus (); 
    822826} 
    823827 
    824 public bool setFocus () { 
     828override public bool setFocus () { 
    825829    checkWidget (); 
    826830    Control [] children = _getChildren (); 
    827831    for (int i=0; i<children.length; i++) { 
     
    926930    } 
    927931} 
    928932 
    929 bool setTabGroupFocus () { 
     933override bool setTabGroupFocus () { 
    930934    if (isTabItem ()) return setTabItemFocus (); 
    931935    bool takeFocus = (style & DWT.NO_FOCUS) is 0; 
    932936    if ((state & CANVAS) !is 0) { 
     
    963967    return control !is null ? control.toolTipText_ : null; 
    964968} 
    965969 
    966 bool translateMnemonic (Event event, Control control) { 
     970override bool translateMnemonic (Event event, Control control) { 
    967971    if (super.translateMnemonic (event, control)) return true; 
    968972    if (control !is null) { 
    969973        Control [] children = _getChildren (); 
     
    975979    return false; 
    976980} 
    977981 
    978 bool translateTraversal (MSG* msg) { 
     982override bool translateTraversal (MSG* msg) { 
    979983    if ((state & CANVAS) !is 0 ) { 
    980984        if ((style & DWT.EMBEDDED) !is 0) return false; 
    981985        switch (msg.wParam) { 
     
    992996    return super.translateTraversal (msg); 
    993997} 
    994998 
    995 void updateBackgroundColor () { 
     999override void updateBackgroundColor () { 
    9961000    super.updateBackgroundColor (); 
    9971001    Control [] children = _getChildren (); 
    9981002    for (int i=0; i<children.length; i++) { 
     
    10021006    } 
    10031007} 
    10041008 
    1005 void updateBackgroundImage () { 
     1009override void updateBackgroundImage () { 
    10061010    super.updateBackgroundImage (); 
    10071011    Control [] children = _getChildren (); 
    10081012    for (int i=0; i<children.length; i++) { 
     
    10121016    } 
    10131017} 
    10141018 
    1015 void updateBackgroundMode () { 
     1019override void updateBackgroundMode () { 
    10161020    super.updateBackgroundMode (); 
    10171021    Control [] children = _getChildren (); 
    10181022    for (int i = 0; i < children.length; i++) { 
     
    10201024    } 
    10211025} 
    10221026 
    1023 void updateFont (Font oldFont, Font newFont) { 
     1027override void updateFont (Font oldFont, Font newFont) { 
    10241028    super.updateFont (oldFont, newFont); 
    10251029    Control [] children = _getChildren (); 
    10261030    for (int i=0; i<children.length; i++) { 
     
    10311035    } 
    10321036} 
    10331037 
    1034 void updateLayout (bool resize, bool all) { 
     1038override void updateLayout (bool resize, bool all) { 
    10351039    Composite parent = findDeferredControl (); 
    10361040    if (parent !is null) { 
    10371041        parent.state |= LAYOUT_CHILD; 
     
    10531057    } 
    10541058} 
    10551059 
    1056 int widgetStyle () { 
     1060override int widgetStyle () { 
    10571061    /* Force clipping of children by setting WS_CLIPCHILDREN */ 
    10581062    return super.widgetStyle () | OS.WS_CLIPCHILDREN; 
    10591063} 
    10601064 
    1061 LRESULT WM_ERASEBKGND (int wParam, int lParam) { 
     1065override LRESULT WM_ERASEBKGND (int wParam, int lParam) { 
    10621066    LRESULT result = super.WM_ERASEBKGND (wParam, lParam); 
    10631067    if (result !is LRESULT.NULL) return result; 
    10641068    if ((state & CANVAS) !is 0) { 
     
    10681072    return result; 
    10691073} 
    10701074 
    1071 LRESULT WM_GETDLGCODE (int wParam, int lParam) { 
     1075override LRESULT WM_GETDLGCODE (int wParam, int lParam) { 
    10721076    LRESULT result = super.WM_GETDLGCODE (wParam, lParam); 
    10731077    if (result !is LRESULT.NULL) return result; 
    10741078    if ((state & CANVAS) !is 0) { 
     
    10831087    return result; 
    10841088} 
    10851089 
    1086 LRESULT WM_GETFONT (int wParam, int lParam) { 
     1090override LRESULT WM_GETFONT (int wParam, int lParam) { 
    10871091    LRESULT result = super.WM_GETFONT (wParam, lParam); 
    10881092    if (result !is LRESULT.NULL) return result; 
    10891093    int code = callWindowProc (handle, OS.WM_GETFONT, wParam, lParam); 
     
    10921096    return cast( LRESULT )(font); 
    10931097} 
    10941098 
    1095 LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { 
     1099override LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { 
    10961100    LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam); 
    10971101    if (result is LRESULT.ZERO) return result; 
    10981102 
     
    11051109    return result; 
    11061110} 
    11071111 
    1108 LRESULT WM_NCPAINT (int wParam, int lParam) { 
     1112override LRESULT WM_NCPAINT (int wParam, int lParam) { 
    11091113    LRESULT result = super.WM_NCPAINT (wParam, lParam); 
    11101114    if (result !is LRESULT.NULL) return result; 
    11111115    if ((state & CANVAS) !is 0) { 
     
    11141118    return result; 
    11151119} 
    11161120 
    1117 LRESULT WM_PARENTNOTIFY (int wParam, int lParam) { 
     1121override LRESULT WM_PARENTNOTIFY (int wParam, int lParam) { 
    11181122    if ((state & CANVAS) !is 0 && (style & DWT.EMBEDDED) !is 0) { 
    11191123        if ((wParam & 0xFFFF) is OS.WM_CREATE) { 
    11201124            RECT rect; 
     
    11251129    return super.WM_PARENTNOTIFY (wParam, lParam); 
    11261130} 
    11271131 
    1128 LRESULT WM_PAINT (int wParam, int lParam) { 
     1132override LRESULT WM_PAINT (int wParam, int lParam) { 
    11291133    if ((state & CANVAS) is 0 || (state & FOREIGN_HANDLE) !is 0) { 
    11301134        return super.WM_PAINT (wParam, lParam); 
    11311135    } 
     
    13281332    return LRESULT.ZERO; 
    13291333} 
    13301334 
    1331 LRESULT WM_PRINTCLIENT (int wParam, int lParam) { 
     1335override LRESULT WM_PRINTCLIENT (int wParam, int lParam) { 
    13321336    LRESULT result = super.WM_PRINTCLIENT (wParam, lParam); 
    13331337    if (result !is LRESULT.NULL) return result; 
    13341338    if ((state & CANVAS) !is 0) { 
     
    13641368    return result; 
    13651369} 
    13661370 
    1367 LRESULT WM_SETFONT (int wParam, int lParam) { 
     1371override LRESULT WM_SETFONT (int wParam, int lParam) { 
    13681372    if (lParam !is 0) OS.InvalidateRect (handle, null, true); 
    13691373    font = cast(HFONT)wParam; 
    13701374    return super.WM_SETFONT (wParam, lParam); 
    13711375} 
    13721376 
    1373 LRESULT WM_SIZE (int wParam, int lParam) { 
     1377override LRESULT WM_SIZE (int wParam, int lParam) { 
    13741378 
    13751379    /* Begin deferred window positioning */ 
    13761380    setResizeChildren (false); 
     
    14141418    return result; 
    14151419} 
    14161420 
    1417 LRESULT WM_SYSCOLORCHANGE (int wParam, int lParam) { 
     1421override LRESULT WM_SYSCOLORCHANGE (int wParam, int lParam) { 
    14181422    LRESULT result = super.WM_SYSCOLORCHANGE (wParam, lParam); 
    14191423    if (result !is LRESULT.NULL) return result; 
    14201424    auto hwndChild = OS.GetWindow (handle, OS.GW_CHILD); 
     
    14251429    return result; 
    14261430} 
    14271431 
    1428 LRESULT WM_SYSCOMMAND (int wParam, int lParam) { 
     1432override LRESULT WM_SYSCOMMAND (int wParam, int lParam) { 
    14291433    LRESULT result = super.WM_SYSCOMMAND (wParam, lParam); 
    14301434    if (result !is LRESULT.NULL) return result; 
    14311435 
     
    14631467    return result; 
    14641468} 
    14651469 
    1466 LRESULT WM_UPDATEUISTATE (int wParam, int lParam) { 
     1470override LRESULT WM_UPDATEUISTATE (int wParam, int lParam) { 
    14671471    LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam); 
    14681472    if (result !is LRESULT.NULL) return result; 
    14691473    if ((state & CANVAS) !is 0) OS.InvalidateRect (handle, null, false); 
     
    14951499    return LRESULT.NULL; 
    14961500} 
    14971501 
    1498 LRESULT wmNotify (NMHDR* hdr, int wParam, int lParam) { 
     1502override LRESULT wmNotify (NMHDR* hdr, int wParam, int lParam) { 
    14991503    if (!OS.IsWinCE) { 
    15001504        switch (hdr.code) { 
    15011505            /* 
  • a/dwt/widgets/Control.d

    old new  
    685685    display.removeControl (handle); 
    686686} 
    687687 
    688 void destroyWidget () { 
     688override void destroyWidget () { 
    689689    auto hwnd = topHandle (); 
    690690    releaseHandle (); 
    691691    if (hwnd !is null) { 
     
    13171317 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 
    13181318 * </ul> 
    13191319 */ 
    1320 public Menu getMenu () { 
     1320override public Menu getMenu () { 
    13211321    checkWidget (); 
    13221322    return menu; 
    13231323} 
     
    17441744    return getVisible () && parent.isVisible (); 
    17451745} 
    17461746 
    1747 void mapEvent (HWND hwnd, Event event) { 
     1747override void mapEvent (HWND hwnd, Event event) { 
    17481748    if (hwnd !is handle) { 
    17491749        POINT point; 
    17501750        point.x = event.x; 
     
    18821882    return Accessible.internal_new_Accessible (this); 
    18831883} 
    18841884 
    1885 GC new_GC (GCData data) { 
     1885override GC new_GC (GCData data) { 
    18861886    return GC.win32_new (this, data); 
    18871887} 
    18881888 
     
    20322032    display.addControl (handle, this); 
    20332033} 
    20342034 
    2035 void releaseHandle () { 
     2035override void releaseHandle () { 
    20362036    super.releaseHandle (); 
    20372037    handle = null; 
    20382038    parent = null; 
    20392039} 
    20402040 
    2041 void releaseParent () { 
     2041override void releaseParent () { 
    20422042    parent.removeControl (this); 
    20432043} 
    20442044 
    2045 void releaseWidget () { 
     2045override void releaseWidget () { 
    20462046    super.releaseWidget (); 
    20472047    if (OS.IsDBLocale) { 
    20482048        OS.ImmAssociateContext (handle, null); 
     
    23742374    if (handle !is topHandle_) OS.ShowWindow (handle, visible ? OS.SW_SHOW : OS.SW_HIDE); 
    23752375} 
    23762376 
    2377 bool sendFocusEvent (int type) { 
     2377override bool sendFocusEvent (int type) { 
    23782378    Shell shell = getShell (); 
    23792379 
    23802380    /* 
  • a/dwt/widgets/CoolBar.d

    old new  
    5353 */ 
    5454 
    5555public class CoolBar : Composite { 
     56 
     57    alias Composite.computeSize computeSize; 
     58    alias Composite.windowProc windowProc; 
    5659 
    5760    CoolItem [] items; 
    5861    CoolItem [] originalItems; 
     
    124127    } 
    125128} 
    126129 
    127 LRESULT callWindowProc (HWND hwnd, int msg, int wParam, int lParam) { 
     130override LRESULT callWindowProc (HWND hwnd, int msg, int wParam, int lParam) { 
    128131    if (handle is null) return LRESULT.NULL; 
    129132    return cast(LRESULT) OS.CallWindowProc (ReBarProc, hwnd, msg, wParam, lParam); 
    130133} 
     
    141144    return style & ~(DWT.H_SCROLL | DWT.V_SCROLL); 
    142145} 
    143146 
    144 protected void checkSubclass () { 
     147override protected void checkSubclass () { 
    145148    if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); 
    146149} 
    147150 
    148 public Point computeSize (int wHint, int hHint, bool changed) { 
     151override public Point computeSize (int wHint, int hHint, bool changed) { 
    149152    checkWidget (); 
    150153    int width = 0, height = 0; 
    151154    int border = getBorderWidth (); 
     
    214217    return new Point (width, height); 
    215218} 
    216219 
    217 void createHandle () { 
     220override void createHandle () { 
    218221    super.createHandle (); 
    219222    state &= ~(CANVAS | THEME_BACKGROUND); 
    220223 
     
    302305    originalItems = newOriginals; 
    303306} 
    304307 
    305 void createWidget () { 
     308override void createWidget () { 
    306309    super.createWidget (); 
    307310    items = new CoolItem [4]; 
    308311    originalItems = new CoolItem [0]; 
     
    374377    originalItems = newOriginals; 
    375378} 
    376379 
    377 void drawThemeBackground (HDC hDC, HWND hwnd, RECT* rect) { 
     380override void drawThemeBackground (HDC hDC, HWND hwnd, RECT* rect) { 
    378381    if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) { 
    379382        if (background is -1 && (style & DWT.FLAT) !is 0) { 
    380383            Control control = findBackgroundControl (); 
     
    393396    OS.SetWindowOrgEx (hDC, lpPoint.x, lpPoint.y, null); 
    394397} 
    395398 
    396 Control findThemeControl () { 
     399override Control findThemeControl () { 
    397400    if ((style & DWT.FLAT) !is 0) return this; 
    398401    return background is -1 && backgroundImage is null ? this : super.findThemeControl (); 
    399402} 
     
    710713    OS.SendMessage (handle, OS.RB_SETBANDINFO, index, &rbBand); 
    711714} 
    712715 
    713 void releaseChildren (bool destroy) { 
     716override void releaseChildren (bool destroy) { 
    714717    if (items !is null) { 
    715718        for (int i=0; i<items.length; i++) { 
    716719            CoolItem item = items [i]; 
     
    723726    super.releaseChildren (destroy); 
    724727} 
    725728 
    726 void removeControl (Control control) { 
     729override void removeControl (Control control) { 
    727730    super.removeControl (control); 
    728731    for (int i=0; i<items.length; i++) { 
    729732        CoolItem item = items [i]; 
     
    733736    } 
    734737} 
    735738 
    736 void setBackgroundPixel (int pixel) { 
     739override void setBackgroundPixel (int pixel) { 
    737740    if (pixel is -1) pixel = defaultBackground (); 
    738741    OS.SendMessage (handle, OS.RB_SETBKCOLOR, 0, pixel); 
    739742    setItemColors (OS.SendMessage (handle, OS.RB_GETTEXTCOLOR, 0, 0), pixel); 
     
    752755    } 
    753756} 
    754757 
    755 void setForegroundPixel (int pixel) { 
     758override void setForegroundPixel (int pixel) { 
    756759    if (pixel is -1) pixel = defaultForeground (); 
    757760    OS.SendMessage (handle, OS.RB_SETTEXTCOLOR, 0, pixel); 
    758761    setItemColors (pixel, OS.SendMessage (handle, OS.RB_GETBKCOLOR, 0, 0)); 
     
    977980    setRedraw (true); 
    978981} 
    979982 
    980 int widgetStyle () { 
     983override int widgetStyle () { 
    981984    int bits = super.widgetStyle () | OS.CCS_NODIVIDER | OS.CCS_NORESIZE; 
    982985    bits |= OS.RBS_VARHEIGHT | OS.RBS_DBLCLKTOGGLE; 
    983986    if ((style & DWT.FLAT) is 0) bits |= OS.RBS_BANDBORDERS; 
    984987    return bits; 
    985988} 
    986989 
    987 char[] windowClass () { 
     990override char[] windowClass () { 
    988991    return TCHARzToStr( ReBarClass ); 
    989992} 
    990993 
    991 int windowProc () { 
     994override int windowProc () { 
    992995    return cast(int) ReBarProc; 
    993996} 
    994997 
    995 LRESULT WM_COMMAND (int wParam, int lParam) { 
     998override LRESULT WM_COMMAND (int wParam, int lParam) { 
    996999    /* 
    9971000    * Feature in Windows.  When the coolbar window 
    9981001    * proc processes WM_COMMAND, it forwards this 
     
    10161019    return LRESULT.ZERO; 
    10171020} 
    10181021 
    1019 LRESULT WM_ERASEBKGND (int wParam, int lParam) { 
     1022override LRESULT WM_ERASEBKGND (int wParam, int lParam) { 
    10201023    LRESULT result = super.WM_ERASEBKGND (wParam, lParam); 
    10211024    /* 
    10221025    * Feature in Windows.  For some reason, Windows 
     
    10381041    return result; 
    10391042} 
    10401043 
    1041 LRESULT WM_NOTIFY (int wParam, int lParam) { 
     1044override LRESULT WM_NOTIFY (int wParam, int lParam) { 
    10421045    /* 
    10431046    * Feature in Windows.  When the cool bar window 
    10441047    * proc processes WM_NOTIFY, it forwards this 
     
    10621065    return LRESULT.ZERO; 
    10631066} 
    10641067 
    1065 LRESULT WM_SETREDRAW (int wParam, int lParam) { 
     1068override LRESULT WM_SETREDRAW (int wParam, int lParam) { 
    10661069    LRESULT result = super.WM_SETREDRAW (wParam, lParam); 
    10671070    if (result !is LRESULT.NULL) return result; 
    10681071    /* 
     
    10941097    return cast( LRESULT )(code); 
    10951098} 
    10961099 
    1097 LRESULT WM_SIZE (int wParam, int lParam) { 
     1100override LRESULT WM_SIZE (int wParam, int lParam) { 
    10981101    if (ignoreResize) { 
    10991102        int code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam); 
    11001103        if (code is 0) return LRESULT.ZERO; 
     
    11091112    return super.WM_SIZE (wParam, lParam); 
    11101113} 
    11111114 
    1112 LRESULT wmNotifyChild (NMHDR* hdr, int wParam, int lParam) { 
     1115override LRESULT wmNotifyChild (NMHDR* hdr, int wParam, int lParam) { 
    11131116    switch (hdr.code) { 
    11141117        case OS.RBN_BEGINDRAG: { 
    11151118            int pos = OS.GetMessagePos (); 
  • a/dwt/widgets/CoolItem.d

    old new  
    161161    addListener (DWT.DefaultSelection,typedListener); 
    162162} 
    163163 
    164 protected void checkSubclass () { 
     164override protected void checkSubclass () { 
    165165    if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); 
    166166} 
    167167 
     
    207207    return new Point (width, height); 
    208208} 
    209209 
    210 void destroyWidget () { 
     210override void destroyWidget () { 
    211211    parent.destroyItem (this); 
    212212    releaseHandle (); 
    213213} 
     
    305305    return parent; 
    306306} 
    307307 
    308 void releaseHandle () { 
     308override void releaseHandle () { 
    309309    super.releaseHandle (); 
    310310    parent = null; 
    311311    id = -1; 
  • a/dwt/widgets/DateTime.d

    old new  
    5959 */ 
    6060 
    6161public class DateTime extends Composite { 
     62 
     63    alias Composite.computeSize computeSize; 
     64    alias Composite.windowProc windowProc; 
     65 
    6266    static final int DateTimeProc; 
    6367    static final TCHAR DateTimeClass = new TCHAR (0, OS.DATETIMEPICK_CLASS, true); 
    6468    static final int CalendarProc; 
     
    165169    addListener (DWT.DefaultSelection, typedListener); 
    166170} 
    167171 
    168 int callWindowProc (int hwnd, int msg, int wParam, int lParam) { 
     172override int callWindowProc (int hwnd, int msg, int wParam, int lParam) { 
    169173    if (handle is 0) return 0; 
    170174    return OS.CallWindowProc (windowProc (), hwnd, msg, wParam, lParam); 
    171175} 
     
    183187    return checkBits (style, DWT.MEDIUM, DWT.SHORT, DWT.LONG, 0, 0, 0); 
    184188} 
    185189 
    186 protected void checkSubclass () { 
     190override protected void checkSubclass () { 
    187191    if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); 
    188192} 
    189193 
    190 public Point computeSize (int wHint, int hHint, bool changed) { 
     194override public Point computeSize (int wHint, int hHint, bool changed) { 
    191195    checkWidget (); 
    192196    int width = 0, height = 0; 
    193197    if (wHint is DWT.DEFAULT || hHint is DWT.DEFAULT) { 
     
    340344    return new Point (width, height); 
    341345} 
    342346 
    343 void createHandle () { 
     347override void createHandle () { 
    344348    super.createHandle (); 
    345349    state &= ~(CANVAS | THEME_BACKGROUND); 
    346350} 
    347351 
    348 int defaultBackground () { 
     352override int defaultBackground () { 
    349353    return OS.GetSysColor (OS.COLOR_WINDOW); 
    350354} 
    351355 
     
    552556    return systime.wMonth - 1; 
    553557} 
    554558 
    555 String getNameText () { 
     559override String getNameText () { 
    556560    return "DateTime"; 
    557561} 
    558562 
     
    761765    OS.SendMessage (handle, msg, 0, systime); 
    762766} 
    763767 
    764 int widgetStyle () { 
     768override int widgetStyle () { 
    765769    int bits = super.widgetStyle () | OS.WS_TABSTOP; 
    766770    if ((style & DWT.CALENDAR) !is 0) return bits | OS.MCS_NOTODAY; 
    767771    /* 
     
    775779    return bits; 
    776780} 
    777781