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

Public Member Functions

 Manager ()
 
component::WindowcreateWindow (const std::string &name, const std::string &title, const glm::vec2 &pos, const glm::vec2 &size, const int &options=DEFAULT_WINDOW_FLAGS)
 
component::WindowgetWindow (const std::string &name)
 
ThemegetTheme ()
 
RenderergetRenderer ()
 
void bindToWindow (oe::core::Window *window)
 
void handleEvents (oe::core::EventHandler &)
 
void generate ()
 
template<typename T , typename... Args>
T * createComponent (Args &&... args)
 
void render ()
 
void applyTheme ()
 Apply theme settings before generating GUI.
 

Public Attributes

glm::ivec2 dimensions = glm::ivec2(0)
 

Constructor & Destructor Documentation

◆ Manager()

oe::gui::Manager::Manager ( )

Constructor

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

◆ createWindow()

component::Window * oe::gui::Manager::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

◆ generate()

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

Helper to let the event handler automaticaly fill setMouseScroll() and onCharacterPress() Generate UI content (no render performed)

◆ getRenderer()

Renderer & oe::gui::Manager::getRenderer ( )
inline

Get ui renderer (for example: to change the shader)

◆ getTheme()

Theme & oe::gui::Manager::getTheme ( )
inline

Get theme handler (for example: to make color / fonts edits)

◆ getWindow()

component::Window * oe::gui::Manager::getWindow ( const std::string &  name)

Get an existing window by name

◆ handleEvents()

void oe::gui::Manager::handleEvents ( oe::core::EventHandler )

Transmit event states to UI

◆ render()

void oe::gui::Manager::render ( )

Render the GUI

Member Data Documentation

◆ dimensions

glm::ivec2 oe::gui::Manager::dimensions = glm::ivec2(0)

Dimensions of the GUI


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