diff options
author | alberth <alberth@openttd.org> | 2009-07-26 13:19:23 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-07-26 13:19:23 +0000 |
commit | 0081bb9a960473bd1e4f4891416f401d1f50e5b8 (patch) | |
tree | 2f40a3c3fff2eb9422c4640b6c74ed8bcdc2e8ca /src/widget_type.h | |
parent | 75ccf9de3a4abc4a67a373959013a18321995d88 (diff) | |
download | openttd-0081bb9a960473bd1e4f4891416f401d1f50e5b8.tar.xz |
(svn r16961) -Codechange: Moving some methods up in the class hierarchy to avoid code duplication.
Diffstat (limited to 'src/widget_type.h')
-rw-r--r-- | src/widget_type.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/widget_type.h b/src/widget_type.h index 20c89e6e6..58c9c580b 100644 --- a/src/widget_type.h +++ b/src/widget_type.h @@ -182,7 +182,7 @@ public: virtual void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl) = 0; virtual NWidgetCore *GetWidgetFromPos(int x, int y) = 0; - virtual NWidgetBase *GetWidgetOfType(WidgetType tp) = 0; + virtual NWidgetBase *GetWidgetOfType(WidgetType tp); /** * Set additional space (padding) around the widget. @@ -295,6 +295,7 @@ public: inline bool IsDisabled(); void StoreWidgets(Widget *widgets, int length, bool left_moving, bool top_moving, bool rtl); + /* virtual */ NWidgetCore *GetWidgetFromPos(int x, int y); virtual Scrollbar *FindScrollbar(Window *w, bool allow_next = true) = 0; @@ -444,7 +445,6 @@ public: /* virtual */ void Draw(const Window *w); /* virtual */ void Invalidate(const Window *w) const; /* virtual */ NWidgetCore *GetWidgetFromPos(int x, int y); - /* virtual */ NWidgetBase *GetWidgetOfType(WidgetType tp); }; /** Nested widget with a child. @@ -480,8 +480,6 @@ public: /* virtual */ void SetupSmallestSize(Window *w, bool init_array); /* virtual */ void Draw(const Window *w); /* virtual */ void Invalidate(const Window *w) const; - /* virtual */ NWidgetCore *GetWidgetFromPos(int x, int y); - /* virtual */ NWidgetBase *GetWidgetOfType(WidgetType tp); /* virtual */ Scrollbar *FindScrollbar(Window *w, bool allow_next = true); static void InvalidateDimensionCache(); |