#include <password_box.hpp>


Public Member Functions | |
| tpassword_box () | |
| virtual void | set_value (const std::string &text) |
| Inherited from ttext_. | |
| std::string | get_real_value () const |
Protected Member Functions | |
| void | insert_char (const Uint16 unicode) |
| Inserts a character at the cursor. | |
| void | delete_char (const bool before_cursor) |
| Inherited from ttext_. | |
| void | paste_selection (const bool mouse) |
| Pastes the current selection. | |
Private Member Functions | |
| void | handle_key_backspace (SDLMod modifier, bool &handled) |
| Backspace key pressed. | |
| void | handle_key_delete (SDLMod modifier, bool &handled) |
| Delete key pressed. | |
| void | pre_function () |
| void | post_function () |
| const std::string & | get_control_type () const |
| Inherited from ttext_box. | |
Private Attributes | |
| std::string | real_value_ |
Definition at line 32 of file password_box.hpp.
| gui2::tpassword_box::tpassword_box | ( | ) | [inline] |
Definition at line 53 of file password_box.hpp.
| void gui2::tpassword_box::delete_char | ( | const bool | before_cursor | ) | [protected, virtual] |
Inherited from ttext_.
Reimplemented from gui2::ttext_box.
Definition at line 57 of file password_box.cpp.
References post_function(), and pre_function().
Referenced by handle_key_backspace(), and handle_key_delete().


| const std::string & gui2::tpassword_box::get_control_type | ( | ) | const [private, virtual] |
Inherited from ttext_box.
Reimplemented from gui2::ttext_box.
Definition at line 134 of file password_box.cpp.
References type.
| std::string gui2::tpassword_box::get_real_value | ( | ) | const [inline] |
Definition at line 57 of file password_box.hpp.
References real_value_.
| void gui2::tpassword_box::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 from gui2::ttext_.
Definition at line 63 of file password_box.cpp.
References DBG_GUI_E, delete_char(), gui2::ttext_box::delete_selection(), gui2::ttext_::get_selection_length(), gui2::ttext_::get_selection_start(), LOG_SCOPE_HEADER, post_function(), and pre_function().

| void gui2::tpassword_box::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 from gui2::ttext_.
Definition at line 79 of file password_box.cpp.
References DBG_GUI_E, delete_char(), gui2::ttext_box::delete_selection(), gui2::ttext_::get_selection_length(), gui2::ttext_::get_selection_start(), LOG_SCOPE_HEADER, post_function(), pre_function(), and gui2::ttext_::text().

| void gui2::tpassword_box::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 from gui2::ttext_.
Definition at line 51 of file password_box.cpp.
References post_function(), and pre_function().

| void gui2::tpassword_box::paste_selection | ( | const bool | mouse | ) | [protected, virtual] |
Pastes the current selection.
Reimplemented from gui2::ttext_.
Definition at line 95 of file password_box.cpp.
References post_function(), and pre_function().

| void gui2::tpassword_box::post_function | ( | ) | [private] |
Definition at line 115 of file password_box.cpp.
References gui2::ttext_::get_selection_length(), gui2::ttext_::get_selection_start(), gui2::ttext_::get_value(), real_value_, gui2::twidget::set_dirty(), gui2::ttext_::set_selection_length(), gui2::ttext_::set_selection_start(), set_value(), and gui2::ttext_box::update_canvas().
Referenced by delete_char(), handle_key_backspace(), handle_key_delete(), insert_char(), and paste_selection().


| void gui2::tpassword_box::pre_function | ( | ) | [private] |
Definition at line 101 of file password_box.cpp.
References gui2::ttext_::get_selection_length(), gui2::ttext_::get_selection_start(), real_value_, gui2::ttext_::set_selection_length(), gui2::ttext_::set_selection_start(), and set_value().
Referenced by delete_char(), handle_key_backspace(), handle_key_delete(), insert_char(), and paste_selection().


| void gui2::tpassword_box::set_value | ( | const std::string & | text | ) | [virtual] |
Inherited from ttext_.
Reimplemented from gui2::ttext_.
Definition at line 45 of file password_box.cpp.
References gui2::ttext_::get_value(), and real_value_.
Referenced by post_function(), and pre_function().


std::string gui2::tpassword_box::real_value_ [private] |
Definition at line 77 of file password_box.hpp.
Referenced by get_real_value(), post_function(), pre_function(), and set_value().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:23:10 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |