lxgui
Loading...
Searching...
No Matches
gui_layered_region.hpp
1#ifndef LXGUI_GUI_LAYERED_REGION_HPP
2#define LXGUI_GUI_LAYERED_REGION_HPP
3
4#include "lxgui/gui_region.hpp"
5#include "lxgui/lxgui.hpp"
6#include "lxgui/utils.hpp"
7
8namespace lxgui::gui {
9
12
25class layered_region : public region {
26public:
27 using base = region;
28
30 explicit layered_region(
31 utils::control_block& block, manager& mgr, const region_core_attributes& attr);
32
38 std::string serialize(const std::string& tab) const override;
39
45
50 layer get_draw_layer() const;
51
56 void set_draw_layer(layer layer_id);
57
62 int get_region_level() const;
63
68 void set_region_level(int region_level);
69
74 void notify_renderer_need_redraw() override;
75
80 void parse_layout(const layout_node& node) override;
81
83 static void register_on_lua(sol::state& lua);
84
85 static constexpr const char* class_name = "LayeredRegion";
86
87protected:
88 void parse_attributes_(const layout_node& node) override;
89
90 const std::vector<std::string>& get_type_list_() const override;
91
94};
95
96} // namespace lxgui::gui
97
98#endif
A region that can be rendered in a layer.
void parse_attributes_(const layout_node &node) override
void notify_renderer_need_redraw() override
Notifies the renderer of this region that it needs to be redrawn.
static constexpr const char * class_name
void parse_layout(const layout_node &node) override
Parses data from a layout_node.
void set_region_level(int region_level)
Sets this layered_region's region level.
static void register_on_lua(sol::state &lua)
Registers this region class to the provided Lua state.
std::string serialize(const std::string &tab) const override
Prints all relevant information about this region in a string.
layer get_draw_layer() const
Returns this layered_region's draw layer.
utils::owner_ptr< region > release_from_parent() override
Removes this region from its parent and return an owning pointer.
int get_region_level() const
Sets the region level.
void set_draw_layer(layer layer_id)
Sets this layered_region's draw layer.
const std::vector< std::string > & get_type_list_() const override
An node in a layout file.
Manages the user interface.
The base class of all elements in the GUI.
layer
ID of a layer for rendering inside a frame.
oup::observable_sealed_ptr< T > owner_ptr
Struct holding all the core information about a region necessary for its creation.