ZenitUI
Retained-mode C++20 UI framework
Loading...
Searching...
No Matches
RaylibPlatform.hpp
1#pragma once
2
3#include "UIContext.hpp"
4
5#include <string>
6
7namespace ZenitUI
8{
12
18 class RaylibPlatform final : public IPlatform
19 {
20 public:
21 RaylibPlatform() = default;
22 ~RaylibPlatform() override = default;
23
24 Vec2 viewportSize() override;
26 double time() override;
29 float dpiScale() override;
30 EdgeInsets safeArea() override;
31 void setClipboardText(const std::string &text) override;
32 std::string getClipboardText() override;
33 void setCursor(CursorShape cursor) override;
34 };
35
37} // namespace ZenitUI
Per-application state: renderer, platform, pointer, focus, portals.
Abstract windowing, timing, input, and clipboard backend.
Definition UIContext.hpp:383
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.
Vec2 viewportSize() override
Return the current window/surface dimensions in logical pixels.
void setCursor(CursorShape cursor) override
Request the OS/windowing system to display the given cursor shape.
EdgeInsets safeArea() override
Return screen safe-area insets in logical pixels (notches, rounded corners, system bars).
double time() override
Return a monotonic clock timestamp in seconds.
std::string getClipboardText() override
Read UTF-8 text from the operating system clipboard (empty string if unavailable).
PointerState pointer() override
Return the current pointer position (logical pixels), scroll wheel delta, and button states.
void setClipboardText(const std::string &text) override
Copy UTF-8 text to the operating system clipboard.
float dpiScale() override
Return the physical-to-logical DPI scale factor (e.g.
CursorShape
Standard OS cursor shapes requested via ZStyle cursor: and IPlatform::setCursor.
Definition UIEnums.hpp:61
Four-sided edge inset (used for padding, margin, borders).
Definition CoreTypes.hpp:62
One frame's worth of keyboard input.
Definition CoreTypes.hpp:437
Keyboard modifier snapshot.
Definition CoreTypes.hpp:390
Pointer position, wheel delta, and per-button state for one frame.
Definition CoreTypes.hpp:378
2D vector with component-wise arithmetic.
Definition CoreTypes.hpp:25