22 #ifndef FIFE_GUI_LIBROCKETMANAGER_H
23 #define FIFE_GUI_LIBROCKETMANAGER_H
30 #include <Rocket/Core/SystemInterface.h>
43 class ElementDocument;
49 class LibRocketInputProcessor;
50 class LibRocketRenderInterface;
53 public Rocket::Core::SystemInterface,
71 void init(
const std::string& backend, int32_t screenWidth, int32_t screenHeight);
101 virtual Rocket::Core::ElementDocument*
loadDocument(
const std::string&
id,
const std::string& documentPath);
105 virtual Rocket::Core::ElementDocument*
getDocument(
const std::string&
id);
109 virtual void unloadDocument(Rocket::Core::ElementDocument* document);
120 virtual void loadFont(
const std::string& filepath);
162 #endif //FIFE_GUI_LIBROCKETMANAGER_H
virtual void turn()
Updates and renders the gui.
virtual Rocket::Core::ElementDocument * loadDocument(const std::string &id, const std::string &documentPath)
Loads a rocket .rml file and shows it.
virtual void unloadDocument(Rocket::Core::ElementDocument *document)
Unloads a rocket document.
virtual float GetElapsedTime()
There is an inconsistency in the naming of this method, it's in upper camelcase and should have been ...
void init(const std::string &backend, int32_t screenWidth, int32_t screenHeight)
Initializes the librocket manager.
LibRocketInputProcessor * m_inputProcessor
Input processor for librocket.
std::map< std::string, Rocket::Core::ElementDocument * > m_openDocuments
A set of all open documents.
void hideDebugger() const
Hides the librocket debugger.
LibRocketRenderInterface * m_renderInterface
Render Interface for librocket.
virtual void loadFont(const std::string &filepath)
Loads a font to be used by librocket.
void showDebugger() const
Shows the librocket debugger.
LibRocketManager()
Constructor.
virtual void resizeTopContainer(uint32_t x, uint32_t y, uint32_t width, uint32_t height)
Resizes the top container.
virtual bool onSdlEvent(SDL_Event &evt)
Receives input and converts it to librocket format, then it forwards it to librocket.
void unloadDocuments()
Unloads documents opened by librocket.
virtual Rocket::Core::ElementDocument * getDocument(const std::string &id)
Rocket::Core::Context * m_context
Librocket's context.
virtual ~LibRocketManager()
Destructor.