|
HikoGUI
A low latency retained GUI
|
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_system & | operator= (const gui_system &)=delete |
| gui_system (gui_system &&)=delete | |
| gui_system & | operator= (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_window & | add_window (std::unique_ptr< gui_window > window) |
| template<typename... Args> | |
| gui_window & | make_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_system > | make_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_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 |
| thread_id const | thread_id |
Static Public Attributes inherited from tt::gui_system | |
| static os_handle | instance |
|
overridevirtual |
Implements tt::gui_system.
|
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.
Implements tt::gui_system.