label Class Reference
List of all members.
Classes |
struct | Scursor |
struct | Sline_text |
Public Member Functions |
| label () |
| Constructor by default, cursor is not moveable, cursor is not visible, and the form is set as NOTHING, the default size is (0, 0).
|
| ~label () |
| Destructor.
|
void | set_font (win_font &font) |
| Set the font.
|
void | set_text (const string &text) |
| Set the text.
|
void | add_text (const string &text) |
| Add text.
|
void | set_form (const u_int8 form) |
| Set the form of the display NOTHING, AUTO_SIZE, AUTO_HEIGHT.
|
void | set_cursor_visible (const bool b) |
| Set visible cursor.
|
void | set_cursor_moveable (const bool b) |
| Set if the cursor can be moved with arrow key.
|
bool | update () |
| Update the label.
|
bool | input_update () |
| Update input label, you can move the cursor if the cursor is moveable.
|
const string | text_string () const |
| Get the text in string.
|
const char * | text_char () const |
| Get the text in char.
|
void | resize (u_int16 l, u_int16 h) |
| Resize the label.
|
Static Public Attributes |
static const u_int8 | NOTHING = 0 |
static const u_int8 | AUTO_HEIGHT = 1 |
static const u_int8 | AUTO_SIZE = 2 |
static const SDLKey | KEY_CURSOR_NEXT = SDLK_RIGHT |
static const SDLKey | KEY_CURSOR_PREVIOUS = SDLK_LEFT |
Protected Member Functions |
u_int16 | ucd (u_int16 &idx) |
void | init_vec_cursor () |
| Init vector and cursor, don't erase my_text_.
|
void | build (const bool erase_all) |
| Build label.
|
void | build_form_nothing () |
| Build the label when the form set top nothing.
|
void | build_form_auto_height () |
void | build_form_auto_size () |
void | clean_surface (const bool erase_all) |
u_int8 | find_word (u_int16 &index, u_int16 &wlength, u_int16 &wlengthpix, const u_int16 rlength) |
void | draw_string (const bool at_cursor) |
void | update_cursor () |
void | cursor_next () |
void | cursor_previous () |
void | cursor_draw () |
void | cursor_undraw () |
bool | last_letter (u_int16 idx) |
Protected Attributes |
win_font * | my_font_ |
string | my_text_ |
string | new_text_ |
u_int8 | my_form_ |
bool | visible_cursor_ |
bool | moveable_cursor_ |
u_int16 | cursor_cur_blink_ |
Scursor | my_cursor_ |
Scursor | my_old_cursor_ |
vector< Sline_text > | my_vect_ |
u_int16 | start_line_ |
Static Protected Attributes |
static u_int16 | cursor_blink_cycle = 75 |
Detailed Description
Definition at line 25 of file label.h.
Constructor & Destructor Documentation
Constructor by default, cursor is not moveable, cursor is not visible, and the form is set as NOTHING, the default size is (0, 0).
Constructor.
Definition at line 22 of file label.cc.
Destructor.
Definition at line 47 of file label.cc.
Member Function Documentation
void label::set_font |
( |
win_font & |
font |
) |
|
Set the font.
Definition at line 55 of file label.cc.
void label::set_text |
( |
const string & |
text |
) |
|
Set the text.
Definition at line 65 of file label.cc.
void label::add_text |
( |
const string & |
text |
) |
|
void label::set_form |
( |
const u_int8 |
form |
) |
|
Set the form of the display NOTHING, AUTO_SIZE, AUTO_HEIGHT.
Set the form.
Definition at line 121 of file label.cc.
void label::set_cursor_visible |
( |
const bool |
b |
) |
|
Set visible cursor.
Set if cursor is visible.
Definition at line 189 of file label.cc.
void label::set_cursor_moveable |
( |
const bool |
b |
) |
|
Set if the cursor can be moved with arrow key.
Set the cursor moveable with arrow.
Definition at line 198 of file label.cc.
bool label::update |
( |
|
) |
[virtual] |
bool label::input_update |
( |
|
) |
[virtual] |
const string label::text_string |
( |
|
) |
const |
Get the text in string.
Definition at line 648 of file label.cc.
const char * label::text_char |
( |
|
) |
const |
Get the text in char.
Definition at line 653 of file label.cc.
void label::resize |
( |
u_int16 |
l, |
|
|
u_int16 |
h | |
|
) |
| | |
void label::init_vec_cursor |
( |
|
) |
[protected] |
Init vector and cursor, don't erase my_text_.
Init vector and cursor.
Definition at line 131 of file label.cc.
void label::build |
( |
const bool |
erase_all |
) |
[protected] |
Build label.
Update the vector start : it's the index where the function must start to update.
Definition at line 157 of file label.cc.
void label::build_form_nothing |
( |
|
) |
[protected] |
Build the label when the form set top nothing.
Definition at line 207 of file label.cc.
The documentation for this class was generated from the following files: