Oxygen Engine
Modern C++ 3D Engine using OpenGL
Loading...
Searching...
No Matches
oe::gui::Manager Class Reference

Public Member Functions

 Manager ()
 Constructor.
 
component::WindowcreateWindow (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.
 
component::WindowgetWindow (const std::string &name)
 Get an existing window by name.
 
ThemegetTheme ()
 Get theme handler (for example: to make color / fonts edits)
 
RenderergetRenderer ()
 Get ui renderer (for example: to change the shader)
 
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.
 
void generate ()
 Generate UI content (no render performed)
 
template<typename T , typename... Args>
T * createComponent (Args &&... args)
 
void render ()
 Render the GUI.
 
void applyTheme ()
 Apply theme settings before generating GUI.
 

Public Attributes

glm::ivec2 dimensions = glm::ivec2(0)
 Dimensions of the GUI.
 

Member Function Documentation

◆ applyTheme()

void oe::gui::Manager::applyTheme ( )

Apply theme settings before generating GUI.

Note
You need to call this function only if you have made any changes to the theme or font (including before first generation)

◆ bindToWindow()

void oe::gui::Manager::bindToWindow ( oe::core::Window window)

Allow the UI to send events / take control of specific application window.

Parameters
windowWindow to take control, use nullptr to disable

@Note Used to let the UI move/show/hide the cursor and access the clipboard

◆ createComponent()

template<typename T , typename... Args>
T * oe::gui::Manager::createComponent ( Args &&...  args)
inline

Create a component

◆ generate()

void oe::gui::Manager::generate ( )

Generate UI content (no render performed)

Note
If you use custom GUI generation you should call this function because some basic checks are done

The documentation for this class was generated from the following file: