1#ifndef OE_GUI_MANAGER_H
2#define OE_GUI_MANAGER_H
49 const std::string& name,
const std::string& title,
50 const glm::vec2& pos,
const glm::vec2& size,
51 const int& options = DEFAULT_WINDOW_FLAGS
98 template <
typename T,
typename... Args>
101 std::shared_ptr<T> result = std::make_shared<T>(std::forward<Args>(args)...);
102 _components.push_back(result);
104 result->setManager(
this);
126 #ifdef OXYGEN_ENGINE_DEBUG_VALIDATE_ORDERED_OPERATIONS
127 bool is_between_generate_render =
false;
131 inline gui_id_t _generate_new_id()
138 std::shared_ptr<nk_context> _ctx;
145 gui_id_t _last_id = 0;
147 std::vector<component::Window*> _windows;
149 std::vector<std::shared_ptr<Component>> _components;
Event handler.
Definition event_handler.h:18
Definition component.h:20
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:70
Theme & getTheme()
Get theme handler (for example: to make color / fonts edits).
Definition manager.h:62
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:99
void applyTheme()
Apply theme settings before generating GUI.
void render()
Render the GUI.
glm::ivec2 dimensions
Dimensions of the GUI.
Definition manager.h:124
component::Window * getWindow(const std::string &name)
Get an existing window by name.
Core functionality (windows, event handler, logger, ...).
Definition args.h:10
UI components.
Definition component.h:13
Graphical user interface (panels, buttons, text input, ...).
Definition component.h:11
Oxygen Engine common namespace.
Definition debug.h:17
Class providing native access to underlying handles.
Definition native.h:20