ubit::UScrollpane Class Reference

A box with (optionnal) scrollbars that manages a viewport. More...

#include <uscrollpane.hpp>

Inheritance diagram for ubit::UScrollpane:

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

Public Member Functions

 UScrollpane (const UArgs &=UArgs::none)
 create a scroll pane with 2 scrollbars.
 UScrollpane (int vert_scrollbar, int horiz_scrollbar, const UArgs &=UArgs::none)
 create a scroll pane with 0, 1 or 2 scrollbars.
virtual ~UScrollpane ()
virtual void setXScroll (float xscroll)
virtual void setYScroll (float yscroll)
virtual void setScroll (float xscroll, float yscroll)
virtual void scroll (float _xscroll, float _yscroll)
 scrolls the pane (float values in [0,100]).
virtual void makeVisible (UBox &child)
 scrolls the pane to make this child visible.
float getXScroll () const
float getYScroll () const
 returns the current scroll values (float values in [0,100]).
UScrollbargetHScrollbar ()
UScrollbargetVScrollbar ()
 return the vertical and horizontal scrollbars (if any; null otherwise)
UBoxgetScrolledBox ()
 returns the box that is scrolled by this pane.
UViewgetScrolledView (UView *pane_view)
 returns the appropriate view of the box that is scrolled by this pane.
virtual void setTracking (bool)
 tracking mode updates the value while the scrollbar is being dragged (default is true).

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

UScrollpaneuscrollpane (const UArgs &args=UArgs::none)
 returns *new UScrollpane(args).
UScrollpaneuscrollpane (int vert_scrollbar, int horiz_scrollbar, const UArgs &args=UArgs::none)
 returns *new UScrollpane(vert_scrollbar, horiz_scrollbar, args).

Detailed Description

A box with (optionnal) scrollbars that manages a viewport.

There are two ways to use a scroll pane:

Note: a scrollpane should only have children that derive from UBox, UProp, UCall (it should not have UGroup or UData/UStr children)


Constructor & Destructor Documentation

ubit::UScrollpane::UScrollpane ( int  vert_scrollbar,
int  horiz_scrollbar,
const UArgs = UArgs::none 
)

create a scroll pane with 0, 1 or 2 scrollbars.

ubit::UScrollpane::~UScrollpane (  )  [virtual]


Member Function Documentation

UStyle * ubit::UScrollpane::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.

UView * ubit::UScrollpane::getScrolledView ( UView pane_view  ) 

returns the appropriate view of the box that is scrolled by this pane.

A Pane can have multiple parents and thus, can appear several times on the GUI. This functions makes return the corresponding view of the scrolled box.

void ubit::UScrollpane::makeVisible ( UBox child  )  [virtual]

scrolls the pane to make this child visible.

'child' must be a direct or indirect child of the viewport

virtual void ubit::UScrollpane::scroll ( float  _xscroll,
float  _yscroll 
) [virtual]

scrolls the pane (float values in [0,100]).

if the pane has scrollbars they are synchronized


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