Abstract base class for text items. More...
#include <text.hpp>


Public Member Functions | |
| ttext_ () | |
| void | set_active (const bool active) |
| Inherited from tcontrol. | |
| bool | get_active () const |
| Inherited from tcontrol. | |
| unsigned | get_state () const |
| Inherited from tcontrol. | |
| void | set_maximum_length (const size_t maximum_length) |
| size_t | get_length () const |
| virtual void | set_value (const std::string &text) |
| The set_value is virtual for the tpassword_box class. | |
| std::string | get_value () const |
| const std::string & | text () const |
| void | set_text_changed_callback (boost::function< void(ttext_ *textbox, const std::string text) > cb) |
| Set the text_changed callback. | |
Protected Member Functions | |
| virtual void | goto_end_of_line (const bool select=false)=0 |
| Moves the cursor to the end of the line. | |
| void | goto_end_of_data (const bool select=false) |
| Moves the cursor to the end of all text. | |
| virtual void | goto_start_of_line (const bool select=false)=0 |
| Moves the cursor to the beginning of the line. | |
| void | goto_start_of_data (const bool select=false) |
| Moves the cursor to the beginning of the data. | |
| void | select_all () |
| Selects all text. | |
| void | set_cursor (const size_t offset, const bool select) |
| Moves the cursor at the wanted position. | |
| virtual void | insert_char (const Uint16 unicode) |
| Inserts a character at the cursor. | |
| virtual void | delete_char (const bool before_cursor)=0 |
| Deletes the character. | |
| virtual void | delete_selection ()=0 |
| Deletes the current selection. | |
| virtual void | copy_selection (const bool mouse) |
| Copies the current selection. | |
| virtual void | paste_selection (const bool mouse) |
| Pastes the current selection. | |
| gui2::tpoint | get_cursor_position (const unsigned column, const unsigned line=0) const |
| tpoint | get_column_line (const tpoint &position) const |
| void | set_font_size (const unsigned font_size) |
| void | set_font_style (const unsigned font_style) |
| void | set_maximum_width (const int width) |
| void | set_maximum_height (const int height) |
| void | set_ellipse_mode (const PangoEllipsizeMode ellipse_mode) |
| size_t | get_selection_start () const |
| void | set_selection_start (const size_t selection_start) |
| size_t | get_selection_length () const |
| void | set_selection_length (const int selection_length) |
| virtual void | handle_key_default (bool &handled, SDLKey key, SDLMod modifier, Uint16 unicode) |
| Default key handler if none of the above functions is called. | |
Private Types | |
| enum | tstate { ENABLED, DISABLED, FOCUSSED, COUNT } |
Note the order of the states must be the same as defined in settings.hpp. More... | |
Private Member Functions | |
| void | set_state (const tstate state) |
| virtual void | handle_key_up_arrow (SDLMod modifier, bool &handled)=0 |
| Every key can have several behaviours. | |
| virtual void | handle_key_down_arrow (SDLMod modifier, bool &handled)=0 |
| Down arrow key pressed. | |
| virtual void | handle_key_clear_line (SDLMod modifier, bool &handled)=0 |
| Clears the current line. | |
| virtual void | handle_key_left_arrow (SDLMod modifier, bool &handled) |
| Left arrow key pressed. | |
| virtual void | handle_key_right_arrow (SDLMod modifier, bool &handled) |
| Right arrow key pressed. | |
| virtual void | handle_key_home (SDLMod modifier, bool &handled) |
| Home key pressed. | |
| virtual void | handle_key_end (SDLMod modifier, bool &handled) |
| End key pressed. | |
| virtual void | handle_key_backspace (SDLMod modifier, bool &handled) |
| Backspace key pressed. | |
| virtual void | handle_key_delete (SDLMod modifier, bool &handled) |
| Delete key pressed. | |
| virtual void | handle_key_page_up (SDLMod, bool &) |
| Page up key. | |
| virtual void | handle_key_page_down (SDLMod, bool &) |
| Page down key. | |
| void | signal_handler_middle_button_click (const event::tevent event, bool &handled) |
| void | signal_handler_sdl_key_down (const event::tevent event, bool &handled, const SDLKey key, SDLMod modifier, const Uint16 unicode) |
| void | signal_handler_receive_keyboard_focus (const event::tevent event) |
| void | signal_handler_lose_keyboard_focus (const event::tevent event) |
Private Attributes | |
| tstate | state_ |
| Current state of the widget. | |
| font::ttext | text_ |
| The text entered in the widget. | |
| size_t | selection_start_ |
| Start of the selected text. | |
| int | selection_length_ |
| Length of the selected text. | |
| boost::function< void(ttext_ *textbox, const std::string text) | text_changed_callback_ ) |
| Text changed callback. | |
Abstract base class for text items.
All other text classes should inherit from this base class.
The NOTIFY_MODIFIED event is send when the text is modified.
Common signal handlers:
Definition at line 43 of file text.hpp.
enum gui2::ttext_::tstate [private] |
| gui2::ttext_::ttext_ | ( | ) |
Definition at line 31 of file text.cpp.
References signal_handler_lose_keyboard_focus(), signal_handler_middle_button_click(), signal_handler_receive_keyboard_focus(), and signal_handler_sdl_key_down().

