Nested widget to display and control a scrollbar in a window. More...
#include <widget_type.h>
Public Member Functions | |
| NWidgetScrollbar (WidgetType tp, Colours colour, int index) | |
| Scrollbar widget. | |
| void | SetupSmallestSize (Window *w, bool init_array) |
| void | Draw (const Window *w) |
Static Public Member Functions | |
| static void | InvalidateDimensionCache () |
| static Dimension | GetVerticalDimension () |
| static Dimension | GetHorizontalDimension () |
Static Private Attributes | |
| static Dimension | vertical_dimension = {0, 0} |
| Cached size of vertical scrollbar button. | |
| static Dimension | horizontal_dimension = {0, 0} |
| Cached size of horizontal scrollbar button. | |
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.
Definition at line 747 of file widget_type.h.
| NWidgetScrollbar::NWidgetScrollbar | ( | WidgetType | tp, | |
| Colours | colour, | |||
| int | index | |||
| ) |
Scrollbar widget.
| tp | Scrollbar type. (horizontal/vertical) | |
| colour | Colour of the scrollbar. | |
| index | Index in the widget array used by the window system. |
Definition at line 1934 of file widget.cpp.
References NWID_HSCROLLBAR, NWID_VSCROLLBAR, NWidgetCore::SetDataTip(), NWidgetResizeBase::SetFill(), NWidgetCore::SetIndex(), NWidgetResizeBase::SetMinimalSize(), NWidgetResizeBase::SetResize(), and NWidgetBase::type.
1.7.1