Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

sjgui::CLabelCtrlTmpl< Tbase > Class Template Reference

Text label. More...

#include <label.h>

Inheritance diagram for sjgui::CLabelCtrlTmpl< Tbase >:

sjgui::CFont sjgui::classic::CLabelTmpl< Tbase > sjgui::modern::CLabelTmpl< Tbase > sjgui::extra::CFPSLabel sjgui::extra::CFPSLabelDropIn List of all members.

Public Member Functions

virtual void OnDraw ()
 Draws label.

virtual void OnReshape ()
 Update text position.

void SetColor (GLfloat *Color)
 Set color of the text.

void SetColor (GLfloat R, GLfloat G, GLfloat B, GLfloat A=1.0f)
 Set color of the text.

float * GetColor ()
 Get color of the text.

void SetText (const char *str)
 Set text.

const char * GetText ()
 Get text.

void SetHAlign (CWnd::eAligns e)
 Set horizontal align.

CWnd::eAligns GetHAlign ()
 Get horizontal align.

void SetVAlign (CWnd::eAligns e)
 Set vertical align.

CWnd::eAligns GetVAlign ()
 Get vertical align.

void SetAlign (CWnd::eAligns eH=CWnd::ALIGN_CENTER, CWnd::eAligns eV=CWnd::ALIGN_CENTER)
 Set horizontal and vertical align options.

unsigned int GetTextLen ()
 Get length of the text.


Protected Member Functions

void Adjust ()
 Recalculate text drawing pos.

virtual void OnUpdatePos ()
 Updates alignment.


Protected Attributes

std::string m_strText
 Displayed text.

float m_Color [4]
 Displayed color.

CWnd::eAligns m_eVAlign
 Vertical align.

CWnd::eAligns m_eHAlign
 Horizontal align.

CWnd::CRect m_TextPos
 Position of the text on the screen.


Detailed Description

template<class Tbase>
class sjgui::CLabelCtrlTmpl< Tbase >

Text label.

Parameters:
Tbase - base class for the label (based on CWndCtrlBase) Text label. Displays aligned text. Color can be changed
Author:
Alexander Shyrokov
Version:
Revision
1.1.1.1


Member Function Documentation

template<class Tbase>
void sjgui::CLabelCtrlTmpl< Tbase >::Adjust  )  [inline, protected]
 

Recalculate text drawing pos.

Based on m_TextPos and alignment.


The documentation for this class was generated from the following file:
sjgui logo
Quick Links:

 News
 Description
 Screen Shots
 Projects
 Downloads
 Source Code
 Help/FAQ
 Want to help?
 Credits
 Disclaimer


Documentation:

 Documentation
 Reference
 Lessons


Useful links:

sjcomp logo
sjcomp

opengl logo

nehe logo

SourceForge.net Logo

Last modified:


Started by Alexander Shyrokov. Generated at Wed Apr 28 12:31:06 2004 for the sjgui by doxygen 1.3.1. SourceForge.net Logo