Changeset 54:0f25be5cbe6f
- Timestamp:
- 02/04/08 04:05:20
(10 months ago)
- Author:
- Frank Benoit <benoit@tionex.de>
- branch:
- default
- Message:
Added aliases and overrides from generated file, remaining widgets. Thanks torhu for doing this job.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r40 |
r54 |
|
| 126 | 126 | } |
|---|
| 127 | 127 | |
|---|
| 128 | | void releaseChildren (bool destroy) { |
|---|
| | 128 | override void releaseChildren (bool destroy) { |
|---|
| 129 | 129 | if (caret !is null) { |
|---|
| 130 | 130 | caret.release (false); |
|---|
| … | … | |
| 289 | 289 | } |
|---|
| 290 | 290 | |
|---|
| 291 | | public void setFont (Font font) { |
|---|
| | 291 | override public void setFont (Font font) { |
|---|
| 292 | 292 | checkWidget (); |
|---|
| 293 | 293 | if (caret !is null) caret.setFont (font); |
|---|
| … | … | |
| 308 | 308 | } |
|---|
| 309 | 309 | |
|---|
| 310 | | LRESULT WM_IME_COMPOSITION (int wParam, int lParam) { |
|---|
| | 310 | override LRESULT WM_IME_COMPOSITION (int wParam, int lParam) { |
|---|
| 311 | 311 | LRESULT result = super.WM_IME_COMPOSITION (wParam, lParam); |
|---|
| 312 | 312 | /* |
|---|
| … | … | |
| 341 | 341 | } |
|---|
| 342 | 342 | |
|---|
| 343 | | LRESULT WM_INPUTLANGCHANGE (int wParam, int lParam) { |
|---|
| | 343 | override LRESULT WM_INPUTLANGCHANGE (int wParam, int lParam) { |
|---|
| 344 | 344 | LRESULT result = super.WM_INPUTLANGCHANGE (wParam, lParam); |
|---|
| 345 | 345 | if (caret !is null && caret.isFocusCaret ()) { |
|---|
| … | … | |
| 350 | 350 | } |
|---|
| 351 | 351 | |
|---|
| 352 | | LRESULT WM_KILLFOCUS (int wParam, int lParam) { |
|---|
| | 352 | override LRESULT WM_KILLFOCUS (int wParam, int lParam) { |
|---|
| 353 | 353 | LRESULT result = super.WM_KILLFOCUS (wParam, lParam); |
|---|
| 354 | 354 | if (caret !is null) caret.killFocus (); |
|---|
| … | … | |
| 356 | 356 | } |
|---|
| 357 | 357 | |
|---|
| 358 | | LRESULT WM_SETFOCUS (int wParam, int lParam) { |
|---|
| | 358 | override LRESULT WM_SETFOCUS (int wParam, int lParam) { |
|---|
| 359 | 359 | LRESULT result = super.WM_SETFOCUS (wParam, lParam); |
|---|
| 360 | 360 | if (caret !is null) caret.setFocus (); |
|---|
| … | … | |
| 362 | 362 | } |
|---|
| 363 | 363 | |
|---|
| 364 | | LRESULT WM_SIZE (int wParam, int lParam) { |
|---|
| | 364 | override LRESULT WM_SIZE (int wParam, int lParam) { |
|---|
| 365 | 365 | LRESULT result = super.WM_SIZE (wParam, lParam); |
|---|
| 366 | 366 | if (caret !is null && caret.isFocusCaret ()) caret.resizeIME (); |
|---|
| … | … | |
| 368 | 368 | } |
|---|
| 369 | 369 | |
|---|
| 370 | | LRESULT WM_WINDOWPOSCHANGED (int wParam, int lParam) { |
|---|
| | 370 | override LRESULT WM_WINDOWPOSCHANGED (int wParam, int lParam) { |
|---|
| 371 | 371 | LRESULT result = super.WM_WINDOWPOSCHANGED (wParam, lParam); |
|---|
| 372 | 372 | if (result !is LRESULT.NULL) return result; |
|---|
| … | … | |
| 383 | 383 | } |
|---|
| 384 | 384 | |
|---|
| 385 | | LRESULT WM_WINDOWPOSCHANGING (int wParam, int lParam) { |
|---|
| | 385 | override LRESULT WM_WINDOWPOSCHANGING (int wParam, int lParam) { |
|---|
| 386 | 386 | LRESULT result = super.WM_WINDOWPOSCHANGING (wParam, lParam); |
|---|
| 387 | 387 | if (result !is LRESULT.NULL) return result; |
|---|
| r42 |
r54 |
|
| 291 | 291 | } |
|---|
| 292 | 292 | |
|---|
| 293 | | void releaseParent () { |
|---|
| | 293 | override void releaseParent () { |
|---|
| 294 | 294 | super.releaseParent (); |
|---|
| 295 | 295 | if (this is parent.getCaret ()) parent.setCaret (null); |
|---|
| 296 | 296 | } |
|---|
| 297 | 297 | |
|---|
| 298 | | void releaseWidget () { |
|---|
| | 298 | override void releaseWidget () { |
|---|
| 299 | 299 | super.releaseWidget (); |
|---|
| 300 | 300 | parent = null; |
|---|
| r44 |
r54 |
|
| 71 | 71 | public class Combo : Composite { |
|---|
| 72 | 72 | |
|---|
| | 73 | alias Composite.computeSize computeSize; |
|---|
| | 74 | alias Composite.dragDetect dragDetect; |
|---|
| 73 | 75 | alias Composite.sendKeyEvent sendKeyEvent; |
|---|
| | 76 | alias Composite.setBackgroundImage setBackgroundImage; |
|---|
| | 77 | alias Composite.setBounds setBounds; |
|---|
| | 78 | alias Composite.setToolTipText setToolTipText; |
|---|
| 74 | 79 | |
|---|
| 75 | 80 | alias extern(Windows) int function( HWND, uint, uint, int ) TWindowProc; |
|---|
| … | … | |
| 337 | 342 | } |
|---|
| 338 | 343 | |
|---|
| 339 | | bool checkHandle (HWND hwnd) { |
|---|
| | 344 | override bool checkHandle (HWND hwnd) { |
|---|
| 340 | 345 | return hwnd is handle || hwnd is OS.GetDlgItem (handle, CBID_EDIT) || hwnd is OS.GetDlgItem (handle, CBID_LIST); |
|---|
| 341 | 346 | } |
|---|
| 342 | 347 | |
|---|
| 343 | | protected void checkSubclass () { |
|---|
| | 348 | override protected void checkSubclass () { |
|---|
| 344 | 349 | if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); |
|---|
| 345 | 350 | } |
|---|
| … | … | |
| 395 | 400 | } |
|---|
| 396 | 401 | |
|---|
| 397 | | public Point computeSize (int wHint, int hHint, bool changed) { |
|---|
| | 402 | override public Point computeSize (int wHint, int hHint, bool changed) { |
|---|
| 398 | 403 | checkWidget (); |
|---|
| 399 | 404 | int width = 0, height = 0; |
|---|
| … | … | |
| 492 | 497 | } |
|---|
| 493 | 498 | |
|---|
| 494 | | void createHandle () { |
|---|
| | 499 | override void createHandle () { |
|---|
| 495 | 500 | /* |
|---|
| 496 | 501 | * Feature in Windows. When the selection changes in a combo box, |
|---|
| … | … | |
| 563 | 568 | } |
|---|
| 564 | 569 | |
|---|
| 565 | | int defaultBackground () { |
|---|
| | 570 | override int defaultBackground () { |
|---|
| 566 | 571 | return OS.GetSysColor (OS.COLOR_WINDOW); |
|---|
| 567 | 572 | } |
|---|
| 568 | 573 | |
|---|
| 569 | | void deregister () { |
|---|
| | 574 | override void deregister () { |
|---|
| 570 | 575 | super.deregister (); |
|---|
| 571 | 576 | auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); |
|---|
| … | … | |
| 617 | 622 | } |
|---|
| 618 | 623 | |
|---|
| 619 | | bool dragDetect (HWND hwnd, int x, int y, bool filter, bool [] detect, bool [] consume) { |
|---|
| | 624 | override bool dragDetect (HWND hwnd, int x, int y, bool filter, bool [] detect, bool [] consume) { |
|---|
| 620 | 625 | if (filter && (style & DWT.READ_ONLY) is 0) { |
|---|
| 621 | 626 | auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); |
|---|
| … | … | |
| 755 | 760 | } |
|---|
| 756 | 761 | |
|---|
| 757 | | char[] getNameText () { |
|---|
| | 762 | override char[] getNameText () { |
|---|
| 758 | 763 | return getText (); |
|---|
| 759 | 764 | } |
|---|
| … | … | |
| 913 | 918 | } |
|---|
| 914 | 919 | |
|---|
| 915 | | bool hasFocus () { |
|---|
| | 920 | override bool hasFocus () { |
|---|
| 916 | 921 | auto hwndFocus = OS.GetFocus (); |
|---|
| 917 | 922 | if (hwndFocus is handle) return true; |
|---|
| … | … | |
| 1028 | 1033 | } |
|---|
| 1029 | 1034 | |
|---|
| 1030 | | void register () { |
|---|
| | 1035 | override void register () { |
|---|
| 1031 | 1036 | super.register (); |
|---|
| 1032 | 1037 | auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); |
|---|
| … | … | |
| 1287 | 1292 | } |
|---|
| 1288 | 1293 | |
|---|
| 1289 | | bool sendKeyEvent (int type, int msg, int wParam, int lParam, Event event) { |
|---|
| | 1294 | override bool sendKeyEvent (int type, int msg, int wParam, int lParam, Event event) { |
|---|
| 1290 | 1295 | if (!super.sendKeyEvent (type, msg, wParam, lParam, event)) { |
|---|
| 1291 | 1296 | return false; |
|---|
| … | … | |
| 1397 | 1402 | } |
|---|
| 1398 | 1403 | |
|---|
| 1399 | | void setBackgroundImage (HBITMAP hBitmap) { |
|---|
| | 1404 | override void setBackgroundImage (HBITMAP hBitmap) { |
|---|
| 1400 | 1405 | super.setBackgroundImage (hBitmap); |
|---|
| 1401 | 1406 | auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); |
|---|
| … | … | |
| 1405 | 1410 | } |
|---|
| 1406 | 1411 | |
|---|
| 1407 | | void setBackgroundPixel (int pixel) { |
|---|
| | 1412 | override void setBackgroundPixel (int pixel) { |
|---|
| 1408 | 1413 | super.setBackgroundPixel (pixel); |
|---|
| 1409 | 1414 | auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); |
|---|
| … | … | |
| 1413 | 1418 | } |
|---|
| 1414 | 1419 | |
|---|
| 1415 | | void setBounds (int x, int y, int width, int height, int flags) { |
|---|
| | 1420 | override void setBounds (int x, int y, int width, int height, int flags) { |
|---|
| 1416 | 1421 | /* |
|---|
| 1417 | 1422 | * Feature in Windows. If the combo box has the CBS_DROPDOWN |
|---|
| … | … | |
| 1460 | 1465 | } |
|---|
| 1461 | 1466 | |
|---|
| 1462 | | public void setFont (Font font) { |
|---|
| | 1467 | override public void setFont (Font font) { |
|---|
| 1463 | 1468 | checkWidget (); |
|---|
| 1464 | 1469 | super.setFont (font); |
|---|
| … | … | |
| 1466 | 1471 | } |
|---|
| 1467 | 1472 | |
|---|
| 1468 | | void setForegroundPixel (int pixel) { |
|---|
| | 1473 | override void setForegroundPixel (int pixel) { |
|---|
| 1469 | 1474 | super.setForegroundPixel (pixel); |
|---|
| 1470 | 1475 | auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); |
|---|
| … | … | |
| 1835 | 1840 | } |
|---|
| 1836 | 1841 | |
|---|
| 1837 | | void setToolTipText (Shell shell, char[] string) { |
|---|
| | 1842 | override void setToolTipText (Shell shell, char[] string) { |
|---|
| 1838 | 1843 | auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); |
|---|
| 1839 | 1844 | auto hwndList = OS.GetDlgItem (handle, CBID_LIST); |
|---|
| … | … | |
| 1873 | 1878 | } |
|---|
| 1874 | 1879 | |
|---|
| 1875 | | void subclass () { |
|---|
| | 1880 | override void subclass () { |
|---|
| 1876 | 1881 | super.subclass (); |
|---|
| 1877 | 1882 | auto newProc = display.windowProc; |
|---|
| … | … | |
| 1886 | 1891 | } |
|---|
| 1887 | 1892 | |
|---|
| 1888 | | bool translateTraversal (MSG* msg) { |
|---|
| | 1893 | override bool translateTraversal (MSG* msg) { |
|---|
| 1889 | 1894 | /* |
|---|
| 1890 | 1895 | * When the combo box is dropped down, allow return |
|---|
| … | … | |
| 1904 | 1909 | } |
|---|
| 1905 | 1910 | |
|---|
| 1906 | | bool traverseEscape () { |
|---|
| | 1911 | override bool traverseEscape () { |
|---|
| 1907 | 1912 | if ((style & DWT.DROP_DOWN) !is 0) { |
|---|
| 1908 | 1913 | if (OS.SendMessage (handle, OS.CB_GETDROPPEDSTATE, 0, 0) !is 0) { |
|---|
| … | … | |
| 1914 | 1919 | } |
|---|
| 1915 | 1920 | |
|---|
| 1916 | | bool traverseReturn () { |
|---|
| | 1921 | override bool traverseReturn () { |
|---|
| 1917 | 1922 | if ((style & DWT.DROP_DOWN) !is 0) { |
|---|
| 1918 | 1923 | if (OS.SendMessage (handle, OS.CB_GETDROPPEDSTATE, 0, 0) !is 0) { |
|---|
| … | … | |
| 1924 | 1929 | } |
|---|
| 1925 | 1930 | |
|---|
| 1926 | | void unsubclass () { |
|---|
| | 1931 | override void unsubclass () { |
|---|
| 1927 | 1932 | super.unsubclass (); |
|---|
| 1928 | 1933 | auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); |
|---|
| … | … | |
| 1979 | 1984 | } |
|---|
| 1980 | 1985 | |
|---|
| 1981 | | int widgetExtStyle () { |
|---|
| | 1986 | override int widgetExtStyle () { |
|---|
| 1982 | 1987 | return super.widgetExtStyle () & ~OS.WS_EX_NOINHERITLAYOUT; |
|---|
| 1983 | 1988 | } |
|---|
| 1984 | 1989 | |
|---|
| 1985 | | int widgetStyle () { |
|---|
| | 1990 | override int widgetStyle () { |
|---|
| 1986 | 1991 | int bits = super.widgetStyle () | OS.CBS_AUTOHSCROLL | OS.CBS_NOINTEGRALHEIGHT | OS.WS_HSCROLL |OS.WS_VSCROLL; |
|---|
| 1987 | 1992 | if ((style & DWT.SIMPLE) !is 0) return bits | OS.CBS_SIMPLE; |
|---|
| … | … | |
| 1990 | 1995 | } |
|---|
| 1991 | 1996 | |
|---|
| 1992 | | char[] windowClass () { |
|---|
| | 1997 | override char[] windowClass () { |
|---|
| 1993 | 1998 | return TCHARzToStr( ComboClass ); |
|---|
| 1994 | 1999 | } |
|---|
| 1995 | 2000 | |
|---|
| 1996 | | int windowProc () { |
|---|
| | 2001 | override int windowProc () { |
|---|
| 1997 | 2002 | return cast(int) ComboProc; |
|---|
| 1998 | 2003 | } |
|---|
| … | … | |
| 2085 | 2090 | } |
|---|
| 2086 | 2091 | |
|---|
| 2087 | | LRESULT WM_CTLCOLOR (int wParam, int lParam) { |
|---|
| | 2092 | override LRESULT WM_CTLCOLOR (int wParam, int lParam) { |
|---|
| 2088 | 2093 | return wmColorChild (wParam, lParam); |
|---|
| 2089 | 2094 | } |
|---|
| 2090 | 2095 | |
|---|
| 2091 | | LRESULT WM_GETDLGCODE (int wParam, int lParam) { |
|---|
| | 2096 | override LRESULT WM_GETDLGCODE (int wParam, int lParam) { |
|---|
| 2092 | 2097 | int code = callWindowProc (handle, OS.WM_GETDLGCODE, wParam, lParam); |
|---|
| 2093 | 2098 | return cast( LRESULT )(code | OS.DLGC_WANTARROWS); |
|---|
| 2094 | 2099 | } |
|---|
| 2095 | 2100 | |
|---|
| 2096 | | LRESULT WM_KILLFOCUS (int wParam, int lParam) { |
|---|
| | 2101 | override LRESULT WM_KILLFOCUS (int wParam, int lParam) { |
|---|
| 2097 | 2102 | /* |
|---|
| 2098 | 2103 | * Bug in Windows. When a combo box that is read only |
|---|
| … | … | |
| 2114 | 2119 | } |
|---|
| 2115 | 2120 | |
|---|
| 2116 | | LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { |
|---|
| | 2121 | override LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { |
|---|
| 2117 | 2122 | /* |
|---|
| 2118 | 2123 | * Feature in Windows. When an editable combo box is dropped |
|---|
| … | … | |
| 2137 | 2142 | } |
|---|
| 2138 | 2143 | |
|---|
| 2139 | | LRESULT WM_SETFOCUS (int wParam, int lParam) { |
|---|
| | 2144 | override LRESULT WM_SETFOCUS (int wParam, int lParam) { |
|---|
| 2140 | 2145 | /* |
|---|
| 2141 | 2146 | * Return NULL - Focus notification is |
|---|
| … | … | |
| 2145 | 2150 | } |
|---|
| 2146 | 2151 | |
|---|
| 2147 | | LRESULT WM_SIZE (int wParam, int lParam) { |
|---|
| | 2152 | override LRESULT WM_SIZE (int wParam, int lParam) { |
|---|
| 2148 | 2153 | /* |
|---|
| 2149 | 2154 | * Bug in Windows. If the combo box has the CBS_SIMPLE style, |
|---|
| … | … | |
| 2219 | 2224 | } |
|---|
| 2220 | 2225 | |
|---|
| 2221 | | LRESULT wmChar (HWND hwnd, int wParam, int lParam) { |
|---|
| | 2226 | override LRESULT wmChar (HWND hwnd, int wParam, int lParam) { |
|---|
| 2222 | 2227 | if (ignoreCharacter) return LRESULT.NULL; |
|---|
| 2223 | 2228 | LRESULT result = super.wmChar (hwnd, wParam, lParam); |
|---|
| … | … | |
| 2325 | 2330 | } |
|---|
| 2326 | 2331 | |
|---|
| 2327 | | LRESULT wmCommandChild (int wParam, int lParam) { |
|---|
| | 2332 | override LRESULT wmCommandChild (int wParam, int lParam) { |
|---|
| 2328 | 2333 | int code = wParam >> 16; |
|---|
| 2329 | 2334 | switch (code) { |
|---|
| … | … | |
| 2390 | 2395 | } |
|---|
| 2391 | 2396 | |
|---|
| 2392 | | LRESULT wmIMEChar (HWND hwnd, int wParam, int lParam) { |
|---|
| | 2397 | override LRESULT wmIMEChar (HWND hwnd, int wParam, int lParam) { |
|---|
| 2393 | 2398 | |
|---|
| 2394 | 2399 | /* Process a DBCS character */ |
|---|
| … | … | |
| 2424 | 2429 | } |
|---|
| 2425 | 2430 | |
|---|
| 2426 | | LRESULT wmKeyDown (HWND hwnd, int wParam, int lParam) { |
|---|
| | 2431 | override LRESULT wmKeyDown (HWND hwnd, int wParam, int lParam) { |
|---|
| 2427 | 2432 | if (ignoreCharacter) return LRESULT.NULL; |
|---|
| 2428 | 2433 | LRESULT result = super.wmKeyDown (hwnd, wParam, lParam); |
|---|
| … | … | |
| 2439 | 2444 | } |
|---|
| 2440 | 2445 | |
|---|
| 2441 | | LRESULT wmSysKeyDown (HWND hwnd, int wParam, int lParam) { |
|---|
| | 2446 | override LRESULT wmSysKeyDown (HWND hwnd, int wParam, int lParam) { |
|---|
| 2442 | 2447 | /* |
|---|
| 2443 | 2448 | * Feature in Windows. When an editable combo box is dropped |
|---|
| r37 |
r54 |
|
| 67 | 67 | |
|---|
| 68 | 68 | public class Composite : Scrollable { |
|---|
| | 69 | |
|---|
| | 70 | alias Scrollable.computeSize computeSize; |
|---|
| | 71 | alias Scrollable.translateMnemonic translateMnemonic; |
|---|
| | 72 | |
|---|
| 69 | 73 | Layout layout_; |
|---|
| 70 | 74 | HFONT font; |
|---|
| … | … | |
| 202 | 206 | } |
|---|
| 203 | 207 | |
|---|
| 204 | | void checkBuffered () { |
|---|
| | 208 | override void checkBuffered () { |
|---|
| 205 | 209 | if (OS.IsWinCE || (state & CANVAS) is 0) { |
|---|
| 206 | 210 | super.checkBuffered (); |
|---|
| … | … | |
| 208 | 212 | } |
|---|
| 209 | 213 | |
|---|
| 210 | | protected void checkSubclass () { |
|---|
| | 214 | override protected void checkSubclass () { |
|---|
| 211 | 215 | /* Do nothing - Subclassing is allowed */ |
|---|
| 212 | 216 | } |
|---|
| 213 | 217 | |
|---|
| 214 | | Control [] computeTabList () { |
|---|
| | 218 | override Control [] computeTabList () { |
|---|
| 215 | 219 | Control result [] = super.computeTabList (); |
|---|
| 216 | 220 | if (result.length is 0) return result; |
|---|
| … | … | |
| 229 | 233 | } |
|---|
| 230 | 234 | |
|---|
| 231 | | public Point computeSize (int wHint, int hHint, bool changed) { |
|---|
| | 235 | override public Point computeSize (int wHint, int hHint, bool changed) { |
|---|
| 232 | 236 | checkWidget (); |
|---|
| 233 | 237 | Point size; |
|---|
| … | … | |
| 251 | 255 | } |
|---|
| 252 | 256 | |
|---|
| 253 | | void createHandle () { |
|---|
| | 257 | override void createHandle () { |
|---|
| 254 | 258 | super.createHandle (); |
|---|
| 255 | 259 | state |= CANVAS; |
|---|
| … | … | |
| 263 | 267 | } |
|---|
| 264 | 268 | |
|---|
| 265 | | Menu [] findMenus (Control control) { |
|---|
| | 269 | override Menu [] findMenus (Control control) { |
|---|
| 266 | 270 | if (control is this) return new Menu [0]; |
|---|
| 267 | 271 | Menu result [] = super.findMenus (control); |
|---|
| … | … | |
| 280 | 284 | } |
|---|
| 281 | 285 | |
|---|
| 282 | | void fixChildren (Shell newShell, Shell oldShell, Decorations newDecorations, Decorations oldDecorations, Menu [] menus) { |
|---|
| | 286 | override void fixChildren (Shell newShell, Shell oldShell, Decorations newDecorations, Decorations oldDecorations, Menu [] menus) { |
|---|
| 283 | 287 | super.fixChildren (newShell, oldShell, newDecorations, oldDecorations, menus); |
|---|
| 284 | 288 | Control [] children = _getChildren (); |
|---|
| … | … | |
| 641 | 645 | } |
|---|
| 642 | 646 | |
|---|
| 643 | | void markLayout (bool changed, bool all) { |
|---|
| | 647 | override void markLayout (bool changed, bool all) { |
|---|
| 644 | 648 | if (layout_ !is null) { |
|---|
| 645 | 649 | state |= LAYOUT_NEEDED; |
|---|
| … | … | |
| 665 | 669 | } |
|---|
| 666 | 670 | |
|---|
| 667 | | bool redrawChildren () { |
|---|
| | 671 | override bool redrawChildren () { |
|---|
| 668 | 672 | if (!super.redrawChildren ()) return false; |
|---|
| 669 | 673 | Control [] children = _getChildren (); |
|---|
| … | … | |
| 674 | 678 | } |
|---|
| 675 | 679 | |
|---|
| 676 | | void releaseChildren (bool destroy) { |
|---|
| | 680 | override void releaseChildren (bool destroy) { |
|---|
| 677 | 681 | Control [] children = _getChildren (); |
|---|
| 678 | 682 | for (int i=0; i<children.length; i++) { |
|---|
| … | … | |
| 685 | 689 | } |
|---|
| 686 | 690 | |
|---|
| 687 | | void releaseWidget () { |
|---|
| | 691 | override void releaseWidget () { |
|---|
| 688 | 692 | super.releaseWidget (); |
|---|
| 689 | 693 | if ((state & CANVAS) !is 0 && (style & DWT.EMBEDDED) !is 0) { |
|---|
| … | … | |
| 808 | 812 | } |
|---|
| 809 | 813 | |
|---|
| 810 | | bool setFixedFocus () { |
|---|
| | 814 | override bool setFixedFocus () { |
|---|
| 811 | 815 | checkWidget (); |
|---|
| 812 | 816 | Control [] children = _getChildren (); |
|---|
| … | … | |
| 822 | 826 | } |
|---|
| 823 | 827 | |
|---|
| 824 | | public bool setFocus () { |
|---|
| | 828 | override public bool setFocus () { |
|---|
| 825 | 829 | checkWidget (); |
|---|
| 826 | 830 | Control [] children = _getChildren (); |
|---|
| … | … | |
| 927 | 931 | } |
|---|
| 928 | 932 | |
|---|
| 929 | | bool setTabGroupFocus () { |
|---|
| | 933 | override bool setTabGroupFocus () { |
|---|
| 930 | 934 | if (isTabItem ()) return setTabItemFocus (); |
|---|
| 931 | 935 | bool takeFocus = (style & DWT.NO_FOCUS) is 0; |
|---|
| … | … | |
| 964 | 968 | } |
|---|
| 965 | 969 | |
|---|
| 966 | | bool translateMnemonic (Event event, Control control) { |
|---|
| | 970 | override bool translateMnemonic (Event event, Control control) { |
|---|
| 967 | 971 | if (super.translateMnemonic (event, control)) return true; |
|---|
| 968 | 972 | if (control !is null) { |
|---|
| … | … | |
| 976 | 980 | } |
|---|
| 977 | 981 | |
|---|
| 978 | | bool translateTraversal (MSG* msg) { |
|---|
| | 982 | override bool translateTraversal (MSG* msg) { |
|---|
| 979 | 983 | if ((state & CANVAS) !is 0 ) { |
|---|
| 980 | 984 | if ((style & DWT.EMBEDDED) !is 0) return false; |
|---|
| … | … | |
| 993 | 997 | } |
|---|
| 994 | 998 | |
|---|
| 995 | | void updateBackgroundColor () { |
|---|
| | 999 | override void updateBackgroundColor () { |
|---|
| 996 | 1000 | super.updateBackgroundColor (); |
|---|
| 997 | 1001 | Control [] children = _getChildren (); |
|---|
| … | … | |
| 1003 | 1007 | } |
|---|
| 1004 | 1008 | |
|---|
| 1005 | | void updateBackgroundImage () { |
|---|
| | 1009 | override void updateBackgroundImage () { |
|---|
| 1006 | 1010 | super.updateBackgroundImage (); |
|---|
| 1007 | 1011 | Control [] children = _getChildren (); |
|---|
| … | … | |
| 1013 | 1017 | } |
|---|
| 1014 | 1018 | |
|---|
| 1015 | | void updateBackgroundMode () { |
|---|
| | 1019 | override void updateBackgroundMode () { |
|---|
| 1016 | 1020 | super.updateBackgroundMode (); |
|---|
| 1017 | 1021 | Control [] children = _getChildren (); |
|---|
| … | … | |
| 1021 | 1025 | } |
|---|
| 1022 | 1026 | |
|---|
| 1023 | | void updateFont (Font oldFont, Font newFont) { |
|---|
| | 1027 | override void updateFont (Font oldFont, Font newFont) { |
|---|
| 1024 | 1028 | super.updateFont (oldFont, newFont); |
|---|
| 1025 | 1029 | Control [] children = _getChildren (); |
|---|
| … | … | |
| 1032 | 1036 | } |
|---|
| 1033 | 1037 | |
|---|
| 1034 | | void updateLayout (bool resize, bool all) { |
|---|
| | 1038 | override void updateLayout (bool resize, bool all) { |
|---|
| 1035 | 1039 | Composite parent = findDeferredControl (); |
|---|
| 1036 | 1040 | if (parent !is null) { |
|---|
| … | … | |
| 1054 | 1058 | } |
|---|
| 1055 | 1059 | |
|---|
| 1056 | | int widgetStyle () { |
|---|
| | 1060 | override int widgetStyle () { |
|---|
| 1057 | 1061 | /* Force clipping of children by setting WS_CLIPCHILDREN */ |
|---|
| 1058 | 1062 | return super.widgetStyle () | OS.WS_CLIPCHILDREN; |
|---|
| 1059 | 1063 | } |
|---|
| 1060 | 1064 | |
|---|
| 1061 | | LRESULT WM_ERASEBKGND (int wParam, int lParam) { |
|---|
| | 1065 | override LRESULT WM_ERASEBKGND (int wParam, int lParam) { |
|---|
| 1062 | 1066 | LRESULT result = super.WM_ERASEBKGND (wParam, lParam); |
|---|
| 1063 | 1067 | if (result !is LRESULT.NULL) return result; |
|---|
| … | … | |
| 1069 | 1073 | } |
|---|
| 1070 | 1074 | |
|---|
| 1071 | | LRESULT WM_GETDLGCODE (int wParam, int lParam) { |
|---|
| | 1075 | override LRESULT WM_GETDLGCODE (int wParam, int lParam) { |
|---|
| 1072 | 1076 | LRESULT result = super.WM_GETDLGCODE (wParam, lParam); |
|---|
| 1073 | 1077 | if (result !is LRESULT.NULL) return result; |
|---|
| … | … | |
| 1084 | 1088 | } |
|---|
| 1085 | 1089 | |
|---|
| 1086 | | LRESULT WM_GETFONT (int wParam, int lParam) { |
|---|
| | 1090 | override LRESULT WM_GETFONT (int wParam, int lParam) { |
|---|
| 1087 | 1091 | LRESULT result = super.WM_GETFONT (wParam, lParam); |
|---|
| 1088 | 1092 | if (result !is LRESULT.NULL) return result; |
|---|
| … | … | |
| 1093 | 1097 | } |
|---|
| 1094 | 1098 | |
|---|
| 1095 | | LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { |
|---|
| | 1099 | override LRESULT WM_LBUTTONDOWN (int wParam, int lParam) { |
|---|
| 1096 | 1100 | LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam); |
|---|
| 1097 | 1101 | if (result is LRESULT.ZERO) return result; |
|---|
| … | … | |
| 1106 | 1110 | } |
|---|
| 1107 | 1111 | |
|---|
| 1108 | | LRESULT WM_NCPAINT (int wParam, int lParam) { |
|---|
| | 1112 | override LRESULT WM_NCPAINT (int wParam, int lParam) { |
|---|
| 1109 | 1113 | LRESULT result = super.WM_NCPAINT (wParam, lParam); |
|---|
| 1110 | 1114 | if (result !is LRESULT.NULL) return result; |
|---|
| … | … | |
| 1115 | 1119 | } |
|---|
| 1116 | 1120 | |
|---|
| 1117 | | LRESULT WM_PARENTNOTIFY (int wParam, int lParam) { |
|---|
| | 1121 | override LRESULT WM_PARENTNOTIFY (int wParam, int lParam) { |
|---|
| 1118 | 1122 | if ((state & CANVAS) !is 0 && (style & DWT.EMBEDDED) !is 0) { |
|---|
| 1119 | 1123 | if ((wParam & 0xFFFF) is OS.WM_CREATE) { |
|---|
| … | … | |
| 1126 | 1130 | } |
|---|
| 1127 | 1131 | |
|---|
| 1128 | | LRESULT WM_PAINT (int wParam, int lParam) { |
|---|
| | 1132 | override LRESULT WM_PAINT (int wParam, int lParam) { |
|---|
| 1129 | 1133 | if ((state & CANVAS) is 0 || (state & FOREIGN_HANDLE) !is 0) { |
|---|
| 1130 | 1134 | return super.WM_PAINT (wParam, lParam); |
|---|
| … | … | |
| 1329 | 1333 | } |
|---|
| 1330 | 1334 | |
|---|
| 1331 | | LRESULT WM_PRINTCLIENT (int wParam, int lParam) { |
|---|
| | 1335 | override LRESULT WM_PRINTCLIENT (int wParam, int lParam) { |
|---|
| 1332 | 1336 | LRESULT result = super.WM_PRINTCLIENT (wParam, lParam); |
|---|
| 1333 | 1337 | if (result !is LRESULT.NULL) return result; |
|---|
| … | … | |
| 1365 | 1369 | } |
|---|
| 1366 | 1370 | |
|---|
| 1367 | | LRESULT WM_SETFONT (int wParam, int lParam) { |
|---|
| | 1371 | override LRESULT WM_SETFONT (int wParam, int lParam) { |
|---|
| 1368 | 1372 | if (lParam !is 0) OS.InvalidateRect (handle, null, true); |
|---|
| 1369 | 1373 | font = cast(HFONT)wParam; |
|---|
| … | … | |
| 1371 | 1375 | } |
|---|
| 1372 | 1376 | |
|---|
| 1373 | | LRESULT WM_SIZE (int wParam, int lParam) { |
|---|
| | 1377 | override LRESULT WM_SIZE (int wParam, int lParam) { |
|---|
| 1374 | 1378 | |
|---|
| 1375 | 1379 | /* Begin deferred window positioning */ |
|---|
| … | … | |
| 1415 | 1419 | } |
|---|
| 1416 | 1420 | |
|---|
| 1417 | | LRESULT WM_SYSCOLORCHANGE (int wParam, int lParam) { |
|---|
| | 1421 | override LRESULT WM_SYSCOLORCHANGE (int wParam, int lParam) { |
|---|
| 1418 | 1422 | LRESULT result = super.WM_SYSCOLORCHANGE (wParam, lParam); |
|---|
| 1419 | 1423 | if (result !is LRESULT.NULL) return result; |
|---|
| … | … | |
| 1426 | 1430 | } |
|---|
| 1427 | 1431 | |
|---|
| 1428 | | LRESULT WM_SYSCOMMAND (int wParam, int lParam) { |
|---|
| | 1432 | override LRESULT WM_SYSCOMMAND (int wParam, int lParam) { |
|---|
| 1429 | 1433 | LRESULT result = super.WM_SYSCOMMAND (wParam, lParam); |
|---|
| 1430 | 1434 | if (result !is LRESULT.NULL) return result; |
|---|
| … | … | |
| 1464 | 1468 | } |
|---|
| 1465 | 1469 | |
|---|
| 1466 | | LRESULT WM_UPDATEUISTATE (int wParam, int lParam) { |
|---|
| | 1470 | override LRESULT WM_UPDATEUISTATE (int wParam, int lParam) { |
|---|
| 1467 | 1471 | LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam); |
|---|
| 1468 | 1472 | if (result !is LRESULT.NULL) return result; |
|---|
| … | … | |
| 1496 | 1500 | } |
|---|
| 1497 | 1501 | |
|---|
| 1498 | | LRESULT wmNotify (NMHDR* hdr, int wParam, int lParam) { |
|---|
| | 1502 | override LRESULT wmNotify (NMHDR* hdr, int wParam, int lParam) { |
|---|
| 1499 | 1503 | if (!OS.IsWinCE) { |
|---|
| 1500 | 1504 | switch (hdr.code) { |
|---|
| r52 |
r54 |
|
| 686 | 686 | } |
|---|
| 687 | 687 | |
|---|
| 688 | | void destroyWidget () { |
|---|
| | 688 | override void destroyWidget () { |
|---|
| 689 | 689 | auto hwnd = topHandle (); |
|---|
| 690 | 690 | releaseHandle (); |
|---|
| … | … | |
| 1318 | 1318 | * </ul> |
|---|
| 1319 | 1319 | */ |
|---|
| 1320 | | public Menu getMenu () { |
|---|
| | 1320 | override public Menu getMenu () { |
|---|
| 1321 | 1321 | checkWidget (); |
|---|
| 1322 | 1322 | return menu; |
|---|
| … | … | |
| 1745 | 1745 | } |
|---|
| 1746 | 1746 | |
|---|
| 1747 | | void mapEvent (HWND hwnd, Event event) { |
|---|
| | 1747 | override void mapEvent (HWND hwnd, Event event) { |
|---|
| 1748 | 1748 | if (hwnd !is handle) { |
|---|
| 1749 | 1749 | POINT point; |
|---|
| … | … | |
| 1883 | 1883 | } |
|---|
| 1884 | 1884 | |
|---|
| 1885 | | GC new_GC (GCData data) { |
|---|
| | 1885 | override GC new_GC (GCData data) { |
|---|
| 1886 | 1886 | return GC.win32_new (this, data); |
|---|
| 1887 | 1887 | } |
|---|
| … | … | |
| 2033 | 2033 | } |
|---|
| 2034 | 2034 | |
|---|
| 2035 | | void releaseHandle () { |
|---|
| | 2035 | override void releaseHandle () { |
|---|
| 2036 | 2036 | super.releaseHandle (); |
|---|
| 2037 | 2037 | handle = null; |
|---|
| … | … | |
| 2039 | 2039 | } |
|---|
| 2040 | 2040 | |
|---|
| 2041 | | void releaseParent () { |
|---|
| | 2041 | override void releaseParent () { |
|---|
| 2042 | 2042 | parent.removeControl (this); |
|---|
| 2043 | 2043 | } |
|---|
| 2044 | 2044 | |
|---|
| 2045 | | void releaseWidget () { |
|---|
| | 2045 | override void releaseWidget () { |
|---|
| 2046 | 2046 | super.releaseWidget (); |
|---|
| 2047 | 2047 | if (OS.IsDBLocale) { |
|---|
| … | … | |
| 2375 | 2375 | } |
|---|
| 2376 | 2376 | |
|---|
| 2377 | | bool sendFocusEvent (int type) { |
|---|
| | 2377 | override bool sendFocusEvent (int type) { |
|---|
| 2378 | 2378 | Shell shell = getShell (); |
|---|
| 2379 | 2379 | |
|---|
| r45 |
r54 |
|
| 55 | 55 | public class CoolBar : Composite { |
|---|
| 56 | 56 | |
|---|
| | 57 | alias Composite.computeSize computeSize; |
|---|
| | 58 | alias Composite.windowProc windowProc; |
|---|
| | 59 | |
|---|
| 57 | 60 | CoolItem [] items; |
|---|
| 58 | 61 | CoolItem [] originalItems; |
|---|
| … | … | |
| 125 | 128 | } |
|---|
| 126 | 129 | |
|---|
| 127 | | LRESULT callWindowProc (HWND hwnd, int msg, int wParam, int lParam) { |
|---|
| | 130 | override LRESULT callWindowProc (HWND hwnd, int msg, int wParam, int lParam) { |
|---|
| 128 | 131 | if (handle is null) return LRESULT.NULL; |
|---|
| 129 | 132 | return cast(LRESULT) OS.CallWindowProc (ReBarProc, hwnd, msg, wParam, lParam); |
|---|
| … | … | |
| 142 | 145 | } |
|---|
| 143 | 146 | |
|---|
| 144 | | protected void checkSubclass () { |
|---|
| | 147 | override protected void checkSubclass () { |
|---|
| 145 | 148 | if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); |
|---|
| 146 | 149 | } |
|---|
| 147 | 150 | |
|---|
| 148 | | public Point computeSize (int wHint, int hHint, bool changed) { |
|---|
| | 151 | override public Point computeSize (int wHint, int hHint, bool changed) { |
|---|
| 149 | 152 | checkWidget (); |
|---|
| 150 | 153 | int width = 0, height = 0; |
|---|
| … | … | |
| 215 | 218 | } |
|---|
| 216 | 219 | |
|---|
| 217 | | void createHandle () { |
|---|
| | 220 | override void createHandle () { |
|---|
| 218 | 221 | super.createHandle (); |
|---|
| 219 | 222 | state &= ~(CANVAS | THEME_BACKGROUND); |
|---|
| … | … | |
| 303 | 306 | } |
|---|
| 304 | 307 | |
|---|
| 305 | | void createWidget () { |
|---|
| | 308 | override void createWidget () { |
|---|
| 306 | 309 | super.createWidget (); |
|---|
| 307 | 310 | items = new CoolItem [4]; |
|---|
| … | … | |
| 375 | 378 | } |
|---|
| 376 | 379 | |
|---|
| 377 | | void drawThemeBackground (HDC hDC, HWND hwnd, RECT* rect) { |
|---|
| | 380 | override void drawThemeBackground (HDC hDC, HWND hwnd, RECT* rect) { |
|---|
| 378 | 381 | if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) { |
|---|
| 379 | 382 | if (background is -1 && (style & DWT.FLAT) !is 0) { |
|---|
| … | … | |
| 394 | 397 | } |
|---|
| 395 | 398 | |
|---|
| 396 | | Control findThemeControl () { |
|---|
| | 399 | override Control findThemeControl () { |
|---|
| 397 | 400 | if ((style & DWT.FLAT) !is 0) return this; |
|---|
| 398 | 401 | return background is -1 && backgroundImage is null ? this : super.findThemeControl (); |
|---|
| … | … | |
| 711 | 714 | } |
|---|
| 712 | 715 | |
|---|
| 713 | | void releaseChildren (bool destroy) { |
|---|
| | 716 | override void releaseChildren (bool destroy) { |
|---|
| 714 | 717 | if (items !is null) { |
|---|
| 715 | 718 | for (int i=0; i<items.length; i++) { |
|---|
| … | … | |
| 724 | 727 | } |
|---|
| 725 | 728 | |
|---|
| 726 | | void removeControl (Control control) { |
|---|
| | 729 | override void removeControl (Control control) { |
|---|
| 727 | 730 | super.removeControl (control); |
|---|
| 728 | 731 | for (int i=0; i<items.length; i++) { |
|---|
| … | … | |
| 734 | 737 | } |
|---|
| 735 | 738 | |
|---|
| 736 | | void setBackgroundPixel (int pixel) { |
|---|
| | 739 | override void setBackgroundPixel (int pixel) { |
|---|
| 737 | 740 | if (pixel is -1) pixel = defaultBackground (); |
|---|
| 738 | 741 | OS.SendMessage (handle, OS.RB_SETBKCOLOR, 0, pixel); |
|---|
| … | … | |
| 753 | 756 | } |
|---|
| 754 | 757 | |
|---|
| 755 | | void setForegroundPixel (int pixel) { |
|---|
| | 758 | override void setForegroundPixel (int pixel) { |
|---|
| 756 | 759 | if (pixel is -1) pixel = defaultForeground (); |
|---|
| 757 | 760 | OS.SendMessage (handle, OS.RB_SETTEXTCOLOR, 0, pixel); |
|---|
| … | … | |
| 978 | 981 | } |
|---|
| 979 | 982 | |
|---|
| 980 | | int widgetStyle () { |
|---|
| | 983 | override int widgetStyle () { |
|---|
| 981 | 984 | int bits = super.widgetStyle () | OS.CCS_NODIVIDER | OS.CCS_NORESIZE; |
|---|
| 982 | 985 | bits |= OS.RBS_VARHEIGHT | OS.RBS_DBLCLKTOGGLE; |
|---|
| … | … | |
| 985 | 988 | } |
|---|
| 986 | 989 | |
|---|
| 987 | | char[] windowClass () { |
|---|
| | 990 | override char[] windowClass () { |
|---|
| 988 | 991 | return TCHARzToStr( ReBarClass ); |
|---|
| 989 | 992 | } |
|---|
| 990 | 993 | |
|---|
| 991 | | int windowProc () { |
|---|
| | 994 | override int windowProc () { |
|---|
| 992 | 995 | return cast(int) ReBarProc; |
|---|
| 993 | 996 | } |
|---|
| 994 | 997 | |
|---|
| 995 | | LRESULT WM_COMMAND (int wParam, int lParam) { |
|---|
| | 998 | override LRESULT WM_COMMAND (int wParam, int lParam) { |
|---|
| 996 | 999 | /* |
|---|
| 997 | 1000 | * Feature in Windows. When the coolbar window |
|---|
| … | … | |
| 1017 | 1020 | } |
|---|
| 1018 | 1021 | |
|---|
| 1019 | | LRESULT WM_ERASEBKGND (int wParam, int lParam) { |
|---|
| | 1022 | override LRESULT WM_ERASEBKGND (int wParam, int lParam) { |
|---|
| 1020 | 1023 | LRESULT result = super.WM_ERASEBKGND (wParam, lParam); |
|---|
| 1021 | 1024 | /* |
|---|
| … | … | |
| 1039 | 1042 | } |
|---|
| 1040 | 1043 | |
|---|
| 1041 | | LRESULT WM_NOTIFY (int wParam, int lParam) { |
|---|
| | 1044 | override LRESULT WM_NOTIFY (int wParam, int lParam) { |
|---|
| 1042 | 1045 | /* |
|---|
| 1043 | 1046 | * Feature in Windows. When the cool bar window |
|---|
| … | … | |
| 1063 | 1066 | } |
|---|
| 1064 | 1067 | |
|---|
| 1065 | | LRESULT WM_SETREDRAW (int wParam, int lParam) { |
|---|
| | 1068 | override LRESULT WM_SETREDRAW (int wParam, int lParam) { |
|---|
| 1066 | 1069 | LRESULT result = super.WM_SETREDRAW (wParam, lParam); |
|---|
| 1067 | 1070 | if (result !is LRESULT.NULL) return result; |
|---|
| … | … | |
| 1095 | 1098 | } |
|---|
| 1096 | 1099 | |
|---|
| 1097 | | LRESULT WM_SIZE (int wParam, int lParam) { |
|---|
| | 1100 | override LRESULT WM_SIZE (int wParam, int lParam) { |
|---|
| 1098 | 1101 | if (ignoreResize) { |
|---|
| 1099 | 1102 | int code = callWindowProc (handle, OS.WM_SIZE, wParam, lParam); |
|---|
| … | … | |
| 1110 | 1113 | } |
|---|
| 1111 | 1114 | |
|---|
| 1112 | | LRESULT wmNotifyChild (NMHDR* hdr, int wParam, int lParam) { |
|---|
| | 1115 | override LRESULT wmNotifyChild (NMHDR* hdr, int wParam, int lParam) { |
|---|
| 1113 | 1116 | switch (hdr.code) { |
|---|
| 1114 | 1117 | case OS.RBN_BEGINDRAG: { |
|---|
| r46 |
r54 |
|
| 162 | 162 | } |
|---|
| 163 | 163 | |
|---|
| 164 | | protected void checkSubclass () { |
|---|
| | 164 | override protected void checkSubclass () { |
|---|
| 165 | 165 | if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); |
|---|
| 166 | 166 | } |
|---|
| … | … | |
| 208 | 208 | } |
|---|
| 209 | 209 | |
|---|
| 210 | | void destroyWidget () { |
|---|
| | 210 | override void destroyWidget () { |
|---|
| 211 | 211 | parent.destroyItem (this); |
|---|
| 212 | 212 | releaseHandle (); |
|---|
| … | … | |
| 306 | 306 | } |
|---|
| 307 | 307 | |
|---|
| 308 | | void releaseHandle () { |
|---|
| | 308 | override void releaseHandle () { |
|---|
| 309 | 309 | super.releaseHandle (); |
|---|
| 310 | 310 | parent = null; |
|---|
| r31 |
r54 |
|
| 60 | 60 | |
|---|
| 61 | 61 | public class DateTime extends Composite { |
|---|
| | 62 | |
|---|
| | 63 | alias Composite.computeSize computeSize; |
|---|
| | 64 | alias Composite.windowProc windowProc; |
|---|
| | 65 | |
|---|
| 62 | 66 | static final int DateTimeProc; |
|---|
| 63 | 67 | static final TCHAR DateTimeClass = new TCHAR (0, OS.DATETIMEPICK_CLASS, true); |
|---|
| … | … | |
| 166 | 170 | } |
|---|
| 167 | 171 | |
|---|
| 168 | | int callWindowProc (int hwnd, int msg, int wParam, int lParam) { |
|---|
| | 172 | override int callWindowProc (int hwnd, int msg, int wParam, int lParam) { |
|---|
| 169 | 173 | if (handle is 0) return 0; |
|---|
| 170 | 174 | return OS.CallWindowProc (windowProc (), hwnd, msg, wParam, lParam); |
|---|
| … | … | |
| 184 | 188 | } |
|---|
| 185 | 189 | |
|---|
| 186 | | protected void checkSubclass () { |
|---|
| | 190 | override protected void checkSubclass () { |
|---|
| 187 | 191 | if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); |
|---|
| 188 | 192 | } |
|---|
| 189 | 193 | |
|---|
| 190 | | public Point computeSize (int wHint, int hHint, bool changed) { |
|---|
| | 194 | override public Point computeSize (int wHint, int hHint, bool changed) { |
|---|
| 191 | 195 | checkWidget (); |
|---|
| 192 | 196 | int width = 0, height = 0; |
|---|
| … | … | |
| 341 | 345 | } |
|---|
| 342 | 346 | |
|---|
| 343 | | void createHandle () { |
|---|
| | 347 | override void createHandle () { |
|---|
| 344 | 348 | super.createHandle (); |
|---|
| 345 | 349 | state &= ~(CANVAS | THEME_BACKGROUND); |
|---|
| 346 | 350 | } |
|---|
| 347 | 351 | |
|---|
| 348 | | int defaultBackground () { |
|---|
| | 352 | override int defaultBackground () { |
|---|
| 349 | 353 | return OS.GetSysColor (OS.COLOR_WINDOW); |
|---|
| 350 | 354 | } |
|---|
| … | … | |
| 553 | 557 | } |
|---|
| 554 | 558 | |
|---|
| 555 | | String getNameText () { |
|---|
| | 559 | override String getNameText () { |
|---|
| 556 | 560 | return "DateTime"; |
|---|
| 557 | 561 | } |
|---|
| … | … | |
| 762 | 766 | } |
|---|
| 763 | 767 | |
|---|
| 764 | | int widgetStyle () { |
|---|
| | 768 | override int widgetStyle () { |
|---|
| 765 | 769 | int bits = super.widgetStyle () | OS.WS_TABSTOP; |
|---|
| 766 | 770 | if ((style & DWT.CALENDAR) !is 0) return bits | OS.MCS_NOTODAY; |
|---|
| … | … | |
| 776 | 780 | } |
|---|
| 777 | 781 | |
|---|
| 778 | | TCHAR windowClass () { |
|---|
| | 782 | override TCHAR windowClass () { |
|---|
| 779 | 783 | return (style & DWT.CALENDAR) !is 0 ? CalendarClass : DateTimeClass; |
|---|
| 780 | 784 | } |
|---|
| 781 | 785 | |
|---|
| 782 | | int windowProc () { |
|---|
| | 786 | override int windowProc () { |
|---|
| 783 | 787 | return (style & DWT.CALENDAR) !is 0 ? CalendarProc : DateTimeProc; |
|---|
| 784 | 788 | } |
|---|
| 785 | 789 | |
|---|
| 786 | | LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) { |
|---|
| | 790 | override LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) { |
|---|
| 787 | 791 | switch (hdr.code) { |
|---|
| 788 | 792 | case OS.MCN_SELCHANGE: //SENT WHEN YOU SET IT? |
|---|
| r40 |
r54 |
|
| 114 | 114 | public class Decorations : Canvas { |
|---|
| 115 | 115 | |
|---|
| | 116 | alias Canvas.setBounds setBounds; |
|---|
| | 117 | alias Canvas.setParent setParent; |
|---|
| | 118 | alias Canvas.setSavedFocus setSavedFocus; |
|---|
| | 119 | alias Canvas.sort sort; |
|---|
| 116 | 120 | alias Canvas.windowProc windowProc; |
|---|
| 117 | 121 | |
|---|
| … | … | |
| 303 | 307 | } |
|---|
| 304 | 308 | |
|---|
| 305 | | void checkBorder () { |
|---|
| | 309 | override void checkBorder () { |
|---|
| 306 | 310 | /* Do nothing */ |
|---|
| 307 | 311 | } |
|---|
| 308 | 312 | |
|---|
| 309 | | void checkOpened () { |
|---|
| | 313 | override void checkOpened () { |
|---|
| 310 | 314 | if (!opened) resized = false; |
|---|
| 3 |
|---|