diff dwt/widgets/Combo.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 c913756e6950
children 1801ddeb8f32
line wrap: on
line diff
--- 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