#include <uscrollpane.hpp>
Inheritance diagram for ubit::UScrollpane:
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]). | |
UScrollbar * | getHScrollbar () |
UScrollbar * | getVScrollbar () |
return the vertical and horizontal scrollbars (if any; null otherwise) | |
UBox * | getScrolledBox () |
returns the box that is scrolled by this pane. | |
UView * | getScrolledView (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 UStyle * | createStyle () |
< important: all subclasses MUST contain this declaration. static function that returns the UStyle of this class (see details!). | |
Friends | |
UScrollpane & | uscrollpane (const UArgs &args=UArgs::none) |
returns *new UScrollpane(args). | |
UScrollpane & | uscrollpane (int vert_scrollbar, int horiz_scrollbar, const UArgs &args=UArgs::none) |
returns *new UScrollpane(vert_scrollbar, horiz_scrollbar, args). |
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)
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] |
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.
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