syBR::Game::GUIText Class Reference

GUI text widget class. More...

#include <GUIText.hpp>

Inheritance diagram for syBR::Game::GUIText:

syBR::Game::GUIWidget

List of all members.

Public Member Functions

 GUIText (GUIManager *pManager)
 Constructor.
 GUIText (GUIManager *pManager, const std::string &name)
 Constructor.
virtual ~GUIText ()
 Destructor.
bool load (Core::XMLNode *pNode)
 Load the widget.
void render (std::vector< GUIManager::Quad > &renderList)
 Render the widget.
void setFontName (const std::string &name)
 Set font name.
const std::string & getFontName () const
 Get font name.
void setFontSize (const float size)
 Set font size.
const float getFontSize () const
 Get font size.
void setText (const std::string &text)
 Set text.
const std::string & getText () const
 Get text.

Private Attributes

GUIFontm_pFont
 Font.
std::string m_fontName
 Font name.
float m_fontSize
 Font size.
std::string m_text
 Text.


Detailed Description

GUI text widget class.

It is a simple widget which displays some text.


Constructor & Destructor Documentation

syBR::Game::GUIText::GUIText ( GUIManager pManager  ) 

Constructor.

Parameters:
pManager GUI manager using this widget

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

Constructor.

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

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

Destructor.

Release used resources.


Member Function Documentation

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

Load the widget.

Implements syBR::Game::GUIWidget.

void syBR::Game::GUIText::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::GUIText::setFontName ( const std::string &  name  ) 

Set font name.

Parameters:
name Name of the font to be used when rendering the widget

const std::string & syBR::Game::GUIText::getFontName (  )  const

Get font name.

Returns:
Name of the font to be used when rendering the widget

void syBR::Game::GUIText::setFontSize ( const float  size  ) 

Set font size.

Parameters:
size Size of the font to be used when rendering the widget

const float syBR::Game::GUIText::getFontSize (  )  const

Get font size.

Returns:
Size of the font to be used when rendering the widget

void syBR::Game::GUIText::setText ( const std::string &  text  ) 

Set text.

Parameters:
text Text to be rendered by the widget

const std::string & syBR::Game::GUIText::getText (  )  const

Get text.

Returns:
Text rendered by the widget


Member Data Documentation

GUIFont* syBR::Game::GUIText::m_pFont [private]

Font.

std::string syBR::Game::GUIText::m_fontName [private]

Font name.

float syBR::Game::GUIText::m_fontSize [private]

Font size.

std::string syBR::Game::GUIText::m_text [private]

Text.


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