Mercurial > projects > dwt-linux
diff dwt/custom/CCombo.d @ 150:f2e04420fd6c
reworked overrides and superclass aliases
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 31 Jan 2008 19:04:56 +0100 |
parents | 52b32f5cb1e0 |
children | 00180515eb65 |
line wrap: on
line diff
--- a/dwt/custom/CCombo.d Sun Jan 27 16:20:03 2008 +0100 +++ b/dwt/custom/CCombo.d Thu Jan 31 19:04:56 2008 +0100 @@ -77,6 +77,8 @@ */ public final class CCombo : Composite { + alias Composite.computeSize computeSize; + Text text; List list; int visibleItemCount = 5; @@ -370,7 +372,7 @@ } } -public Point computeSize (int wHint, int hHint, bool changed) { +public override Point computeSize (int wHint, int hHint, bool changed) { checkWidget (); int width = 0, height = 0; char[][] items = list.getItems (); @@ -563,7 +565,7 @@ } return null; } -public Control [] getChildren () { +public override Control [] getChildren () { checkWidget(); return new Control [0]; } @@ -652,7 +654,7 @@ checkWidget (); return list.getItems (); } -public Menu getMenu() { +public override Menu getMenu() { return text.getMenu(); } /** @@ -688,7 +690,7 @@ checkWidget (); return list.getSelectionIndex (); } -public int getStyle () { +public override int getStyle () { int style = super.getStyle (); style &= ~DWT.READ_ONLY; if (!text.getEditable()) style |= DWT.READ_ONLY; @@ -941,7 +943,7 @@ bool isDropped () { return popup.getVisible (); } -public bool isFocusControl () { +public override bool isFocusControl () { checkWidget(); if (text.isFocusControl () || arrow.isFocusControl () || list.isFocusControl () || popup.isFocusControl ()) { return true; @@ -1089,13 +1091,13 @@ default: } } -public void redraw () { +public override void redraw () { super.redraw(); text.redraw(); arrow.redraw(); if (popup.isVisible()) list.redraw(); } -public void redraw (int x, int y, int width, int height, bool all) { +public override void redraw (int x, int y, int width, int height, bool all) { super.redraw(x, y, width, height, true); } @@ -1269,7 +1271,7 @@ } } } -public void setBackground (Color color) { +public override void setBackground (Color color) { super.setBackground(color); background = color; if (text !is null) text.setBackground(color); @@ -1292,25 +1294,25 @@ checkWidget (); text.setEditable(editable); } -public void setEnabled (bool enabled) { +public override void setEnabled (bool enabled) { super.setEnabled(enabled); if (popup !is null) popup.setVisible (false); if (text !is null) text.setEnabled(enabled); if (arrow !is null) arrow.setEnabled(enabled); } -public bool setFocus () { +public override bool setFocus () { checkWidget(); if (isFocusControl ()) return true; return text.setFocus (); } -public void setFont (Font font) { +public override void setFont (Font font) { super.setFont (font); this.font = font; text.setFont (font); list.setFont (font); internalLayout (true); } -public void setForeground (Color color) { +public override void setForeground (Color color) { super.setForeground(color); foreground = color; if (text !is null) text.setForeground(color); @@ -1373,11 +1375,11 @@ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ -public void setLayout (Layout layout) { +public override void setLayout (Layout layout) { checkWidget (); return; } -public void setMenu(Menu menu) { +public override void setMenu(Menu menu) { text.setMenu(menu); } /** @@ -1456,14 +1458,14 @@ text.setTextLimit (limit); } -public void setToolTipText (char[] string) { +public override void setToolTipText (char[] string) { checkWidget(); super.setToolTipText(string); arrow.setToolTipText (string); text.setToolTipText (string); } -public void setVisible (bool visible) { +public override void setVisible (bool visible) { super.setVisible(visible); /* * At this point the widget may have been disposed in a FocusOut event.