Abstract base class for text items. More...
#include <text_box_base.hpp>
Public Types | |
enum | state_t { ENABLED , DISABLED , FOCUSED , HOVERED } |
Note the order of the states must be the same as defined in settings.hpp. More... | |
![]() | |
enum class | visibility { visible , hidden , invisible } |
Visibility settings done by the user. More... | |
enum class | redraw_action { full , partly , none } |
Visibility set by the engine. More... | |
enum class | debug_border { none , outline , fill } |
![]() | |
enum | event_queue_type { pre = 1 , child = 2 , post = 4 } |
enum | queue_position { front_pre_child , back_pre_child , front_child , back_child , front_post_child , back_post_child } |
The position where to add a new callback in the signal handler. More... | |
enum class | mouse_behavior { all , hit , none } |
The behavior of the mouse events. More... | |
Public Member Functions | |
text_box_base (const implementation::builder_styled_widget &builder, const std::string &control_type) | |
~text_box_base () | |
virtual void | set_active (const bool active) override |
See styled_widget::set_active. More... | |
virtual bool | get_active () const override |
See styled_widget::get_active. More... | |
virtual unsigned | get_state () const override |
See styled_widget::get_state. More... | |
void | set_maximum_length (const std::size_t maximum_length) |
std::size_t | get_length () const |
Wrapper function, returns length of the text in pango column offsets. More... | |
std::vector< std::string > | get_lines () |
Wrapper function, returns a vector with the lines. More... | |
PangoLayoutLine * | get_line (int index) |
Wrapper function, returns the line corresponding to index. More... | |
int | get_line_number (const unsigned offset) |
Wrapper function, return the line number given the byte index. More... | |
point | get_cursor_pos_from_index (const unsigned offset) const |
Wrapper function, return the cursor position given the byte index. More... | |
unsigned | get_lines_count () const |
Wrapper function, return number of lines. More... | |
void | set_highlight_area (const unsigned start_offset, const unsigned end_offset, const color_t &color) |
Wrapper function, sets the area between column start and end offset to be highlighted in a specific color. More... | |
virtual void | set_value (const std::string &text) |
The set_value is virtual for the password_box class. More... | |
std::string | get_value () const |
const std::string & | text () const |
std::string | plain_text () |
template<typename Func > | |
void | on_modified (const Func &f) |
Registers a NOTIFY_MODIFIED handler. More... | |
void | set_selection (std::size_t start, int length) |
Sets or clears the text selection. More... | |
void | set_editable (bool editable) |
Set or unset whether text can be edited or not Text can only be copied and scrolled through when editable is false. More... | |
bool | is_editable () const |
Check whether text can be edited or not. More... | |
bool | is_composing () const |
void | interrupt_composition () |
![]() | |
styled_widget (const implementation::builder_styled_widget &builder, const std::string &control_type) | |
Constructor. More... | |
virtual void | set_members (const widget_item &data) |
Sets the members of the styled_widget. More... | |
bool | disable_click_dismiss () const override |
See widget::disable_click_dismiss. More... | |
virtual iteration::walker_ptr | create_walker () override |
See widget::create_walker. More... | |
point | get_config_minimum_size () const |
Gets the minimum size as defined in the config. More... | |
point | get_config_default_size () const |
Gets the default size as defined in the config. More... | |
point | get_config_maximum_size () const |
Gets the best size as defined in the config. More... | |
virtual unsigned | get_characters_per_line () const |
Returns the number of characters per line. More... | |
virtual bool | get_link_aware () const |
Returns whether the label should be link_aware, in in rendering and in searching for links with get_link. More... | |
virtual color_t | get_link_color () const |
Returns the color string to be used with links. More... | |
virtual void | layout_initialize (const bool full_initialization) override |
See widget::layout_initialize. More... | |
virtual void | request_reduce_width (const unsigned maximum_width) override |
See widget::request_reduce_width. More... | |
virtual void | request_reduce_height (const unsigned maximum_height) override |
See widget::request_reduce_height. More... | |
virtual void | place (const point &origin, const point &size) override |
See widget::place. More... | |
virtual widget * | find_at (const point &coordinate, const bool must_be_active) override |
See widget::find_at. More... | |
virtual const widget * | find_at (const point &coordinate, const bool must_be_active) const override |
See widget::find_at. More... | |
widget * | find (const std::string_view id, const bool must_be_active) override |
See widget::find. More... | |
const widget * | find (const std::string_view id, const bool must_be_active) const override |
See widget::find. More... | |
bool | get_use_tooltip_on_label_overflow () const |
void | set_use_tooltip_on_label_overflow (const bool use_tooltip=true) |
const t_string & | get_label () const |
virtual void | set_label (const t_string &text) |
virtual void | set_use_markup (bool use_markup) |
bool | get_use_markup () const |
const t_string & | tooltip () const |
void | set_tooltip (const t_string &tooltip) |
const t_string & | help_message () const |
void | set_help_message (const t_string &help_message) |
std::vector< canvas > & | get_canvases () |
canvas & | get_canvas (const unsigned index) |
virtual void | set_text_alignment (const PangoAlignment text_alignment) |
PangoAlignment | get_text_alignment () const |
void | set_text_ellipse_mode (const PangoEllipsizeMode ellipse_mode) |
PangoEllipsizeMode | get_text_ellipse_mode () const |
Get the text's ellipsize mode. More... | |
void | set_text_maximum_width (int max_width) |
Set how wide the text can become. More... | |
virtual const std::string & | get_control_type () const =0 |
Returns the type of this styled_widget. More... | |
![]() | |
widget (const widget &)=delete | |
widget & | operator= (const widget &)=delete |
widget () | |
widget (const builder_widget &builder) | |
Constructor. More... | |
virtual | ~widget () override |
void | set_id (const std::string &id) |
const std::string & | id () const |
window * | get_window () |
Get the parent window. More... | |
const window * | get_window () const |
The constant version of get_window. More... | |
grid * | get_parent_grid () |
Get the parent grid. More... | |
const grid * | get_parent_grid () const |
void | set_parent (widget *parent) |
widget * | parent () |
virtual void | demand_reduce_width (const unsigned maximum_width) |
Tries to reduce the width of a widget. More... | |
virtual void | demand_reduce_height (const unsigned maximum_height) |
Tries to reduce the height of a widget. More... | |
point | get_best_size () const |
Gets the best size for the widget. More... | |
virtual bool | can_mouse_focus () const |
Whether the mouse move/click event go 'through' this widget. More... | |
virtual bool | can_wrap () const |
Can the widget wrap. More... | |
virtual void | set_origin (const point &origin) |
Sets the origin of the widget. More... | |
virtual void | set_size (const point &size) |
Sets the size of the widget. More... | |
virtual void | move (const int x_offset, const int y_offset) |
Moves a widget. More... | |
virtual void | set_horizontal_alignment (const std::string &alignment) |
Sets the horizontal alignment of the widget within its parent grid. More... | |
virtual void | set_vertical_alignment (const std::string &alignment) |
Sets the horizontal alignment of the widget within its parent grid. More... | |
virtual void | layout_children () |
Allows a widget to update its children. More... | |
point | get_origin () const |
Returns the screen origin of the widget. More... | |
point | get_size () const |
Returns the size of the widget. More... | |
rect | get_rectangle () const |
Gets the bounding rectangle of the widget on the screen. More... | |
int | get_x () const |
int | get_y () const |
unsigned | get_width () const |
unsigned | get_height () const |
void | set_linked_group (const std::string &linked_group) |
std::string | get_linked_group () const |
SDL_Rect | calculate_blitting_rectangle () const |
Calculates the blitting rectangle of the widget. More... | |
SDL_Rect | calculate_clipping_rectangle () const |
Calculates the clipping rectangle of the widget. More... | |
bool | draw_background () |
Draws the background of a widget. More... | |
void | draw_children () |
Draws the children of a widget. More... | |
bool | draw_foreground () |
Draws the foreground of the widget. More... | |
SDL_Rect | get_dirty_rectangle () const |
Gets the dirty rectangle of the widget. More... | |
virtual void | set_visible_rectangle (const SDL_Rect &rectangle) |
Sets the visible rectangle for a widget. More... | |
void | queue_redraw () |
Indicates that this widget should be redrawn. More... | |
void | queue_redraw (const rect ®ion) |
Indicate that specific region of the screen should be redrawn. More... | |
void | set_visible (const visibility visible) |
visibility | get_visible () const |
void | set_visible (bool visible) |
Sets widget to visible if visible is true, else invisible. More... | |
redraw_action | get_drawing_action () const |
void | set_debug_border_mode (const debug_border debug_border_mode) |
void | set_debug_border_color (const color_t debug_border_color) |
virtual bool | has_widget (const widget &widget) const |
Does the widget contain the widget. More... | |
template<class T > | |
T * | find_widget (const std::string_view id, const bool must_be_active, const bool must_exist) |
Gets a widget with the wanted id. More... | |
template<class T > | |
const T * | find_widget (const std::string_view id, const bool must_be_active, const bool must_exist) const |
template<class T > | |
T & | find_widget (const std::string_view id, const bool must_be_active=false) |
Gets a widget with the wanted id. More... | |
template<class T > | |
const T & | find_widget (const std::string_view id, const bool must_be_active=false) const |
![]() | |
event_executor () | |
virtual | ~event_executor () |
void | set_wants_mouse_hover (const bool hover=true) |
bool | wants_mouse_hover () const |
void | set_wants_mouse_left_double_click (const bool click=true) |
bool | wants_mouse_left_double_click () const |
void | set_wants_mouse_middle_double_click (const bool click=true) |
bool | wants_mouse_middle_double_click () const |
event_executor & | set_wants_mouse_right_double_click (const bool click=true) |
bool | wants_mouse_right_double_click () const |
![]() | |
dispatcher () | |
virtual | ~dispatcher () |
void | connect () |
Connects the dispatcher to the event handler. More... | |
void | disconnect () |
Disconnects the dispatcher from the event handler. More... | |
bool | is_connected () const |
Return whether the dispatcher is currently connected. More... | |
bool | has_event (const ui_event event, const event_queue_type event_type) |
bool | fire (const ui_event event, widget &target) |
Fires an event which has no extra parameters. More... | |
bool | fire (const ui_event event, widget &target, const point &coordinate) |
Fires an event which takes a coordinate parameter. More... | |
bool | fire (const ui_event event, widget &target, const SDL_Keycode key, const SDL_Keymod modifier, const std::string &unicode) |
Fires an event which takes keyboard parameters. More... | |
bool | fire (const ui_event event, widget &target, const point &pos, const point &distance) |
Fires an event which takes touch-motion parameters. More... | |
bool | fire (const ui_event event, widget &target, const point ¢er, float dTheta, float dDist, uint8_t numFingers) |
Fires an event which takes touch-gesture parameters. More... | |
bool | fire (const ui_event event, widget &target, void *) |
Fires an event which takes notification parameters. More... | |
bool | fire (const ui_event event, widget &target, const message &msg) |
Fires an event which takes message parameters. More... | |
bool | fire (const ui_event event, widget &target, const SDL_Event &sdlevent) |
Fires an event that's a raw SDL event. More... | |
bool | fire (const ui_event event, widget &target, const std::string &text, int32_t start, int32_t len) |
Fires an event which takes text input parameters. More... | |
template<ui_event E, typename F > | |
void | connect_signal (const F &func, const queue_position position=back_child) |
Adds a callback to the appropriate queue based on event type. More... | |
template<ui_event E, typename F > | |
void | disconnect_signal (const F &func, const queue_position position=back_child) |
Removes a callback from the appropriate queue based on event type. More... | |
void | capture_mouse () |
Captures the mouse. More... | |
void | release_mouse () |
Releases the mouse capture. More... | |
void | set_mouse_behavior (const mouse_behavior mouse_behavior) |
mouse_behavior | get_mouse_behavior () const |
void | set_want_keyboard_input (const bool want_keyboard_input) |
bool | get_want_keyboard_input () const |
void | register_hotkey (const hotkey::HOTKEY_COMMAND id, const hotkey_function &function) |
Registers a hotkey. More... | |
bool | execute_hotkey (const hotkey::HOTKEY_COMMAND id) |
Executes a hotkey. More... | |
![]() | |
enable_lua_ptr (widget *tp) | |
enable_lua_ptr (enable_lua_ptr &&o) | |
enable_lua_ptr & | operator= (enable_lua_ptr &&o) |
Protected Member Functions | |
size_t | get_composition_length () const |
Get length of composition text by IME. More... | |
virtual void | goto_end_of_line (const bool select=false)=0 |
Moves the cursor to the end of the line. More... | |
virtual void | goto_end_of_data (const bool select=false) |
Moves the cursor to the end of all text. More... | |
virtual void | goto_start_of_line (const bool select=false)=0 |
Moves the cursor to the beginning of the line. More... | |
virtual void | goto_start_of_data (const bool select=false) |
Moves the cursor to the beginning of the data. More... | |
void | select_all () |
Selects all text. More... | |
virtual void | set_cursor (const std::size_t offset, const bool select) |
Moves the cursor at the wanted position. More... | |
virtual void | insert_char (const std::string &unicode) |
Inserts a character at the cursor. More... | |
virtual void | delete_char (const bool before_cursor)=0 |
Deletes the character. More... | |
virtual void | delete_selection ()=0 |
Deletes the current selection. More... | |
virtual void | copy_selection () |
Copies the current selection. More... | |
virtual void | paste_selection () |
Pastes the current selection. More... | |
point | get_cursor_position (const unsigned column, const unsigned line=0) const |
point | get_column_line (const point &position) const |
font::family_class | get_font_family () |
void | set_font_family (font::family_class fclass) |
void | set_font_size (const unsigned font_size) |
void | set_font_style (const font::pango_text::FONT_STYLE font_style) |
void | set_maximum_width (const int width) |
void | set_maximum_height (const int height, const bool multiline) |
void | set_ellipse_mode (const PangoEllipsizeMode ellipse_mode) |
std::size_t | get_selection_start () const |
void | set_selection_start (const std::size_t selection_start) |
std::size_t | get_selection_length () const |
void | set_selection_length (const int selection_length) |
std::size_t | get_composition_start () const |
virtual void | handle_key_left_arrow (SDL_Keymod modifier, bool &handled) |
Left arrow key pressed. More... | |
virtual void | handle_key_right_arrow (SDL_Keymod modifier, bool &handled) |
Right arrow key pressed. More... | |
virtual void | handle_commit (bool &handled, const std::string &unicode) |
virtual void | handle_editing (bool &handled, const std::string &unicode, int32_t start, int32_t length) |
SDL_TEXTEDITING handler. More... | |
![]() | |
virtual point | calculate_best_size () const override |
See widget::calculate_best_size. More... | |
resolution_definition_ptr | get_config () |
resolution_definition_const_ptr | get_config () const |
template<typename T > | |
std::shared_ptr< const typename T::resolution > | cast_config_to () const |
Casts the current resolution definition config to the respective type of a derived widget. More... | |
void | set_config (resolution_definition_ptr config) |
virtual void | update_canvas () |
Updates the canvas(ses). More... | |
unsigned int | get_text_font_size () const |
Resolves and returns the text_font_size. More... | |
int | get_text_maximum_width () const |
Returns the maximum width available for the text. More... | |
int | get_text_maximum_height () const |
Returns the maximum height available for the text. More... | |
virtual bool | impl_draw_background () override |
See widget::impl_draw_background. More... | |
virtual bool | impl_draw_foreground () override |
See widget::impl_draw_foreground. More... | |
std::string | get_label_token (const point &position, const char *delimiters=" \n\r\t") const |
Exposes font::pango_text::get_token, for the text label of this styled_widget. More... | |
std::string | get_label_link (const point &position) const |
![]() | |
void | set_layout_size (const point &size) |
const point & | layout_size () const |
void | clear_layout_size () |
Throws away layout_size_. More... | |
Private Member Functions | |
void | set_state (const state_t state) |
virtual void | toggle_cursor_timer (bool enable) |
virtual void | cursor_timer_callback () |
Implements blinking cursor functionality. More... | |
virtual void | reset_cursor_state () |
void | update_mouse_cursor (bool enable) |
virtual void | handle_key_up_arrow (SDL_Keymod modifier, bool &handled)=0 |
Every key can have several behaviors. More... | |
virtual void | handle_key_down_arrow (SDL_Keymod modifier, bool &handled)=0 |
Down arrow key pressed. More... | |
virtual void | handle_key_clear_line (SDL_Keymod modifier, bool &handled)=0 |
Clears the current line. More... | |
virtual void | handle_key_home (SDL_Keymod modifier, bool &handled) |
Home key pressed. More... | |
virtual void | handle_key_end (SDL_Keymod modifier, bool &handled) |
End key pressed. More... | |
virtual void | handle_key_backspace (SDL_Keymod modifier, bool &handled) |
Backspace key pressed. More... | |
virtual void | handle_key_delete (SDL_Keymod modifier, bool &handled) |
Delete key pressed. More... | |
virtual void | handle_key_page_up (SDL_Keymod, bool &) |
Page up key. More... | |
virtual void | handle_key_page_down (SDL_Keymod, bool &) |
Page down key. More... | |
virtual void | handle_key_tab (SDL_Keymod, bool &) |
Tab key. More... | |
virtual void | handle_key_enter (SDL_Keymod, bool &) |
Enter key. More... | |
void | signal_handler_middle_button_click (const event::ui_event event, bool &handled) |
void | signal_handler_sdl_key_down (const event::ui_event event, bool &handled, const SDL_Keycode key, SDL_Keymod modifier) |
void | signal_handler_sdl_text_input (const event::ui_event event, bool &handled, const std::string &unicode, int32_t start, int32_t len) |
void | signal_handler_receive_keyboard_focus (const event::ui_event event) |
void | signal_handler_lose_keyboard_focus (const event::ui_event event) |
void | signal_handler_mouse_enter (const event::ui_event event, bool &handled) |
void | signal_handler_mouse_leave (const event::ui_event event, bool &handled) |
Private Attributes | |
state_t | state_ |
Current state of the widget. More... | |
font::pango_text | text_ |
The text entered in the widget. More... | |
font::family_class | font_family_ |
font family More... | |
std::string | text_cached_ |
Cached version of the text without any pending IME modifications. More... | |
std::size_t | selection_start_ |
Start of the selected text. More... | |
int | selection_length_ |
Length of the selected text. More... | |
bool | editable_ |
If this text_box_base is editable. More... | |
bool | ime_composing_ |
int | ime_start_point_ |
std::size_t | cursor_timer_ |
unsigned short | cursor_alpha_ |
std::chrono::milliseconds | cursor_blink_rate_ |
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_box_base.hpp.
Note the order of the states must be the same as defined in settings.hpp.
Enumerator | |
---|---|
ENABLED | |
DISABLED | |
FOCUSED | |
HOVERED |
Definition at line 375 of file text_box_base.hpp.
gui2::text_box_base::text_box_base | ( | const implementation::builder_styled_widget & | builder, |
const std::string & | control_type | ||
) |
Definition at line 40 of file text_box_base.cpp.
References gui2::implementation::builder_styled_widget::definition, gui2::get_control(), handle_commit(), handle_editing(), set_font_family(), signal_handler_lose_keyboard_focus(), signal_handler_middle_button_click(), signal_handler_mouse_enter(), signal_handler_mouse_leave(), signal_handler_receive_keyboard_focus(), signal_handler_sdl_key_down(), and toggle_cursor_timer().
gui2::text_box_base::~text_box_base | ( | ) |
Definition at line 81 of file text_box_base.cpp.
References toggle_cursor_timer(), and update_mouse_cursor().
|
protectedvirtual |
Copies the current selection.
Definition at line 206 of file text_box_base.cpp.
References desktop::clipboard::copy_to_clipboard(), gui2::styled_widget::get_use_markup(), utf8::index(), plain_text(), selection_length_, selection_start_, editor::start(), font::pango_text::text(), and text_.
Referenced by signal_handler_sdl_key_down().
|
privatevirtual |
Implements blinking cursor functionality.
Definition at line 318 of file text_box_base.cpp.
References cursor_alpha_, DISABLED, ENABLED, gui2::event::get_all_dispatchers(), gui2::styled_widget::get_canvases(), gui2::widget::get_window(), gui2::widget::queue_redraw(), and state_.
Referenced by toggle_cursor_timer().
|
protectedpure 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::text_box, gui2::multiline_text, and gui2::combobox.
Referenced by handle_key_backspace(), and handle_key_delete().
|
protectedpure virtual |
Deletes the current selection.
Implemented in gui2::text_box, gui2::password_box, gui2::multiline_text, and gui2::combobox.
Referenced by handle_editing(), handle_key_backspace(), handle_key_delete(), insert_char(), paste_selection(), and signal_handler_sdl_key_down().
|
overridevirtual |
See styled_widget::get_active.
Implements gui2::styled_widget.
Definition at line 94 of file text_box_base.cpp.
References DISABLED, and state_.
Referenced by set_active().
Definition at line 305 of file text_box_base.hpp.
References font::pango_text::get_column_line(), and text_.
Referenced by gui2::combobox::handle_mouse_selection(), gui2::multiline_text::handle_mouse_selection(), and gui2::text_box::handle_mouse_selection().
|
protected |
Get length of composition text by IME.
Definition at line 183 of file text_box_base.cpp.
References is_composing(), utf8::size(), font::pango_text::text(), text_, and text_cached_.
Referenced by handle_commit(), handle_key_backspace(), handle_key_delete(), gui2::combobox::update_canvas(), gui2::multiline_text::update_canvas(), and gui2::text_box::update_canvas().
|
inlineprotected |
Definition at line 360 of file text_box_base.hpp.
References ime_start_point_.
Referenced by gui2::combobox::update_canvas(), gui2::multiline_text::update_canvas(), and gui2::text_box::update_canvas().
|
inline |
Wrapper function, return the cursor position given the byte index.
See font::pango_text::get_cursor_pos_from_index.
Definition at line 107 of file text_box_base.hpp.
References font::pango_text::get_cursor_pos_from_index(), and text_.
Referenced by gui2::multiline_text::update_canvas().
|
inlineprotected |
Definition at line 299 of file text_box_base.hpp.
References font::pango_text::get_cursor_position(), draw::line(), and text_.
Referenced by gui2::multiline_text::get_cursor_pos(), gui2::multiline_text::get_line_end_pos(), gui2::multiline_text::get_text_end_pos(), handle_editing(), gui2::combobox::update_canvas(), gui2::multiline_text::update_canvas(), and gui2::text_box::update_canvas().
|
inlineprotected |
Definition at line 310 of file text_box_base.hpp.
References font_family_.
Referenced by gui2::multiline_text::update_offsets().
|
inline |
Wrapper function, returns length of the text in pango column offsets.
See font::pango_text::get_length.
Definition at line 68 of file text_box_base.hpp.
References font::pango_text::get_length(), and text_.
Referenced by gui2::multiline_text::get_text_end_pos(), gui2::multiline_text::handle_key_down_arrow(), gui2::multiline_text::handle_key_up_arrow(), gui2::combobox::update_canvas(), and gui2::text_box::update_canvas().
|
inline |
Wrapper function, returns the line corresponding to index.
See font::pango_text::get_line.
Definition at line 87 of file text_box_base.hpp.
References font::pango_text::get_line(), utf8::index(), and text_.
Referenced by gui2::multiline_text::get_line_end_offset(), and gui2::multiline_text::get_line_start_offset().
|
inline |
Wrapper function, return the line number given the byte index.
See font::pango_text::get_line_num_from_offset.
Definition at line 97 of file text_box_base.hpp.
References font::pango_text::get_line_num_from_offset(), and text_.
Referenced by gui2::multiline_text::get_line_end_pos(), gui2::multiline_text::goto_end_of_line(), gui2::multiline_text::goto_start_of_line(), gui2::multiline_text::handle_key_down_arrow(), and gui2::multiline_text::handle_key_up_arrow().
|
inline |
Wrapper function, returns a vector with the lines.
See font::pango_text::get_lines.
Definition at line 77 of file text_box_base.hpp.
References font::pango_text::get_lines(), and text_.
|
inline |
Wrapper function, return number of lines.
See font::pango_text::get_lines_count.
Definition at line 116 of file text_box_base.hpp.
References font::pango_text::get_lines_count(), and text_.
Referenced by gui2::multiline_text::handle_key_down_arrow(), and gui2::multiline_text::handle_mouse_selection().
|
inlineprotected |
Definition at line 354 of file text_box_base.hpp.
References selection_length_.
Referenced by gui2::combobox::delete_selection(), gui2::multiline_text::delete_selection(), gui2::password_box::delete_selection(), gui2::text_box::delete_selection(), gui2::multiline_text::handle_key_down_arrow(), gui2::multiline_text::handle_key_up_arrow(), gui2::password_box::insert_char(), gui2::combobox::update_canvas(), gui2::multiline_text::update_canvas(), and gui2::text_box::update_canvas().
|
inlineprotected |
Definition at line 348 of file text_box_base.hpp.
References selection_start_.
Referenced by gui2::combobox::delete_char(), gui2::multiline_text::delete_char(), gui2::text_box::delete_char(), gui2::combobox::delete_selection(), gui2::multiline_text::delete_selection(), gui2::password_box::delete_selection(), gui2::text_box::delete_selection(), gui2::multiline_text::get_cursor_pos(), gui2::multiline_text::get_line_end_pos(), gui2::multiline_text::goto_end_of_line(), gui2::multiline_text::goto_start_of_line(), gui2::multiline_text::handle_key_down_arrow(), gui2::multiline_text::handle_key_up_arrow(), gui2::password_box::insert_char(), gui2::combobox::update_canvas(), gui2::multiline_text::update_canvas(), and gui2::text_box::update_canvas().
|
overridevirtual |
|
inline |
Definition at line 137 of file text_box_base.hpp.
References font::pango_text::text(), and text_.
Referenced by gui2::chatbox::chat_input_keypress_callback(), gui2::dialogs::file_dialog::check_filename(), gui2::combobox::delete_selection(), gui2::multiline_text::delete_selection(), gui2::text_box::delete_selection(), gui2::dialogs::lobby_player_info::do_kick_ban(), gui2::dialogs::lobby_player_info::do_stopgame(), gui2::dialogs::mp_lobby::game_filter_init(), gui2::dialogs::addon_manager::get_name_filter_visibility(), gui2::spinner::get_value(), gui2::multiline_text::history_down(), gui2::text_box::history_down(), gui2::multiline_text::history_up(), gui2::text_box::history_up(), gui2::dialogs::preferences_dialog::hotkey_filter_callback(), gui2::dialogs::mp_match_history::new_search(), gui2::dialogs::mp_connect::on_server_add(), gui2::dialogs::edit_text::on_text_change(), gui2::dialogs::mp_method_selection::post_show(), gui2::dialogs::mp_report::post_show(), gui2::dialogs::file_dialog::process_textbox_submit(), gui2::dialogs::screenshot_notification::save_screenshot(), gui2::multiline_text::save_to_history(), gui2::text_box::save_to_history(), gui2::dialogs::editor_edit_unit::save_unit_type(), gui2::dialogs::mp_connect::select_first_match(), gui2::combobox::update_canvas(), gui2::multiline_text::update_canvas(), gui2::text_box::update_canvas(), and gui2::multiline_text::update_layout().
|
inlineprotectedvirtual |
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? |
Reimplemented in gui2::multiline_text.
Definition at line 229 of file text_box_base.hpp.
References font::pango_text::get_length(), set_cursor(), and text_.
Referenced by gui2::multiline_text::goto_end_of_data(), gui2::combobox::goto_end_of_line(), gui2::text_box::goto_end_of_line(), handle_key_end(), and select_all().
|
protectedpure 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::text_box, gui2::multiline_text, and gui2::combobox.
Referenced by handle_key_end().
|
inlineprotectedvirtual |
Moves the cursor to the beginning of the data.
select | Select the text from the original cursor position till the beginning of the data? |
Reimplemented in gui2::multiline_text.
Definition at line 248 of file text_box_base.hpp.
References set_cursor().
Referenced by gui2::multiline_text::goto_start_of_data(), gui2::combobox::goto_start_of_line(), gui2::text_box::goto_start_of_line(), and handle_key_home().
|
protectedpure 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::text_box, gui2::multiline_text, and gui2::combobox.
Referenced by handle_key_home().
|
protectedvirtual |
Definition at line 450 of file text_box_base.cpp.
References DBG_GUI_E, gui2::event::dispatcher::fire(), get_composition_length(), ime_composing_, ime_start_point_, insert_char(), is_composing(), LOG_SCOPE_HEADER, gui2::event::NOTIFY_MODIFIED, and set_selection().
Referenced by text_box_base().
|
protectedvirtual |
SDL_TEXTEDITING handler.
See example at https://wiki.libsdl.org/Tutorials/TextInput
Definition at line 468 of file text_box_base.cpp.
References delete_selection(), get_cursor_position(), font::pango_text::get_length(), gui2::widget::get_rectangle(), gui2::styled_widget::get_use_markup(), ime_composing_, ime_start_point_, utf8::insert(), font::pango_text::insert_text(), is_composing(), gui2::widget::queue_redraw(), selection_start_, set_cursor(), font::pango_text::set_text(), utf8::size(), editor::start(), font::pango_text::text(), text_, text_cached_, and gui2::styled_widget::update_canvas().
Referenced by text_box_base().
|
privatevirtual |
Backspace key pressed.
Unmodified Deletes the character before the cursor, ignored if at the beginning of the data. Control Ignored. Shift Ignored. Alt Ignored.
Definition at line 414 of file text_box_base.cpp.
References DBG_GUI_E, delete_char(), delete_selection(), gui2::event::dispatcher::fire(), get_composition_length(), ime_composing_, is_composing(), LOG_SCOPE_HEADER, gui2::event::NOTIFY_MODIFIED, selection_length_, and selection_start_.
Referenced by signal_handler_sdl_key_down().
|
privatepure virtual |
Clears the current line.
Unmodified Clears the current line. Control Ignored. Shift Ignored. Alt Ignored.
Implemented in gui2::text_box, gui2::multiline_text, and gui2::combobox.
Referenced by signal_handler_sdl_key_down().
|
privatevirtual |
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.
Definition at line 432 of file text_box_base.cpp.
References DBG_GUI_E, delete_char(), delete_selection(), gui2::event::dispatcher::fire(), get_composition_length(), font::pango_text::get_length(), ime_composing_, is_composing(), LOG_SCOPE_HEADER, gui2::event::NOTIFY_MODIFIED, selection_length_, selection_start_, and text_.
Referenced by signal_handler_sdl_key_down().
|
privatepure virtual |
Down arrow key pressed.
The behavior is implementation defined.
Implemented in gui2::multiline_text, gui2::combobox, and gui2::text_box.
Referenced by signal_handler_sdl_key_down().
|
privatevirtual |
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 402 of file text_box_base.cpp.
References DBG_GUI_E, goto_end_of_data(), goto_end_of_line(), and LOG_SCOPE_HEADER.
Referenced by signal_handler_sdl_key_down().
|
inlineprivatevirtual |
Enter key.
Unmodified Handled by Window. Control Implementation defined. Shift Implementation defined. Alt Implementation defined.
Reimplemented in gui2::multiline_text.
Definition at line 600 of file text_box_base.hpp.
Referenced by signal_handler_sdl_key_down().
|
privatevirtual |
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 390 of file text_box_base.cpp.
References DBG_GUI_E, goto_start_of_data(), goto_start_of_line(), and LOG_SCOPE_HEADER.
Referenced by signal_handler_sdl_key_down().
|
protectedvirtual |
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.
Reimplemented in gui2::multiline_text.
Definition at line 366 of file text_box_base.cpp.
References DBG_GUI_E, LOG_SCOPE_HEADER, selection_length_, selection_start_, and set_cursor().
Referenced by gui2::multiline_text::handle_key_left_arrow(), and signal_handler_sdl_key_down().
|
inlineprivatevirtual |
Page down key.
Unmodified Unhandled. Control Ignored. Shift Ignored. Alt Ignored.
Definition at line 576 of file text_box_base.hpp.
Referenced by signal_handler_sdl_key_down().
|
inlineprivatevirtual |
Page up key.
Unmodified Unhandled. Control Ignored. Shift Ignored. Alt Ignored.
Definition at line 564 of file text_box_base.hpp.
Referenced by signal_handler_sdl_key_down().
|
protectedvirtual |
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.
Reimplemented in gui2::multiline_text.
Definition at line 378 of file text_box_base.cpp.
References DBG_GUI_E, font::pango_text::get_length(), gui2::styled_widget::get_use_markup(), LOG_SCOPE_HEADER, plain_text(), selection_length_, selection_start_, set_cursor(), utf8::size(), and text_.
Referenced by gui2::multiline_text::handle_key_right_arrow(), and signal_handler_sdl_key_down().
|
inlineprivatevirtual |
Tab key.
Unmodified Implementation defined. Control Implementation defined. Shift Implementation defined. Alt Implementation defined.
Reimplemented in gui2::text_box, and gui2::multiline_text.
Definition at line 588 of file text_box_base.hpp.
Referenced by signal_handler_sdl_key_down().
|
privatepure virtual |
Every key can have several behaviors.
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 behavior is implementation defined.
Implemented in gui2::multiline_text, gui2::combobox, and gui2::text_box.
Referenced by signal_handler_sdl_key_down().
|
protectedvirtual |
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::password_box, and gui2::multiline_text.
Definition at line 161 of file text_box_base.cpp.
References delete_selection(), editable_, gui2::styled_widget::get_use_markup(), font::pango_text::insert_text(), plain_text(), gui2::widget::queue_redraw(), selection_start_, set_cursor(), utf8::size(), text_, and gui2::styled_widget::update_canvas().
Referenced by handle_commit(), gui2::multiline_text::insert_char(), and gui2::password_box::insert_char().
void gui2::text_box_base::interrupt_composition | ( | ) |
Definition at line 198 of file text_box_base.cpp.
References ime_composing_.
Referenced by signal_handler_sdl_key_down().
|
inline |
Definition at line 366 of file text_box_base.hpp.
References ime_composing_.
Referenced by gui2::chatbox::chat_input_keypress_callback(), get_composition_length(), handle_commit(), handle_editing(), handle_key_backspace(), handle_key_delete(), and signal_handler_sdl_key_down().
|
inline |
Check whether text can be edited or not.
Definition at line 204 of file text_box_base.hpp.
References editable_.
Referenced by gui2::multiline_text::delete_char(), gui2::multiline_text::delete_selection(), gui2::multiline_text::handle_key_enter(), gui2::multiline_text::handle_key_tab(), signal_handler_sdl_key_down(), gui2::multiline_text::update_canvas(), and gui2::text_box::update_canvas().
|
inline |
Registers a NOTIFY_MODIFIED handler.
For convenience, the handler is invoked with a text_box_base reference as its first (and only) argument, rather than the usual widget reference.
Definition at line 163 of file text_box_base.hpp.
Referenced by gui2::dialogs::chat_log::view::bind(), gui2::dialogs::mp_options_helper::display_custom_options(), and gui2::dialogs::mp_report::pre_show().
|
protectedvirtual |
Pastes the current selection.
Reimplemented in gui2::password_box, and gui2::multiline_text.
Definition at line 226 of file text_box_base.cpp.
References desktop::clipboard::copy_from_clipboard(), delete_selection(), editable_, gui2::event::dispatcher::fire(), gui2::styled_widget::get_use_markup(), font::pango_text::insert_text(), gui2::event::NOTIFY_MODIFIED, gui2::widget::queue_redraw(), selection_start_, text(), text_, and gui2::styled_widget::update_canvas().
Referenced by gui2::multiline_text::paste_selection(), signal_handler_middle_button_click(), and signal_handler_sdl_key_down().
|
inline |
Definition at line 147 of file text_box_base.hpp.
References utf8::size(), and text().
Referenced by copy_selection(), handle_key_right_arrow(), insert_char(), and gui2::multiline_text::update_canvas().
|
privatevirtual |
Definition at line 350 of file text_box_base.cpp.
References cursor_alpha_, cursor_blink_rate_, gui2::styled_widget::get_canvases(), and toggle_cursor_timer().
Referenced by set_cursor().
|
inlineprotected |
Selects all text.
Definition at line 254 of file text_box_base.hpp.
References goto_end_of_data(), and selection_start_.
Referenced by gui2::combobox::signal_handler_left_button_double_click(), gui2::multiline_text::signal_handler_left_button_double_click(), gui2::text_box::signal_handler_left_button_double_click(), and signal_handler_sdl_key_down().
|
overridevirtual |
See styled_widget::set_active.
Implements gui2::styled_widget.
Definition at line 87 of file text_box_base.cpp.
References DISABLED, ENABLED, get_active(), and set_state().
Referenced by gui2::dialogs::game_cache_options::pre_show(), and gui2::dialogs::screenshot_notification::save_screenshot().
|
protectedvirtual |
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? |
Reimplemented in gui2::multiline_text.
Definition at line 146 of file text_box_base.cpp.
References font::pango_text::get_length(), gui2::widget::queue_redraw(), reset_cursor_state(), selection_length_, selection_start_, text_, and gui2::styled_widget::update_canvas().
Referenced by gui2::combobox::delete_char(), gui2::text_box::delete_char(), gui2::combobox::delete_selection(), gui2::password_box::delete_selection(), gui2::text_box::delete_selection(), goto_end_of_data(), goto_start_of_data(), handle_editing(), handle_key_left_arrow(), handle_key_right_arrow(), gui2::combobox::handle_mouse_selection(), gui2::text_box::handle_mouse_selection(), insert_char(), gui2::multiline_text::set_cursor(), and set_selection().
|
inline |
Set or unset whether text can be edited or not Text can only be copied and scrolled through when editable is false.
Definition at line 195 of file text_box_base.hpp.
References editable_, and gui2::styled_widget::update_canvas().
Referenced by gui2::scroll_text::finalize_subclass().
|
inlineprotected |
Definition at line 341 of file text_box_base.hpp.
References font::pango_text::set_ellipse_mode(), and text_.
Referenced by gui2::combobox::update_canvas(), and gui2::text_box::update_canvas().
|
inlineprotected |
Definition at line 315 of file text_box_base.hpp.
References font_family_, font::pango_text::set_family_class(), and text_.
Referenced by text_box_base().
|
inlineprotected |
Definition at line 321 of file text_box_base.hpp.
References font::pango_text::set_font_size(), and text_.
Referenced by gui2::text_box::text_box().
|
inlineprotected |
Definition at line 326 of file text_box_base.hpp.
References font::pango_text::set_font_style(), and text_.
Referenced by gui2::text_box::text_box().
void gui2::text_box_base::set_highlight_area | ( | const unsigned | start_offset, |
const unsigned | end_offset, | ||
const color_t & | color | ||
) |
Wrapper function, sets the area between column start and end offset to be highlighted in a specific color.
See font::add_attribute_bg_color.
Definition at line 126 of file text_box_base.cpp.
References font::add_attribute_bg_color(), font::pango_text::apply_attributes(), and text_.
|
inlineprotected |
Definition at line 336 of file text_box_base.hpp.
References font::pango_text::set_maximum_height(), and text_.
Referenced by gui2::combobox::place(), gui2::multiline_text::place(), and gui2::text_box::place().
void gui2::text_box_base::set_maximum_length | ( | const std::size_t | maximum_length | ) |
Definition at line 104 of file text_box_base.cpp.
References font::pango_text::get_length(), gui2::widget::queue_redraw(), selection_length_, selection_start_, font::pango_text::set_maximum_length(), text_, and gui2::styled_widget::update_canvas().
Referenced by gui2::combobox::place(), gui2::multiline_text::place(), gui2::text_box::place(), gui2::dialogs::mp_method_selection::pre_show(), gui2::dialogs::wml_message_base::pre_show(), gui2::combobox::update_canvas(), gui2::multiline_text::update_canvas(), and gui2::text_box::update_canvas().
|
inlineprotected |
Definition at line 331 of file text_box_base.hpp.
References font::pango_text::set_maximum_width(), and text_.
Referenced by gui2::combobox::place(), gui2::multiline_text::place(), and gui2::text_box::place().
void gui2::text_box_base::set_selection | ( | std::size_t | start, |
int | length | ||
) |
Sets or clears the text selection.
Setting the selection range will re-position the cursor depending on the selection direction, specified by the length's sign. Selecting beyond the start or end of the text is safe; the final selection will be limited accordingly.
start | Start offset, in characters. |
length | Selection length, in characters. If zero, the current selection is canceled. If negative, the selection extends towards the start of the text and the cursor will be re-positioned in that direction as well; otherwise the selection and cursor extend towards the end. |
Definition at line 263 of file text_box_base.cpp.
References font::pango_text::get_length(), set_cursor(), set_selection_length(), set_selection_start(), editor::start(), text_, and gui2::styled_widget::update_canvas().
Referenced by handle_commit(), and gui2::dialogs::screenshot_notification::pre_show().
|
protected |
Definition at line 255 of file text_box_base.cpp.
References gui2::widget::queue_redraw(), and selection_length_.
Referenced by gui2::combobox::delete_char(), gui2::multiline_text::delete_char(), gui2::text_box::delete_char(), and set_selection().
|
protected |
Definition at line 247 of file text_box_base.cpp.
References gui2::widget::queue_redraw(), and selection_start_.
Referenced by set_selection().
|
private |
Definition at line 295 of file text_box_base.cpp.
References gui2::widget::queue_redraw(), and state_.
Referenced by set_active(), signal_handler_lose_keyboard_focus(), signal_handler_mouse_enter(), signal_handler_mouse_leave(), and signal_handler_receive_keyboard_focus().
|
virtual |
The set_value is virtual for the password_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::password_box.
Definition at line 133 of file text_box_base.cpp.
References font::pango_text::get_length(), gui2::styled_widget::get_use_markup(), gui2::widget::queue_redraw(), selection_length_, selection_start_, font::pango_text::set_text(), font::pango_text::text(), text(), text_, and gui2::styled_widget::update_canvas().
Referenced by gui2::chatbox::chat_input_keypress_callback(), gui2::combobox::clear(), gui2::multiline_text::clear(), gui2::text_box::clear(), gui2::combobox::delete_selection(), gui2::multiline_text::delete_selection(), gui2::text_box::delete_selection(), gui2::dialogs::mp_options_helper::display_custom_options(), gui2::combobox::handle_key_clear_line(), gui2::multiline_text::handle_key_clear_line(), gui2::text_box::handle_key_clear_line(), gui2::multiline_text::history_down(), gui2::text_box::history_down(), gui2::multiline_text::history_up(), gui2::text_box::history_up(), gui2::dialogs::mp_login::load_password(), gui2::dialogs::preferences_dialog::on_friends_list_select(), gui2::dialogs::mp_connect::on_server_select(), gui2::dialogs::addon_auth::pre_show(), gui2::dialogs::editor_edit_pbl::pre_show(), gui2::dialogs::game_cache_options::pre_show(), gui2::dialogs::game_version::pre_show(), gui2::dialogs::mp_match_history::pre_show(), gui2::dialogs::mp_method_selection::pre_show(), gui2::dialogs::screenshot_notification::pre_show(), gui2::dialogs::wml_message_base::pre_show(), gui2::combobox::set_selected(), gui2::dialogs::editor_edit_unit::set_selected_from_string(), gui2::spinner::set_value(), gui2::password_box::set_value(), and gui2::combobox::set_values().
|
private |
Definition at line 689 of file text_box_base.cpp.
References DBG_GUI_E, ENABLED, LOG_HEADER, and set_state().
Referenced by text_box_base().
|
private |
Definition at line 517 of file text_box_base.cpp.
References DBG_GUI_E, LOG_HEADER, and paste_selection().
Referenced by text_box_base().
|
private |
Definition at line 696 of file text_box_base.cpp.
References DBG_GUI_E, FOCUSED, HOVERED, LOG_HEADER, set_state(), state_, and update_mouse_cursor().
Referenced by text_box_base().
|
private |
Definition at line 710 of file text_box_base.cpp.
References DBG_GUI_E, ENABLED, FOCUSED, LOG_HEADER, set_state(), state_, and update_mouse_cursor().
Referenced by text_box_base().
|
private |
Definition at line 682 of file text_box_base.cpp.
References DBG_GUI_E, FOCUSED, LOG_HEADER, and set_state().
Referenced by text_box_base().
|
private |
Definition at line 527 of file text_box_base.cpp.
References copy_selection(), DBG_GUI_E, delete_selection(), handle_key_backspace(), handle_key_clear_line(), handle_key_delete(), handle_key_down_arrow(), handle_key_end(), handle_key_enter(), handle_key_home(), handle_key_left_arrow(), handle_key_page_down(), handle_key_page_up(), handle_key_right_arrow(), handle_key_tab(), handle_key_up_arrow(), interrupt_composition(), is_composing(), is_editable(), LOG_HEADER, paste_selection(), and select_all().
Referenced by text_box_base().
|
private |
|
inline |
Definition at line 142 of file text_box_base.hpp.
References font::pango_text::text(), and text_.
Referenced by gui2::dialogs::preferences_dialog::add_friend_list_entry(), paste_selection(), gui2::password_box::paste_selection(), plain_text(), gui2::dialogs::screenshot_notification::pre_show(), gui2::dialogs::preferences_dialog::remove_friend_list_entry(), gui2::combobox::set_hint_data(), gui2::multiline_text::set_hint_data(), gui2::text_box::set_hint_data(), gui2::combobox::set_hint_text(), gui2::text_box::set_hint_text(), set_value(), and gui2::password_box::set_value().
|
privatevirtual |
Definition at line 303 of file text_box_base.cpp.
References gui2::add_timer(), cursor_blink_rate_, cursor_timer_, cursor_timer_callback(), and gui2::remove_timer().
Referenced by reset_cursor_state(), text_box_base(), and ~text_box_base().
|
private |
Definition at line 724 of file text_box_base.cpp.
References cursor::get(), cursor::IBEAM, cursor::NORMAL, and cursor::set().
Referenced by signal_handler_mouse_enter(), signal_handler_mouse_leave(), and ~text_box_base().
|
private |
Definition at line 432 of file text_box_base.hpp.
Referenced by cursor_timer_callback(), and reset_cursor_state().
|
private |
Definition at line 433 of file text_box_base.hpp.
Referenced by reset_cursor_state(), and toggle_cursor_timer().
|
private |
Definition at line 430 of file text_box_base.hpp.
Referenced by toggle_cursor_timer().
|
private |
If this text_box_base is editable.
Definition at line 424 of file text_box_base.hpp.
Referenced by insert_char(), is_editable(), paste_selection(), and set_editable().
|
private |
font family
Definition at line 406 of file text_box_base.hpp.
Referenced by get_font_family(), and set_font_family().
|
private |
Definition at line 427 of file text_box_base.hpp.
Referenced by handle_commit(), handle_editing(), handle_key_backspace(), handle_key_delete(), interrupt_composition(), and is_composing().
|
private |
Definition at line 428 of file text_box_base.hpp.
Referenced by get_composition_start(), handle_commit(), and handle_editing().
|
private |
Length of the selected text.
Definition at line 421 of file text_box_base.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().
|
private |
Start of the selected text.
Definition at line 412 of file text_box_base.hpp.
Referenced by copy_selection(), get_selection_start(), handle_editing(), 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().
|
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 400 of file text_box_base.hpp.
Referenced by cursor_timer_callback(), get_active(), get_state(), set_state(), signal_handler_mouse_enter(), and signal_handler_mouse_leave().
|
private |
The text entered in the widget.
Definition at line 403 of file text_box_base.hpp.
Referenced by copy_selection(), get_column_line(), get_composition_length(), get_cursor_pos_from_index(), get_cursor_position(), get_length(), get_line(), get_line_number(), get_lines(), get_lines_count(), get_value(), goto_end_of_data(), handle_editing(), handle_key_delete(), handle_key_right_arrow(), insert_char(), paste_selection(), set_cursor(), set_ellipse_mode(), set_font_family(), set_font_size(), set_font_style(), set_highlight_area(), set_maximum_height(), set_maximum_length(), set_maximum_width(), set_selection(), set_value(), and text().
|
private |
Cached version of the text without any pending IME modifications.
Definition at line 409 of file text_box_base.hpp.
Referenced by get_composition_length(), and handle_editing().