HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Data Fields
tt::gui_window_win32 Class Referencefinal
Inheritance diagram for tt::gui_window_win32:
tt::gui_window

Public Types

using super = gui_window
 
using delegate_type = typename super::delegate_type
 
- Public Types inherited from tt::gui_window
using delegate_type = gui_window_delegate
 

Public Member Functions

 gui_window_win32 (gui_system &gui, label const &title, std::weak_ptr< delegate_type > delegate={}) noexcept
 
void create_window (extent2 new_size) override
 Let the operating system create the actual window.
 
int windowProc (unsigned int uMsg, uint64_t wParam, int64_t lParam) noexcept
 
void set_cursor (mouse_cursor cursor) noexcept override
 Set the mouse cursor icon.
 
void close_window () override
 Ask the operating system to close this window.
 
void minimize_window () override
 Ask the operating system to minimize this window.
 
void maximize_window () override
 Ask the operating system to maximize this window.
 
void normalize_window () override
 Ask the operating system to normalize this window.
 
void set_window_size (extent2 extent) override
 Ask the operating system to set the size of this window.
 
extent2 virtual_screen_size () const noexcept override
 Get the size of the virtual-screen.
 
std::string get_text_from_clipboard () const noexcept override
 Retrieve a text string from the operating system's clip-board.
 
void set_text_on_clipboard (std::string str) noexcept override
 Place a text string on the operating system's clip-board.
 
- Public Member Functions inherited from tt::gui_window
 gui_window (gui_system &gui, label const &title, std::weak_ptr< delegate_type > delegate={}) noexcept
 
 gui_window (gui_window const &)=delete
 
gui_windowoperator= (gui_window const &)=delete
 
 gui_window (gui_window &&)=delete
 
gui_windowoperator= (gui_window &&)=delete
 
virtual void init ()
 2 phase constructor.
 
virtual void deinit ()
 2 phase constructor.
 
bool is_gui_thread () const noexcept
 Check if the current thread is the same as the gui_system loop.
 
void set_device (gfx_device *device) noexcept
 
tt::keyboard_bindings const & keyboard_bindings () const noexcept
 Get the keyboard binding.
 
void request_redraw (aarectangle rectangle) noexcept
 Request a rectangle on the window to be redrawn.
 
void request_redraw () noexcept
 Request a rectangle on the window to be redrawn.
 
float fontScale () const noexcept
 By how much the font needs to be scaled compared to current windowScale.
 
virtual void render (utc_nanoseconds displayTimePoint)
 Update window.
 
bool is_closed () const noexcept
 Check if the window was closed by the operating system.
 
grid_widgetcontent () noexcept
 Get a reference to the window's content widget.
 
toolbar_widgettoolbar () noexcept
 Get a reference to window's toolbar widget.
 
void set_resize_border_priority (bool left, bool right, bool bottom, bool top) noexcept
 
void update_mouse_target (tt::widget const *new_target_widget, point2 position={}) noexcept
 
void update_keyboard_target (tt::widget const *widget, keyboard_focus_group group=keyboard_focus_group::normal) noexcept
 Change the keyboard focus to the given widget.
 
void update_keyboard_target (tt::widget const *widget, keyboard_focus_group group, keyboard_focus_direction direction) noexcept
 Change the keyboard focus to the previous or next widget from the given widget.
 
void update_keyboard_target (keyboard_focus_group group, keyboard_focus_direction direction) noexcept
 Change the keyboard focus to the given, previous or next widget.
 
translate2 window_to_screen () const noexcept
 
translate2 screen_to_window () const noexcept
 

Data Fields

HWND win32Window = nullptr
 
- Data Fields inherited from tt::gui_window
gui_systemgui
 
std::unique_ptr< gfx_surfacesurface
 
aarectangle screen_rectangle
 The current rectangle of the window relative to the screen.
 
mouse_cursor currentmouse_cursor = mouse_cursor::None
 The current cursor.
 
std::atomic< bool > request_constrain = true
 When set to true the widget will calculate their constraints.
 
std::atomic< bool > request_resize = true
 When set to true the window will resize to the preferred size of the contained widget.
 
std::atomic< bool > request_layout = true
 When set to true the widgets will be laid out.
 
bool resizing = false
 
bool active = false
 
gui_window_size size_state = gui_window_size::normal
 
label title
 
float dpi = 72.0
 
std::unique_ptr< window_widgetwidget
 The widget covering the complete window.
 

Member Function Documentation

◆ close_window()

void tt::gui_window_win32::close_window ( )
overridevirtual

Ask the operating system to close this window.

Implements tt::gui_window.

◆ create_window()

void tt::gui_window_win32::create_window ( extent2 new_size)
overridevirtual

Let the operating system create the actual window.

Precondition
title and extent must be set.

Implements tt::gui_window.

◆ get_text_from_clipboard()

std::string tt::gui_window_win32::get_text_from_clipboard ( ) const
overridevirtualnoexcept

Retrieve a text string from the operating system's clip-board.

Implements tt::gui_window.

◆ maximize_window()

void tt::gui_window_win32::maximize_window ( )
overridevirtual

Ask the operating system to maximize this window.

Implements tt::gui_window.

◆ minimize_window()

void tt::gui_window_win32::minimize_window ( )
overridevirtual

Ask the operating system to minimize this window.

Implements tt::gui_window.

◆ normalize_window()

void tt::gui_window_win32::normalize_window ( )
overridevirtual

Ask the operating system to normalize this window.

Implements tt::gui_window.

◆ set_cursor()

void tt::gui_window_win32::set_cursor ( mouse_cursor cursor)
overridevirtualnoexcept

Set the mouse cursor icon.

Implements tt::gui_window.

◆ set_text_on_clipboard()

void tt::gui_window_win32::set_text_on_clipboard ( std::string str)
overridevirtualnoexcept

Place a text string on the operating system's clip-board.

Implements tt::gui_window.

◆ set_window_size()

void tt::gui_window_win32::set_window_size ( extent2 extent)
overridevirtual

Ask the operating system to set the size of this window.

Implements tt::gui_window.

◆ virtual_screen_size()

extent2 tt::gui_window_win32::virtual_screen_size ( ) const
overridevirtualnoexcept

Get the size of the virtual-screen.

Each window may be on a different virtual screen with different sizes, so retrieve it on a per window basis.

Implements tt::gui_window.


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