29#ifndef NOMLIB_GUI_UICONTEXT_HPP
30#define NOMLIB_GUI_UICONTEXT_HPP
34#include "nomlib/config.hpp"
35#include "nomlib/math/Point2.hpp"
36#include "nomlib/math/Size2.hpp"
174 Rocket::Core::RenderInterface* interface =
nullptr );
176 Rocket::Core::ElementDocument*
177 load_document_file(
const std::string& filename );
179 Rocket::Core::ElementDocument* load_mouse_cursor_file(
const std::string& filename );
181 void show_mouse_cursor(
bool state );
183 bool load_font(
const std::string& filename );
236 std::unique_ptr<IUIEventHandler>
evt_;
Event handling abstraction.
Interface for a nom::UIContext event processing loop.
void set_size(const Size2i &dims)
Resize the dimensions (width and height) of this context instance.
virtual ~UIContext()
Destructor.
void initialize_debugger()
Initialize libRocket's visual debugger tool.
bool create_context(const std::string &name, const Size2i &res, Rocket::Core::RenderInterface *interface=nullptr)
Create a new element context used by libRocket.
bool debugger_enabled() const
Get the state of the visual debugger for the context.
bool debugger_
Active state of libRocket's visual debugger.
Size2i beacon_size() const
Get the visual error beacon dimensions.
void process_event(const nom::Event &evt)
Internal event processing loop for the context.
void set_debugger_position(const Point2i &pos)
Set the visual debugger's position.
void disable_debugger()
Disable libRocket's visual debugger tool.
void enable_debugger()
Enable libRocket's visual debugger tool.
Size2i res_
The dimensions of the context.
std::unique_ptr< IUIEventHandler > evt_
The internal event handler for the context.
UIContext()
Default constructor; initialize the visual debugger state to boolean FALSE.
Size2i size() const
Get the dimensions (width and height) of this context instance.
void shutdown()
Free the resources (documents) used by the context followed by the context itself.
Rocket::Core::Context * context() const
Get libRocket's context.
void set_debugger_size(const Size2i &dims)
Set the visual debugger's dimensions.
void set_beacon_position(const Point2i &pos)
Set the visual error beacon position.
Size2i debugger_size() const
Get the visual debugger's dimensions.
Rocket::Core::RenderInterface * renderer_
Rendering bridge between libRocket and nomlib.
bool valid() const
Get the validity status of this context instance.
Rocket::Core::Context * context_
The implementation's element context (used by libRocket).
void set_event_handler(nom::EventHandler &evt_handler)
Install the event handler used by the context.