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 |
Definition at line 25 of file label.h.