#include <guibackground.h>
Inheritance diagram for GuiPictureBg:
Public Member Functions | |
DECLSPEC | GuiPictureBg (const SDL_Rect &r, GuiElement *el, const char *name, Uint32 color=CLR_STANDARD, SdlSurface *backbmp=NULL) |
DECLSPEC | GuiPictureBg (TiXmlElement *el, GuiElement *p) |
virtual const char * | getClassName () |
DECLSPEC void | setBmp (SdlSurface *backbmp) |
Static Public Member Functions | |
static void | newguiobject (void *presult, BasicObject *o, void *xmldata) |
Protected Member Functions | |
virtual DECLSPEC void | paintBg (SdlSurface *dst) |
virtual DECLSPEC Uint32 | onFrame (SdlSurface *dst) |
virtual DECLSPEC void | onInit () |
virtual DECLSPEC Uint32 | onThemeChanged (UiTheme *t) |
GuiPictureBg::GuiPictureBg | ( | TiXmlElement * | el, | |
GuiElement * | p | |||
) |
Constructor. Uses XML data.
el | the XML data for initialisation, the following attributes are read: BgBmp (name of surface), BgTheme (bool) | |
p | parent element (or NULL, to take GuiManager::the as parent) |
virtual const char* GuiPictureBg::getClassName | ( | ) | [inline, virtual] |
This function should be overriden in every sub-class of BasicObject!
Reimplemented from GuiBackground.
Reimplemented in GuiFlowWindow, GuiPageControl, GuiCursor, GuiFlowMenu, GuiHint, GuiMessageBox, GuiProgressBar, GuiScroller, GuiTextField, and GuiUpDown.
void GuiPictureBg::paintBg | ( | SdlSurface * | dst | ) | [protected, virtual] |
Fills the clip rect with the color bgcolor. Especially useful, when deriving this class and you want to draw something onto the background: call this method at the beginning of the onFrame() event, then draw your things and finally call GuiElement::onFrame(dst)
dst | the surface to paint on |
Reimplemented from GuiBackground.
Uint32 GuiPictureBg::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.
Reimplemented from GuiBackground.
Reimplemented in GuiFlowWindow, and GuiProgressBar.
void GuiPictureBg::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 GuiBackground.
Reimplemented in GuiFlowWindow, GuiPageControl, GuiCursor, GuiFlowMenu, GuiHint, GuiMessageBox, GuiProgressBar, GuiScroller, GuiTextField, and GuiUpDown.
Uint32 GuiPictureBg::onThemeChanged | ( | UiTheme * | t | ) | [protected, virtual] |
This event is called, when the theme changes. Perform here the changes of the object's look and feel.
t | pointer to the new used theme |
Reimplemented from GuiBackground.
Reimplemented in GuiFlowWindow, GuiPageControl, GuiHint, GuiProgressBar, GuiScroller, and GuiUpDown.