Public Member Functions | Static Public Member Functions | Static Private Attributes

NWidgetScrollbar Class Reference
[Hierarchical widgets]

Nested widget to display and control a scrollbar in a window. More...

#include <widget_type.h>

Inheritance diagram for NWidgetScrollbar:
NWidgetCore Scrollbar NWidgetResizeBase NWidgetBase ZeroedMemoryAllocator

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.

Detailed Description

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 748 of file widget_type.h.


Constructor & Destructor Documentation

NWidgetScrollbar::NWidgetScrollbar ( WidgetType  tp,
Colours  colour,
int  index 
)

Scrollbar widget.

Parameters:
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.


The documentation for this class was generated from the following files: