Handles the creation of new UI objects.
More...
#include <gui_factory.hpp>
Handles the creation of new UI objects.
- Note
- This is a low-level class, which is only meant to be used internally by the GUI. To create your own UI objects, use root::create_root_frame(), frame::create_child(), or frame::create_region().
Definition at line 39 of file gui_factory.hpp.
◆ factory() [1/3]
lxgui::gui::factory::factory |
( |
manager & |
mgr | ) |
|
|
explicit |
◆ factory() [2/3]
lxgui::gui::factory::factory |
( |
const factory & |
| ) |
|
|
delete |
◆ factory() [3/3]
lxgui::gui::factory::factory |
( |
factory && |
| ) |
|
|
delete |
◆ create_frame()
Creates a new frame.
- Parameters
-
reg | The registry in which to register this frame |
attr | The attributes of the frame |
- Returns
- The new frame
- Note
- This function takes care of the basic initializing: the frame is directly usable. However, you still need to call notify_loaded() when you are done with any extra initialization you require on this frame. If you do not, the frame's OnLoad callback will not fire.
Definition at line 35 of file gui_factory.cpp.
◆ create_layered_region()
Creates a new layered_region.
- Parameters
-
reg | The registry in which to register this region |
attr | The attributes of the region |
- Returns
- The new layered_region
- Note
- This function takes care of the basic initializing: the region is directly usable.
Definition at line 57 of file gui_factory.cpp.
◆ create_region()
Creates a new region.
- Parameters
-
reg | The registry in which to register this object |
attr | The attributes of the object |
- Returns
- The new frame
- Note
- This function takes care of the basic initializing: the object is directly usable.
Definition at line 14 of file gui_factory.cpp.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ register_on_lua()
void lxgui::gui::factory::register_on_lua |
( |
sol::state & |
lua | ) |
|
Registers all region types on the provided Lua state.
- Parameters
-
Definition at line 78 of file gui_factory.cpp.
◆ register_region_type() [1/2]
template<typename ObjectType , typename Enable = typename std::enable_if<std::is_base_of<gui::region, ObjectType>::value>::type>
void lxgui::gui::factory::register_region_type |
( |
| ) |
|
|
inline |
Registers a new object type.
- Note
- Set the first template argument as the C++ type of this object.
Definition at line 114 of file gui_factory.hpp.
◆ register_region_type() [2/2]
template<typename ObjectType , typename FunctionType , typename Enable = typename std::enable_if<std::is_base_of<gui::region, ObjectType>::value>::type>
void lxgui::gui::factory::register_region_type |
( |
FunctionType && |
factory_func | ) |
|
|
inline |
Registers a new object type.
- Parameters
-
factory_func | Factory function to call to create a new instance |
- Note
- Set the first template argument as the C++ type of this object.
Definition at line 136 of file gui_factory.hpp.
The documentation for this class was generated from the following files: