summaryrefslogtreecommitdiff
path: root/src/widget_type.h
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-08-12 09:07:45 +0000
committerfrosch <frosch@openttd.org>2010-08-12 09:07:45 +0000
commit66e48dfdce40b2fac38ae5931581d24fded4265e (patch)
tree4af677a6a91a4168f1ae36937d9157eab723eb09 /src/widget_type.h
parent037d2ed436f0c8a357fcb2e6f8a63400f2bd4746 (diff)
downloadopenttd-66e48dfdce40b2fac38ae5931581d24fded4265e.tar.xz
(svn r20456) -Codechange: Add separate nested widget class for scrollbars.
Diffstat (limited to 'src/widget_type.h')
-rw-r--r--src/widget_type.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/widget_type.h b/src/widget_type.h
index da871df55..f61937aa8 100644
--- a/src/widget_type.h
+++ b/src/widget_type.h
@@ -502,6 +502,22 @@ public:
};
/**
+ * Nested widget to display and control a scrollbar in a window.
+ * Also assign the scrollbar to other widgets using #SetScrollbar() to make the mousewheel work.
+ * @ingroup NestedWidgets
+ */
+class NWidgetScrollbar : public NWidgetCore {
+public:
+ NWidgetScrollbar(WidgetType tp, Colours colour, int index);
+
+ /* virtual */ void SetupSmallestSize(Window *w, bool init_array);
+ /* virtual */ void Draw(const Window *w);
+
+ const Scrollbar *GetScrollbar(const Window *w) const;
+ Scrollbar *GetScrollbar(Window *w) const;
+};
+
+/**
* Leaf widget.
* @ingroup NestedWidgets
*/