GuiScroller Class Reference
[2D graphical user interface]

A class for scrollbars. More...

#include <guiscroller.h>

Inheritance diagram for GuiScroller:

Inheritance graph
[legend]
Collaboration diagram for GuiScroller:

Collaboration graph
[legend]
List of all members.

Public Types

enum  direction { horizontal, vertikal }

Public Member Functions

DECLSPEC GuiScroller (const SDL_Rect &r, GuiElement *p, const char *name, bool usetheme=true)
DECLSPEC GuiScroller (TiXmlElement *el, GuiElement *p)
virtual const char * getClassName ()
int getScrollPos () const
DECLSPEC int setScrollPos (int p)
DECLSPEC int setMinMax (int mi, int ma)
int getMax () const
int getMin () const
DECLSPEC void setDirection (direction d)
void setChangeCallback (Callback c)
void setCallbackData (BasicObject *d)

Static Public Member Functions

static void newguiobject (void *presult, BasicObject *o, void *xmldata)

Public Attributes

int tick

Protected Member Functions

virtual DECLSPEC Uint32 onMouseDown (SDL_MouseButtonEvent *ev)
virtual DECLSPEC Uint32 onMouseUp (SDL_MouseButtonEvent *ev)
virtual DECLSPEC Uint32 onResize ()
virtual DECLSPEC void onInit ()
virtual DECLSPEC Uint32 onThemeChanged (UiTheme *t)

Protected Attributes

GuiClickableBtnbuttonincrement
GuiClickableBtnbuttondecrement
GuiMoveableBtn * buttonmove

Friends

class guiinfo

Detailed Description

A class for scrollbars.


Constructor & Destructor Documentation

GuiScroller::GuiScroller ( TiXmlElement el,
GuiElement p 
)

Constructor. Uses XML data.

Parameters:
el the XML data for initialisation
p parent element (or NULL, to take GuiManager::the as parent)
See also:
GuiElement(TiXmlElement*,GuiElement*)


Member Function Documentation

virtual const char* GuiScroller::getClassName (  )  [inline, virtual]

This function should be overriden in every sub-class of BasicObject!

Returns:
the name of the class.

Reimplemented from GuiPictureBg.

Uint32 GuiScroller::onMouseDown ( SDL_MouseButtonEvent *  ev  )  [protected, virtual]

This event is called, when the object has the mouse focus and a mouse button is pressed down.

Parameters:
ev the button-down event, that occured
Returns:
currently the result is not used; may be zero, if no error...

Reimplemented from UiObject.

Uint32 GuiScroller::onMouseUp ( SDL_MouseButtonEvent *  ev  )  [protected, virtual]

This event is called, when the object has the mouse focus and a mouse button is released.

Parameters:
ev the button-up event, that occured
Returns:
currently the result is not used; may be zero, if no error...

Reimplemented from UiObject.

Uint32 GuiScroller::onResize (  )  [protected, virtual]

This event is called, when the element changed its place or size.

Returns:
currently the result is not used; may be zero, if no error...

Reimplemented from GuiElement.

void GuiScroller::onInit (  )  [protected, virtual]

Initializes the object's variables by reading data from the XML element. If there were no XML data used for creation, nothing is done. This function calls onInit() of its children recursively (after it has inited itself). It is highly recommended to call BasicObject::onInit(), usually at the end of the onInit() method, when overwriting it in a derived class.

Reimplemented from GuiPictureBg.

Uint32 GuiScroller::onThemeChanged ( UiTheme t  )  [protected, virtual]

This event is called, when the theme changes. Perform here the changes of the object's look and feel.

Parameters:
t pointer to the new used theme
Returns:
currently the result is not used; may be zero, if no error...

Reimplemented from GuiPictureBg.


The documentation for this class was generated from the following files:
Generated on Wed May 9 17:36:27 2007 for netrinjo by  doxygen 1.5.1