A frame with a movable texture. More...
#include <gui_slider.hpp>
Public Types | |
using | base = frame |
using | child_list = std::list< utils::owner_ptr< frame > > |
Type of the frame child list (internal). More... | |
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). More... | |
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 | |
slider (utils::control_block &block, manager &mgr, const frame_core_attributes &attr) | |
Constructor. More... | |
std::string | serialize (const std::string &tab) const override |
Prints all relevant information about this region in a string. More... | |
bool | can_use_script (const std::string &script_name) const override |
Returns 'true' if this slider can use a script. More... | |
void | fire_script (const std::string &script_name, const event_data &data=event_data{}) override |
Calls a script. More... | |
void | copy_from (const region &obj) override |
Copies a region's parameters into this slider (inheritance). More... | |
void | set_thumb_texture (utils::observer_ptr< texture > tex) |
Sets the texture to use for the thumb. More... | |
const utils::observer_ptr< texture > & | get_thumb_texture () |
Returns the texture used for the thumb. More... | |
utils::observer_ptr< const texture > | get_thumb_texture () const |
Returns the texture used for the thumb. More... | |
void | set_orientation (orientation orient) |
Sets the orientation of this slider. More... | |
orientation | get_orientation () const |
Returns the orientation of this slider. More... | |
void | set_min_max_values (float min_value, float max_value) |
Sets the slider's value range. More... | |
void | set_min_value (float min_value) |
Sets this slider's minimum value. More... | |
void | set_max_value (float max_value) |
Sets this slider's maximum value. More... | |
float | get_min_value () const |
Returns this slider's minimum value. More... | |
float | get_max_value () const |
Returns this slider's maximum value. More... | |
void | set_value (float value, bool silent=false) |
Sets this slider's value. More... | |
float | get_value () const |
Returns this slider's value. More... | |
void | set_value_step (float value_step) |
Sets this slider's value step. More... | |
float | get_value_step () const |
Returns this slider's value step. More... | |
void | set_thumb_draw_layer (layer thumb_layer) |
Sets the draw layer of this slider's thumb texture. More... | |
layer | get_thumb_draw_layer () const |
Returns the draw layer of this slider's thumb texture. More... | |
void | set_allow_clicks_outside_thumb (bool allow) |
Allows the user to click anywhere in the slider to relocate the thumb. More... | |
bool | are_clicks_outside_thumb_allowed () const |
Checks if clicks are allowed outside of the thumb. More... | |
bool | is_in_region (const vector2f &position) const override |
Checks if the provided coordinates are in the slider. More... | |
void | notify_borders_need_update () override |
Tells this region that its borders need updating. More... | |
void | render () const override |
Renders this region on the current render target. More... | |
void | update (float delta) final |
Updates this region's logic. More... | |
void | create_title_region () |
Creates a new title region for this frame. More... | |
void | set_draw_layer_enabled (layer layer_id, bool enable) |
Enables or disables a layer. More... | |
void | disable_draw_layer (layer layer_id) |
Disables a layer. More... | |
void | enable_draw_layer (layer layer_id) |
Enables a layer. More... | |
void | set_mouse_enabled (bool is_mouse_enabled) |
Sets if this frame can receive mouse input (click & move). More... | |
void | enable_mouse () |
Marks this frame as able to receive mouse input (click & move). More... | |
void | disable_mouse () |
Marks this frame as unable to receive mouse input (click & move). More... | |
void | set_mouse_click_enabled (bool is_mouse_enabled) |
Sets if this frame can receive mouse click input. More... | |
void | enable_mouse_click () |
Marks this frame as able to receive mouse click input. More... | |
void | disable_mouse_click () |
Marks this frame as unable to receive mouse click input. More... | |
void | set_mouse_move_enabled (bool is_mouse_enabled) |
Sets if this frame can receive mouse move input. More... | |
void | enable_mouse_move () |
Marks this frame as able to receive mouse move input. More... | |
void | disable_mouse_move () |
Marks this frame as unable to receive mouse move input. More... | |
void | set_mouse_wheel_enabled (bool is_mouse_wheel_enabled) |
Sets if this frame can receive mouse wheel input. More... | |
void | enable_mouse_wheel () |
Marks this frame as able to receive mouse wheel input. More... | |
void | disable_mouse_wheel () |
Marks this frame as unable to receive mouse wheel input. More... | |
void | set_keyboard_enabled (bool is_keyboard_enabled) |
Sets if this frame can receive any keyboard input. More... | |
void | enable_keyboard () |
Marks this frame as able to receive any keyboard input. More... | |
void | disable_keyboard () |
Marks this frame as unable to receive any keyboard input. More... | |
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. More... | |
void | set_key_capture_enabled (input::key key_id, bool enable) |
Marks this frame as able to receive keyboard input from a specific key. More... | |
void | enable_key_capture (const std::string &key_name) |
Marks this frame as able to receive keyboard input from a specific key. More... | |
void | enable_key_capture (input::key key_id) |
Marks this frame as able to receive keyboard input from a specific key. More... | |
void | disable_key_capture (const std::string &key_name) |
Marks this frame as unable to receive keyboard input from a specific key. More... | |
void | disable_key_capture (input::key key_id) |
Marks this frame as unable to receive keyboard input from a specific key. More... | |
void | disable_key_capture () |
Marks this frame as unable to receive keyboard input from any key. More... | |
bool | has_script (const std::string &script_name) const |
Checks if this frame has a script defined. More... | |
utils::observer_ptr< layered_region > | add_region (utils::owner_ptr< layered_region > reg) |
Adds a layered_region to this frame's children. More... | |
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. More... | |
utils::owner_ptr< layered_region > | remove_region (const utils::observer_ptr< layered_region > ®) |
Removes a layered_region from this frame's children. More... | |
utils::observer_ptr< layered_region > | create_layered_region (layer layer_id, region_core_attributes attr) |
Creates a new region as child of this frame. More... | |
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. More... | |
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. More... | |
utils::observer_ptr< frame > | create_child (frame_core_attributes attr) |
Creates a new frame as child of this frame. More... | |
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. More... | |
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. More... | |
utils::observer_ptr< frame > | add_child (utils::owner_ptr< frame > child) |
Adds a frame to this frame's children. More... | |
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. More... | |
utils::owner_ptr< frame > | remove_child (const utils::observer_ptr< frame > &child) |
Removes a frame from this frame's children. More... | |
child_list_view | get_children () |
Returns the child list. More... | |
const_child_list_view | get_children () const |
Returns the child list. More... | |
utils::observer_ptr< const frame > | get_child (const std::string &name) const |
Returns one of this frame's children. More... | |
utils::observer_ptr< frame > | get_child (const std::string &name) |
Returns one of this frame's children. More... | |
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. More... | |
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. More... | |
region_list_view | get_regions () |
Returns the region list. More... | |
const_region_list_view | get_regions () const |
Returns the region list. More... | |
utils::observer_ptr< const layered_region > | get_region (const std::string &name) const |
Returns one of this frame's region. More... | |
utils::observer_ptr< layered_region > | get_region (const std::string &name) |
Returns one of this frame's region. More... | |
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. More... | |
float | get_effective_scale () const |
Calculates effective scale. More... | |
int | get_level () const |
Returns this frame's level. More... | |
std::optional< strata > | get_strata () const |
Returns this frame's strata. More... | |
strata | get_effective_strata () const |
Returns this frame's effective strata. More... | |
utils::observer_ptr< const frame > | get_top_level_parent () const |
Returns this frame's top-level parent. More... | |
utils::observer_ptr< frame > | get_top_level_parent () |
Returns this frame's top-level parent. More... | |
const backdrop * | get_backdrop () const |
Returns this frame's backdrop. More... | |
backdrop * | get_backdrop () |
Returns this frame's backdrop. More... | |
backdrop & | get_or_create_backdrop () |
Returns this frame's backdrop, creating it if needed. More... | |
const bounds2f & | get_abs_hit_rect_insets () const |
Returns this frame's absolute hit rect insets. More... | |
const bounds2f & | get_rel_hit_rect_insets () const |
Returns this frame's relative hit rect insets. More... | |
vector2f | get_max_dimensions () const |
Returns this frame's max dimensions. More... | |
vector2f | get_min_dimensions () const |
Returns this frame's min dimensions. More... | |
std::size_t | get_child_count () const |
Returns the number of children of this frame. More... | |
std::size_t | get_child_count_upper_bound () const |
Returns the approximate number of children of this frame. More... | |
std::size_t | get_layered_region_count () const |
Returns the number of layered regions of this frame. More... | |
std::size_t | get_layered_region_count_upper_bound () const |
Returns the approximate number of regions of this frame. More... | |
float | get_scale () const |
Returns this frame's scale. More... | |
utils::observer_ptr< const region > | get_title_region () const |
Returns this frame's title region. More... | |
utils::observer_ptr< region > | get_title_region () |
Returns this frame's title region. More... | |
bool | is_clamped_to_screen () const |
Checks if this frame is clamped to screen. More... | |
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. More... | |
utils::observer_ptr< frame > | find_topmost_frame (const std::function< bool(const frame &)> &predicate) |
Find the topmost frame matching the provided predicate. More... | |
bool | is_mouse_move_enabled () const |
Checks if this frame can receive mouse movement input. More... | |
bool | is_mouse_click_enabled () const |
Checks if this frame can receive mouse click input. More... | |
bool | is_mouse_wheel_enabled () const |
Checks if this frame can receive mouse wheel input. More... | |
bool | is_drag_enabled (const std::string &button_name) const |
Checks if this frame is registered for drag events with the provided mouse button. More... | |
bool | is_key_capture_enabled (const std::string &key_name) const |
Checks if this frame can receive keyboard input from a specific key. More... | |
bool | is_keyboard_enabled () const |
Checks if this frame can receive any keyboard input. More... | |
bool | is_movable () const |
Checks if this frame can be moved. More... | |
bool | is_resizable () const |
Checks if this frame can be resized. More... | |
bool | is_top_level () const |
Checks if this frame is at top level. More... | |
bool | is_user_placed () const |
Checks if this frame has been moved by the user. More... | |
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). More... | |
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). More... | |
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). More... | |
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). More... | |
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). More... | |
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). More... | |
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). More... | |
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). More... | |
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. More... | |
void | remove_script (const std::string &script_name) |
Removes a script from this frame. More... | |
void | set_update_rate (float rate) |
Sets a maximum update rate (in updates per seconds). More... | |
float | get_update_rate () const |
Gets the maximum update rate (in upates per seconds). More... | |
void | register_event (const std::string &event_name) |
Tells this frame to react to a certain event. More... | |
void | unregister_event (const std::string &event_name) |
Tells the frame not to react to a certain event. More... | |
void | set_drag_enabled (const std::string &button_name, bool enable) |
Tells this frame whether to react to mouse drag or not. More... | |
void | set_drag_enabled (input::mouse_button button_id, bool enable) |
Tells this frame whether to react to mouse drag or not. More... | |
void | enable_drag (const std::string &button_name) |
Tells this frame to react to mouse drag. More... | |
void | enable_drag (input::mouse_button button_id) |
Tells this frame to react to mouse drag. More... | |
void | disable_drag (const std::string &button_name) |
Tells this frame to not react to mouse drag. More... | |
void | disable_drag (input::mouse_button button_id) |
Tells this frame to not react to mouse drag. More... | |
void | disable_drag () |
Tells this frame to not react to mouse drag from any mouse button. More... | |
void | set_clamped_to_screen (bool is_clamped_to_screen) |
Sets if this frame is clamped to screen. More... | |
void | set_strata (std::optional< strata > strata_id) |
Sets this frame's strata. More... | |
void | set_backdrop (std::unique_ptr< backdrop > bdrop) |
Sets this frames' backdrop. More... | |
void | set_abs_hit_rect_insets (const bounds2f &insets) |
Sets this frame's absolute hit rect insets. More... | |
void | set_rel_hit_rect_insets (const bounds2f &insets) |
Sets this frame's relative hit rect insets. More... | |
void | set_level (int level_id) |
Sets this frame's level. More... | |
void | set_max_dimensions (const vector2f &max) |
Sets this frame's maximum size. More... | |
void | set_min_dimensions (const vector2f &min) |
Sets this frame's minimum size. More... | |
void | set_max_height (float max_height) |
Sets this frame's maximum height. More... | |
void | set_max_width (float max_width) |
Sets this frame's maximum width. More... | |
void | set_min_height (float min_height) |
Sets this frame's minimum height. More... | |
void | set_min_width (float min_width) |
Sets this frame's minimum width. More... | |
void | set_movable (bool is_movable) |
Sets if this frame can be moved by the user. More... | |
utils::owner_ptr< region > | release_from_parent () override |
Removes this region from its parent and return an owning pointer. More... | |
void | set_resizable (bool is_resizable) |
Sets if this frame can be resized by the user. More... | |
void | set_scale (float scale) |
Sets this frame's scale. More... | |
void | set_top_level (bool is_top_level) |
Sets if this frame is at top level. More... | |
void | raise () |
Increases this frame's level so it's the highest of the strata. More... | |
void | set_user_placed (bool is_user_placed) |
Sets if this frame has been moved by the user. More... | |
void | start_moving () |
Starts moving this frame with the mouse. More... | |
void | stop_moving () |
ends moving this frame. More... | |
void | start_sizing (const point &p) |
Starts resizing this frame with the mouse. More... | |
void | stop_sizing () |
ends resizing this frame. More... | |
void | enable_auto_focus (bool enable) |
Enables automatic focus when this frame is shown or raised. More... | |
bool | is_auto_focus_enabled () const |
Checks if automatic focus is enabled. More... | |
void | set_focus (bool focus) |
Asks for focus for this frame. More... | |
bool | has_focus () const |
Check if this frame currently has focus. More... | |
void | set_frame_renderer (utils::observer_ptr< frame_renderer > rdr) |
Flags this object as rendered by another object. More... | |
utils::observer_ptr< const frame_renderer > | get_frame_renderer () const |
Returns the renderer of this object, nullptr if none. More... | |
const utils::observer_ptr< frame_renderer > & | get_frame_renderer () |
Returns the renderer of this object, nullptr if none. More... | |
utils::observer_ptr< const frame_renderer > | get_effective_frame_renderer () const final |
Returns the renderer of this object or its parents, nullptr if none. More... | |
utils::observer_ptr< frame_renderer > | get_effective_frame_renderer () |
Returns the renderer of this object or its parents, nullptr if none. More... | |
void | notify_renderer_need_redraw () override |
Notifies the renderer of this region that it needs to be redrawn. More... | |
void | set_dimensions (const vector2f &dimensions) override |
Changes this region's absolute dimensions (in pixels). More... | |
void | set_width (float abs_width) override |
Changes this region's absolute width (in pixels). More... | |
void | set_height (float abs_height) override |
Changes this region's absolute height (in pixels). More... | |
virtual void | notify_mouse_in_frame (bool mouse_in_frame, const vector2f &mouse_pos) |
Tells this frame it is being hovered by the mouse. More... | |
void | notify_visible () override |
Notifies this region that it is now visible on screen. More... | |
void | notify_invisible () override |
Notifies this region that it is no longer visible on screen. More... | |
virtual void | notify_focus (bool focus) |
Notifies this frame that it has received or lost focus. More... | |
void | notify_loaded () override |
Notifies this region that it has been fully loaded. More... | |
void | notify_layers_need_update () |
Tells this frame to rebuild its layer list. More... | |
void | notify_scaling_factor_updated () override |
Tells this region that the global interface scaling factor has changed. More... | |
void | parse_layout (const layout_node &node) final |
Parses data from a layout_node. More... | |
const std::string & | get_name () const |
Returns this region's name. More... | |
const std::string & | get_raw_name () const |
Returns this region's raw name. More... | |
utils::observer_ptr< const frame > | get_parent () const |
Returns this region's parent. More... | |
const utils::observer_ptr< frame > & | get_parent () |
Returns this region's parent. More... | |
void | destroy () |
Forcefully removes this region from the GUI. More... | |
void | set_alpha (float alpha) |
Changes this region's alpha (opacity). More... | |
float | get_alpha () const |
Returns this region's alpha (opacity). More... | |
float | get_effective_alpha () const |
Returns this region's effective alpha (opacity). More... | |
void | show () |
shows this region. More... | |
void | hide () |
hides this region. More... | |
void | set_shown (bool is_shown) |
shows/hides this region. More... | |
bool | is_shown () const |
Checks if this region is shown. More... | |
bool | is_visible () const |
Checks if this region can be seen on the screen. More... | |
bool | is_valid () const |
Checks if this region has all its borders correctly defined. More... | |
void | set_relative_dimensions (const vector2f &dimensions) |
Changes this region's dimensions (relative to its parent). More... | |
void | set_relative_width (float rel_width) |
Changes this region's width (relative to its parent). More... | |
void | set_relative_height (float rel_height) |
Changes this region's height (relative to its parent). More... | |
const vector2f & | get_dimensions () const |
Returns this region's explicitly-defined width and height (in pixels). More... | |
vector2f | get_apparent_dimensions () const |
Returns this region's apparent width and height (in pixels). More... | |
bool | is_apparent_width_defined () const |
Checks if this region's apparent width is defined. More... | |
bool | is_apparent_height_defined () const |
Checks if this region's apparent height is defined. More... | |
const std::string & | get_region_type () const |
Returns the type of this region. More... | |
bool | is_region_type (const std::string &type_name) const |
Checks if this region is of the provided type. More... | |
template<typename ObjectType > | |
bool | is_region_type () const |
Checks if this region is of the provided type. More... | |
bool | is_region_type (const region &obj) const |
Checks if this region is of a type equal or derived from the supplied region. More... | |
float | get_bottom () const |
Returns the vertical position of this region's bottom border. More... | |
vector2f | get_center () const |
Returns the position of this region's center. More... | |
float | get_left () const |
Returns the horizontal position of this region's left border. More... | |
float | get_right () const |
Returns the horizontal position of this region's right border. More... | |
float | get_top () const |
Returns the vertical position of this region's top border. More... | |
const bounds2f & | get_borders () const |
Returns this region's borders. More... | |
void | clear_all_anchors () |
Removes all anchors. More... | |
void | set_all_anchors (const utils::observer_ptr< region > &obj) |
Adjusts this regions anchors to fit the provided region. More... | |
void | set_all_anchors (const std::string &obj_name) |
Adjusts this regions anchors to fit the provided region. More... | |
void | set_anchor (const anchor_data &a) |
Adds/replaces an anchor. More... | |
template<typename... Args> | |
void | set_anchor (Args &&... args) |
Adds/replaces an anchor. More... | |
bool | depends_on (const region &obj) const |
Checks if this region depends on another. More... | |
std::size_t | get_anchor_count () const |
Returns the number of defined anchors. More... | |
anchor & | modify_anchor (point p) |
Returns one of this region's anchor to modify it. More... | |
const anchor & | get_anchor (point p) const |
Returns one of this region's anchor. More... | |
const std::array< std::optional< anchor >, 9 > & | get_anchors () const |
Returns all of this region's anchors. More... | |
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. More... | |
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. More... | |
void | add_anchored_object (region &obj) |
Notifies this region that another one is anchored to it. More... | |
void | remove_anchored_object (region &obj) |
Notifies this region that another one is no longer anchored to it. More... | |
bool | is_virtual () const |
Checks if this region is virtual. More... | |
void | set_manually_inherited (bool manually_inherited) |
Flags this region as manually inherited or not. More... | |
bool | is_manually_inherited () const |
Checks if this object is manually inherited. More... | |
const std::vector< utils::observer_ptr< region > > & | get_anchored_objects () const |
Returns the list of all objects that are anchored to this one. More... | |
bool | is_loaded () const |
Checks if this region has been fully loaded. More... | |
void | set_addon (const addon *a) |
Sets the addon this frame belongs to. More... | |
const addon * | get_addon () const |
Returns this frame's addon. More... | |
std::string | parse_file_name (const std::string &file_name) const |
Convert an addon-relative file path to a application-relative path. More... | |
manager & | get_manager () |
Returns this region's manager. More... | |
const manager & | get_manager () const |
Returns this region's manager. More... | |
registry & | get_registry () |
Returns the UI object registry, which keeps track of all objects in the UI. More... | |
const registry & | get_registry () const |
Returns the UI object registry, which keeps track of all objects in the UI. More... | |
void | remove_glue () |
Removes the Lua glue. More... | |
Static Public Member Functions | |
static void | register_on_lua (sol::state &lua) |
Registers this region class to the provided Lua state. More... | |
static std::string | get_adjusted_script_name (const std::string &script_name) |
Returns the "adjusted" script name: "OnEvent" becomes "on_event". More... | |
Static Public Attributes | |
static constexpr const char * | class_name = "Slider" |
Protected Member Functions | |
void | constrain_thumb_ () |
void | update_thumb_texture_ () |
void | notify_thumb_texture_needs_update_ () |
void | parse_attributes_ (const layout_node &node) override |
void | parse_all_nodes_before_children_ (const layout_node &node) override |
const std::vector< std::string > & | get_type_list_ () const override |
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) |
virtual void | update_ (float delta) |
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. More... | |
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. More... | |
void | set_name_ (const std::string &name) |
Sets this region's name. More... | |
template<typename T > | |
void | initialize_ (T &self, const region_core_attributes &attr) |
Set up function to call in all derived class constructors. More... | |
Static Protected Member Functions | |
template<typename T > | |
static const std::vector< std::string > & | get_type_list_impl_ () |
Static Protected Attributes | |
static constexpr std::size_t | num_layers = magic_enum::enum_count<layer>() |
A frame with a movable texture.
This frame contains a special texture, the "slider thumb". It can be moved along a single axis (X or Y) and its position can be used to represent a value (for configuration menus, or scroll bars).
Events. Hard-coded events available to all sliders, in addition to those from frame:
OnValueChanged
: Triggered whenever the value controlled by the slider changes. This is triggered whenever the user moves the slider thumb, and by slider::set_value. This can also be triggered by slider::set_min_value, slider::set_max_value, slider::set_min_max_values, and slider::set_value_step if the previous value would not satisfy the new constraints. Definition at line 30 of file gui_slider.hpp.
using lxgui::gui::slider::base = frame |
Definition at line 32 of file gui_slider.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 22 of file gui_slider.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.
|
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.
|
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.
bool lxgui::gui::slider::are_clicks_outside_thumb_allowed | ( | ) | const |
Checks if clicks are allowed outside of the thumb.
Definition at line 315 of file gui_slider.cpp.
|
overridevirtual |
Returns 'true' if this slider can use a script.
script_name | The name of the script |
Reimplemented from lxgui::gui::frame.
Definition at line 45 of file gui_slider.cpp.
|
protectedinherited |
Definition at line 359 of file gui_frame.cpp.
|
protectedinherited |
Definition at line 946 of file gui_frame.cpp.
|
inherited |
Removes all anchors.
Definition at line 365 of file gui_region.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.
|
protected |
Definition at line 122 of file gui_slider.cpp.
|
overridevirtual |
Copies a region's parameters into this slider (inheritance).
obj | The region to copy |
Reimplemented from lxgui::gui::frame.
Definition at line 92 of file gui_slider.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.
|
protectedinherited |
Definition at line 136 of file gui_region_tpl.hpp.
|
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.
|
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.
|
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 49 of file gui_slider.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.
|
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 |
|
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.
|
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.
|
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.
|
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.
float lxgui::gui::slider::get_max_value | ( | ) | const |
Returns this slider's maximum value.
Definition at line 291 of file gui_slider.cpp.
|
inherited |
Returns this frame's min dimensions.
Definition at line 789 of file gui_frame.cpp.
float lxgui::gui::slider::get_min_value | ( | ) | const |
Returns this slider's minimum value.
Definition at line 287 of file gui_slider.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.
orientation lxgui::gui::slider::get_orientation | ( | ) | const |
Returns the orientation of this slider.
Definition at line 303 of file gui_slider.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.
layer lxgui::gui::slider::get_thumb_draw_layer | ( | ) | const |
Returns the draw layer of this slider's thumb texture.
Definition at line 307 of file gui_slider.cpp.
|
inline |
Returns the texture used for the thumb.
Definition at line 78 of file gui_slider.hpp.
|
inline |
Returns the texture used for the thumb.
Definition at line 86 of file gui_slider.hpp.
|
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::frame.
Definition at line 350 of file gui_slider.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.
float lxgui::gui::slider::get_value | ( | ) | const |
Returns this slider's value.
Definition at line 295 of file gui_slider.cpp.
float lxgui::gui::slider::get_value_step | ( | ) | const |
Returns this slider's value step.
Definition at line 299 of file gui_slider.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.
|
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.
|
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.
|
overridevirtual |
Checks if the provided coordinates are in the slider.
position | The coordinate to test |
Reimplemented from lxgui::gui::frame.
Definition at line 319 of file gui_slider.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.
|
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.
|
overridevirtual |
Tells this region that its borders need updating.
Reimplemented from lxgui::gui::region.
Definition at line 341 of file gui_slider.cpp.
|
virtualinherited |
Notifies this frame that it has received or lost focus.
focus | 'true' if focus is received, 'false' if lost |
Reimplemented in lxgui::gui::edit_box.
Definition at line 1330 of file gui_frame.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.
|
overridevirtualinherited |
Tells this region that the global interface scaling factor has changed.
Reimplemented from lxgui::gui::region.
Reimplemented in lxgui::gui::scroll_frame.
Definition at line 1488 of file gui_frame.cpp.
|
protectedinherited |
Definition at line 567 of file gui_frame.cpp.
|
protected |
Definition at line 346 of file gui_slider.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 26 of file gui_slider_parser.cpp.
|
protectedvirtualinherited |
Definition at line 89 of file gui_region_parser.cpp.
|
overrideprotectedvirtual |
Reimplemented from lxgui::gui::frame.
Definition at line 9 of file gui_slider_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.
|
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.
|
protectedvirtualinherited |
Definition at line 124 of file gui_frame_parser.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.
|
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.
|
overridevirtual |
Prints all relevant information about this region in a string.
tab | The offset to give to all lines |
Reimplemented from lxgui::gui::frame.
Definition at line 31 of file gui_slider.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.
void lxgui::gui::slider::set_allow_clicks_outside_thumb | ( | bool | allow | ) |
Allows the user to click anywhere in the slider to relocate the thumb.
allow | 'true' to allow it, 'false' to allow clicks on the thumb only |
Definition at line 311 of file gui_slider.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.
|
inherited |
Sets this frames' backdrop.
bdrop | The new backdrop |
Definition at line 1188 of file gui_frame.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.
|
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.
|
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.
|
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::slider::set_max_value | ( | float | max_value | ) |
Sets this slider's maximum value.
max_value | The maximum value |
Definition at line 182 of file gui_slider.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.
void lxgui::gui::slider::set_min_max_values | ( | float | min_value, |
float | max_value | ||
) |
Sets the slider's value range.
min_value | The minimum value |
max_value | The maximum value |
Definition at line 200 of file gui_slider.cpp.
void lxgui::gui::slider::set_min_value | ( | float | min_value | ) |
Sets this slider's minimum value.
min_value | The minimum value |
Definition at line 164 of file gui_slider.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.
|
protectedinherited |
Sets this region's name.
name | This region's name |
Definition at line 294 of file gui_region.cpp.
void lxgui::gui::slider::set_orientation | ( | orientation | orient | ) |
Sets the orientation of this slider.
orient | The orientation of this slider |
Definition at line 265 of file gui_slider.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.
|
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::slider::set_thumb_draw_layer | ( | layer | thumb_layer | ) |
Sets the draw layer of this slider's thumb texture.
thumb_layer | The layer |
Definition at line 280 of file gui_slider.cpp.
void lxgui::gui::slider::set_thumb_texture | ( | utils::observer_ptr< texture > | tex | ) |
Sets the texture to use for the thumb.
tex | The new texture |
Definition at line 251 of file gui_slider.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.
void lxgui::gui::slider::set_value | ( | float | value, |
bool | silent = false |
||
) |
Sets this slider's value.
value | The value |
silent | 'true' to prevent OnValueChanged to be fired |
Definition at line 217 of file gui_slider.cpp.
void lxgui::gui::slider::set_value_step | ( | float | value_step | ) |
Sets this slider's value step.
value_step | The new step |
Definition at line 232 of file gui_slider.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.
|
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.
|
protectedvirtualinherited |
Reimplemented in lxgui::gui::scroll_frame, and lxgui::gui::edit_box.
Definition at line 1561 of file gui_frame.cpp.
|
overrideprotectedvirtualinherited |
Reimplemented from lxgui::gui::region.
Definition at line 1519 of file gui_frame.cpp.
|
protected |
Definition at line 328 of file gui_slider.cpp.
|
protectedinherited |
Definition at line 1833 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 802 of file gui_region.hpp.
|
protected |
Definition at line 217 of file gui_slider.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.
|
protectedinherited |
Definition at line 1822 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 816 of file gui_region.hpp.
|
protectedinherited |
Definition at line 1801 of file gui_frame.hpp.
|
staticconstexpr |
Definition at line 197 of file gui_slider.hpp.
|
protectedinherited |
Definition at line 815 of file gui_region.hpp.
|
protectedinherited |
Definition at line 822 of file gui_region.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.
|
protectedinherited |
Definition at line 1819 of file gui_frame.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.
|
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.
|
protectedinherited |
Definition at line 1830 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 819 of file gui_region.hpp.
|
protected |
Definition at line 222 of file gui_slider.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.
|
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 214 of file gui_slider.hpp.
|
protectedinherited |
Definition at line 1837 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 1838 of file gui_frame.hpp.
|
protected |
Definition at line 213 of file gui_slider.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 210 of file gui_slider.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.
|
protectedinherited |
Definition at line 1808 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 1815 of file gui_frame.hpp.
|
protected |
Definition at line 219 of file gui_slider.hpp.
|
protected |
Definition at line 220 of file gui_slider.hpp.
|
protectedinherited |
Definition at line 1844 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 1848 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 1843 of file gui_frame.hpp.
|
protected |
Definition at line 212 of file gui_slider.hpp.
|
protected |
Definition at line 215 of file gui_slider.hpp.