|
psychic-ui 0.0.0
|
#include <SDL3Application.hpp>
Public Member Functions | |
| SDL3Application (const SDL3Application &)=delete | |
| SDL3Application & | operator= (const SDL3Application &)=delete |
| SDL3Application (SDL3Application &&)=delete | |
| SDL3Application & | operator= (SDL3Application &&)=delete |
| SDL3SystemWindow & | open (std::shared_ptr< Window > window) |
| void | close (const std::shared_ptr< Window > &window) |
| void | run () |
Runs Psychic UI windows on SDL3: sets up SDL's video, gives each opened Window an SDL window with an OpenGL context, and runs the event loop until every window is closed.
psychic_ui::SDL3Application app; app.open(std::make_shared<MyWindow>()); app.run();
To put Psychic UI in an SDL window you create yourself, use SDL3SystemWindow directly.
| SDL3SystemWindow & psychic_ui::SDL3Application::open | ( | std::shared_ptr< Window > | window | ) |
Creates the window's SDL window and GL context, from the window's title, size and flags
| void psychic_ui::SDL3Application::run | ( | ) |
Handles events and draws the windows, until none is visible or SDL asks to quit. A window is drawn after an event for it, and while it needs frames (Window::untilNextFrame: a style or layout change, an animation, a requested frame, a timer); when none does, the loop sleeps in SDL until an event or the soonest timer.