|
ReXGlue SDK
|
#include <rex/ui/ui_driver.h>
Public Member Functions | |
| virtual bool | HasDisplay () const =0 |
| virtual Result< void > | OpenWindow (const WindowConfig &config)=0 |
| virtual void | CloseUIWindow ()=0 |
| virtual void | SetTitle (std::string_view title)=0 |
| virtual void | SetSize (u32 width, u32 height)=0 |
| virtual void | SetLimits (u32 min_width, u32 min_height, ui::AspectRatio ratio)=0 |
| virtual void | SetFullscreen (bool fullscreen, bool exclusive, i32 monitor, u32 mode_width, u32 mode_height)=0 |
| virtual void | RaiseWindow ()=0 |
| virtual void | SetCursorShape (bool visible, CursorShape shape)=0 |
| virtual void | SetPointerMode (PointerMode mode)=0 |
| virtual void | CaptureMouse (bool captured)=0 |
| virtual f32 | GetContentScale () const =0 |
| virtual ui::WindowSize | GetWindowSize () const =0 |
| virtual bool | HasFocus () const =0 |
| virtual void | SetTextInputActive (bool active)=0 |
| virtual Result< NativeWindow > | GetNativeWindow () const =0 |
| virtual bool | WaitEvents (IUIEventListener &listener, u32 timeout_ms)=0 |
| virtual void | WakeUp ()=0 |
| virtual Result< u32 > | ShowMessageBox (MessageType type, std::string_view title, std::string_view body, std::span< const std::string > buttons)=0 |
| virtual Result< std::vector< std::filesystem::path > > | ShowFileDialog (const ui::FileDialogConfig &config)=0 |
| virtual std::vector< ui::Monitor > | GetDisplays ()=0 |
| virtual std::vector< ui::HostLocale > | GetPreferredLocales ()=0 |
| virtual std::string | GetClipboardText ()=0 |
| virtual void | SetClipboardText (std::string_view text)=0 |
| Public Member Functions inherited from rex::IDriver | |
| virtual std::string_view | GetName () const =0 |
| virtual Result< void > | Initialize (IDriverContext &context)=0 |
| virtual void | Shutdown ()=0 |
A windowing library with one window, the event pump, native dialogs, displays, locales and the clipboard. UISystem makes every call on the UI thread except WakeUp. A driver owns only its own ui.<name>.* settings and never draws.
|
pure virtual |
Captures the mouse so a drag keeps reporting outside the window, or releases it.
|
pure virtual |
|
pure virtual |
Returns the ratio of window pixels to layout size, 1 when the host has none.
|
nodiscardpure virtual |
Returns the window's native handles, which GraphicsSystem presents to, or kNotFound when the window is not open.
|
pure virtual |
Lists the host's preferred locales, most preferred first.
|
pure virtual |
Returns the window size in pixels, zero when the window is not open.
|
pure virtual |
Reports whether a display exists.
|
nodiscardpure virtual |
| config | The window title, size and fullscreen state. |
|
pure virtual |
Sets the clipboard text.
|
pure virtual |
Shows or hides the cursor and sets its shape.
| shape | The shape while shown. |
|
pure virtual |
Enters or leaves fullscreen on a display.
| exclusive | True for exclusive fullscreen, false for borderless. |
| mode_width | Exclusive mode width, 0 for the desktop mode. |
| mode_height | Exclusive mode height, 0 for the desktop mode. |
|
pure virtual |
Sets the smallest client size and the shape kept on resize.
|
pure virtual |
Sets the pointer mode. When the host refuses relative motion the driver recenters the pointer and reports dx and dy.
|
pure virtual |
Sets the client size of a window not in fullscreen.
|
pure virtual |
Starts or stops text input, which turns on an on screen keyboard where the host has one.
|
nodiscardpure virtual |
Shows the native open or save dialog and waits.
| config | The mode, filters and start folder. |
|
nodiscardpure virtual |
Shows a native message box and waits.
| type | Information, warning or error. |
| buttons | The button labels, one OK button when empty. |
|
pure virtual |
Waits for events and delivers each one, in order.
| timeout_ms | The longest wait, 0 delivers what is waiting and returns. |
|
pure virtual |
Ends a WaitEvents in progress. Any thread.