#include <CUI_Widget.h>
Inheritance diagram for CUI_Widget:

Public Member Functions | |
| CUI_Widget (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, char *text=NULL, IUI_Font *font=NULL, float textscale=0.8, IUI_Border *border=NULL) | |
| constructor | |
| virtual | ~CUI_Widget () |
| destructor | |
| virtual bool | Render (double dtime, IUI_Renderer *renderer) |
| overloaded render | |
| virtual CUI_Frame * | TestHit (float x, float y) |
| overloaded testhit | |
| virtual bool | SetBorder (IUI_Border *border) |
| set the border for this widget | |
| virtual IUI_Border * | GetBorder () |
| get the border for this widget | |
| virtual bool | SetText (const char *text) |
| set the text label for this widget | |
| virtual char * | GetText () |
| get the text label for this widget - returned memory is owned by the CUI_Widget object | |
| virtual bool | SetFont (IUI_Font *font) |
| set the font for this widget | |
| virtual IUI_Font * | GetFont () |
| get the font | |
| virtual bool | SetTextScale (float scale) |
| set the scale value for the text | |
Protected Member Functions | |
| virtual bool | ExpandBuffer (unsigned long amount) |
| increase the size of the text buffer | |
Protected Attributes | |
| IUI_Border * | m_border |
| widgets can have a non-rectagular border | |
| char * | m_text |
| text label for this widget | |
| unsigned long | m_textLength |
| total length of text | |
| unsigned long | m_bufferLength |
| current size of buffer | |
| IUI_Font * | m_font |
| font for the text | |
| float | m_textscale |
| how much to scale the text | |
The base widget is a static component, it does not have any interaction with the cursor.
Recognized flags:
[system]
UI_CLICKED
UI_HOVER
UI_SELECTED
UI_DISABLED
UI_INACTIVE
|
|
increase the size of the text buffer
|
|
|
set the scale value for the text Set the amount that the text is scaled by in relation to the widget. Default is 1.0.
|
|
|
total length of text should be udpated any time the text changes |
1.3.4