HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Data Fields | Static Public Attributes
v1::gui_system Class Reference

#include <hikogui/GUI/gui_system.hpp>

Inheritance diagram for v1::gui_system:
v1::gui_system_win32

Public Member Functions

 gui_system (const gui_system &)=delete
 
gui_systemoperator= (const gui_system &)=delete
 
 gui_system (gui_system &&)=delete
 
gui_systemoperator= (gui_system &&)=delete
 
virtual void init () noexcept
 Initialize after construction.
 
virtual void deinit () noexcept
 
void set_delegate (std::weak_ptr< gui_system_delegate > delegate) noexcept
 
std::shared_ptr< gui_windowadd_window (std::shared_ptr< gui_window > window)
 
template<typename... Args>
std::shared_ptr< gui_windowmake_window (Args &&...args)
 Create a new window.
 
void request_reconstrain () noexcept
 Request all windows to constrain.
 

Static Public Member Functions

static std::unique_ptr< gui_systemmake_unique (std::weak_ptr< gui_system_delegate > delegate={}) noexcept
 Make a gui_system instance.
 

Data Fields

std::unique_ptr< gfx_systemgfx
 
std::unique_ptr< hi::theme_book > theme_book
 
std::unique_ptr< hi::keyboard_bindings > keyboard_bindings
 
thread_id const thread_id
 
observer< std::stringselected_theme = "default"
 The name of the selected theme.
 

Static Public Attributes

static os_handle instance
 

Detailed Description

Graphics system.

Member Function Documentation

◆ init()

virtual void v1::gui_system::init ( )
inlinevirtualnoexcept

Initialize after construction.

Call this function directly after the constructor on the same thread.

◆ make_unique()

static std::unique_ptr< gui_system > v1::gui_system::make_unique ( std::weak_ptr< gui_system_delegate > delegate = {})
staticnoexcept

Make a gui_system instance.

This will instantiate a gui_system instance appropriate for the current operating system.

Parameters
delegateAn optional delegate.
Returns
A unique pointer to a gui_system instance.

◆ make_window()

template<typename... Args>
std::shared_ptr< gui_window > v1::gui_system::make_window ( Args &&... args)
inline

Create a new window.

Parameters
argsThe arguments that are forwarded to the constructor of hi::gui_window_win32.
Returns
A reference to the new window.

◆ request_reconstrain()

void v1::gui_system::request_reconstrain ( )
noexcept

Request all windows to constrain.

Field Documentation

◆ selected_theme

observer<std::string> v1::gui_system::selected_theme = "default"

The name of the selected theme.


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