| void gui2::ttext_::copy_selection | ( | const bool | mouse | ) | [protected, virtual] |
Copies the current selection.
Definition at line 126 of file text.cpp.
References copy_to_clipboard(), selection_length_, selection_start_, editor::start(), utils::string_to_wstring(), text(), text_, and utils::wstring_to_string().
Referenced by set_cursor(), and signal_handler_sdl_key_down().


| virtual void gui2::ttext_::delete_char | ( | const bool | before_cursor | ) | [protected, pure virtual] |
Deletes the character.
| before_cursor | If true it deletes the character before the cursor (backspace) else the character after the cursor (delete). |
Implemented in gui2::tpassword_box, and gui2::ttext_box.
Referenced by handle_key_backspace(), and handle_key_delete().

| virtual void gui2::ttext_::delete_selection | ( | ) | [protected, pure virtual] |
Deletes the current selection.
Implemented in gui2::ttext_box.
Referenced by handle_key_backspace(), handle_key_delete(), insert_char(), paste_selection(), and signal_handler_sdl_key_down().

| bool gui2::ttext_::get_active | ( | ) | const [inline, virtual] |
Inherited from tcontrol.
Implements gui2::tcontrol.
Definition at line 54 of file text.hpp.
References state_.
Referenced by set_active().

Definition at line 168 of file text.hpp.
References text_.
Referenced by gui2::ttext_box::handle_mouse_selection().

| gui2::tpoint gui2::ttext_::get_cursor_position | ( | const unsigned | column, | |
| const unsigned | line = 0 | |||
| ) | const [inline, protected] |
Definition at line 164 of file text.hpp.
References text_.
Referenced by gui2::ttext_box::update_canvas().

| size_t gui2::ttext_::get_length | ( | ) | const [inline] |
Definition at line 63 of file text.hpp.
References text_.
Referenced by gui2::ttext_box::update_canvas().

| size_t gui2::ttext_::get_selection_length | ( | ) | const [inline, protected] |
Definition at line 191 of file text.hpp.
References selection_length_.
Referenced by gui2::ttext_box::delete_selection(), gui2::tpassword_box::handle_key_backspace(), gui2::tpassword_box::handle_key_delete(), gui2::tpassword_box::post_function(), gui2::tpassword_box::pre_function(), and gui2::ttext_box::update_canvas().

| size_t gui2::ttext_::get_selection_start | ( | ) | const [inline, protected] |
Definition at line 188 of file text.hpp.
References selection_start_.
Referenced by gui2::ttext_box::delete_char(), gui2::ttext_box::delete_selection(), gui2::tpassword_box::handle_key_backspace(), gui2::tpassword_box::handle_key_delete(), gui2::tpassword_box::post_function(), gui2::tpassword_box::pre_function(), and gui2::ttext_box::update_canvas().

| unsigned gui2::ttext_::get_state | ( | ) | const [inline, virtual] |
Inherited from tcontrol.
Implements gui2::tcontrol.
Definition at line 57 of file text.hpp.
References state_.
| std::string gui2::ttext_::get_value | ( | ) | const [inline] |
Definition at line 74 of file text.hpp.
References text_.
Referenced by gui2::tlobby_main::chat_input_keypress_callback(), gui2::ttext_box::delete_selection(), gui2::tlobby_player_info::do_kick_ban(), gui2::tlobby_main::game_filter_reload(), gui2::ttext_box::history_down(), gui2::ttext_box::history_up(), gui2::tpassword_box::post_function(), gui2::tmp_method_selection::post_show(), gui2::ttext_box::save_to_history(), gui2::tlobby_main::send_message_button_callback(), gui2::tpassword_box::set_value(), and gui2::ttext_box::update_canvas().

