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

sjgui::CTextBoxCtrlTmpl< Ttext, Tslider, Tbase > Class Template Reference

Text with horizontal and vertical sliders. More...

#include <textbox.h>

Inheritance diagram for sjgui::CTextBoxCtrlTmpl< Ttext, Tslider, Tbase >:

sjgui::classic::CTextBoxTmpl< Ttext, Tslider, Tbase > sjgui::modern::CTextBoxTmpl< Ttext, Tslider, Tbase > List of all members.

Public Member Functions

virtual void OnReshape ()
 Updates slider information.

virtual void OnAnimate ()
 Used to dynamicaly update slider information.

virtual void OnKeyUp (int &iKey)
 Slider and selection control.

virtual void OnKeyDown (int &iKey)
 Selection control.

void AutoScroll (bool b=true)
 Enable/Disable AutoScroll.

void ShowVSBAlways (bool b=true)
 Set "always show vertical scroll bar".

void SetBgColor (GLfloat R, GLfloat G, GLfloat B, GLfloat A=1.0f)
 Set background color.

void EnableScrlBars (bool h=true, bool v=true)
 Enables/disables ability to show scroll bars.

void ScrollDown (int i=1)
 Scrolls down "i" number of lines.

CText functions.
These functions correspond to the CText functions.

See also:
CText


int GetNumLinesOnScreen ()
 Number of displayed lines.

int GetNumOfLines ()
 Total number of lines.

void SetIdent (bool b=true)
 Set ident for wrapping.

void SetWrap (bool b=true)
 Set wrap flag.

bool IsWrap ()
 Wrapping flag state.

void AddLine (const char *str)
 Add a new line (push_back wrapper).

void AddLine (std::string &str)
 Add a new line (push_back wrapper).

void Clear ()
 Erases all text.

const char * GetLine (int i)
 Returns string with index i.

int GetTopLine ()
 Index of the top shown line.

void SetSelectLines (bool b=true)
 Enables/Disables selection.

bool IsSelectLines ()
 Selection flag state.

void SetColor (float *pC)
 Set color of the text.

void SetColor (float R, float G, float B)
 Set color of the text.

float * GetColor ()
 Get color of the text.

void SetFontSize (float fS)
 Set font size.

int GetFontSize ()
 Get font size.

void LoadTextFromFile (char *pName)
 Loads text from a file.

int GetSelectedLine ()
 Index of the selected line.

void SetSelectedLine (int iL)
 Set selected line index.

CTextStrs & GetStrings ()
 CTextStrs::m_Strings member reference.

void SetTopLine (int i)
 Set top line.

void ShowBackPlane (bool b=true)
 Show/Hide back plane.


Detailed Description

template<class Ttext, class Tslider, class Tbase>
class sjgui::CTextBoxCtrlTmpl< Ttext, Tslider, Tbase >

Text with horizontal and vertical sliders.

Parameters:
Ttext - text class (use CText)
Tslider - label for caption (use CSlider)
Tbase - base class (use CWndCtrl) Employees sliders to scroll through the text. Allows text automatically scroll up when a new line is added. The reason why it does not have CText as a base class is reshaping option, so I would need to adjust drawing area of the CText.
See also:
CText; CSlider
Author:
Alexander Shyrokov
Version:
Revision
1.1.1.1


Member Function Documentation

template<class Ttext, class Tslider, class Tbase>
int sjgui::CTextBoxCtrlTmpl< Ttext, Tslider, Tbase >::GetSelectedLine  )  [inline]
 

Index of the selected line.

Returns:
-1 if none is selected, otherwise 0 and higher.

template<class Ttext, class Tslider, class Tbase>
void sjgui::CTextBoxCtrlTmpl< Ttext, Tslider, Tbase >::ShowBackPlane bool  b = true  )  [inline]
 

Show/Hide back plane.

Disable if you want text floating above whatever is under it. Then it is your responsibility to make sure text color is different from the background color.


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