syBR::Game::GUIPicture Class Reference

GUI picture widget class. More...

#include <GUIPicture.hpp>

Inheritance diagram for syBR::Game::GUIPicture:

syBR::Game::GUIWidget

List of all members.

Public Member Functions

 GUIPicture (GUIManager *pManager)
 Constructor.
 GUIPicture (GUIManager *pManager, const std::string &name)
 Constructor.
 GUIPicture (GUIManager *pManager, const std::string &name, const std::string &texture)
 Constructor.
virtual ~GUIPicture ()
 Destructor.
bool load (Core::XMLNode *pNode)
 Load the widget.
virtual void render (std::vector< GUIManager::Quad > &renderList)
 Render the widget.
void adjustWidthToAspectRatio ()
 Adjust width to texture aspect ratio.
void adjustHeightToAspectRatio ()
 Adjust height to texture aspect ratio.


Detailed Description

GUI picture widget class.

It is a simple widget which displays a picture (texture).


Constructor & Destructor Documentation

syBR::Game::GUIPicture::GUIPicture ( GUIManager pManager  ) 

Constructor.

Set name of the widget to an empty string

Parameters:
pManager GUI manager using this widget

syBR::Game::GUIPicture::GUIPicture ( GUIManager pManager,
const std::string &  name 
)

Constructor.

Set name of the widget to an empty string

Parameters:
pManager GUI manager using this widget
name Name of the widget

syBR::Game::GUIPicture::GUIPicture ( GUIManager pManager,
const std::string &  name,
const std::string &  texture 
)

Constructor.

Parameters:
pManager GUI manager using this widget
name Name of the widget
texture Name of the texture of the picture widget

syBR::Game::GUIPicture::~GUIPicture (  )  [virtual]

Destructor.

Release used resources.


Member Function Documentation

bool syBR::Game::GUIPicture::load ( Core::XMLNode pNode  )  [virtual]

Load the widget.

Implements syBR::Game::GUIWidget.

void syBR::Game::GUIPicture::render ( std::vector< GUIManager::Quad > &  renderList  )  [virtual]

Render the widget.

Render the widget and its subcomponents.

Parameters:
renderList List of renderables where all the renderables of this widget and its subcomponents will be pushed back

Reimplemented from syBR::Game::GUIWidget.

void syBR::Game::GUIPicture::adjustWidthToAspectRatio (  ) 

Adjust width to texture aspect ratio.

Note:
The texture must have been previously loaded or otherwise, nothing will be done.

void syBR::Game::GUIPicture::adjustHeightToAspectRatio (  ) 

Adjust height to texture aspect ratio.

Note:
The texture must have been previously loaded or otherwise, nothing will be done.


The documentation for this class was generated from the following files:

Copyright © 2008 by Sebastien Frippiat
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.
Last modified Tue Dec 30 17:57:33 2008