(svn r20456) -Codechange: Add separate nested widget class for scrollbars.

This commit is contained in:
frosch
2010-08-12 09:07:45 +00:00
parent 037d2ed436
commit 66e48dfdce
3 changed files with 130 additions and 54 deletions

View File

@@ -501,6 +501,22 @@ public:
void UpdateViewportCoordinates(Window *w);
};
/**
* 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