ZenitUI
Retained-mode C++20 UI framework
Loading...
Searching...
No Matches
ZenitUI::RaylibPlatform Class Referencefinal

Reference IPlatform backed by Raylib window, input, and clipboard APIs. More...

#include <RaylibPlatform.hpp>

Inheritance diagram for ZenitUI::RaylibPlatform:
[legend]

Public Member Functions

Vec2 viewportSize () override
 Return the current window/surface dimensions in logical pixels.
PointerState pointer () override
 Return the current pointer position (logical pixels), scroll wheel delta, and button states.
double time () override
 Return a monotonic clock timestamp in seconds.
ModifierState modifiers () override
 Return the current state of modifier keys (shift, ctrl, alt, super).
InputEvents pollInputEvents () override
 Drain and return keyboard events queued since the previous frame.
float dpiScale () override
 Return the physical-to-logical DPI scale factor (e.g.
EdgeInsets safeArea () override
 Return screen safe-area insets in logical pixels (notches, rounded corners, system bars).
void setClipboardText (const std::string &text) override
 Copy UTF-8 text to the operating system clipboard.
std::string getClipboardText () override
 Read UTF-8 text from the operating system clipboard (empty string if unavailable).
void setCursor (CursorShape cursor) override
 Request the OS/windowing system to display the given cursor shape.
Public Member Functions inherited from ZenitUI::IPlatform
virtual void setTextInputRect (Rect, float=0.0f)
 Inform the OS IME of the active text-input rect and caret offset (in logical window coordinates) so candidate windows appear at the caret.

Detailed Description

Reference IPlatform backed by Raylib window, input, and clipboard APIs.

Member Function Documentation

◆ dpiScale()

float ZenitUI::RaylibPlatform::dpiScale ( )
overridevirtual

Return the physical-to-logical DPI scale factor (e.g.

1.0f on standard displays, 2.0f on Retina).

Implements ZenitUI::IPlatform.

◆ getClipboardText()

std::string ZenitUI::RaylibPlatform::getClipboardText ( )
overridevirtual

Read UTF-8 text from the operating system clipboard (empty string if unavailable).

Implements ZenitUI::IPlatform.

◆ modifiers()

ModifierState ZenitUI::RaylibPlatform::modifiers ( )
overridevirtual

Return the current state of modifier keys (shift, ctrl, alt, super).

Implements ZenitUI::IPlatform.

◆ pointer()

PointerState ZenitUI::RaylibPlatform::pointer ( )
overridevirtual

Return the current pointer position (logical pixels), scroll wheel delta, and button states.

Edge-triggered fields (ButtonState::pressed, ButtonState::released, PointerState::wheelY) must fire for one frame only; ButtonState::down stays true while held.

Implements ZenitUI::IPlatform.

◆ pollInputEvents()

InputEvents ZenitUI::RaylibPlatform::pollInputEvents ( )
overridevirtual

Drain and return keyboard events queued since the previous frame.

InputEvents::chars and InputEvents::keys are edge-triggered (one frame); InputEvents::held lists keys currently held down for repeat handling.

Implements ZenitUI::IPlatform.

◆ safeArea()

EdgeInsets ZenitUI::RaylibPlatform::safeArea ( )
overridevirtual

Return screen safe-area insets in logical pixels (notches, rounded corners, system bars).

Implements ZenitUI::IPlatform.

◆ setClipboardText()

void ZenitUI::RaylibPlatform::setClipboardText ( const std::string & text)
overridevirtual

Copy UTF-8 text to the operating system clipboard.

Implements ZenitUI::IPlatform.

◆ setCursor()

void ZenitUI::RaylibPlatform::setCursor ( CursorShape )
overridevirtual

Request the OS/windowing system to display the given cursor shape.

Reimplemented from ZenitUI::IPlatform.

◆ time()

double ZenitUI::RaylibPlatform::time ( )
overridevirtual

Return a monotonic clock timestamp in seconds.

Implements ZenitUI::IPlatform.

◆ viewportSize()

Vec2 ZenitUI::RaylibPlatform::viewportSize ( )
overridevirtual

Return the current window/surface dimensions in logical pixels.

Implements ZenitUI::IPlatform.


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