| void gui2::ttext_::goto_end_of_data | ( | const bool | select = false |
) | [inline, protected] |
Moves the cursor to the end of all text.
For a single line text this is the same as goto_end_of_line().
| select | Select the text from the original cursor position till the end of the data? |
Definition at line 103 of file text.hpp.
References set_cursor(), and text_.
Referenced by gui2::ttext_box::goto_end_of_line(), handle_key_end(), and select_all().


| virtual void gui2::ttext_::goto_end_of_line | ( | const bool | select = false |
) | [protected, pure virtual] |
Moves the cursor to the end of the line.
| select | Select the text from the original cursor position till the end of the line? |
Implemented in gui2::ttext_box.
Referenced by handle_key_end().

| void gui2::ttext_::goto_start_of_data | ( | const bool | select = false |
) | [inline, protected] |
Moves the cursor to the beginning of the data.
| select | Select the text from the original cursor position till the beginning of the data? |
Definition at line 120 of file text.hpp.
References set_cursor().
Referenced by gui2::ttext_box::goto_start_of_line(), and handle_key_home().


| virtual void gui2::ttext_::goto_start_of_line | ( | const bool | select = false |
) | [protected, pure virtual] |
Moves the cursor to the beginning of the line.
| select | Select the text from the original cursor position till the beginning of the line? |
Implemented in gui2::ttext_box.
Referenced by handle_key_home().

| void gui2::ttext_::handle_key_backspace | ( | SDLMod | modifier, | |
| bool & | handled | |||
| ) | [private, virtual] |
Backspace key pressed.
Unmodified Deletes the character before the cursor, ignored if at the beginning of the data. Control Ignored. Shift Ignored. Alt Ignored.
Reimplemented in gui2::tpassword_box.
Definition at line 235 of file text.cpp.
References DBG_GUI_E, delete_char(), delete_selection(), gui2::event::tdispatcher::fire(), LOG_SCOPE_HEADER, gui2::event::NOTIFY_MODIFIED, selection_length_, and selection_start_.
Referenced by signal_handler_sdl_key_down().


| virtual void gui2::ttext_::handle_key_clear_line | ( | SDLMod | modifier, | |
| bool & | handled | |||
| ) | [private, pure virtual] |
Clears the current line.
Unmodified Clears the current line. Control Ignored. Shift Ignored. Alt Ignored.
Implemented in gui2::ttext_box.
Referenced by signal_handler_sdl_key_down().

| void gui2::ttext_::handle_key_default | ( | bool & | handled, | |
| SDLKey | key, | |||
| SDLMod | modifier, | |||
| Uint16 | unicode | |||
| ) | [protected, virtual] |
Default key handler if none of the above functions is called.
Unmodified If invalid unicode it's ignored. Else if text selected the selected text is replaced with the unicode character send. Else the unicode character is inserted after the cursor. Control Ignored. Shift Ignored (already in the unicode value). Alt Ignored.
Reimplemented in gui2::ttext_box.
Definition at line 261 of file text.cpp.
References DBG_GUI_E, gui2::event::tdispatcher::fire(), insert_char(), LOG_SCOPE_HEADER, and gui2::event::NOTIFY_MODIFIED.
Referenced by signal_handler_sdl_key_down().


| void gui2::ttext_::handle_key_delete | ( | SDLMod | modifier, | |
| bool & | handled | |||
| ) | [private, virtual] |
Delete key pressed.
Unmodified If there is a selection that's deleted. Else if not at the end of the data the character after the cursor is deleted. Else the key is ignored. ignored if at the beginning of the data. Control Ignored. Shift Ignored. Alt Ignored.
Reimplemented in gui2::tpassword_box.
Definition at line 248 of file text.cpp.
References DBG_GUI_E, delete_char(), delete_selection(), gui2::event::tdispatcher::fire(), LOG_SCOPE_HEADER, gui2::event::NOTIFY_MODIFIED, selection_length_, selection_start_, and text_.
Referenced by signal_handler_sdl_key_down().


| virtual void gui2::ttext_::handle_key_down_arrow | ( | SDLMod | modifier, | |
| bool & | handled | |||
| ) | [private, pure virtual] |
Down arrow key pressed.
The behaviour is implementation defined.
Implemented in gui2::ttext_box.
Referenced by signal_handler_sdl_key_down().

