lxgui
gui_virtual_root.hpp
1 #ifndef LXGUI_GUI_VIRTUAL_ROOT_HPP
2 #define LXGUI_GUI_VIRTUAL_ROOT_HPP
3 
4 #include "lxgui/gui_frame_container.hpp"
5 #include "lxgui/gui_virtual_registry.hpp"
6 #include "lxgui/lxgui.hpp"
7 #include "lxgui/utils_observer.hpp"
8 
9 #include <list>
10 #include <memory>
11 
12 namespace lxgui::gui {
13 
14 class registry;
15 class manager;
16 class renderer;
17 
23 class virtual_root : public frame_container {
24 public:
30  explicit virtual_root(manager& mgr, registry& non_virtual_registry);
31 
33  ~virtual_root() override;
34 
35  virtual_root(const virtual_root&) = delete;
37  virtual_root& operator=(const virtual_root&) = delete;
39 
45  return manager_;
46  }
47 
52  const manager& get_manager() const {
53  return manager_;
54  }
55 
61  return object_registry_;
62  }
63 
68  const virtual_registry& get_registry() const {
69  return object_registry_;
70  }
71 
72 private:
73  manager& manager_;
74  virtual_registry object_registry_;
75 };
76 
77 } // namespace lxgui::gui
78 
79 #endif
Manages the user interface.
Definition: gui_manager.hpp:44
Keeps track of created UI objects and records their names for lookup.
Keeps track of virtual UI objects and records their names for lookup.
Root of the virtual UI object hierarchy.
const manager & get_manager() const
Returns the manager instance associated with this root.
virtual_root(virtual_root &&)=delete
virtual_root & operator=(virtual_root &&)=delete
manager & get_manager()
Returns the manager instance associated with this root.
virtual_root(const virtual_root &)=delete
virtual_root(manager &mgr, registry &non_virtual_registry)
Constructor.
const virtual_registry & get_registry() const
Returns the UI object registry, which keeps track of all objects in the UI.
~virtual_root() override
Destructor.
virtual_registry & get_registry()
Returns the UI object registry, which keeps track of all objects in the UI.
virtual_root & operator=(const virtual_root &)=delete