lxgui
|
A frame with an editable text box. More...
#include <gui_edit_box.hpp>
Public Types | |
using | base = frame |
using | child_list = std::list< utils::owner_ptr< frame > > |
Type of the frame child list (internal). | |
using | child_list_view = utils::view::adaptor< child_list, utils::view::smart_ptr_dereferencer, utils::view::non_null_filter > |
using | const_child_list_view = utils::view::adaptor< const child_list, utils::view::smart_ptr_dereferencer, utils::view::non_null_filter > |
using | region_list = std::list< utils::owner_ptr< layered_region > > |
Type of the region list (internal). | |
using | region_list_view = utils::view::adaptor< region_list, utils::view::smart_ptr_dereferencer, utils::view::non_null_filter > |
using | const_region_list_view = utils::view::adaptor< const region_list, utils::view::smart_ptr_dereferencer, utils::view::non_null_filter > |
Public Member Functions | |
edit_box (utils::control_block &block, manager &mgr, const frame_core_attributes &attr) | |
Constructor. | |
void | copy_from (const region &obj) override |
Copies a region's parameters into this edit_box (inheritance). | |
void | fire_script (const std::string &script_name, const event_data &data=event_data{}) override |
Calls a script. | |
bool | can_use_script (const std::string &script_name) const override |
Returns 'true' if this edit_box can use a script. | |
void | set_text (const utils::ustring &content) |
Sets the content of this edit_box. | |
const utils::ustring & | get_text () const |
Returns the content of this edit_box. | |
void | highlight_text (std::size_t start=0u, std::size_t end=std::numeric_limits< std::size_t >::max(), bool force_update=false) |
Selects a portion of the content. | |
void | unlight_text () |
Deselects the selected text, if any. | |
void | set_highlight_color (const color &c) |
Sets the color of the highlight quad. | |
void | insert_after_cursor (const utils::ustring &content) |
Inserts some text after the cursor. | |
std::size_t | get_cursor_position () const |
Returns the current position of the cursor. | |
void | set_cursor_position (std::size_t pos) |
Moves the cursor to a chosen position. | |
void | set_max_letters (std::size_t max_letters) |
Sets the maximum number of letters to allow in this edit_box. | |
std::size_t | get_max_letters () const |
Returns the maximum number of letters to allow in this edit_box. | |
std::size_t | get_letter_count () const |
Returns the number of letters in the content. | |
void | set_blink_time (double blink_time) |
Sets the carret's blink time. | |
double | get_blink_time () const |
Returns the carret's blink time. | |
void | set_numeric_only (bool numeric_only) |
Makes this edit_box allow numeric characters only. | |
void | set_positive_only (bool positive_only) |
Makes this edit_box allow positive numbers only. | |
void | set_integer_only (bool integer_only) |
Makes this edit_box allow integer numbers only. | |
bool | is_numeric_only () const |
Checks if this edit_box allows numeric characters only. | |
bool | is_positive_only () const |
Checks if this edit_box allows positive numbers only. | |
bool | is_integer_only () const |
Checks if this edit_box allows integer numbers only. | |
void | set_password_mode_enabled (bool enable) |
Enables or disables password mode. | |
void | enable_password_mode () |
Enables password mode. | |
void | disable_password_mode () |
Disables password mode. | |
bool | is_password_mode_enabled () const |
Checks if this edit_box is in password mode. | |
void | set_multi_line (bool multi_line) |
Allows this edit_box to have several lines in it. | |
bool | is_multi_line () const |
Checks if this edit_box can have several lines in it. | |
void | set_max_history_lines (std::size_t max_history_lines) |
Sets the maximum number of history lines this edit_box can keep. | |
std::size_t | get_max_history_lines () const |
Returns the maximum number of history lines this edit_box can keep. | |
void | add_history_line (const utils::ustring &history_line) |
Adds a new history line to the history line list. | |
const std::vector< utils::ustring > & | get_history_lines () const |
Returns the history line list. | |
void | clear_history_lines () |
Clears the history line list. | |
void | set_arrows_ignored (bool arrows_ignored) |
Sets whether keyboard arrows move the carret or not. | |
void | set_text_insets (const bounds2f &insets) |
Sets the insets used to render the content text. | |
const bounds2f & | get_text_insets () const |
Returns the text insets. | |
const utils::observer_ptr< font_string > & | get_font_string () |
Returns the font_string used to render the content. | |
utils::observer_ptr< const font_string > | get_font_string () const |
Returns the font_string used to render the content. | |
void | set_font_string (utils::observer_ptr< font_string > fstr) |
Sets the font_string to use to render the content. | |
void | set_font (const std::string &font_name, float height) |
Sets the font (file and size) to render the content. | |
void | notify_focus (bool focus) override |
Notifies this frame that it has received or lost focus. | |
void | notify_scaling_factor_updated () override |
Tells this region that the global interface scaling factor has changed. | |
void | render () const override |
Renders this region on the current render target. | |
void | update (float delta) final |
Updates this region's logic. | |
std::string | serialize (const std::string &tab) const override |
Prints all relevant information about this region in a string. | |
void | create_title_region () |
Creates a new title region for this frame. | |
void | set_draw_layer_enabled (layer layer_id, bool enable) |
Enables or disables a layer. | |
void | disable_draw_layer (layer layer_id) |
Disables a layer. | |
void | enable_draw_layer (layer layer_id) |
Enables a layer. | |
void | set_mouse_enabled (bool is_mouse_enabled) |
Sets if this frame can receive mouse input (click & move). | |
void | enable_mouse () |
Marks this frame as able to receive mouse input (click & move). | |
void | disable_mouse () |
Marks this frame as unable to receive mouse input (click & move). | |
void | set_mouse_click_enabled (bool is_mouse_enabled) |
Sets if this frame can receive mouse click input. | |
void | enable_mouse_click () |
Marks this frame as able to receive mouse click input. | |
void | disable_mouse_click () |
Marks this frame as unable to receive mouse click input. | |
void | set_mouse_move_enabled (bool is_mouse_enabled) |
Sets if this frame can receive mouse move input. | |
void | enable_mouse_move () |
Marks this frame as able to receive mouse move input. | |
void | disable_mouse_move () |
Marks this frame as unable to receive mouse move input. | |
void | set_mouse_wheel_enabled (bool is_mouse_wheel_enabled) |
Sets if this frame can receive mouse wheel input. | |
void | enable_mouse_wheel () |
Marks this frame as able to receive mouse wheel input. | |
void | disable_mouse_wheel () |
Marks this frame as unable to receive mouse wheel input. | |
void | set_keyboard_enabled (bool is_keyboard_enabled) |
Sets if this frame can receive any keyboard input. | |
void | enable_keyboard () |
Marks this frame as able to receive any keyboard input. | |
void | disable_keyboard () |
Marks this frame as unable to receive any keyboard input. | |
void | set_key_capture_enabled (const std::string &key_name, bool enable) |
Marks this frame as able to receive keyboard input from a specific key. | |
void | set_key_capture_enabled (input::key key_id, bool enable) |
Marks this frame as able to receive keyboard input from a specific key. | |
void | enable_key_capture (const std::string &key_name) |
Marks this frame as able to receive keyboard input from a specific key. | |
void | enable_key_capture (input::key key_id) |
Marks this frame as able to receive keyboard input from a specific key. | |
void | disable_key_capture (const std::string &key_name) |
Marks this frame as unable to receive keyboard input from a specific key. | |
void | disable_key_capture (input::key key_id) |
Marks this frame as unable to receive keyboard input from a specific key. | |
void | disable_key_capture () |
Marks this frame as unable to receive keyboard input from any key. | |
bool | has_script (const std::string &script_name) const |
Checks if this frame has a script defined. | |
utils::observer_ptr< layered_region > | add_region (utils::owner_ptr< layered_region > reg) |
Adds a layered_region to this frame's children. | |
template<typename RegionType , typename Enable = typename std::enable_if<std::is_base_of<gui::layered_region, RegionType>::value>::type> | |
utils::observer_ptr< RegionType > | add_region (utils::owner_ptr< RegionType > reg) |
Adds a layered_region to this frame's children. | |
utils::owner_ptr< layered_region > | remove_region (const utils::observer_ptr< layered_region > ®) |
Removes a layered_region from this frame's children. | |
utils::observer_ptr< layered_region > | create_layered_region (layer layer_id, region_core_attributes attr) |
Creates a new region as child of this frame. | |
template<typename RegionType , typename Enable = typename std::enable_if<std::is_base_of<gui::layered_region, RegionType>::value>::type> | |
utils::observer_ptr< RegionType > | create_layered_region (layer layer_id, region_core_attributes attr) |
Creates a new region as child of this frame. | |
template<typename RegionType , typename Enable = typename std::enable_if<std::is_base_of<gui::layered_region, RegionType>::value>::type> | |
utils::observer_ptr< RegionType > | create_layered_region (layer layer_id, const std::string &name) |
Creates a new region as child of this frame. | |
utils::observer_ptr< frame > | create_child (frame_core_attributes attr) |
Creates a new frame as child of this frame. | |
template<typename FrameType , typename Enable = typename std::enable_if<std::is_base_of<gui::frame, FrameType>::value>::type> | |
utils::observer_ptr< FrameType > | create_child (frame_core_attributes attr) |
Creates a new frame as child of this frame. | |
template<typename FrameType , typename Enable = typename std::enable_if<std::is_base_of<gui::frame, FrameType>::value>::type> | |
utils::observer_ptr< FrameType > | create_child (const std::string &name) |
Creates a new frame as child of this frame. | |
utils::observer_ptr< frame > | add_child (utils::owner_ptr< frame > child) |
Adds a frame to this frame's children. | |
template<typename FrameType , typename Enable = typename std::enable_if<std::is_base_of<gui::frame, FrameType>::value>::type> | |
utils::observer_ptr< FrameType > | add_child (utils::owner_ptr< FrameType > child) |
Adds a frame to this frame's children. | |
utils::owner_ptr< frame > | remove_child (const utils::observer_ptr< frame > &child) |
Removes a frame from this frame's children. | |
child_list_view | get_children () |
Returns the child list. | |
const_child_list_view | get_children () const |
Returns the child list. | |
utils::observer_ptr< const frame > | get_child (const std::string &name) const |
Returns one of this frame's children. | |
utils::observer_ptr< frame > | get_child (const std::string &name) |
Returns one of this frame's children. | |
template<typename FrameType , typename Enable = typename std::enable_if<std::is_base_of<gui::frame, FrameType>::value>::type> | |
utils::observer_ptr< const FrameType > | get_child (const std::string &name) const |
Returns one of this frame's children. | |
template<typename FrameType , typename Enable = typename std::enable_if<std::is_base_of<gui::frame, FrameType>::value>::type> | |
utils::observer_ptr< FrameType > | get_child (const std::string &name) |
Returns one of this frame's children. | |
region_list_view | get_regions () |
Returns the region list. | |
const_region_list_view | get_regions () const |
Returns the region list. | |
utils::observer_ptr< const layered_region > | get_region (const std::string &name) const |
Returns one of this frame's region. | |
utils::observer_ptr< layered_region > | get_region (const std::string &name) |
Returns one of this frame's region. | |
template<typename RegionType , typename Enable = typename std::enable_if<std::is_base_of<gui::layered_region, RegionType>::value>::type> | |
utils::observer_ptr< RegionType > | get_region (const std::string &name) |
Returns one of this frame's region. | |
float | get_effective_scale () const |
Calculates effective scale. | |
int | get_level () const |
Returns this frame's level. | |
std::optional< strata > | get_strata () const |
Returns this frame's strata. | |
strata | get_effective_strata () const |
Returns this frame's effective strata. | |
utils::observer_ptr< const frame > | get_top_level_parent () const |
Returns this frame's top-level parent. | |
utils::observer_ptr< frame > | get_top_level_parent () |
Returns this frame's top-level parent. | |
const backdrop * | get_backdrop () const |
Returns this frame's backdrop. | |
backdrop * | get_backdrop () |
Returns this frame's backdrop. | |
backdrop & | get_or_create_backdrop () |
Returns this frame's backdrop, creating it if needed. | |
const bounds2f & | get_abs_hit_rect_insets () const |
Returns this frame's absolute hit rect insets. | |
const bounds2f & | get_rel_hit_rect_insets () const |
Returns this frame's relative hit rect insets. | |
vector2f | get_max_dimensions () const |
Returns this frame's max dimensions. | |
vector2f | get_min_dimensions () const |
Returns this frame's min dimensions. | |
std::size_t | get_child_count () const |
Returns the number of children of this frame. | |
std::size_t | get_child_count_upper_bound () const |
Returns the approximate number of children of this frame. | |
std::size_t | get_layered_region_count () const |
Returns the number of layered regions of this frame. | |
std::size_t | get_layered_region_count_upper_bound () const |
Returns the approximate number of regions of this frame. | |
float | get_scale () const |
Returns this frame's scale. | |
utils::observer_ptr< const region > | get_title_region () const |
Returns this frame's title region. | |
utils::observer_ptr< region > | get_title_region () |
Returns this frame's title region. | |
bool | is_clamped_to_screen () const |
Checks if this frame is clamped to screen. | |
bool | is_in_region (const vector2f &position) const override |
Checks if the provided coordinates are inside this frame. | |
virtual utils::observer_ptr< const frame > | find_topmost_frame (const std::function< bool(const frame &)> &predicate) const |
Find the topmost frame matching the provided predicate. | |
utils::observer_ptr< frame > | find_topmost_frame (const std::function< bool(const frame &)> &predicate) |
Find the topmost frame matching the provided predicate. | |
bool | is_mouse_move_enabled () const |
Checks if this frame can receive mouse movement input. | |
bool | is_mouse_click_enabled () const |
Checks if this frame can receive mouse click input. | |
bool | is_mouse_wheel_enabled () const |
Checks if this frame can receive mouse wheel input. | |
bool | is_drag_enabled (const std::string &button_name) const |
Checks if this frame is registered for drag events with the provided mouse button. | |
bool | is_key_capture_enabled (const std::string &key_name) const |
Checks if this frame can receive keyboard input from a specific key. | |
bool | is_keyboard_enabled () const |
Checks if this frame can receive any keyboard input. | |
bool | is_movable () const |
Checks if this frame can be moved. | |
bool | is_resizable () const |
Checks if this frame can be resized. | |
bool | is_top_level () const |
Checks if this frame is at top level. | |
bool | is_user_placed () const |
Checks if this frame has been moved by the user. | |
utils::connection | add_script (const std::string &script_name, std::string content, script_info info=script_info{}) |
Adds an additional handler script to this frame (executed after existing scripts). | |
utils::connection | add_script (const std::string &script_name, sol::protected_function handler, script_info info=script_info{}) |
Adds an additional handler script to this frame (executed after existing scripts). | |
utils::connection | add_script (const std::string &script_name, script_function handler, script_info info=script_info{}) |
Adds an additional handler script to this frame (executed after existing scripts). | |
template<typename DerivedType = void, typename Function > | |
utils::connection | add_script (const std::string &script_name, Function &&handler, script_info info=script_info{}) |
Adds an additional handler script to this frame (executed after existing scripts). | |
utils::connection | set_script (const std::string &script_name, std::string content, script_info info=script_info{}) |
Sets a new handler script for this frame (replacing existing scripts). | |
utils::connection | set_script (const std::string &script_name, sol::protected_function handler, script_info info=script_info{}) |
Sets a new handler script for this frame (replacing existing scripts). | |
utils::connection | set_script (const std::string &script_name, script_function handler, script_info info=script_info{}) |
Sets a new handler script for this frame (replacing existing scripts). | |
template<typename DerivedType = void, typename Function > | |
utils::connection | set_script (const std::string &script_name, Function &&handler, script_info info=script_info{}) |
Sets a new handler script for this frame (replacing existing scripts). | |
script_list_view | get_script (const std::string &script_name) const |
Return a view into this frame's handler scripts, registered for the given event. | |
void | remove_script (const std::string &script_name) |
Removes a script from this frame. | |
void | set_update_rate (float rate) |
Sets a maximum update rate (in updates per seconds). | |
float | get_update_rate () const |
Gets the maximum update rate (in upates per seconds). | |
void | register_event (const std::string &event_name) |
Tells this frame to react to a certain event. | |
void | unregister_event (const std::string &event_name) |
Tells the frame not to react to a certain event. | |
void | set_drag_enabled (const std::string &button_name, bool enable) |
Tells this frame whether to react to mouse drag or not. | |
void | set_drag_enabled (input::mouse_button button_id, bool enable) |
Tells this frame whether to react to mouse drag or not. | |
void | enable_drag (const std::string &button_name) |
Tells this frame to react to mouse drag. | |
void | enable_drag (input::mouse_button button_id) |
Tells this frame to react to mouse drag. | |
void | disable_drag (const std::string &button_name) |
Tells this frame to not react to mouse drag. | |
void | disable_drag (input::mouse_button button_id) |
Tells this frame to not react to mouse drag. | |
void | disable_drag () |
Tells this frame to not react to mouse drag from any mouse button. | |
void | set_clamped_to_screen (bool is_clamped_to_screen) |
Sets if this frame is clamped to screen. | |
void | set_strata (std::optional< strata > strata_id) |
Sets this frame's strata. | |
void | set_backdrop (std::unique_ptr< backdrop > bdrop) |
Sets this frames' backdrop. | |
void | set_abs_hit_rect_insets (const bounds2f &insets) |
Sets this frame's absolute hit rect insets. | |
void | set_rel_hit_rect_insets (const bounds2f &insets) |
Sets this frame's relative hit rect insets. | |
void | set_level (int level_id) |
Sets this frame's level. | |
void | set_max_dimensions (const vector2f &max) |
Sets this frame's maximum size. | |
void | set_min_dimensions (const vector2f &min) |
Sets this frame's minimum size. | |
void | set_max_height (float max_height) |
Sets this frame's maximum height. | |
void | set_max_width (float max_width) |
Sets this frame's maximum width. | |
void | set_min_height (float min_height) |
Sets this frame's minimum height. | |
void | set_min_width (float min_width) |
Sets this frame's minimum width. | |
void | set_movable (bool is_movable) |
Sets if this frame can be moved by the user. | |
utils::owner_ptr< region > | release_from_parent () override |
Removes this region from its parent and return an owning pointer. | |
void | set_resizable (bool is_resizable) |
Sets if this frame can be resized by the user. | |
void | set_scale (float scale) |
Sets this frame's scale. | |
void | set_top_level (bool is_top_level) |
Sets if this frame is at top level. | |
void | raise () |
Increases this frame's level so it's the highest of the strata. | |
void | set_user_placed (bool is_user_placed) |
Sets if this frame has been moved by the user. | |
void | start_moving () |
Starts moving this frame with the mouse. | |
void | stop_moving () |
ends moving this frame. | |
void | start_sizing (const point &p) |
Starts resizing this frame with the mouse. | |
void | stop_sizing () |
ends resizing this frame. | |
void | enable_auto_focus (bool enable) |
Enables automatic focus when this frame is shown or raised. | |
bool | is_auto_focus_enabled () const |
Checks if automatic focus is enabled. | |
void | set_focus (bool focus) |
Asks for focus for this frame. | |
bool | has_focus () const |
Check if this frame currently has focus. | |
void | set_frame_renderer (utils::observer_ptr< frame_renderer > rdr) |
Flags this object as rendered by another object. | |
utils::observer_ptr< const frame_renderer > | get_frame_renderer () const |
Returns the renderer of this object, nullptr if none. | |
const utils::observer_ptr< frame_renderer > & | get_frame_renderer () |
Returns the renderer of this object, nullptr if none. | |
utils::observer_ptr< const frame_renderer > | get_effective_frame_renderer () const final |
Returns the renderer of this object or its parents, nullptr if none. | |
utils::observer_ptr< frame_renderer > | get_effective_frame_renderer () |
Returns the renderer of this object or its parents, nullptr if none. | |
void | notify_renderer_need_redraw () override |
Notifies the renderer of this region that it needs to be redrawn. | |
void | set_dimensions (const vector2f &dimensions) override |
Changes this region's absolute dimensions (in pixels). | |
void | set_width (float abs_width) override |
Changes this region's absolute width (in pixels). | |
void | set_height (float abs_height) override |
Changes this region's absolute height (in pixels). | |
virtual void | notify_mouse_in_frame (bool mouse_in_frame, const vector2f &mouse_pos) |
Tells this frame it is being hovered by the mouse. | |
void | notify_visible () override |
Notifies this region that it is now visible on screen. | |
void | notify_invisible () override |
Notifies this region that it is no longer visible on screen. | |
void | notify_loaded () override |
Notifies this region that it has been fully loaded. | |
void | notify_layers_need_update () |
Tells this frame to rebuild its layer list. | |
void | parse_layout (const layout_node &node) final |
Parses data from a layout_node. | |
virtual void | notify_borders_need_update () |
Tells this region that its borders need updating. | |
const std::string & | get_name () const |
Returns this region's name. | |
const std::string & | get_raw_name () const |
Returns this region's raw name. | |
utils::observer_ptr< const frame > | get_parent () const |
Returns this region's parent. | |
const utils::observer_ptr< frame > & | get_parent () |
Returns this region's parent. | |
void | destroy () |
Forcefully removes this region from the GUI. | |
void | set_alpha (float alpha) |
Changes this region's alpha (opacity). | |
float | get_alpha () const |
Returns this region's alpha (opacity). | |
float | get_effective_alpha () const |
Returns this region's effective alpha (opacity). | |
void | show () |
shows this region. | |
void | hide () |
hides this region. | |
void | set_shown (bool is_shown) |
shows/hides this region. | |
bool | is_shown () const |
Checks if this region is shown. | |
bool | is_visible () const |
Checks if this region can be seen on the screen. | |
bool | is_valid () const |
Checks if this region has all its borders correctly defined. | |
void | set_relative_dimensions (const vector2f &dimensions) |
Changes this region's dimensions (relative to its parent). | |
void | set_relative_width (float rel_width) |
Changes this region's width (relative to its parent). | |
void | set_relative_height (float rel_height) |
Changes this region's height (relative to its parent). | |
const vector2f & | get_dimensions () const |
Returns this region's explicitly-defined width and height (in pixels). | |
vector2f | get_apparent_dimensions () const |
Returns this region's apparent width and height (in pixels). | |
bool | is_apparent_width_defined () const |
Checks if this region's apparent width is defined. | |
bool | is_apparent_height_defined () const |
Checks if this region's apparent height is defined. | |
const std::string & | get_region_type () const |
Returns the type of this region. | |
bool | is_region_type (const std::string &type_name) const |
Checks if this region is of the provided type. | |
template<typename ObjectType > | |
bool | is_region_type () const |
Checks if this region is of the provided type. | |
bool | is_region_type (const region &obj) const |
Checks if this region is of a type equal or derived from the supplied region. | |
float | get_bottom () const |
Returns the vertical position of this region's bottom border. | |
vector2f | get_center () const |
Returns the position of this region's center. | |
float | get_left () const |
Returns the horizontal position of this region's left border. | |
float | get_right () const |
Returns the horizontal position of this region's right border. | |
float | get_top () const |
Returns the vertical position of this region's top border. | |
const bounds2f & | get_borders () const |
Returns this region's borders. | |
void | clear_all_anchors () |
Removes all anchors. | |
void | set_all_anchors (const utils::observer_ptr< region > &obj) |
Adjusts this regions anchors to fit the provided region. | |
void | set_all_anchors (const std::string &obj_name) |
Adjusts this regions anchors to fit the provided region. | |
void | set_anchor (const anchor_data &a) |
Adds/replaces an anchor. | |
template<typename... Args> | |
void | set_anchor (Args &&... args) |
Adds/replaces an anchor. | |
bool | depends_on (const region &obj) const |
Checks if this region depends on another. | |
std::size_t | get_anchor_count () const |
Returns the number of defined anchors. | |
anchor & | modify_anchor (point p) |
Returns one of this region's anchor to modify it. | |
const anchor & | get_anchor (point p) const |
Returns one of this region's anchor. | |
const std::array< std::optional< anchor >, 9 > & | get_anchors () const |
Returns all of this region's anchors. | |
float | round_to_pixel (float value, utils::rounding_method method=utils::rounding_method::nearest) const |
Round an absolute position on screen to the nearest physical pixel. | |
vector2f | round_to_pixel (const vector2f &position, utils::rounding_method method=utils::rounding_method::nearest) const |
Round an absolute position on screen to the nearest physical pixel. | |
void | add_anchored_object (region &obj) |
Notifies this region that another one is anchored to it. | |
void | remove_anchored_object (region &obj) |
Notifies this region that another one is no longer anchored to it. | |
bool | is_virtual () const |
Checks if this region is virtual. | |
void | set_manually_inherited (bool manually_inherited) |
Flags this region as manually inherited or not. | |
bool | is_manually_inherited () const |
Checks if this object is manually inherited. | |
const std::vector< utils::observer_ptr< region > > & | get_anchored_objects () const |
Returns the list of all objects that are anchored to this one. | |
bool | is_loaded () const |
Checks if this region has been fully loaded. | |
void | set_addon (const addon *a) |
Sets the addon this frame belongs to. | |
const addon * | get_addon () const |
Returns this frame's addon. | |
std::string | parse_file_name (const std::string &file_name) const |
Convert an addon-relative file path to a application-relative path. | |
manager & | get_manager () |
Returns this region's manager. | |
const manager & | get_manager () const |
Returns this region's manager. | |
registry & | get_registry () |
Returns the UI object registry, which keeps track of all objects in the UI. | |
const registry & | get_registry () const |
Returns the UI object registry, which keeps track of all objects in the UI. | |
void | remove_glue () |
Removes the Lua glue. | |
Static Public Member Functions | |
static void | register_on_lua (sol::state &lua) |
Registers this region class to the provided Lua state. | |
static std::string | get_adjusted_script_name (const std::string &script_name) |
Returns the "adjusted" script name: "OnEvent" becomes "on_event". | |
Static Public Attributes | |
static constexpr const char * | class_name = "EditBox" |
Protected Member Functions | |
void | parse_attributes_ (const layout_node &node) override |
void | parse_all_nodes_before_children_ (const layout_node &node) override |
void | parse_font_string_node_ (const layout_node &node) |
void | parse_text_insets_node_ (const layout_node &node) |
void | update_ (float delta) override |
const std::vector< std::string > & | get_type_list_ () const override |
void | create_font_string_ () |
void | create_highlight_ () |
void | create_carret_ () |
bool | check_text_ () |
void | update_displayed_text_ () |
void | update_font_string_ () |
void | update_carret_position_ () |
bool | add_char_ (char32_t c) |
bool | remove_char_ () |
std::size_t | get_letter_id_at_ (const vector2f &position) const |
bool | move_carret_at_ (const vector2f &position) |
bool | move_carret_horizontally_ (bool forward=true) |
bool | move_carret_vertically_ (bool down=true) |
void | process_key_ (input::key key_id, bool shift_is_pressed, bool ctrl_is_pressed) |
virtual void | parse_resize_bounds_node_ (const layout_node &node) |
virtual void | parse_title_region_node_ (const layout_node &node) |
virtual void | parse_backdrop_node_ (const layout_node &node) |
virtual void | parse_hit_rect_insets_node_ (const layout_node &node) |
virtual void | parse_layers_node_ (const layout_node &node) |
virtual void | parse_frames_node_ (const layout_node &node) |
virtual void | parse_scripts_node_ (const layout_node &node) |
utils::observer_ptr< layered_region > | parse_region_ (const layout_node &node, const std::string &layer_name, const std::string &type) |
utils::observer_ptr< frame > | parse_child_ (const layout_node &node, const std::string &type) |
void | check_position_ () |
void | add_level_ (int amount) |
utils::observer_ptr< const frame_renderer > | compute_top_level_frame_renderer_ () const |
utils::observer_ptr< frame_renderer > | compute_top_level_frame_renderer_ () |
strata | compute_effective_strata_ () const |
void | notify_strata_changed_ (strata new_strata_id) |
void | notify_frame_renderer_changed_ (const utils::observer_ptr< frame_renderer > &new_renderer) |
void | update_borders_ () override |
void | set_parent_ (utils::observer_ptr< frame > parent) override |
Changes this region's parent. | |
bool | check_script_ (const std::string &script_name) const |
utils::connection | define_script_ (const std::string &script_name, const std::string &content, bool append, const script_info &info) |
utils::connection | define_script_ (const std::string &script_name, sol::protected_function handler, bool append, const script_info &info) |
utils::connection | define_script_ (const std::string &script_name, script_function handler, bool append, const script_info &info) |
void | on_event_ (std::string_view event_name, const event_data &event) |
virtual void | parse_size_node_ (const layout_node &node) |
virtual void | parse_anchor_node_ (const layout_node &node) |
color | parse_color_node_ (const layout_node &node) |
vector2< std::optional< float > > | parse_offset_node_ (const layout_node &node) |
vector2< float > | parse_offset_node_or_ (const layout_node &node, float fallback) |
std::pair< anchor_type, vector2< std::optional< float > > > | parse_dimension_node_ (const layout_node &node) |
void | read_anchors_ (float &left, float &right, float &top, float &bottom, float &x_center, float &y_center) const |
bool | make_borders_ (float &min, float &max, float center, float size) const |
sol::state & | get_lua_ () |
const sol::state & | get_lua_ () const |
template<typename T > | |
void | create_glue_ (T &self) |
void | set_lua_member_ (std::string key, sol::stack_object value) |
sol::object | get_lua_member_ (const std::string &key) const |
void | set_virtual_ () |
Makes this region virtual. | |
void | set_name_ (const std::string &name) |
Sets this region's name. | |
template<typename T > | |
void | initialize_ (T &self, const region_core_attributes &attr) |
Set up function to call in all derived class constructors. | |
Static Protected Member Functions | |
template<typename T > | |
static const std::vector< std::string > & | get_type_list_impl_ () |
Protected Attributes | |
utils::ustring | unicode_text_ |
utils::ustring | displayed_text_ |
utils::ustring::iterator | iter_carret_pos_ |
std::size_t | display_pos_ = 0 |
std::size_t | num_letters_ = 0 |
std::size_t | max_letters_ = std::numeric_limits<std::size_t>::max() |
bool | is_numeric_only_ = false |
bool | is_positive_only_ = false |
bool | is_integer_only_ = false |
bool | is_password_mode_ = false |
bool | is_multi_line_ = false |
bool | are_arrows_ignored_ = false |
utils::observer_ptr< texture > | highlight_ = nullptr |
color | highlight_color_ = color(1.0f, 1.0f, 1.0f, 0.5f) |
std::size_t | selection_start_pos_ = 0u |
std::size_t | selection_end_pos_ = 0u |
bool | is_text_selected_ = false |
utils::observer_ptr< texture > | carret_ = nullptr |
double | blink_time_ = 0.5 |
utils::periodic_timer | carret_timer_ |
std::vector< utils::ustring > | history_line_list_ |
std::size_t | max_history_lines_ = std::numeric_limits<std::size_t>::max() |
std::size_t | current_history_line_ = std::numeric_limits<std::size_t>::max() |
utils::observer_ptr< font_string > | font_string_ = nullptr |
bounds2f | text_insets_ = bounds2f::zero |
child_list | child_list_ |
region_list | region_list_ |
std::array< layer_container, num_layers > | layer_list_ |
std::unordered_map< std::string, script_signal > | signal_list_ |
event_receiver | event_receiver_ |
std::set< std::string > | reg_drag_list_ |
std::set< std::string > | reg_key_list_ |
int | level_ = 0 |
std::optional< strata > | strata_ |
strata | effective_strata_ = strata::medium |
bool | is_top_level_ = false |
utils::observer_ptr< frame_renderer > | frame_renderer_ = nullptr |
utils::observer_ptr< frame_renderer > | effective_frame_renderer_ = nullptr |
std::unique_ptr< backdrop > | backdrop_ |
bool | is_mouse_click_enabled_ = false |
bool | is_mouse_move_enabled_ = false |
bool | is_mouse_wheel_enabled_ = false |
bool | is_keyboard_enabled_ = false |
bool | is_movable_ = false |
bool | is_clamped_to_screen_ = false |
bool | is_resizable_ = false |
bool | is_user_placed_ = false |
bounds2f | abs_hit_rect_inset_list_ = bounds2f::zero |
bounds2f | rel_hit_rect_inset_list_ = bounds2f::zero |
float | min_width_ = 0.0f |
float | max_width_ = std::numeric_limits<float>::infinity() |
float | min_height_ = 0.0f |
float | max_height_ = std::numeric_limits<float>::infinity() |
float | scale_ = 1.0f |
float | update_rate_ = 0.0f |
float | time_since_last_update_ = std::numeric_limits<float>::infinity() |
bool | is_mouse_in_frame_ = false |
utils::owner_ptr< region > | title_region_ = nullptr |
bool | is_focused_ = false |
bool | is_auto_focus_ = false |
manager & | manager_ |
const addon * | addon_ = nullptr |
std::string | name_ |
std::string | raw_name_ |
utils::observer_ptr< frame > | parent_ = nullptr |
bool | is_manually_inherited_ = false |
bool | is_virtual_ = false |
bool | is_loaded_ = false |
bool | is_valid_ = true |
std::array< std::optional< anchor >, 9 > | anchor_list_ |
bounds2< bool > | defined_borders_ |
bounds2f | borders_ |
float | alpha_ = 1.0f |
bool | is_shown_ = true |
bool | is_visible_ = true |
vector2f | dimensions_ |
std::vector< utils::observer_ptr< region > > | anchored_object_list_ |
Static Protected Attributes | |
static constexpr std::size_t | num_layers = magic_enum::enum_count<layer>() |
A frame with an editable text box.
This frame lets the user input arbitrary text into a box, which can be read and used by the rest of the interface. The text box can be either single-line or multi-line. Text can be selected by holding the Shift key, and natural navigation is available with the Left, Right, Up, Down, Home, End, Page Up, and Page Down keys. Copy and paste operations are also supported. The edit box can also remember the history of previously entered values or commands, which can be brought back at will. The characters entered as handled by the operating system, hence this class will use whatever keyboard layout is currently in use. Finally, the edit box can be configured to only accept numeric values (of either sign, or positive only), and to hide the input characters to simulate a password box (no encryption or other safety measure is used).
Note that an edit_box has frame::enable_mouse set to true
and frame::enable_drag set to "LeftButton"
by default.
Events. Hard-coded events available to all edit_boxes, in addition to those from frame:
OnCursorChanged
: Triggered whenever the position of the edit cursor is changed (not yet implemented).OnEnterPressed
: Triggered when the Enter
(or Return
) key is pressed while the edit box is focused. This captures both the main keyboard key and the smaller one on the numpad.OnEscapePressed
: Triggered when the Escape
key is pressed while the edit box is focused.OnSpacePressed
: Triggered when the Space
key is pressed while the edit box is focused.OnTabPressed
: Triggered when the Tab
key is pressed while the edit box is focused.OnUpPressed
: Triggered when the Up
key is pressed while the edit box is focused.OnDownPressed
: Triggered when the Down
key is pressed while the edit box is focused.OnTextChanged
: Triggered whenever the text contained in the edit box changes (character added or deleted, text set or pasted, etc.). Triggered after OnChar
.OnTextSet
: Triggered by edit_box::set_text. Will always be followed by OnTextChanged
. Definition at line 62 of file gui_edit_box.hpp.
using lxgui::gui::edit_box::base = frame |
Definition at line 64 of file gui_edit_box.hpp.
|
inherited |
Type of the frame child list (internal).
Definition at line 268 of file gui_frame.hpp.
|
inherited |
Definition at line 269 of file gui_frame.hpp.
|
inherited |
Definition at line 271 of file gui_frame.hpp.
|
inherited |
Definition at line 288 of file gui_frame.hpp.
|
inherited |
Type of the region list (internal).
Definition at line 285 of file gui_frame.hpp.
|
inherited |
Definition at line 286 of file gui_frame.hpp.
|
explicit |
Constructor.
Definition at line 20 of file gui_edit_box.cpp.
|
inherited |
Notifies this region that another one is anchored to it.
obj | The anchored region |
Definition at line 561 of file gui_region.cpp.
|
protected |
Definition at line 914 of file gui_edit_box.cpp.
|
inherited |
Adds a frame to this frame's children.
child | The frame to add |
Definition at line 678 of file gui_frame.cpp.
|
inlineinherited |
Adds a frame to this frame's children.
child | The frame to add |
Definition at line 731 of file gui_frame.hpp.
void lxgui::gui::edit_box::add_history_line | ( | const utils::ustring & | history_line | ) |
Adds a new history line to the history line list.
history_line | The content of this history line |
Definition at line 566 of file gui_edit_box.cpp.
|
protectedinherited |
Definition at line 1342 of file gui_frame.cpp.
|
inherited |
Adds a layered_region to this frame's children.
reg | The layered_region to add |
Definition at line 592 of file gui_frame.cpp.
|
inlineinherited |
Adds a layered_region to this frame's children.
reg | The layered_region to add |
Definition at line 590 of file gui_frame.hpp.
|
inlineinherited |
Adds an additional handler script to this frame (executed after existing scripts).
script_name | The name of the script (e.g., "OnEvent") |
handler | The handler of the script, as a C++ function (see below for expected signature) |
info | The location where this script has been defined |
script_name
. This provides the best performance, but lacks direct access to the Lua environment. If this is required, prefer the other overload taking a Lua function instead.self
parameter of type other than frame, for example: dynamic_cast
, so that incorrect types will be reported. However this has a cost; if you are sure of the type and want to bypass this cost, just supply the self
type as the first template argument to this function: Definition at line 1197 of file gui_frame.hpp.
|
inlineinherited |
Adds an additional handler script to this frame (executed after existing scripts).
script_name | The name of the script (e.g., "OnEvent") |
handler | The handler of the script, as a C++ function of signature script_signature |
info | The location where this script has been defined |
script_name
. This provides the best performance, but lacks direct access to the Lua environment. If this is required, prefer the other overload taking a Lua function instead. Definition at line 1165 of file gui_frame.hpp.
|
inlineinherited |
Adds an additional handler script to this frame (executed after existing scripts).
script_name | The name of the script (e.g., "OnEvent") |
handler | The handler of the script, as a Lua function |
info | The location where this script has been defined |
Definition at line 1144 of file gui_frame.hpp.
|
inlineinherited |
Adds an additional handler script to this frame (executed after existing scripts).
script_name | The name of the script (e.g., "OnEvent") |
content | The content of the script, as Lua code |
info | The location where this script has been defined |
Definition at line 1125 of file gui_frame.hpp.
|
overridevirtual |
Returns 'true' if this edit_box can use a script.
script_name | The name of the script |
Reimplemented from lxgui::gui::frame.
Definition at line 33 of file gui_edit_box.cpp.
|
protectedinherited |
Definition at line 359 of file gui_frame.cpp.
|
protectedinherited |
Definition at line 946 of file gui_frame.cpp.
|
protected |
Definition at line 746 of file gui_edit_box.cpp.
|
inherited |
Removes all anchors.
Definition at line 365 of file gui_region.cpp.
void lxgui::gui::edit_box::clear_history_lines | ( | ) |
Clears the history line list.
Definition at line 585 of file gui_edit_box.cpp.
|
protectedinherited |
Definition at line 739 of file gui_frame.cpp.
|
inlineprotectedinherited |
Definition at line 1759 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 1414 of file gui_frame.cpp.
|
overridevirtual |
Copies a region's parameters into this edit_box (inheritance).
obj | The region to copy |
Reimplemented from lxgui::gui::region.
Definition at line 41 of file gui_edit_box.cpp.
|
protected |
Definition at line 720 of file gui_edit_box.cpp.
|
inlineinherited |
Creates a new frame as child of this frame.
name | The name of the frame |
Definition at line 709 of file gui_frame.hpp.
|
inherited |
Creates a new frame as child of this frame.
attr | The core attributes of the frame (parent will be ignored) |
Definition at line 666 of file gui_frame.cpp.
|
inlineinherited |
Creates a new frame as child of this frame.
attr | The core attributes of the frame (object_type and parent will be ignored) |
Definition at line 688 of file gui_frame.hpp.
|
protected |
Definition at line 688 of file gui_edit_box.cpp.
|
protectedinherited |
Definition at line 136 of file gui_region_tpl.hpp.
|
protected |
Definition at line 701 of file gui_edit_box.cpp.
|
inlineinherited |
Creates a new region as child of this frame.
layer_id | The layer on which to create the region |
name | The name of the region |
Definition at line 651 of file gui_frame.hpp.
|
inherited |
Creates a new region as child of this frame.
layer_id | The layer on which to create the region |
attr | The core attributes of the region (parent will be ignored) |
Definition at line 652 of file gui_frame.cpp.
|
inlineinherited |
Creates a new region as child of this frame.
layer_id | The layer on which to create the region |
attr | The core attributes of the region (object_type and parent will be ignored) |
Definition at line 630 of file gui_frame.hpp.
|
inherited |
Creates a new title region for this frame.
Definition at line 275 of file gui_frame.cpp.
|
protectedinherited |
Definition at line 957 of file gui_frame.cpp.
|
protectedinherited |
Definition at line 1034 of file gui_frame.cpp.
|
protectedinherited |
Definition at line 992 of file gui_frame.cpp.
|
inherited |
Checks if this region depends on another.
obj | The region to test |
Definition at line 503 of file gui_region.cpp.
|
inherited |
Forcefully removes this region from the GUI.
Definition at line 333 of file gui_region.cpp.
|
inherited |
Tells this frame to not react to mouse drag from any mouse button.
Definition at line 1170 of file gui_frame.cpp.
|
inherited |
Tells this frame to not react to mouse drag.
button_name | The mouse button to not react to |
Definition at line 1162 of file gui_frame.cpp.
|
inherited |
Tells this frame to not react to mouse drag.
button_id | The mouse button to not react to |
Definition at line 1166 of file gui_frame.cpp.
|
inherited |
Disables a layer.
layer_id | The id of the layer to disable |
Definition at line 421 of file gui_frame.cpp.
|
inherited |
Marks this frame as unable to receive keyboard input from any key.
Definition at line 474 of file gui_frame.cpp.
|
inherited |
Marks this frame as unable to receive keyboard input from a specific key.
key_name | The key for which to disable capture |
Definition at line 466 of file gui_frame.cpp.
|
inherited |
Marks this frame as unable to receive keyboard input from a specific key.
key_id | The key for which to disable capture |
Definition at line 470 of file gui_frame.cpp.
|
inlineinherited |
Marks this frame as unable to receive any keyboard input.
Definition at line 475 of file gui_frame.hpp.
|
inlineinherited |
Marks this frame as unable to receive mouse input (click & move).
Definition at line 380 of file gui_frame.hpp.
|
inlineinherited |
Marks this frame as unable to receive mouse click input.
Definition at line 402 of file gui_frame.hpp.
|
inlineinherited |
Marks this frame as unable to receive mouse move input.
Definition at line 424 of file gui_frame.hpp.
|
inlineinherited |
Marks this frame as unable to receive mouse wheel input.
Definition at line 446 of file gui_frame.hpp.
|
inline |
Disables password mode.
Definition at line 234 of file gui_edit_box.hpp.
|
inherited |
Enables automatic focus when this frame is shown or raised.
enable | 'true' to enable auto focus |
Definition at line 1310 of file gui_frame.cpp.
|
inherited |
Tells this frame to react to mouse drag.
button_name | The mouse button to react to |
Definition at line 1154 of file gui_frame.cpp.
|
inherited |
Tells this frame to react to mouse drag.
button_id | The mouse button to react to |
Definition at line 1158 of file gui_frame.cpp.
|
inherited |
Enables a layer.
layer_id | The id of the layer to enable |
Definition at line 429 of file gui_frame.cpp.
|
inherited |
Marks this frame as able to receive keyboard input from a specific key.
key_name | The key to capture |
Definition at line 458 of file gui_frame.cpp.
|
inherited |
Marks this frame as able to receive keyboard input from a specific key.
key_id | The key to capture |
Definition at line 462 of file gui_frame.cpp.
|
inlineinherited |
Marks this frame as able to receive any keyboard input.
Definition at line 467 of file gui_frame.hpp.
|
inlineinherited |
Marks this frame as able to receive mouse input (click & move).
Definition at line 372 of file gui_frame.hpp.
|
inlineinherited |
Marks this frame as able to receive mouse click input.
Definition at line 394 of file gui_frame.hpp.
|
inlineinherited |
Marks this frame as able to receive mouse move input.
Definition at line 416 of file gui_frame.hpp.
|
inlineinherited |
Marks this frame as able to receive mouse wheel input.
Definition at line 438 of file gui_frame.hpp.
|
inline |
Enables password mode.
Definition at line 226 of file gui_edit_box.hpp.
|
inlineinherited |
Find the topmost frame matching the provided predicate.
predicate | A function returning 'true' if the frame can be selected |
Definition at line 1034 of file gui_frame.hpp.
|
virtualinherited |
Find the topmost frame matching the provided predicate.
predicate | A function returning 'true' if the frame can be selected |
Reimplemented in lxgui::gui::scroll_frame.
Definition at line 832 of file gui_frame.cpp.
|
overridevirtual |
Calls a script.
script_name | The name of the script |
data | Stores scripts arguments |
Reimplemented from lxgui::gui::frame.
Definition at line 97 of file gui_edit_box.cpp.
|
inherited |
Returns this frame's absolute hit rect insets.
Definition at line 777 of file gui_frame.cpp.
|
inherited |
Returns this frame's addon.
Definition at line 843 of file gui_region.cpp.
|
staticinherited |
Returns the "adjusted" script name: "OnEvent" becomes "on_event".
script_name | The CamelCase name of the script |
Definition at line 879 of file gui_frame.cpp.
|
inherited |
Returns this region's alpha (opacity).
Definition at line 157 of file gui_region.cpp.
Returns one of this region's anchor.
p | The anchor point |
Definition at line 539 of file gui_region.cpp.
|
inherited |
Returns the number of defined anchors.
Definition at line 519 of file gui_region.cpp.
|
inherited |
Returns the list of all objects that are anchored to this one.
Definition at line 790 of file gui_region.cpp.
|
inherited |
Returns all of this region's anchors.
Definition at line 549 of file gui_region.cpp.
|
inherited |
Returns this region's apparent width and height (in pixels).
Definition at line 276 of file gui_region.cpp.
|
inherited |
Returns this frame's backdrop.
Definition at line 766 of file gui_frame.cpp.
|
inherited |
Returns this frame's backdrop.
Definition at line 762 of file gui_frame.cpp.
double lxgui::gui::edit_box::get_blink_time | ( | ) | const |
Returns the carret's blink time.
Definition at line 410 of file gui_edit_box.cpp.
|
inherited |
Returns this region's borders.
Definition at line 361 of file gui_region.cpp.
|
inherited |
Returns the vertical position of this region's bottom border.
Definition at line 357 of file gui_region.cpp.
|
inherited |
Returns the position of this region's center.
Definition at line 341 of file gui_region.cpp.
|
inlineinherited |
Returns one of this frame's children.
name | The name of the child |
Definition at line 775 of file gui_frame.hpp.
|
inlineinherited |
Returns one of this frame's children.
name | The name of the child |
Definition at line 809 of file gui_frame.hpp.
|
inherited |
Returns one of this frame's children.
name | The name of the child |
Definition at line 305 of file gui_frame.cpp.
|
inlineinherited |
Returns one of this frame's children.
name | The name of the child |
Definition at line 792 of file gui_frame.hpp.
|
inherited |
Returns the number of children of this frame.
Definition at line 793 of file gui_frame.cpp.
|
inherited |
Returns the approximate number of children of this frame.
Definition at line 798 of file gui_frame.cpp.
|
inherited |
|
inherited |
std::size_t lxgui::gui::edit_box::get_cursor_position | ( | ) | const |
Returns the current position of the cursor.
Definition at line 339 of file gui_edit_box.cpp.
|
inherited |
Returns this region's explicitly-defined width and height (in pixels).
Definition at line 272 of file gui_region.cpp.
|
inherited |
Returns this region's effective alpha (opacity).
Definition at line 161 of file gui_region.cpp.
|
inlineinherited |
Returns the renderer of this object or its parents, nullptr if none.
Definition at line 1645 of file gui_frame.hpp.
|
finalvirtualinherited |
Returns the renderer of this object or its parents, nullptr if none.
Reimplemented from lxgui::gui::region.
Definition at line 1410 of file gui_frame.cpp.
|
inherited |
Calculates effective scale.
Definition at line 720 of file gui_frame.cpp.
|
inherited |
Returns this frame's effective strata.
Definition at line 735 of file gui_frame.cpp.
|
inline |
Returns the font_string used to render the content.
Definition at line 314 of file gui_edit_box.hpp.
|
inline |
Returns the font_string used to render the content.
Definition at line 322 of file gui_edit_box.hpp.
|
inlineinherited |
Returns the renderer of this object, nullptr if none.
Definition at line 1629 of file gui_frame.hpp.
|
inlineinherited |
Returns the renderer of this object, nullptr if none.
Definition at line 1620 of file gui_frame.hpp.
const std::vector< utils::ustring > & lxgui::gui::edit_box::get_history_lines | ( | ) | const |
Returns the history line list.
Definition at line 581 of file gui_edit_box.cpp.
|
inherited |
Returns the number of layered regions of this frame.
Definition at line 802 of file gui_frame.cpp.
|
inherited |
Returns the approximate number of regions of this frame.
Definition at line 807 of file gui_frame.cpp.
|
inherited |
Returns the horizontal position of this region's left border.
Definition at line 345 of file gui_region.cpp.
std::size_t lxgui::gui::edit_box::get_letter_count | ( | ) | const |
Returns the number of letters in the content.
Definition at line 397 of file gui_edit_box.cpp.
|
protected |
Definition at line 966 of file gui_edit_box.cpp.
|
inherited |
|
protectedinherited |
Definition at line 767 of file gui_region.cpp.
|
protectedinherited |
Definition at line 771 of file gui_region.cpp.
|
protectedinherited |
|
inlineinherited |
Returns this region's manager.
Definition at line 693 of file gui_region.hpp.
|
inlineinherited |
Returns this region's manager.
Definition at line 701 of file gui_region.hpp.
|
inherited |
Returns this frame's max dimensions.
Definition at line 785 of file gui_frame.cpp.
std::size_t lxgui::gui::edit_box::get_max_history_lines | ( | ) | const |
Returns the maximum number of history lines this edit_box can keep.
Definition at line 562 of file gui_edit_box.cpp.
std::size_t lxgui::gui::edit_box::get_max_letters | ( | ) | const |
Returns the maximum number of letters to allow in this edit_box.
Definition at line 393 of file gui_edit_box.cpp.
|
inherited |
Returns this frame's min dimensions.
Definition at line 789 of file gui_frame.cpp.
|
inherited |
Returns this region's name.
Definition at line 140 of file gui_region.cpp.
|
inherited |
Returns this frame's backdrop, creating it if needed.
Definition at line 770 of file gui_frame.cpp.
|
inlineinherited |
Returns this region's parent.
Definition at line 237 of file gui_region.hpp.
|
inlineinherited |
Returns this region's parent.
Definition at line 229 of file gui_region.hpp.
|
inherited |
Returns this region's raw name.
Definition at line 144 of file gui_region.cpp.
|
inlineinherited |
Returns one of this frame's region.
name | The name of the region |
Definition at line 845 of file gui_frame.hpp.
|
inlineinherited |
Returns one of this frame's region.
name | The name of the region |
Definition at line 863 of file gui_frame.hpp.
|
inherited |
Returns one of this frame's region.
name | The name of the region |
Definition at line 329 of file gui_frame.cpp.
|
inherited |
Returns the type of this region.
Definition at line 148 of file gui_region.cpp.
|
inherited |
|
inherited |
|
inherited |
Returns the UI object registry, which keeps track of all objects in the UI.
Definition at line 850 of file gui_region.cpp.
|
inherited |
Returns the UI object registry, which keeps track of all objects in the UI.
Definition at line 855 of file gui_region.cpp.
|
inherited |
Returns this frame's relative hit rect insets.
Definition at line 781 of file gui_frame.cpp.
|
inherited |
Returns the horizontal position of this region's right border.
Definition at line 349 of file gui_region.cpp.
|
inherited |
Returns this frame's scale.
Definition at line 811 of file gui_frame.cpp.
|
inherited |
Return a view into this frame's handler scripts, registered for the given event.
script_name | The name of the script (e.g., "OnEvent") |
Definition at line 1072 of file gui_frame.cpp.
|
inherited |
Returns this frame's strata.
Definition at line 731 of file gui_frame.cpp.
const utils::ustring & lxgui::gui::edit_box::get_text | ( | ) | const |
Returns the content of this edit_box.
Definition at line 230 of file gui_edit_box.cpp.
const bounds2f & lxgui::gui::edit_box::get_text_insets | ( | ) | const |
|
inlineinherited |
Returns this frame's title region.
Definition at line 997 of file gui_frame.hpp.
|
inlineinherited |
Returns this frame's title region.
Definition at line 992 of file gui_frame.hpp.
|
inherited |
Returns the vertical position of this region's top border.
Definition at line 353 of file gui_region.cpp.
|
inlineinherited |
Returns this frame's top-level parent.
Definition at line 902 of file gui_frame.hpp.
|
inherited |
Returns this frame's top-level parent.
Definition at line 750 of file gui_frame.cpp.
|
overrideprotectedvirtual |
Reimplemented from lxgui::gui::region.
Definition at line 1227 of file gui_edit_box.cpp.
|
staticprotectedinherited |
Definition at line 147 of file gui_region_tpl.hpp.
|
inherited |
Gets the maximum update rate (in upates per seconds).
Definition at line 1150 of file gui_frame.cpp.
|
inherited |
Check if this frame currently has focus.
Definition at line 1326 of file gui_frame.cpp.
|
inherited |
Checks if this frame has a script defined.
script_name | The name of the script to check |
Definition at line 584 of file gui_frame.cpp.
|
inherited |
hides this region.
Definition at line 186 of file gui_region.cpp.
void lxgui::gui::edit_box::highlight_text | ( | std::size_t | start = 0u , |
std::size_t | end = std::numeric_limits<std::size_t>::max() , |
||
bool | force_update = false |
||
) |
Selects a portion of the content.
start | The first character to select |
end | The last character to select |
force_update | 'true' to bypass all redundancy checks |
Definition at line 243 of file gui_edit_box.cpp.
|
protectedinherited |
Set up function to call in all derived class constructors.
self | A pointer to the derived this |
attr | The region attributes provided to the constructor |
Definition at line 141 of file gui_region_tpl.hpp.
void lxgui::gui::edit_box::insert_after_cursor | ( | const utils::ustring & | content | ) |
Inserts some text after the cursor.
content | The text to insert |
Definition at line 312 of file gui_edit_box.cpp.
|
inherited |
Checks if this region's apparent height is defined.
Definition at line 284 of file gui_region.cpp.
|
inherited |
Checks if this region's apparent width is defined.
Definition at line 280 of file gui_region.cpp.
|
inherited |
Checks if automatic focus is enabled.
Definition at line 1314 of file gui_frame.cpp.
|
inherited |
Checks if this frame is clamped to screen.
Definition at line 815 of file gui_frame.cpp.
|
inherited |
Checks if this frame is registered for drag events with the provided mouse button.
button_name | The name of the mouse button to check |
Definition at line 851 of file gui_frame.cpp.
|
overridevirtualinherited |
Checks if the provided coordinates are inside this frame.
position | The coordinates to test |
Reimplemented from lxgui::gui::region.
Reimplemented in lxgui::gui::slider.
Definition at line 819 of file gui_frame.cpp.
bool lxgui::gui::edit_box::is_integer_only | ( | ) | const |
Checks if this edit_box allows integer numbers only.
Definition at line 488 of file gui_edit_box.cpp.
|
inherited |
Checks if this frame can receive keyboard input from a specific key.
key_name | The key to check |
Definition at line 859 of file gui_frame.cpp.
|
inherited |
Checks if this frame can receive any keyboard input.
Definition at line 855 of file gui_frame.cpp.
|
inherited |
Checks if this region has been fully loaded.
Definition at line 798 of file gui_region.cpp.
|
inherited |
Checks if this object is manually inherited.
Definition at line 784 of file gui_region.cpp.
|
inherited |
Checks if this frame can receive mouse click input.
Definition at line 839 of file gui_frame.cpp.
|
inherited |
Checks if this frame can receive mouse movement input.
Definition at line 843 of file gui_frame.cpp.
|
inherited |
Checks if this frame can receive mouse wheel input.
Definition at line 847 of file gui_frame.cpp.
|
inherited |
Checks if this frame can be moved.
Definition at line 863 of file gui_frame.cpp.
bool lxgui::gui::edit_box::is_multi_line | ( | ) | const |
Checks if this edit_box can have several lines in it.
Definition at line 539 of file gui_edit_box.cpp.
bool lxgui::gui::edit_box::is_numeric_only | ( | ) | const |
Checks if this edit_box allows numeric characters only.
Definition at line 480 of file gui_edit_box.cpp.
bool lxgui::gui::edit_box::is_password_mode_enabled | ( | ) | const |
Checks if this edit_box is in password mode.
Definition at line 503 of file gui_edit_box.cpp.
bool lxgui::gui::edit_box::is_positive_only | ( | ) | const |
Checks if this edit_box allows positive numbers only.
Definition at line 484 of file gui_edit_box.cpp.
|
inlineinherited |
Checks if this region is of the provided type.
Definition at line 423 of file gui_region.hpp.
|
inlineinherited |
Checks if this region is of a type equal or derived from the supplied region.
Definition at line 431 of file gui_region.hpp.
|
inherited |
Checks if this region is of the provided type.
type_name | The type to test |
Definition at line 152 of file gui_region.cpp.
|
inherited |
Checks if this frame can be resized.
Definition at line 867 of file gui_frame.cpp.
|
inherited |
Checks if this region is shown.
Definition at line 203 of file gui_region.cpp.
|
inherited |
Checks if this frame is at top level.
Definition at line 871 of file gui_frame.cpp.
|
inherited |
Checks if this frame has been moved by the user.
Definition at line 875 of file gui_frame.cpp.
|
inherited |
Checks if this region has all its borders correctly defined.
Definition at line 211 of file gui_region.cpp.
|
inherited |
Checks if this region is virtual.
Definition at line 553 of file gui_region.cpp.
|
inherited |
Checks if this region can be seen on the screen.
Definition at line 207 of file gui_region.cpp.
|
protectedinherited |
Definition at line 585 of file gui_region.cpp.
Returns one of this region's anchor to modify it.
p | The anchor point |
Definition at line 529 of file gui_region.cpp.
|
protected |
Definition at line 1001 of file gui_edit_box.cpp.
|
protected |
Definition at line 1011 of file gui_edit_box.cpp.
|
protected |
Definition at line 1043 of file gui_edit_box.cpp.
|
virtualinherited |
Tells this region that its borders need updating.
Reimplemented in lxgui::gui::slider.
Definition at line 744 of file gui_region.cpp.
|
overridevirtual |
Notifies this frame that it has received or lost focus.
focus | 'true' if focus is received, 'false' if lost |
Reimplemented from lxgui::gui::frame.
Definition at line 612 of file gui_edit_box.cpp.
|
protectedinherited |
Definition at line 1385 of file gui_frame.cpp.
|
overridevirtualinherited |
Notifies this region that it is no longer visible on screen.
Reimplemented from lxgui::gui::region.
Definition at line 1457 of file gui_frame.cpp.
|
inherited |
Tells this frame to rebuild its layer list.
Definition at line 489 of file gui_frame.cpp.
|
overridevirtualinherited |
Notifies this region that it has been fully loaded.
Reimplemented from lxgui::gui::region.
Definition at line 478 of file gui_frame.cpp.
|
virtualinherited |
Tells this frame it is being hovered by the mouse.
mouse_in_frame | 'true' if the mouse is above this frame |
mouse_pos | The mouse coordinates in pixels |
Definition at line 1501 of file gui_frame.cpp.
|
overridevirtualinherited |
Notifies the renderer of this region that it needs to be redrawn.
Reimplemented from lxgui::gui::region.
Definition at line 1481 of file gui_frame.cpp.
|
overridevirtual |
Tells this region that the global interface scaling factor has changed.
Reimplemented from lxgui::gui::region.
Definition at line 651 of file gui_edit_box.cpp.
|
protectedinherited |
Definition at line 567 of file gui_frame.cpp.
|
overridevirtualinherited |
Notifies this region that it is now visible on screen.
Reimplemented from lxgui::gui::region.
Definition at line 1423 of file gui_frame.cpp.
|
protectedinherited |
Definition at line 1096 of file gui_frame.cpp.
|
overrideprotectedvirtual |
Reimplemented from lxgui::gui::frame.
Definition at line 39 of file gui_edit_box_parser.cpp.
|
protectedvirtualinherited |
Definition at line 89 of file gui_region_parser.cpp.
|
overrideprotectedvirtual |
Reimplemented from lxgui::gui::region.
Definition at line 8 of file gui_edit_box_parser.cpp.
|
protectedvirtualinherited |
Definition at line 133 of file gui_frame_parser.cpp.
|
protectedinherited |
Definition at line 360 of file gui_frame_parser.cpp.
|
protectedinherited |
Definition at line 10 of file gui_region_parser.cpp.
|
protectedinherited |
Definition at line 35 of file gui_region_parser.cpp.
|
inherited |
Convert an addon-relative file path to a application-relative path.
file_name | The raw file name |
Definition at line 818 of file gui_region.cpp.
|
protected |
Definition at line 49 of file gui_edit_box_parser.cpp.
|
protectedvirtualinherited |
Definition at line 389 of file gui_frame_parser.cpp.
|
protectedvirtualinherited |
Definition at line 271 of file gui_frame_parser.cpp.
|
protectedvirtualinherited |
Definition at line 342 of file gui_frame_parser.cpp.
|
finalvirtualinherited |
Parses data from a layout_node.
node | The layout node |
Reimplemented from lxgui::gui::region.
Definition at line 27 of file gui_frame_parser.cpp.
|
protectedinherited |
Definition at line 24 of file gui_region_parser.cpp.
|
protectedinherited |
Definition at line 28 of file gui_region_parser.cpp.
|
protectedinherited |
Definition at line 306 of file gui_frame_parser.cpp.
|
protectedvirtualinherited |
Definition at line 82 of file gui_frame_parser.cpp.
|
protectedvirtualinherited |
Definition at line 397 of file gui_frame_parser.cpp.
|
protectedvirtualinherited |
Definition at line 65 of file gui_region_parser.cpp.
|
protected |
Definition at line 75 of file gui_edit_box_parser.cpp.
|
protectedvirtualinherited |
Definition at line 124 of file gui_frame_parser.cpp.
|
protected |
Definition at line 1072 of file gui_edit_box.cpp.
|
inherited |
Increases this frame's level so it's the highest of the strata.
Definition at line 1286 of file gui_frame.cpp.
|
protectedinherited |
Definition at line 614 of file gui_region.cpp.
|
inherited |
Tells this frame to react to a certain event.
event_name | The name of the event |
Definition at line 1131 of file gui_frame.cpp.
|
static |
Registers this region class to the provided Lua state.
|
overridevirtualinherited |
Removes this region from its parent and return an owning pointer.
Reimplemented from lxgui::gui::region.
Definition at line 1264 of file gui_frame.cpp.
|
inherited |
Notifies this region that another one is no longer anchored to it.
obj | The region no longer anchored |
Definition at line 565 of file gui_region.cpp.
|
protected |
Definition at line 935 of file gui_edit_box.cpp.
|
inherited |
Removes a frame from this frame's children.
child | The frame to remove |
Definition at line 690 of file gui_frame.cpp.
|
inherited |
Removes the Lua glue.
Definition at line 775 of file gui_region.cpp.
|
inherited |
Removes a layered_region from this frame's children.
reg | The layered_region to remove |
Definition at line 617 of file gui_frame.cpp.
|
inherited |
Removes a script from this frame.
script_name | The name of the script (e.g., "OnEvent") |
Definition at line 1080 of file gui_frame.cpp.
|
overridevirtualinherited |
Renders this region on the current render target.
Reimplemented from lxgui::gui::region.
Definition at line 62 of file gui_frame.cpp.
|
inherited |
Round an absolute position on screen to the nearest physical pixel.
position | The input absolute position (can be fractional) |
method | The rounding method |
Definition at line 578 of file gui_region.cpp.
|
inherited |
Round an absolute position on screen to the nearest physical pixel.
value | The input absolute position (can be fractional) |
method | The rounding method |
Definition at line 573 of file gui_region.cpp.
|
overridevirtualinherited |
Prints all relevant information about this region in a string.
tab | The offset to give to all lines |
Reimplemented from lxgui::gui::region.
Reimplemented in lxgui::gui::slider, and lxgui::gui::status_bar.
Definition at line 84 of file gui_frame.cpp.
|
inherited |
Sets this frame's absolute hit rect insets.
insets | Offsets |
Definition at line 1193 of file gui_frame.cpp.
|
inherited |
Sets the addon this frame belongs to.
a | The addon this frame belongs to |
Definition at line 833 of file gui_region.cpp.
|
inherited |
Adjusts this regions anchors to fit the provided region.
obj_name | The name of the object to fit to |
Definition at line 404 of file gui_region.cpp.
|
inherited |
Adjusts this regions anchors to fit the provided region.
obj | A pointer to the object you want to wrap |
Definition at line 437 of file gui_region.cpp.
|
inherited |
Changes this region's alpha (opacity).
alpha | The new alpha value |
Definition at line 169 of file gui_region.cpp.
|
inlineinherited |
Adds/replaces an anchor.
args | Argument to construct a new anchor_data |
Definition at line 503 of file gui_region.hpp.
|
inherited |
Adds/replaces an anchor.
a | The anchor to add |
Definition at line 473 of file gui_region.cpp.
void lxgui::gui::edit_box::set_arrows_ignored | ( | bool | arrows_ignored | ) |
Sets whether keyboard arrows move the carret or not.
arrows_ignored | 'true' to ignore arrow keys |
Definition at line 590 of file gui_edit_box.cpp.
|
inherited |
Sets this frames' backdrop.
bdrop | The new backdrop |
Definition at line 1188 of file gui_frame.cpp.
void lxgui::gui::edit_box::set_blink_time | ( | double | blink_time | ) |
Sets the carret's blink time.
blink_time | The number of seconds to wait between each blink |
Definition at line 401 of file gui_edit_box.cpp.
|
inherited |
Sets if this frame is clamped to screen.
is_clamped_to_screen | 'true' if this frame is clamped to screen |
Definition at line 1174 of file gui_frame.cpp.
void lxgui::gui::edit_box::set_cursor_position | ( | std::size_t | pos | ) |
Moves the cursor to a chosen position.
pos | The new cursor position (0: before first character, get_letter_count(): after last character). |
Definition at line 343 of file gui_edit_box.cpp.
|
overridevirtualinherited |
Changes this region's absolute dimensions (in pixels).
dimensions | The new dimensions |
Reimplemented from lxgui::gui::region.
Definition at line 345 of file gui_frame.cpp.
|
inlineinherited |
Tells this frame whether to react to mouse drag or not.
button_name | The mouse button to react to |
enable | 'true' to enable, 'false' to disable |
Definition at line 1391 of file gui_frame.hpp.
|
inlineinherited |
Tells this frame whether to react to mouse drag or not.
button_id | The mouse button to react to |
enable | 'true' to enable, 'false' to disable |
Definition at line 1404 of file gui_frame.hpp.
|
inlineinherited |
Enables or disables a layer.
layer_id | The id of the layer to disable |
enable | 'true' to enable, 'false' to disable |
Definition at line 342 of file gui_frame.hpp.
|
inherited |
Asks for focus for this frame.
focus | 'true' to ask for focus, 'false' to release it |
Definition at line 1318 of file gui_frame.cpp.
void lxgui::gui::edit_box::set_font | ( | const std::string & | font_name, |
float | height | ||
) |
Sets the font (file and size) to render the content.
font_name | The file path to the .ttf file |
height | The font height |
Definition at line 679 of file gui_edit_box.cpp.
void lxgui::gui::edit_box::set_font_string | ( | utils::observer_ptr< font_string > | fstr | ) |
Sets the font_string to use to render the content.
fstr | The font_string to use to render the content |
Definition at line 660 of file gui_edit_box.cpp.
|
inherited |
Flags this object as rendered by another object.
rdr | The object that will take care of rendering this region |
Definition at line 1398 of file gui_frame.cpp.
|
overridevirtualinherited |
Changes this region's absolute height (in pixels).
abs_height | The new height |
Reimplemented from lxgui::gui::region.
Definition at line 355 of file gui_frame.cpp.
void lxgui::gui::edit_box::set_highlight_color | ( | const color & | c | ) |
Sets the color of the highlight quad.
c | The color |
Definition at line 297 of file gui_edit_box.cpp.
void lxgui::gui::edit_box::set_integer_only | ( | bool | integer_only | ) |
Makes this edit_box allow integer numbers only.
integer_only | 'true' to only allow integer numbers |
Definition at line 458 of file gui_edit_box.cpp.
|
inlineinherited |
Marks this frame as able to receive keyboard input from a specific key.
key_name | The key to capture |
enable | 'true' to enable, 'false' to disable |
Definition at line 486 of file gui_frame.hpp.
|
inlineinherited |
Marks this frame as able to receive keyboard input from a specific key.
key_id | The key to capture |
enable | 'true' to enable, 'false' to disable |
Definition at line 501 of file gui_frame.hpp.
|
inherited |
Sets if this frame can receive any keyboard input.
is_keyboard_enabled | 'true' to enable |
Definition at line 454 of file gui_frame.cpp.
|
inherited |
Sets this frame's level.
level_id | The new level |
Definition at line 1201 of file gui_frame.cpp.
|
protectedinherited |
|
inherited |
Flags this region as manually inherited or not.
Definition at line 780 of file gui_region.cpp.
|
inherited |
Sets this frame's maximum size.
max | The maximum dimensions of this frame |
Definition at line 1212 of file gui_frame.cpp.
|
inherited |
Sets this frame's maximum height.
max_height | The maximum height this frame can have |
Definition at line 1222 of file gui_frame.cpp.
void lxgui::gui::edit_box::set_max_history_lines | ( | std::size_t | max_history_lines | ) |
Sets the maximum number of history lines this edit_box can keep.
max_history_lines | The max number of history lines |
Definition at line 543 of file gui_edit_box.cpp.
void lxgui::gui::edit_box::set_max_letters | ( | std::size_t | max_letters | ) |
Sets the maximum number of letters to allow in this edit_box.
max_letters | The max number of letters |
Definition at line 356 of file gui_edit_box.cpp.
|
inherited |
Sets this frame's maximum width.
max_width | The maximum width this frame can have |
Definition at line 1233 of file gui_frame.cpp.
|
inherited |
Sets this frame's minimum size.
min | Minimum dimensions of this frame |
Definition at line 1217 of file gui_frame.cpp.
|
inherited |
Sets this frame's minimum height.
min_height | The minimum height this frame can have |
Definition at line 1244 of file gui_frame.cpp.
|
inherited |
Sets this frame's minimum width.
min_width | The minimum width this frame can have |
Definition at line 1252 of file gui_frame.cpp.
|
inherited |
Sets if this frame can receive mouse click input.
is_mouse_enabled | 'true' to enable |
Definition at line 442 of file gui_frame.cpp.
|
inherited |
Sets if this frame can receive mouse input (click & move).
is_mouse_enabled | 'true' to enable |
Definition at line 437 of file gui_frame.cpp.
|
inherited |
Sets if this frame can receive mouse move input.
is_mouse_enabled | 'true' to enable |
Definition at line 446 of file gui_frame.cpp.
|
inherited |
Sets if this frame can receive mouse wheel input.
is_mouse_wheel_enabled | 'true' to enable |
Definition at line 450 of file gui_frame.cpp.
|
inherited |
Sets if this frame can be moved by the user.
is_movable | 'true' to allow the user to move this frame |
Definition at line 1260 of file gui_frame.cpp.
void lxgui::gui::edit_box::set_multi_line | ( | bool | multi_line | ) |
Allows this edit_box to have several lines in it.
multi_line | 'true' to allow several lines in this edit_box |
Definition at line 507 of file gui_edit_box.cpp.
|
protectedinherited |
Sets this region's name.
name | This region's name |
Definition at line 294 of file gui_region.cpp.
void lxgui::gui::edit_box::set_numeric_only | ( | bool | numeric_only | ) |
Makes this edit_box allow numeric characters only.
numeric_only | 'true' to only allow numeric characters |
Definition at line 414 of file gui_edit_box.cpp.
|
overrideprotectedvirtualinherited |
Changes this region's parent.
parent | The new parent |
Reimplemented from lxgui::gui::region.
Definition at line 513 of file gui_frame.cpp.
void lxgui::gui::edit_box::set_password_mode_enabled | ( | bool | enable | ) |
Enables or disables password mode.
enable | 'true' to enable password mode |
Definition at line 492 of file gui_edit_box.cpp.
void lxgui::gui::edit_box::set_positive_only | ( | bool | positive_only | ) |
Makes this edit_box allow positive numbers only.
positive_only | 'true' to only allow positive numbers |
Definition at line 436 of file gui_edit_box.cpp.
|
inherited |
Sets this frame's relative hit rect insets.
insets | Offsets |
Definition at line 1197 of file gui_frame.cpp.
|
inherited |
Changes this region's dimensions (relative to its parent).
dimensions | The new dimensions (relative) |
Definition at line 251 of file gui_region.cpp.
|
inherited |
Changes this region's height (relative to its parent).
rel_height | The new height |
Definition at line 265 of file gui_region.cpp.
|
inherited |
Changes this region's width (relative to its parent).
rel_width | The new width |
Definition at line 258 of file gui_region.cpp.
|
inherited |
Sets if this frame can be resized by the user.
is_resizable | 'true' to allow the user to resize this frame |
Definition at line 1272 of file gui_frame.cpp.
|
inherited |
Sets this frame's scale.
scale | The new scale |
Definition at line 1276 of file gui_frame.cpp.
|
inlineinherited |
Sets a new handler script for this frame (replacing existing scripts).
script_name | The name of the script (e.g., "OnEvent") |
handler | The handler of the script, as a C++ function of signature script_signature |
info | The location where this script has been defined |
self
parameter of type other than frame, for example: dynamic_cast
, so that incorrect types will be reported. However this has a cost; if you are sure of the type and want to bypass this cost, just supply the self
type as the first template argument to this function: Definition at line 1305 of file gui_frame.hpp.
|
inlineinherited |
Sets a new handler script for this frame (replacing existing scripts).
script_name | The name of the script (e.g., "OnEvent") |
handler | The handler of the script, as a C++ function of signature script_signature |
info | The location where this script has been defined |
Definition at line 1273 of file gui_frame.hpp.
|
inlineinherited |
Sets a new handler script for this frame (replacing existing scripts).
script_name | The name of the script (e.g., "OnEvent") |
handler | The handler of the script, as a Lua function |
info | The location where this script has been defined |
Definition at line 1252 of file gui_frame.hpp.
|
inlineinherited |
Sets a new handler script for this frame (replacing existing scripts).
script_name | The name of the script (e.g., "OnEvent") |
content | The content of the script, as Lua code |
info | The location where this script has been defined |
Definition at line 1233 of file gui_frame.hpp.
|
inherited |
shows/hides this region.
is_shown | 'true' if you want to show this region |
Definition at line 196 of file gui_region.cpp.
|
inherited |
Sets this frame's strata.
strata_id | The new strata, or nullopt to inherit strata from parent |
Definition at line 1178 of file gui_frame.cpp.
void lxgui::gui::edit_box::set_text | ( | const utils::ustring & | content | ) |
Sets the content of this edit_box.
content | The content of this edit_box |
Definition at line 203 of file gui_edit_box.cpp.
void lxgui::gui::edit_box::set_text_insets | ( | const bounds2f & | insets | ) |
Sets the insets used to render the content text.
insets | (left, right, top, bottom) |
Definition at line 594 of file gui_edit_box.cpp.
|
inherited |
Sets if this frame is at top level.
is_top_level | 'true' to put the frame at top level |
Definition at line 1282 of file gui_frame.cpp.
|
inherited |
Sets a maximum update rate (in updates per seconds).
rate | The new rate, or 0 to update as often as possible |
Definition at line 1146 of file gui_frame.cpp.
|
inherited |
Sets if this frame has been moved by the user.
is_user_placed | 'true' if this frame has been moved by the user |
Definition at line 1355 of file gui_frame.cpp.
|
protectedinherited |
|
overridevirtualinherited |
Changes this region's absolute width (in pixels).
abs_width | The new width |
Reimplemented from lxgui::gui::region.
Definition at line 351 of file gui_frame.cpp.
|
inherited |
shows this region.
Definition at line 176 of file gui_region.cpp.
|
inherited |
Starts moving this frame with the mouse.
Definition at line 1359 of file gui_frame.cpp.
|
inherited |
Starts resizing this frame with the mouse.
p | The corner to move |
Definition at line 1372 of file gui_frame.cpp.
|
inherited |
ends moving this frame.
Definition at line 1367 of file gui_frame.cpp.
|
inherited |
ends resizing this frame.
Definition at line 1380 of file gui_frame.cpp.
void lxgui::gui::edit_box::unlight_text | ( | ) |
Deselects the selected text, if any.
Definition at line 234 of file gui_edit_box.cpp.
|
inherited |
Tells the frame not to react to a certain event.
event_name | The name of the event |
Definition at line 1139 of file gui_frame.cpp.
|
finalvirtualinherited |
Updates this region's logic.
delta | Time spent since last update |
Reimplemented from lxgui::gui::region.
Definition at line 1543 of file gui_frame.cpp.
|
overrideprotectedvirtual |
Reimplemented from lxgui::gui::frame.
Definition at line 73 of file gui_edit_box.cpp.
|
overrideprotectedvirtualinherited |
Reimplemented from lxgui::gui::region.
Definition at line 1519 of file gui_frame.cpp.
|
protected |
Definition at line 811 of file gui_edit_box.cpp.
|
protected |
Definition at line 775 of file gui_edit_box.cpp.
|
protected |
Definition at line 801 of file gui_edit_box.cpp.
|
protectedinherited |
Definition at line 1833 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 802 of file gui_region.hpp.
|
protectedinherited |
Definition at line 818 of file gui_region.hpp.
|
protectedinherited |
Definition at line 814 of file gui_region.hpp.
|
protectedinherited |
Definition at line 824 of file gui_region.hpp.
|
protected |
Definition at line 393 of file gui_edit_box.hpp.
|
protectedinherited |
Definition at line 1822 of file gui_frame.hpp.
|
protected |
Definition at line 402 of file gui_edit_box.hpp.
|
protectedinherited |
Definition at line 816 of file gui_region.hpp.
|
protected |
Definition at line 401 of file gui_edit_box.hpp.
|
protected |
Definition at line 403 of file gui_edit_box.hpp.
|
protectedinherited |
Definition at line 1801 of file gui_frame.hpp.
|
staticconstexpr |
Definition at line 351 of file gui_edit_box.hpp.
|
protected |
Definition at line 407 of file gui_edit_box.hpp.
|
protectedinherited |
Definition at line 815 of file gui_region.hpp.
|
protectedinherited |
Definition at line 822 of file gui_region.hpp.
|
protected |
Definition at line 385 of file gui_edit_box.hpp.
|
protected |
Definition at line 382 of file gui_edit_box.hpp.
|
protectedinherited |
Definition at line 1820 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 1816 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 1809 of file gui_frame.hpp.
|
protected |
Definition at line 409 of file gui_edit_box.hpp.
|
protectedinherited |
Definition at line 1819 of file gui_frame.hpp.
|
protected |
Definition at line 395 of file gui_edit_box.hpp.
Definition at line 396 of file gui_edit_box.hpp.
|
protected |
Definition at line 405 of file gui_edit_box.hpp.
|
protectedinherited |
Definition at line 1851 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 1829 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 1850 of file gui_frame.hpp.
|
protected |
Definition at line 390 of file gui_edit_box.hpp.
|
protectedinherited |
Definition at line 1827 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 811 of file gui_region.hpp.
|
protectedinherited |
Definition at line 809 of file gui_region.hpp.
|
protectedinherited |
Definition at line 1824 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 1846 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 1825 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 1826 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 1828 of file gui_frame.hpp.
|
protected |
Definition at line 392 of file gui_edit_box.hpp.
|
protected |
Definition at line 388 of file gui_edit_box.hpp.
|
protected |
Definition at line 391 of file gui_edit_box.hpp.
|
protected |
Definition at line 389 of file gui_edit_box.hpp.
|
protectedinherited |
Definition at line 1830 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 819 of file gui_region.hpp.
|
protected |
Definition at line 399 of file gui_edit_box.hpp.
|
protectedinherited |
Definition at line 1817 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 1831 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 812 of file gui_region.hpp.
|
protectedinherited |
Definition at line 810 of file gui_region.hpp.
|
protectedinherited |
Definition at line 820 of file gui_region.hpp.
|
protected |
Definition at line 383 of file gui_edit_box.hpp.
|
protectedinherited |
Definition at line 1806 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 1814 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 800 of file gui_region.hpp.
|
protectedinherited |
Definition at line 1839 of file gui_frame.hpp.
|
protected |
Definition at line 406 of file gui_edit_box.hpp.
|
protected |
Definition at line 387 of file gui_edit_box.hpp.
|
protectedinherited |
Definition at line 1837 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 1838 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 1836 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 804 of file gui_region.hpp.
|
staticconstexprprotectedinherited |
Definition at line 1804 of file gui_frame.hpp.
|
protected |
Definition at line 386 of file gui_edit_box.hpp.
|
protectedinherited |
Definition at line 807 of file gui_region.hpp.
|
protectedinherited |
Definition at line 805 of file gui_region.hpp.
|
protectedinherited |
Definition at line 1811 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 1812 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 1802 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 1834 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 1841 of file gui_frame.hpp.
|
protected |
Definition at line 398 of file gui_edit_box.hpp.
|
protected |
Definition at line 397 of file gui_edit_box.hpp.
|
protectedinherited |
Definition at line 1808 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 1815 of file gui_frame.hpp.
|
protected |
Definition at line 411 of file gui_edit_box.hpp.
|
protectedinherited |
Definition at line 1844 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 1848 of file gui_frame.hpp.
|
protected |
Definition at line 381 of file gui_edit_box.hpp.
|
protectedinherited |
Definition at line 1843 of file gui_frame.hpp.