Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

CUI_ScrollableTextBox Class Reference

A Scrollable Textbox control. More...

#include <CUI_ScrollableTextBox.h>

Inheritance diagram for CUI_ScrollableTextBox:

CUI_Control CUI_Frame List of all members.

Public Member Functions

 CUI_ScrollableTextBox (CUI_UI *ui=NULL, float x=0, float y=0, float x2=1, float y2=1, CUI_Frame *parent=NULL, IUI_Shader *shader=NULL, IUI_Shader *cursor=NULL, CUI_CoordSys *coordsys=NULL, int columns=28, int rows=26, IUI_Font *font=NULL, IUI_Shader *scrollShader=NULL, IUI_Shader *sliderShader=NULL, bool wordwrap=true)
 constructor

virtual ~CUI_ScrollableTextBox ()
 destructor

virtual bool SetUI (CUI_UI *ui)
 Set UI - add the textbox and scrollbars to the ui.

virtual bool ProcessKey (unsigned long key)
 Process a incoming key.

virtual bool CallbackFunc (int id, int numparam, void *param)
 Callback function to handle updating the selection.

virtual bool GotoBottom ()
 move the view to the bottom of the text

virtual bool GotoTop ()
 move the view to the top of the text

virtual char * GetText (void)
 get the text from the box

virtual CUI_TextBoxGetTextBox ()
 get pointer to textbox

virtual bool SetText (char *text)
 set the text for the box to display

virtual bool SetFont (IUI_Font *font)
 set the font for the textbox

virtual bool SetFlag (unsigned long flag, bool set)
 set a flag for the textbox

virtual bool SetScrollShader (IUI_Shader *shader)
 Set the scrollbar shader.

virtual bool SetSliderShader (IUI_Shader *shader)
 Set the actual slider's shader.

virtual bool SetTextBoxSize (int columns, int rows)
 set the textbox viewable size

virtual bool SetWordWrap (bool wordwrap)
 enable/disable word wrap on the text

virtual bool CatText (const char *text)
 concatenate some text into the textbox


Protected Attributes

IUI_Shaderm_scrollShader
 shader for the scrollbar

IUI_Shaderm_sliderShader
 shader for the actual slider

CUI_TextBoxm_textBox
 pointer to the textbox (may be editable or not)

CUI_SliderBarm_horizontalBar
 pointer to the horizontal scrollbar

CUI_SliderBarm_verticalBar
 pointer to the vertical scrollbar


Detailed Description

A Scrollable Textbox control.

Combines a textbox and scrollbars with the logic to connect them.

Scrollable textbox cannot be editable. That will require a different class.

Recognized flags:
[system]
UI_CLICKED
UI_HOVER
UI_SELECTED

UI_DISABLED
UI_INACTIVE


Member Function Documentation

bool CUI_ScrollableTextBox::CallbackFunc int  id,
int  numparam,
void *  param
[virtual]
 

Callback function to handle updating the selection.

Returns:
true if the global callback does NOT need to be called

false if the global callback needs to be called

Reimplemented from CUI_Frame.

virtual char* CUI_ScrollableTextBox::GetText void   )  [inline, virtual]
 

get the text from the box

Returned memory belongs to the CUI_ScrollableTextBox


The documentation for this class was generated from the following files:
Generated on Mon Sep 29 23:07:04 2003 for glGUI by doxygen 1.3.4