Keeps track of virtual UI objects and records their names for lookup.
More...
#include <gui_virtual_registry.hpp>
Keeps track of virtual UI objects and records their names for lookup.
Definition at line 16 of file gui_virtual_registry.hpp.
◆ virtual_registry() [1/3]
lxgui::gui::virtual_registry::virtual_registry |
( |
const registry & |
object_registry | ) |
|
|
explicit |
◆ virtual_registry() [2/3]
◆ virtual_registry() [3/3]
◆ add_region()
bool lxgui::gui::registry::add_region |
( |
utils::observer_ptr< region > |
obj | ) |
|
|
inherited |
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 |
|
inherited |
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 | ) |
|
|
inlineinherited |
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 |
|
inherited |
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.
◆ get_virtual_region_list()
std::vector< utils::observer_ptr< const region > > lxgui::gui::virtual_registry::get_virtual_region_list |
( |
std::string_view |
names | ) |
const |
Return a list of virtual regions matching the provided comma-separated list.
- Parameters
-
names | Comma-separated list of object names |
- Returns
- A vector of objects matching the list. Objects not found will be excluded.
Definition at line 13 of file gui_virtual_registry.cpp.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ remove_region()
void lxgui::gui::registry::remove_region |
( |
const region & |
obj | ) |
|
|
inherited |
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: