1#ifndef OE_GUI_MANAGER_H
2#define OE_GUI_MANAGER_H
53 const std::string& name,
const std::string& title,
54 const glm::vec2& pos,
const glm::vec2& size,
55 const int& options = DEFAULT_WINDOW_FLAGS
102 template <
typename T,
typename... Args>
105 std::shared_ptr<T> result = std::make_shared<T>(std::forward<Args>(args)...);
106 _components.push_back(result);
108 result->setManager(
this);
130 #ifdef OXYGEN_ENGINE_DEBUG_VALIDATE_ORDERED_OPERATIONS
131 bool is_between_generate_render =
false;
135 inline gui_id_t _generate_new_id()
142 std::shared_ptr<nk_context> _ctx;
149 gui_id_t _last_id = 0;
151 std::vector<component::Window*> _windows;
153 std::vector<std::shared_ptr<Component>> _components;
Event handler.
Definition event_handler.h:22
Definition component.h:22
component::Window * createWindow(const std::string &name, const std::string &title, const glm::vec2 &pos, const glm::vec2 &size, const int &options=DEFAULT_WINDOW_FLAGS)
Create a new window.
void generate()
Generate UI content (no render performed)
Renderer & getRenderer()
Get ui renderer (for example: to change the shader)
Definition manager.h:74
Theme & getTheme()
Get theme handler (for example: to make color / fonts edits)
Definition manager.h:66
void bindToWindow(oe::core::Window *window)
Allow the UI to send events / take control of specific application window.
void handleEvents(oe::core::EventHandler &)
Transmit event states to UI.
T * createComponent(Args &&... args)
Definition manager.h:103
void applyTheme()
Apply theme settings before generating GUI.
void render()
Render the GUI.
glm::ivec2 dimensions
Dimensions of the GUI.
Definition manager.h:128
component::Window * getWindow(const std::string &name)
Get an existing window by name.
Core functionality (windows, event handler, logger, ...)
Definition cursor.h:8
Graphical user interface (panels, buttons, text input, ...)
Definition component.h:13
Oxygen Engine common namespace.
Definition cursor.h:8
Class providing native access to underlying handles.
Definition native.h:20