TachyonUI 0.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
Windows and platform

Window backends (SDL, null, image), OS windows and window flags. More...

Classes

class  tachyon::ImageWindowBackend
 Adds windows that render to an image (WindowFlags::RenderToImage) to another window backend. More...
class  tachyon::LayeredFades
 Layered windows that stand in for a window while it fades in or out: each shows a fixed picture (the window's last frame) at a screen rect and an opacity. More...
class  tachyon::OSWindowManager
 Keeps the OS windows (through an IWindowBackend) and their window contexts for the GUI's window elements, keyed by ID. More...
struct  tachyon::MonitorInfo
 Window, monitor and mouse coordinates are physical pixels. More...
class  tachyon::IWindowContext
 A window's rendering state: made by GraphicsContext::CreateWindowContext for each OS window, attached to it with IWindowBackend::AttachContextToWindow, and destroyed by GraphicsContext::DestroyWindowContext. More...
class  tachyon::IWindowBackend
 Makes and manages the OS windows and delivers their input; GUIApplication::SetWindowBackend sets one, SDLWindowBackend is the default. More...
class  tachyon::WindowRegistry
 Per-window lists of ElementRefs in addition (render) order, driven during ElementStorage construction: More...
class  tachyon::NullWindowBackend
 A window backend without an OS: windows are records with a rect, and no input arrives (inject it with GUIApplication::Inject*). More...
class  tachyon::SDLClipboard
 The system clipboard, through SDL. More...
struct  tachyon::SDLWindowBackendOptions
 Options for SDLWindowBackend (SDLWindowBackend::Options). More...
class  tachyon::SDLWindowBackend
 The default window backend, on SDL3. More...

Typedefs

using tachyon::OSWindowHandle = void*
 An OS window, opaque; what it points to is up to the window backend.

Enumerations

enum class  tachyon::AddWindowResult : int8_t {
  tachyon::AddWindowResult::SuccessCreate = 0 , tachyon::AddWindowResult::SuccessRecycle = 1 , tachyon::AddWindowResult::CalledOutsideOfFrame = -1 , tachyon::AddWindowResult::IndexOutOfBounds = -2 ,
  tachyon::AddWindowResult::FailedToCreateOSWindow = -3 , tachyon::AddWindowResult::InvalidID = -4 , tachyon::AddWindowResult::WindowUserClosed = -5
}
 Outcome of OSWindowManager::GetOrCreateWindow; negative values are failures. More...
enum class  tachyon::RequestCloseResult : int8_t {
  tachyon::RequestCloseResult::Success = 0 , tachyon::RequestCloseResult::CalledOutsideFrame = -1 , tachyon::RequestCloseResult::IndexOutOfBounds = -2 , tachyon::RequestCloseResult::WindowAlreadyClosed = -3 ,
  tachyon::RequestCloseResult::UnknownError = -4
}
 Outcome of an OSWindowManager close request; negative values are failures. More...
enum class  tachyon::WindowState : uint8_t { tachyon::WindowState::NotRegistered , tachyon::WindowState::Alive , tachyon::WindowState::Closing , tachyon::WindowState::Hidden }
 The life cycle of a managed window. More...
enum class  tachyon::WindowHitArea : uint8_t { tachyon::WindowHitArea::Client , tachyon::WindowHitArea::Caption , tachyon::WindowHitArea::MaximizeButton }
 What a point of a window with a custom title bar (WindowFlags::CustomTitleBar) is to the OS. More...
enum class  tachyon::WindowMode : uint8_t {
  tachyon::WindowMode::Normal , tachyon::WindowMode::Minimized , tachyon::WindowMode::Maximized , tachyon::WindowMode::Fullscreen ,
  tachyon::WindowMode::ExclusiveFullscreen
}
 A window's state (IWindowBackend::SetWindowMode). Any window can go fullscreen. More...
enum class  tachyon::WindowFlags : uint32_t {
  tachyon::WindowFlags::None = 0 , tachyon::WindowFlags::AllowHighDPI = 1 , tachyon::WindowFlags::Hidden = 2 , tachyon::WindowFlags::Borderless = 4 ,
  tachyon::WindowFlags::Moveable = 8 , tachyon::WindowFlags::Resizable = 16 , tachyon::WindowFlags::UserControlled = Moveable | Resizable , tachyon::WindowFlags::AlwaysOnTop = 32 ,
  tachyon::WindowFlags::SkipTaskbar = 64 , tachyon::WindowFlags::Utility = 128 , tachyon::WindowFlags::Transparent = 256 , tachyon::WindowFlags::Modal = 512 ,
  tachyon::WindowFlags::PopupMenu = 1024 , tachyon::WindowFlags::Shadow = 2048 , tachyon::WindowFlags::NotFocusable = 4096 , tachyon::WindowFlags::RenderToImage = 8192 ,
  tachyon::WindowFlags::CloseWithParent = 16384 , tachyon::WindowFlags::CustomTitleBar = 32768 , tachyon::WindowFlags::ConfirmClose = 65536 , tachyon::WindowFlags::NoInput = 131072 ,
  tachyon::WindowFlags::DefaultFlags = AllowHighDPI
}
 How an OS window is made and behaves (IWindowBackend::CreateWindow); flags combine with |. More...
enum class  tachyon::RegistryResult { tachyon::RegistryResult::Success , tachyon::RegistryResult::InvalidRef , tachyon::RegistryResult::NoActiveWindow }
 Outcome of a WindowRegistry call. More...

Functions

void tachyon::SyncWindowsBeforeLayout (OSWindowManager &windowManager, const WindowRegistry &windowRegistry, ElementStorage &elementStorage)
 Before layout: releases the windows no longer declared, and pins the elements of user-moved/resized windows to their OS rects.
void tachyon::SyncWindowsAfterLayout (OSWindowManager &windowManager, const WindowRegistry &windowRegistry, ElementStorage &elementStorage, ITextSystem *textSystem, OnGuiFunc onGui)
 After layout: creates or updates an OS window for each declared window element.
void tachyon::InstallSDLVulkanSurfaceFactory (GraphicsContext *graphicsContext)
 Lets a VulkanGraphicsContext create surfaces for SDL windows; other contexts are left alone.

Detailed Description

Window backends (SDL, null, image), OS windows and window flags.

See Your own window and input.

Typedef Documentation

◆ OSWindowHandle

using tachyon::OSWindowHandle = void*

#include <gui_core/windows/gui_window_backend.h>

An OS window, opaque; what it points to is up to the window backend.

Enumeration Type Documentation

◆ AddWindowResult

enum class tachyon::AddWindowResult : int8_t
strong

#include <gui_core/windows/gui_os_window_manager.h>

Outcome of OSWindowManager::GetOrCreateWindow; negative values are failures.

Enumerator
SuccessCreate 

New window created.

SuccessRecycle 

Existing window returned (a hidden one is shown again).

CalledOutsideOfFrame 

Called outside of BeginFrame/EndFrame.

IndexOutOfBounds 

Internal error: window index out of bounds.

FailedToCreateOSWindow 

OS window creation failed.

InvalidID 

Provided ID was invalid.

WindowUserClosed 

The user closed it; not reopened until AllowReopenWindow.

◆ RequestCloseResult

enum class tachyon::RequestCloseResult : int8_t
strong

#include <gui_core/windows/gui_os_window_manager.h>

Outcome of an OSWindowManager close request; negative values are failures.

Enumerator
Success 

Window close requested.

CalledOutsideFrame 

Called outside of BeginFrame/EndFrame.

IndexOutOfBounds 

Internal error: window index out of bounds.

WindowAlreadyClosed 

Window was already closed.

UnknownError 

Another failure.

◆ WindowState

enum class tachyon::WindowState : uint8_t
strong

#include <gui_core/windows/gui_os_window_manager.h>

The life cycle of a managed window.

Enumerator
NotRegistered 

no window with this ID (GetWindowState for an unknown ID)

Alive 

normal

Closing 

close requested (this frame) or already closed

Hidden 

OS window hidden but context alive (for fast reopen of popups/menus).

◆ WindowHitArea

enum class tachyon::WindowHitArea : uint8_t
strong

#include <gui_core/windows/gui_window_backend.h>

What a point of a window with a custom title bar (WindowFlags::CustomTitleBar) is to the OS.

Enumerator
Client 

the GUI handles it

Caption 

drags the window; a double-click maximizes it

MaximizeButton 

the GUI's maximize button, so the OS can offer its snap layouts

◆ WindowMode

enum class tachyon::WindowMode : uint8_t
strong

#include <gui_core/windows/gui_window_backend.h>

A window's state (IWindowBackend::SetWindowMode). Any window can go fullscreen.

Enumerator
Normal 

as placed (restored)

Minimized 
Maximized 
Fullscreen 

borderless, covering its monitor at the desktop resolution

ExclusiveFullscreen 

takes the monitor over, in its desktop display mode

◆ WindowFlags

enum class tachyon::WindowFlags : uint32_t
strong

#include <gui_core/windows/gui_window_flags.h>

How an OS window is made and behaves (IWindowBackend::CreateWindow); flags combine with |.

Enumerator
None 
AllowHighDPI 
Hidden 
Borderless 
Moveable 
Resizable 
UserControlled 
AlwaysOnTop 
SkipTaskbar 
Utility 
Transparent 
Modal 

Blocks interaction with the other windows OSWindowManager manages.

PopupMenu 

Stays on top without blocking other windows; closes when another (non-child) window gets focus.

Shadow 

The OS drop shadow, where supported.

NotFocusable 

Never takes keyboard focus (e.g. tooltips).

RenderToImage 

No OS window: the window renders into an image the host reads or provides, and the host passes in its input (GUIApplication::Inject*).

CloseWithParent 

Closes with its parent window; without it the window becomes top-level when the parent closes.

CustomTitleBar 

Keeps the OS frame (resizing, snapping, shadow) but the client area covers the title bar, which the window draws itself (GUIApplication::BeginTitleBar).

ConfirmClose 

A close from the OS (its close button, Alt+F4, quitting) is only recorded for the app to decide on (IWindowBackend::TakeCloseRequest); the window stays.

NoInput 

The pointer, clicks and drops from other applications go through it to what's under it, as if it weren't there (tooltips, which may lie over what they're about).

Where the OS supports it: Windows, for a Transparent window.

DefaultFlags 

◆ RegistryResult

enum class tachyon::RegistryResult
strong

#include <gui_core/windows/gui_window_registry.h>

Outcome of a WindowRegistry call.

Enumerator
Success 
InvalidRef 
NoActiveWindow 

Function Documentation

◆ SyncWindowsBeforeLayout()

void tachyon::SyncWindowsBeforeLayout ( OSWindowManager & windowManager,
const WindowRegistry & windowRegistry,
ElementStorage & elementStorage )

#include <gui_core/windows/gui_window_sync.h>

Before layout: releases the windows no longer declared, and pins the elements of user-moved/resized windows to their OS rects.

◆ SyncWindowsAfterLayout()

void tachyon::SyncWindowsAfterLayout ( OSWindowManager & windowManager,
const WindowRegistry & windowRegistry,
ElementStorage & elementStorage,
ITextSystem * textSystem,
OnGuiFunc onGui )

#include <gui_core/windows/gui_window_sync.h>

After layout: creates or updates an OS window for each declared window element.

◆ InstallSDLVulkanSurfaceFactory()

void tachyon::InstallSDLVulkanSurfaceFactory ( GraphicsContext * graphicsContext)

#include <gui_core/windows/sdl/gui_window_backend_sdl_vulkan.h>

Lets a VulkanGraphicsContext create surfaces for SDL windows; other contexts are left alone.