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
 
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 WidgetType , typename... Args>
std::pair< std::shared_ptr< gui_window >, WidgetType & > make_window (hi::label const &label, Args &&...args)
 Create a new window with an embedded widget.
 
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::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

◆ 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 WidgetType , typename... Args>
std::pair< std::shared_ptr< gui_window >, WidgetType & > v1::gui_system::make_window ( hi::label const & label,
Args &&... args )
inline

Create a new window with an embedded widget.

Template Parameters
WidgetTypeThe widget to construct in the window.
Parameters
labelThe label for the window. The label is also passed to the widget.
argsThe arguments that are forwarded to the constructor of the window's widget.
Returns
A shared_ptr to the new window and a reference to the widget.

◆ 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: