#include <uscrollbar.hpp>
Inheritance diagram for ubit::UScrollbar:
Public Member Functions | |
UScrollbar (const UArgs &=UArgs::none) | |
creates a new scrollbar. | |
UScrollbar (UFloat &value, const UArgs &=UArgs::none) | |
creates a new scrollbar with a model value. | |
bool | isVertical () const |
bool | isHorizontal () const |
UFloat & | value () |
virtual float | getValue () const |
returns the current value (a float between 0 and 100). | |
virtual void | setValue (float percent) |
changes the current value (a float between 0 and 100). | |
virtual int | getUnitIncrement () const |
virtual int | getBlockIncrement () const |
return the current increments. | |
virtual void | setUnitIncrement (int) |
virtual void | setBlockIncrement (int) |
change the current increments. | |
virtual void | setTracking (bool) |
virtual bool | isTracking () const |
tracking mode updates the value while the scrollbar is being dragged (default is true). | |
virtual void | setTransparent (bool state) |
virtual bool | isTransparent () const |
transparent scrollbars are displayed above scrollpane viewports (default is false). | |
virtual UBox * | getKnob () |
virtual UBox * | getRail () |
virtual UBox * | getLessScroller () |
virtual UBox * | getMoreScroller () |
return the knob, the rail and the 2 scrollers (if any, null otherwise). | |
virtual UBox * | createKnob (bool vertical) |
virtual UBox * | createRail (bool vertical) |
virtual UBox * | createLessScroller (bool vertical) |
virtual UBox * | createMoreScroller (bool vertical) |
virtual void | setPane (UScrollpane *) |
UScrollpane * | getPane () |
[impl] attaches the scrollbar to a scrollpane. | |
virtual void | setValueImpl (float percent, bool update_pane) |
[impl] does not update the associated pane. | |
virtual void | pressScroller (int dir) |
[impl]. | |
Static Public Member Functions | |
static UStyle * | createStyle () |
< important: all subclasses MUST contain this declaration. static function that returns the UStyle of this class (see details!). | |
Friends | |
class | UScrollbarView |
class | UScrollpane |
UScrollbar & | uscrollbar (const UArgs &a=UArgs::none) |
shortcut that creates a new scrollbar (that is vertical by default). | |
UScrollbar & | uscrollbar (UFloat &value, const UArgs &a=UArgs::none) |
shortcut that creates a new scrollbar (that is vertical by default) with a model value. | |
UScrollbar & | uhscrollbar (const UArgs &a=UArgs::none) |
shortcut that creates a new horizontal scrollbar | |
UScrollbar & | uvscrollbar (const UArgs &a=UArgs::none) |
shortcut that creates a new vertical scrollbar |
the value is a percentage in the range [0., 100.] UOn::change callbacks are activated when the scrollbar value is changed.
ubit::UScrollbar::UScrollbar | ( | const UArgs & | = UArgs::none |
) |
creates a new scrollbar.
Default orientation is vertical. new UScrollbar(UOrient::horizontal) creates a horizontal slider. The scrollbar value is in the range [0., 100.]
creates a new scrollbar with a model value.
the scrollbar is synchronized with this value. Several widgets (eg.scrollbar) that share the same value are synchronized. Default orientation is vertical. new USlider(value, UOrient::horizontal) creates a horizontal scrollbar. The value is in the range [0., 100.]
UStyle * ubit::UScrollbar::createStyle | ( | ) | [static] |
< important: all subclasses MUST contain this declaration. static function that returns the UStyle of this class (see details!).
this macro defines the UClass that corresponds to this class and:
Reimplemented from ubit::UBox.
void ubit::UScrollbar::setValue | ( | float | percent | ) | [virtual] |
changes the current value (a float between 0 and 100).
Note: UOn::change callbacks are activated when the value is changed.