Nebula
Loading...
Searching...
No Matches
rmluiapi.cc File Reference
#include "render/stdneb.h"
#include "rmluiapi.h"
#include "rmlui/rmluicontext.h"
#include "rmlui/rmluidatabinding.h"
#include "game/world.h"
#include <RmlUi/Core.h>
#include <RmlUi/Core/Elements/ElementFormControl.h>

Namespaces

namespace  RmlUi
namespace  RmlUi::Api

Functions

bool RmlUi::Api::RmlUiLoadFontFace (const char *path, bool fallback)
 load a font face (ttf, otf...)
uint64_t RmlUi::Api::RmlUiLoadDocument (const char *path)
 load a document, hidden until shown, returns 0 on failure
void RmlUi::Api::RmlUiDocumentShow (uint64_t document)
 show a document
void RmlUi::Api::RmlUiDocumentHide (uint64_t document)
 hide a document
void RmlUi::Api::RmlUiDocumentClose (uint64_t document)
 close a document, its elements become invalid
bool RmlUi::Api::RmlUiIsActive ()
 check if RmlUi is running. At shutdown it stops before scripts unload
void RmlUi::Api::RmlUiSetDebuggerVisible (bool visible)
 show or hide the RmlUi debugger
bool RmlUi::Api::RmlUiElementIsValid (uint64_t element)
 check if a handle still refers to a live element
uint64_t RmlUi::Api::RmlUiElementGetElementById (uint64_t element, const char *id)
 find an element by id in the subtree of an element (or document), returns 0 if there is none
uint64_t RmlUi::Api::RmlUiElementGetDocument (uint64_t element)
 get the document an element is in
int RmlUi::Api::RmlUiElementGetInnerRml (uint64_t element, char *buffer, int bufferSize)
 get the element's inner RML
void RmlUi::Api::RmlUiElementSetInnerRml (uint64_t element, const char *rml)
 replace the element's content with RML
int RmlUi::Api::RmlUiElementGetAttribute (uint64_t element, const char *name, char *buffer, int bufferSize)
 get an attribute as a string
void RmlUi::Api::RmlUiElementSetAttribute (uint64_t element, const char *name, const char *value)
 set an attribute
void RmlUi::Api::RmlUiElementRemoveAttribute (uint64_t element, const char *name)
 remove an attribute
void RmlUi::Api::RmlUiElementSetClass (uint64_t element, const char *name, bool active)
 set or clear a class
bool RmlUi::Api::RmlUiElementIsClassSet (uint64_t element, const char *name)
 check for a class
bool RmlUi::Api::RmlUiElementSetProperty (uint64_t element, const char *name, const char *value)
 set an RCSS property from its string form, returns false if it doesn't parse
void RmlUi::Api::RmlUiElementRemoveProperty (uint64_t element, const char *name)
 remove a local RCSS property
int RmlUi::Api::RmlUiElementGetValue (uint64_t element, char *buffer, int bufferSize)
 get the value of a form control (input, select, textarea)
void RmlUi::Api::RmlUiElementSetValue (uint64_t element, const char *value)
 set the value of a form control
bool RmlUi::Api::RmlUiElementFocus (uint64_t element)
 focus an element
uint64_t RmlUi::Api::RmlUiElementAddEventListener (uint64_t element, const char *event, EventCallback callback, ReleaseCallback release, intptr_t userData)
 add a listener for an event ("click", "change", "mouseover"...)
void RmlUi::Api::RmlUiRemoveEventListener (uint64_t listenerId)
 A listener whose element has been destroyed is already gone, removing it again does nothing.
void RmlUi::Api::RmlUiCreateDataModel (const char *model)
 create a data model, bind its variables before loading documents that use it
void RmlUi::Api::RmlUiRemoveDataModel (const char *model)
 remove a data model and its component bindings
void RmlUi::Api::RmlUiBindComponent (const char *model, const char *name, uint64_t entity, uint32_t component)
 bind a component of an entity as a variable of a data model
void RmlUi::Api::RmlUiBindDataEvent (const char *model, const char *name, EventCallback callback, intptr_t userData)
 bind a data event (data-event-click="name"), the callback gets the element the event is on
void RmlUi::Api::RmlUiDirtyVariable (const char *model, const char *name)
 mark a data model variable dirty so views update
void RmlUi::Api::DiscardHandles ()
 drop all handles and listeners, called when RmlUi shuts down