HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions
tt::gui_system_win32 Class Referencefinal
Inheritance diagram for tt::gui_system_win32:
tt::gui_system

Public Member Functions

 gui_system_win32 (std::shared_ptr< tt::event_queue > event_queue, std::unique_ptr< gfx_system > gfx, std::unique_ptr< tt::vertical_sync > vertical_sync, std::unique_ptr< tt::font_book > font_book, std::unique_ptr< tt::theme_book > theme_book, std::unique_ptr< tt::keyboard_bindings > keyboard_bindings, std::weak_ptr< gui_system_delegate > delegate={})
 
int loop () override
 Start the GUI event loop.
 
void exit (int exit_code) override
 
- Public Member Functions inherited from tt::gui_system
 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
 
tt::event_queue const & event_queue () const noexcept
 Get the event queue.
 
void run_from_event_queue (std::invocable auto &&function) noexcept
 Run the function from the GUI's event queue.
 
void run (std::invocable auto &&function) noexcept
 Run the function now or on from the GUI's event loop.
 
gui_windowadd_window (std::unique_ptr< gui_window > window)
 
template<typename... Args>
gui_windowmake_window (Args &&...args)
 Create a new window.
 
ssize_t num_windows ()
 
void render (utc_nanoseconds display_time_point)
 
bool is_gui_thread () const noexcept
 Check if this thread is the same as the gui thread.
 
void set_theme (tt::theme const &new_theme) noexcept
 Set the theme for the system.
 
tt::theme const & theme () const noexcept
 Get the theme.
 
void set_theme_mode (tt::theme_mode mode) noexcept
 
void request_constrain () noexcept
 Request all windows to constrain.
 

Additional Inherited Members

- Static Public Member Functions inherited from tt::gui_system
static std::unique_ptr< gui_systemmake_unique (std::weak_ptr< gui_system_delegate > delegate={}) noexcept
 Make a gui_system instance.
 
- Data Fields inherited from tt::gui_system
std::unique_ptr< gfx_systemgfx
 
std::unique_ptr< tt::vertical_syncvertical_sync
 
std::unique_ptr< tt::font_bookfont_book
 
std::unique_ptr< tt::theme_booktheme_book
 
std::unique_ptr< tt::keyboard_bindingskeyboard_bindings
 
thread_id const thread_id
 
- Static Public Attributes inherited from tt::gui_system
static os_handle instance
 

Member Function Documentation

◆ exit()

void tt::gui_system_win32::exit ( int exit_code)
overridevirtual

Implements tt::gui_system.

◆ loop()

int tt::gui_system_win32::loop ( )
overridevirtual

Start the GUI event loop.

This function will start the GUI event loop. The event loop will monitor keyboard & mouse event, changes in window size & position and rendering of all windows.

When all windows are closed this function will return with an exit code of zero, or the return value from the delegate. Calling exit() will also cause this function to return.

Returns
exit code.

Implements tt::gui_system.


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