Unravel Engine C++ Reference
Loading...
Searching...
No Matches
unravel::RmlUi_Backend_Engine Namespace Reference

Functions

auto initialize (rtti::context &ctx, const char *window_name="RmlUi", int width=1024, int height=768) -> bool
 Initialize the RmlUi backend with engine context.
 
void shutdown ()
 Shutdown the RmlUi backend and cleanup resources.
 
auto get_system_interface () -> Rml::SystemInterface *
 Get the system interface for RmlUi.
 
auto get_render_interface () -> Rml::RenderInterface *
 Get the render interface for RmlUi.
 
auto process_events (Rml::Context *context, KeyDownCallback key_down_callback=nullptr) -> bool
 Process input events and forward them to RmlUi.
 
void request_exit ()
 Request the backend to exit during next event processing.
 
void begin_frame ()
 Prepare render state for RmlUi rendering Call this before rendering RmlUi context.
 
void present_frame (const gfx::frame_buffer::ptr &framebuffer)
 Present the rendered frame Call this after rendering RmlUi context.
 
void set_viewport (int width, int height)
 Update viewport size (call on window resize)
 

Function Documentation

◆ begin_frame()

void unravel::RmlUi_Backend_Engine::begin_frame ( )

Prepare render state for RmlUi rendering Call this before rendering RmlUi context.

Definition at line 158 of file RmlUi_Backend_Engine.cpp.

◆ get_render_interface()

auto unravel::RmlUi_Backend_Engine::get_render_interface ( ) -> Rml::RenderInterface *

Get the render interface for RmlUi.

Returns
Pointer to the custom render interface

Definition at line 128 of file RmlUi_Backend_Engine.cpp.

◆ get_system_interface()

auto unravel::RmlUi_Backend_Engine::get_system_interface ( ) -> Rml::SystemInterface *

Get the system interface for RmlUi.

Returns
Pointer to the custom system interface

Definition at line 118 of file RmlUi_Backend_Engine.cpp.

◆ initialize()

auto unravel::RmlUi_Backend_Engine::initialize ( rtti::context & ctx,
const char * window_name = "RmlUi",
int width = 1024,
int height = 768 ) -> bool

Initialize the RmlUi backend with engine context.

Parameters
ctxEngine context for accessing systems
window_nameName for the UI context (optional)
widthInitial viewport width
heightInitial viewport height
Returns
True if initialization was successful

Definition at line 40 of file RmlUi_Backend_Engine.cpp.

◆ present_frame()

void unravel::RmlUi_Backend_Engine::present_frame ( const gfx::frame_buffer::ptr & framebuffer)

Present the rendered frame Call this after rendering RmlUi context.

Definition at line 166 of file RmlUi_Backend_Engine.cpp.

◆ process_events()

auto unravel::RmlUi_Backend_Engine::process_events ( Rml::Context * context,
KeyDownCallback key_down_callback = nullptr ) -> bool

Process input events and forward them to RmlUi.

Parameters
contextRmlUi context to receive events
key_down_callbackOptional callback for key down events
Returns
False if the application should exit

Definition at line 138 of file RmlUi_Backend_Engine.cpp.

◆ request_exit()

void unravel::RmlUi_Backend_Engine::request_exit ( )

Request the backend to exit during next event processing.

Definition at line 150 of file RmlUi_Backend_Engine.cpp.

◆ set_viewport()

void unravel::RmlUi_Backend_Engine::set_viewport ( int width,
int height )

Update viewport size (call on window resize)

Parameters
widthNew viewport width
heightNew viewport height

Definition at line 174 of file RmlUi_Backend_Engine.cpp.

◆ shutdown()

void unravel::RmlUi_Backend_Engine::shutdown ( )

Shutdown the RmlUi backend and cleanup resources.

Definition at line 93 of file RmlUi_Backend_Engine.cpp.