ubit::UScrollbar Class Reference

Scrollbar widget. More...

#include <uscrollbar.hpp>

Inheritance diagram for ubit::UScrollbar:

ubit::UBox ubit::UGroup ubit::UControl ubit::UBrick ubit::UObject List of all members.

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
UFloatvalue ()
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 UBoxgetKnob ()
virtual UBoxgetRail ()
virtual UBoxgetLessScroller ()
virtual UBoxgetMoreScroller ()
 return the knob, the rail and the 2 scrollers (if any, null otherwise).
virtual UBoxcreateKnob (bool vertical)
virtual UBoxcreateRail (bool vertical)
virtual UBoxcreateLessScroller (bool vertical)
virtual UBoxcreateMoreScroller (bool vertical)
virtual void setPane (UScrollpane *)
UScrollpanegetPane ()
 [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 UStylecreateStyle ()
 < important: all subclasses MUST contain this declaration. static function that returns the UStyle of this class (see details!).

Friends

class UScrollbarView
class UScrollpane
UScrollbaruscrollbar (const UArgs &a=UArgs::none)
 shortcut that creates a new scrollbar (that is vertical by default).
UScrollbaruscrollbar (UFloat &value, const UArgs &a=UArgs::none)
 shortcut that creates a new scrollbar (that is vertical by default) with a model value.
UScrollbaruhscrollbar (const UArgs &a=UArgs::none)
 shortcut that creates a new horizontal scrollbar
UScrollbaruvscrollbar (const UArgs &a=UArgs::none)
 shortcut that creates a new vertical scrollbar

Detailed Description

Scrollbar widget.

the value is a percentage in the range [0., 100.] UOn::change callbacks are activated when the scrollbar value is changed.


Constructor & Destructor Documentation

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.]

ubit::UScrollbar::UScrollbar ( UFloat value,
const UArgs = UArgs::none 
)

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.]


Member Function Documentation

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.


The documentation for this class was generated from the following files:
Generated on Mon Jan 29 00:20:55 2007 for Ubit by  doxygen 1.4.7