| void gui2::ttext_::handle_key_end | ( | SDLMod | modifier, | |
| bool & | handled | |||
| ) | [private, virtual] |
End key pressed.
Unmodified Moves the cursor a to the end of the line. Control Like unmodified but to the end of the data. Shift Selects the text while moving. Alt Ignored.
Definition at line 223 of file text.cpp.
References DBG_GUI_E, goto_end_of_data(), goto_end_of_line(), and LOG_SCOPE_HEADER.
Referenced by signal_handler_sdl_key_down().


| void gui2::ttext_::handle_key_home | ( | SDLMod | modifier, | |
| bool & | handled | |||
| ) | [private, virtual] |
Home key pressed.
Unmodified Moves the cursor a to the beginning of the line. Control Like unmodified but to the beginning of the data. Shift Selects the text while moving. Alt Ignored.
Definition at line 211 of file text.cpp.
References DBG_GUI_E, goto_start_of_data(), goto_start_of_line(), and LOG_SCOPE_HEADER.
Referenced by signal_handler_sdl_key_down().


| void gui2::ttext_::handle_key_left_arrow | ( | SDLMod | modifier, | |
| bool & | handled | |||
| ) | [private, virtual] |
Left arrow key pressed.
Unmodified Moves the cursor a character to the left. Control Like unmodified but a word instead of a letter at the time. Shift Selects the text while moving. Alt Ignored.
Definition at line 187 of file text.cpp.
References DBG_GUI_E, LOG_SCOPE_HEADER, selection_length_, selection_start_, and set_cursor().
Referenced by signal_handler_sdl_key_down().


| virtual void gui2::ttext_::handle_key_page_down | ( | SDLMod | , | |
| bool & | ||||
| ) | [inline, private, virtual] |
Page down key.
Unmodified Unhandled. Control Ignored. Shift Ignored. Alt Ignored.
Definition at line 362 of file text.hpp.
Referenced by signal_handler_sdl_key_down().

| virtual void gui2::ttext_::handle_key_page_up | ( | SDLMod | , | |
| bool & | ||||
| ) | [inline, private, virtual] |
Page up key.
Unmodified Unhandled. Control Ignored. Shift Ignored. Alt Ignored.
Definition at line 352 of file text.hpp.
Referenced by signal_handler_sdl_key_down().

| void gui2::ttext_::handle_key_right_arrow | ( | SDLMod | modifier, | |
| bool & | handled | |||
| ) | [private, virtual] |
Right arrow key pressed.
Unmodified Moves the cursor a character to the right. Control Like unmodified but a word instead of a letter at the time. Shift Selects the text while moving. Alt Ignored.
Definition at line 199 of file text.cpp.
References DBG_GUI_E, LOG_SCOPE_HEADER, selection_length_, selection_start_, set_cursor(), and text_.
Referenced by signal_handler_sdl_key_down().


| virtual void gui2::ttext_::handle_key_up_arrow | ( | SDLMod | modifier, | |
| bool & | handled | |||
| ) | [private, pure virtual] |
Every key can have several behaviours.
Unmodified No modifier is pressed. Control The control key is pressed. Shift The shift key is pressed. Alt The alt key is pressed.
If modifiers together do something else as the sum of the modifiers it's listed separately eg.
Control Moves 10 steps at the time. Shift Selects the text. Control + Shift Inserts 42 in the text.
There are some predefined actions for results. Unhandled The key/modifier is ignored and also reported unhandled. Ignored The key/modifier is ignored and it's _expected_ the inherited classes do the same. Implementation defined The key/modifier is ignored and it's expected the inherited classes will define some meaning to it. Up arrow key pressed.
The behaviour is implementation defined.
Implemented in gui2::ttext_box.
Referenced by signal_handler_sdl_key_down().

| void gui2::ttext_::insert_char | ( | const Uint16 | unicode | ) | [protected, virtual] |
Inserts a character at the cursor.
This function is preferred over set_text since it's optimized for updating the internal bookkeeping.
| unicode | The unicode value of the character to insert. |
Reimplemented in gui2::tpassword_box.
Definition at line 113 of file text.cpp.
References delete_selection(), selection_start_, set_cursor(), gui2::twidget::set_dirty(), text_, and gui2::tcontrol::update_canvas().
Referenced by handle_key_default().


