Keeps track of created UI objects and records their names for lookup.
More...
#include <gui_registry.hpp>
Keeps track of created UI objects and records their names for lookup.
Definition at line 16 of file gui_registry.hpp.
◆ registry() [1/3]
lxgui::gui::registry::registry |
( |
| ) |
|
|
default |
◆ ~registry()
virtual lxgui::gui::registry::~registry |
( |
| ) |
|
|
virtualdefault |
◆ registry() [2/3]
lxgui::gui::registry::registry |
( |
const registry & |
| ) |
|
|
default |
◆ registry() [3/3]
lxgui::gui::registry::registry |
( |
registry && |
| ) |
|
|
default |
◆ add_region()
bool lxgui::gui::registry::add_region |
( |
utils::observer_ptr< region > |
obj | ) |
|
Adds a region to be handled by this registry.
- Parameters
-
- Returns
- 'false' if the name of the region was already taken
Definition at line 43 of file gui_registry.cpp.
◆ check_region_name()
bool lxgui::gui::registry::check_region_name |
( |
std::string_view |
name | ) |
const |
Checks the provided string is suitable for naming a region.
- Parameters
-
- Returns
- 'true' if the provided string can be the name of a region
Definition at line 9 of file gui_registry.cpp.
◆ get_region_by_name() [1/2]
utils::observer_ptr< region > lxgui::gui::registry::get_region_by_name |
( |
std::string_view |
name | ) |
|
|
inline |
Returns the region associated with the given name.
- Parameters
-
name | The name of the region you're after |
- Returns
- The region associated with the given name, or nullptr if not found
Definition at line 58 of file gui_registry.hpp.
◆ get_region_by_name() [2/2]
utils::observer_ptr< const region > lxgui::gui::registry::get_region_by_name |
( |
std::string_view |
name | ) |
const |
Returns the region associated with the given name.
- Parameters
-
name | The name of the region you're after |
- Returns
- The region associated with the given name, or nullptr if not found
Definition at line 66 of file gui_registry.cpp.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ remove_region()
void lxgui::gui::registry::remove_region |
( |
const region & |
obj | ) |
|
Removes a region from this registry.
- Parameters
-
Definition at line 62 of file gui_registry.cpp.
The documentation for this class was generated from the following files: