GuiRotator Class Reference
[2D graphical user interface]

A class to display rotating pictures. More...

#include <guirotator.h>

Inheritance diagram for GuiRotator:

Inheritance graph
[legend]
Collaboration diagram for GuiRotator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

DECLSPEC GuiRotator (const SDL_Rect &r, GuiElement *p, const char *name, SdlSurface *bmp, double angle=0)
DECLSPEC GuiRotator (TiXmlElement *el, GuiElement *p)
virtual const char * getClassName ()
DECLSPEC void setAngleSpeed (double a, double speed)
DECLSPEC void setAngle (double a)
DECLSPEC void setSpeed (double speed)
void setBmp (SdlSurface *s)

Static Public Member Functions

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

Public Attributes

double dZoom
bool bSmooth

Protected Member Functions

virtual DECLSPEC Uint32 onFrame (SdlSurface *dst)
virtual DECLSPEC void paintBg (SdlSurface *dst)
virtual DECLSPEC void onInit ()

Detailed Description

A class to display rotating pictures.


Constructor & Destructor Documentation

GuiRotator::GuiRotator ( 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* GuiRotator::getClassName (  )  [inline, virtual]

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

Returns:
the name of the class.

Reimplemented from GuiElement.

Uint32 GuiRotator::onFrame ( SdlSurface dst  )  [protected, virtual]

This event is called, when a frame is drawn. If the object should be visible, is has to draw it's look to a valid surface. This method calls the children's function, if visible.

Returns:
zero, if no error occured; if not zero, drawing is stopped
Note:
if you derive the function, then call GuiElement::onFrame(SdlSurface*) after your class's drawing was done in the onFrame-event, otherwise you paint over the children elements

Reimplemented from GuiElement.

void GuiRotator::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 GuiElement.


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