| void gui2::ttext_::paste_selection | ( | const bool | mouse | ) | [protected, virtual] |
Pastes the current selection.
Reimplemented in gui2::tpassword_box.
Definition at line 147 of file text.cpp.
References copy_from_clipboard(), delete_selection(), gui2::event::tdispatcher::fire(), gui2::event::NOTIFY_MODIFIED, selection_start_, gui2::twidget::set_dirty(), text(), text_, and gui2::tcontrol::update_canvas().
Referenced by signal_handler_middle_button_click(), and signal_handler_sdl_key_down().


| void gui2::ttext_::select_all | ( | ) | [inline, protected] |
Selects all text.
Definition at line 123 of file text.hpp.
References goto_end_of_data(), and selection_start_.
Referenced by gui2::ttext_box::signal_handler_left_button_double_click().


| void gui2::ttext_::set_active | ( | const bool | active | ) | [inline, virtual] |
Inherited from tcontrol.
Implements gui2::tcontrol.
Definition at line 50 of file text.hpp.
References DISABLED, ENABLED, get_active(), and set_state().

| void gui2::ttext_::set_cursor | ( | const size_t | offset, | |
| const bool | select | |||
| ) | [protected] |
Moves the cursor at the wanted position.
| offset | The wanted new cursor position. | |
| select | Select the text from the original cursor position till the new position? |
Definition at line 86 of file text.cpp.
References copy_selection(), selection_length_, selection_start_, gui2::twidget::set_dirty(), text_, and gui2::tcontrol::update_canvas().
Referenced by gui2::ttext_box::delete_char(), gui2::ttext_box::delete_selection(), goto_end_of_data(), goto_start_of_data(), handle_key_left_arrow(), handle_key_right_arrow(), gui2::ttext_box::handle_mouse_selection(), and insert_char().


| void gui2::ttext_::set_ellipse_mode | ( | const PangoEllipsizeMode | ellipse_mode | ) | [inline, protected] |
Definition at line 183 of file text.hpp.
References text_.
Referenced by gui2::ttext_box::update_canvas().

| void gui2::ttext_::set_font_size | ( | const unsigned | font_size | ) | [inline, protected] |
Definition at line 171 of file text.hpp.
References text_.
Referenced by gui2::ttext_box::load_config_extra().

| void gui2::ttext_::set_font_style | ( | const unsigned | font_style | ) | [inline, protected] |
Definition at line 174 of file text.hpp.
References text_.
Referenced by gui2::ttext_box::load_config_extra().

| void gui2::ttext_::set_maximum_height | ( | const int | height | ) | [inline, protected] |
Definition at line 180 of file text.hpp.
References text_.
Referenced by gui2::ttext_box::place().

| void gui2::ttext_::set_maximum_length | ( | const size_t | maximum_length | ) |
Definition at line 55 of file text.cpp.
References selection_length_, selection_start_, gui2::twidget::set_dirty(), text_, and gui2::tcontrol::update_canvas().
Referenced by gui2::tmp_method_selection::pre_show().


| void gui2::ttext_::set_maximum_width | ( | const int | width | ) | [inline, protected] |
Definition at line 177 of file text.hpp.
References text_.
Referenced by gui2::ttext_box::place().

| void gui2::ttext_::set_selection_length | ( | const int | selection_length | ) | [protected] |
Definition at line 171 of file text.cpp.
References selection_length_, and gui2::twidget::set_dirty().
Referenced by gui2::ttext_box::delete_char(), gui2::tpassword_box::post_function(), and gui2::tpassword_box::pre_function().


| void gui2::ttext_::set_selection_start | ( | const size_t | selection_start | ) | [protected] |
Definition at line 163 of file text.cpp.
References selection_start_, and gui2::twidget::set_dirty().
Referenced by gui2::tpassword_box::post_function(), and gui2::tpassword_box::pre_function().


| void gui2::ttext_::set_state | ( | const tstate | state | ) | [private] |
Definition at line 179 of file text.cpp.
References gui2::twidget::set_dirty(), and state_.
Referenced by set_active(), signal_handler_lose_keyboard_focus(), and signal_handler_receive_keyboard_focus().


| void gui2::ttext_::set_text_changed_callback | ( | boost::function< void(ttext_ *textbox, const std::string text) > | cb | ) | [inline] |
Set the text_changed callback.
Definition at line 79 of file text.hpp.
References text_changed_callback_.
Referenced by gui2::tdata_manage::pre_show().

