summaryrefslogtreecommitdiff
path: root/src/widget_type.h
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-07-26 13:19:23 +0000
committeralberth <alberth@openttd.org>2009-07-26 13:19:23 +0000
commit0081bb9a960473bd1e4f4891416f401d1f50e5b8 (patch)
tree2f40a3c3fff2eb9422c4640b6c74ed8bcdc2e8ca /src/widget_type.h
parent75ccf9de3a4abc4a67a373959013a18321995d88 (diff)
downloadopenttd-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.h6
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();