lxgui
|
A frame with scrollable content. More...
#include <gui_scroll_frame.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 | |
scroll_frame (utils::control_block &block, manager &mgr, const frame_core_attributes &attr) | |
Constructor. | |
~scroll_frame () override | |
Destructor. | |
void | copy_from (const region &obj) override |
Copies a region's parameters into this scroll_frame (inheritance). | |
bool | can_use_script (const std::string &script_name) const override |
Returns 'true' if this scroll_frame can use a script. | |
void | fire_script (const std::string &script_name, const event_data &data=event_data{}) override |
Calls a script. | |
void | set_scroll_child (utils::owner_ptr< frame > obj) |
Sets this scroll_frame's scroll child. | |
const utils::observer_ptr< frame > & | get_scroll_child () |
Returns this scroll_frame's scroll child. | |
utils::observer_ptr< const frame > | get_scroll_child () const |
Returns this scroll_frame's scroll child. | |
void | set_horizontal_scroll (float horizontal_scroll) |
Sets the horizontal offset of the scroll child. | |
float | get_horizontal_scroll () const |
Returns the horizontal offset of the scroll child. | |
float | get_horizontal_scroll_range () const |
Returns the maximum horizontal offset of the scroll child. | |
void | set_vertical_scroll (float vertical_scroll) |
Sets the vertical offset of the scroll child. | |
float | get_vertical_scroll () const |
Returns the vertical offset of the scroll child. | |
float | get_vertical_scroll_range () const |
Returns the maximum vertical offset of the scroll child. | |
utils::observer_ptr< const frame > | find_topmost_frame (const std::function< bool(const frame &)> &predicate) const override |
Find the topmost frame matching the provided predicate. | |
void | notify_strata_needs_redraw (strata strata_id) override |
Tells this renderer that one of its region requires redraw. | |
vector2f | get_target_dimensions () const override |
Returns the width and height of of this renderer's main render target (e.g., screen). | |
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. | |
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. | |
virtual void | notify_focus (bool focus) |
Notifies this frame that it has received or lost focus. | |
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. | |
virtual void | notify_rendered_frame (const utils::observer_ptr< frame > &obj, bool rendered) |
Tells this renderer that it should (or not) render another frame. | |
virtual void | notify_strata_changed (const utils::observer_ptr< frame > &obj, strata old_strata_id, strata new_strata_id) |
Tells this renderer that a frame has changed strata. | |
virtual void | notify_level_changed (const utils::observer_ptr< frame > &obj, int old_level, int new_level) |
Tells this renderer that a frame has changed level. | |
utils::observer_ptr< frame > | find_topmost_frame (const std::function< bool(const frame &)> &predicate) |
Find the top-most frame matching the provided predicate. | |
int | get_highest_level (strata strata_id) const |
Returns the highest level on the provided strata. | |
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 = "ScrollFrame" |
Protected Types | |
using | frame_list_type = utils::sorted_vector< frame *, frame_comparator > |
using | frame_list_iterator = frame_list_type::iterator |
Protected Member Functions | |
void | parse_all_nodes_before_children_ (const layout_node &node) override |
virtual void | parse_scroll_child_node_ (const layout_node &node) |
void | update_ (float delta) override |
const std::vector< std::string > & | get_type_list_ () const override |
void | update_scroll_range_ () |
void | rebuild_scroll_render_target_ () |
void | render_scroll_strata_list_ () |
void | parse_attributes_ (const layout_node &node) 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) |
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. | |
void | clear_strata_list_ () |
bool | has_strata_list_changed_ () const |
void | reset_strata_list_changed_flag_ () |
void | render_strata_ (const strata_data &strata_obj) const |
std::pair< std::size_t, std::size_t > | get_strata_range_ (strata strata_id) const |
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>() |
static constexpr std::size_t | num_strata = magic_enum::enum_count<strata>() |
A frame with scrollable content.
This frame has a special child frame, the "scroll child". The scroll child is rendered on a separate render target, which is then rendered on the screen. This allows clipping the content of the scroll child and only display a portion of it (as if scrolling on a page). The displayed portion is controlled by the scroll value, which can be changed in both the vertical and horizontal directions.
By default, the mouse wheel movement will not trigger any scrolling; this has to be explicitly implemented using the OnMouseWheel
callback and the scroll_frame::set_horizontal_scroll function.
Events. Hard-coded events available to all scroll frames, in addition to those from frame:
OnHorizontalScroll
: Triggered by scroll_frame::set_horizontal_scroll.OnScrollRangeChanged
: Triggered whenever the range of the scroll value changes. This happens either when the size of the scrollable content changes, or when the size of the scroll frame changes.OnVerticalScroll
: Triggered by scroll_frame::set_vertical_scroll. Definition at line 35 of file gui_scroll_frame.hpp.
using lxgui::gui::scroll_frame::base = frame |
Definition at line 37 of file gui_scroll_frame.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.
|
protectedinherited |
Definition at line 106 of file gui_frame_renderer.hpp.
|
protectedinherited |
Definition at line 105 of file gui_frame_renderer.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 14 of file gui_scroll_frame.cpp.
|
override |
Destructor.
Definition at line 21 of file gui_scroll_frame.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.
|
overridevirtual |
Returns 'true' if this scroll_frame can use a script.
script_name | The name of the script |
Reimplemented from lxgui::gui::frame.
Definition at line 31 of file gui_scroll_frame.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 183 of file gui_frame_renderer.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 scroll_frame (inheritance).
obj | The region to copy |
Reimplemented from lxgui::gui::frame.
Definition at line 54 of file gui_scroll_frame.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.
|
inlineinherited |
Find the top-most frame matching the provided predicate.
predicate | A function returning 'true' if the frame can be selected |
Definition at line 82 of file gui_frame_renderer.hpp.
|
overridevirtual |
Find the topmost frame matching the provided predicate.
predicate | A function returning 'true' if the frame can be selected |
Reimplemented from lxgui::gui::frame.
Definition at line 271 of file gui_scroll_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 36 of file gui_scroll_frame.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 highest level on the provided strata.
strata_id | The strata to inspect |
Definition at line 161 of file gui_frame_renderer.cpp.
float lxgui::gui::scroll_frame::get_horizontal_scroll | ( | ) | const |
Returns the horizontal offset of the scroll child.
Definition at line 141 of file gui_scroll_frame.cpp.
float lxgui::gui::scroll_frame::get_horizontal_scroll_range | ( | ) | const |
Returns the maximum horizontal offset of the scroll child.
Definition at line 145 of file gui_scroll_frame.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.
|
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.
|
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.
|
inline |
Returns this scroll_frame's scroll child.
Definition at line 81 of file gui_scroll_frame.hpp.
|
inline |
Returns this scroll_frame's scroll child.
Definition at line 89 of file gui_scroll_frame.hpp.
|
inherited |
Returns this frame's strata.
Definition at line 731 of file gui_frame.cpp.
|
protectedinherited |
Definition at line 125 of file gui_frame_renderer.cpp.
|
overridevirtual |
Returns the width and height of of this renderer's main render target (e.g., screen).
Implements lxgui::gui::frame_renderer.
Definition at line 287 of file gui_scroll_frame.cpp.
|
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 291 of file gui_scroll_frame.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::scroll_frame::get_vertical_scroll | ( | ) | const |
Returns the vertical offset of the scroll child.
Definition at line 166 of file gui_scroll_frame.cpp.
float lxgui::gui::scroll_frame::get_vertical_scroll_range | ( | ) | const |
Returns the maximum vertical offset of the scroll child.
Definition at line 170 of file gui_scroll_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.
|
protectedinherited |
Definition at line 188 of file gui_frame_renderer.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.
|
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.
|
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.
|
virtualinherited |
Tells this region that its borders need updating.
Reimplemented in lxgui::gui::slider.
Definition at line 744 of file gui_region.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.
|
virtualinherited |
Tells this renderer that a frame has changed level.
obj | The frame which has changed |
old_level | The old frame level |
new_level | The new frame level |
Definition at line 132 of file gui_frame_renderer.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.
|
virtualinherited |
Tells this renderer that it should (or not) render another frame.
obj | The frame to render |
rendered | 'true' if this renderer needs to render that new object |
Definition at line 82 of file gui_frame_renderer.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::frame.
Definition at line 211 of file gui_scroll_frame.cpp.
|
virtualinherited |
Tells this renderer that a frame has changed strata.
obj | The frame which has changed |
old_strata_id | The old frame strata |
new_strata_id | The new frame strata |
Definition at line 110 of file gui_frame_renderer.cpp.
|
protectedinherited |
Definition at line 567 of file gui_frame.cpp.
|
overridevirtual |
Tells this renderer that one of its region requires redraw.
Reimplemented from lxgui::gui::frame_renderer.
Definition at line 282 of file gui_scroll_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 8 of file gui_scroll_frame_parser.cpp.
|
protectedvirtualinherited |
Definition at line 89 of file gui_region_parser.cpp.
|
overrideprotectedvirtualinherited |
Reimplemented from lxgui::gui::region.
Reimplemented in lxgui::gui::slider, and lxgui::gui::status_bar.
Definition at line 33 of file gui_frame_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.
|
protectedvirtual |
Definition at line 13 of file gui_scroll_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.
|
protected |
Definition at line 217 of file gui_scroll_frame.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.
|
protected |
Definition at line 249 of file gui_scroll_frame.cpp.
|
protectedinherited |
Definition at line 174 of file gui_frame_renderer.cpp.
|
protectedinherited |
Definition at line 192 of file gui_frame_renderer.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.
|
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.
void lxgui::gui::scroll_frame::set_horizontal_scroll | ( | float | horizontal_scroll | ) |
Sets the horizontal offset of the scroll child.
horizontal_scroll | The horizontal offset |
Definition at line 124 of file gui_scroll_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.
|
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.
|
protectedinherited |
Sets this region's name.
name | This region's name |
Definition at line 294 of file gui_region.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.
void lxgui::gui::scroll_frame::set_scroll_child | ( | utils::owner_ptr< frame > | obj | ) |
Sets this scroll_frame's scroll child.
obj | The scroll child |
Definition at line 80 of file gui_scroll_frame.cpp.
|
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.
|
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::scroll_frame::set_vertical_scroll | ( | float | vertical_scroll | ) |
Sets the vertical offset of the scroll child.
vertical_scroll | The vertical offset |
Definition at line 149 of file gui_scroll_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.
|
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 174 of file gui_scroll_frame.cpp.
|
overrideprotectedvirtualinherited |
Reimplemented from lxgui::gui::region.
Definition at line 1519 of file gui_frame.cpp.
|
protected |
Definition at line 188 of file gui_scroll_frame.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.
|
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 157 of file gui_scroll_frame.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 114 of file gui_frame_renderer.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.
|
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.
|
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.
|
staticconstexprprotectedinherited |
Definition at line 110 of file gui_frame_renderer.hpp.
|
protectedinherited |
Definition at line 807 of file gui_region.hpp.
|
protectedinherited |
Definition at line 805 of file gui_region.hpp.
|
protected |
Definition at line 177 of file gui_scroll_frame.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 171 of file gui_scroll_frame.hpp.
|
protected |
Definition at line 174 of file gui_scroll_frame.hpp.
|
protected |
Definition at line 175 of file gui_scroll_frame.hpp.
|
protected |
Definition at line 172 of file gui_scroll_frame.hpp.
|
protected |
Definition at line 178 of file gui_scroll_frame.hpp.
|
protected |
Definition at line 180 of file gui_scroll_frame.hpp.
|
protectedinherited |
Definition at line 1808 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 113 of file gui_frame_renderer.hpp.
|
protectedinherited |
Definition at line 1815 of file gui_frame.hpp.
|
protectedinherited |
Definition at line 112 of file gui_frame_renderer.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.