| void gui2::ttext_::set_value | ( | const std::string & | text | ) | [virtual] |
The set_value is virtual for the tpassword_box class.
That class overrides the set_value function to replace it with asterisk. There might be more generic way to do it when more classes are needed.
Reimplemented in gui2::tpassword_box.
Definition at line 73 of file text.cpp.
References selection_length_, selection_start_, gui2::twidget::set_dirty(), text_, and gui2::tcontrol::update_canvas().
Referenced by gui2::tlobby_main::chat_input_keypress_callback(), gui2::ttext_box::delete_selection(), gui2::ttext_box::handle_key_clear_line(), gui2::ttext_box::history_down(), gui2::ttext_box::history_up(), gui2::tmp_method_selection::pre_show(), and gui2::tlobby_main::send_message_button_callback().


| void gui2::ttext_::signal_handler_lose_keyboard_focus | ( | const event::tevent | event | ) | [private] |
Definition at line 422 of file text.cpp.
References DBG_GUI_E, ENABLED, LOG_HEADER, and set_state().
Referenced by ttext_().


| void gui2::ttext_::signal_handler_middle_button_click | ( | const event::tevent | event, | |
| bool & | handled | |||
| ) | [private] |
Definition at line 273 of file text.cpp.
References DBG_GUI_E, LOG_HEADER, and paste_selection().
Referenced by ttext_().


| void gui2::ttext_::signal_handler_receive_keyboard_focus | ( | const event::tevent | event | ) | [private] |
Definition at line 415 of file text.cpp.
References DBG_GUI_E, FOCUSSED, LOG_HEADER, and set_state().
Referenced by ttext_().


| void gui2::ttext_::signal_handler_sdl_key_down | ( | const event::tevent | event, | |
| bool & | handled, | |||
| const SDLKey | key, | |||
| SDLMod | modifier, | |||
| const Uint16 | unicode | |||
| ) | [private] |
Definition at line 283 of file text.cpp.
References copy_selection(), DBG_GUI_E, delete_selection(), handle_key_backspace(), handle_key_clear_line(), handle_key_default(), handle_key_delete(), handle_key_down_arrow(), handle_key_end(), handle_key_home(), handle_key_left_arrow(), handle_key_page_down(), handle_key_page_up(), handle_key_right_arrow(), handle_key_up_arrow(), LOG_HEADER, paste_selection(), text(), and text_changed_callback_.
Referenced by ttext_().


| const std::string& gui2::ttext_::text | ( | ) | const [inline] |
Definition at line 76 of file text.hpp.
References text_.
Referenced by gui2::contains(), copy_selection(), gui2::ttext_box::delete_selection(), gui2::tpassword_box::handle_key_delete(), paste_selection(), and signal_handler_sdl_key_down().

int gui2::ttext_::selection_length_ [private] |
Length of the selected text.
* positive selection_len_ means selection to the right. * negative selection_len_ means selection to the left. * selection_len_ == 0 means no selection.
Definition at line 222 of file text.hpp.
Referenced by copy_selection(), get_selection_length(), handle_key_backspace(), handle_key_delete(), handle_key_left_arrow(), handle_key_right_arrow(), set_cursor(), set_maximum_length(), set_selection_length(), and set_value().
size_t gui2::ttext_::selection_start_ [private] |
Start of the selected text.
Definition at line 213 of file text.hpp.
Referenced by copy_selection(), get_selection_start(), handle_key_backspace(), handle_key_delete(), handle_key_left_arrow(), handle_key_right_arrow(), insert_char(), paste_selection(), select_all(), set_cursor(), set_maximum_length(), set_selection_start(), and set_value().
tstate gui2::ttext_::state_ [private] |
Current state of the widget.
The state of the widget determines what to render and how the widget reacts to certain 'events'.
Definition at line 207 of file text.hpp.
Referenced by get_active(), get_state(), and set_state().
font::ttext gui2::ttext_::text_ [private] |
The text entered in the widget.
Definition at line 210 of file text.hpp.
Referenced by copy_selection(), get_column_line(), get_cursor_position(), get_length(), get_value(), goto_end_of_data(), handle_key_delete(), handle_key_right_arrow(), insert_char(), paste_selection(), set_cursor(), set_ellipse_mode(), set_font_size(), set_font_style(), set_maximum_height(), set_maximum_length(), set_maximum_width(), set_value(), and text().
boost::function< void (ttext_* textbox, const std::string text) gui2::ttext_::text_changed_callback_) [private] |
Text changed callback.
This callback is called in key_press after the key_press event has been handled by the control. The parameters to the function are:
Definition at line 390 of file text.hpp.
Referenced by set_text_changed_callback(), and signal_handler_sdl_key_down().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:23:28 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |