RMLServer

Server for creating and manipulating RmlUi documents.

Description

Allows direct access for RmlUi document manipulation, including loading document files, creating elements, processing events and updating documents.

Methods

RID

create_document() 

RID

create_document_from_path(path: String

RID

create_document_from_rml_string(rml: String

RMLElement

create_element(document: RID, tag_name: String

void

document_draw(document: RID, canvas_item: RID

bool

document_process_event(document: RID, event: InputEvent

void

document_set_size(document: RID, size: Vector2i

void

document_update(document: RID

void

free_rid(rid: RID

RMLElement

get_document_root(document: RID

bool

load_font_face_from_buffer(buffer: PackedByteArray, family: String, fallback_face: bool, is_italic: bool

bool

load_font_face_from_path(path: String, fallback_face: bool

Method Descriptions

RID create_document()

Creates a new empty document.

RID create_document_from_path(path: String)

Creates a new document and loads it's source from path.

RID create_document_from_rml_string(rml: String)

Creates a new document and loads it's source from string.

RMLElement create_element(document: RID, tag_name: String)

Creates an element of type tag_name.
Must add to the document with RMLElement.append_child.

void document_draw(document: RID, canvas_item: RID)

Draws document into canvas_item.
Must be called after document_update.

bool document_process_event(document: RID, event: InputEvent)

Issue a InputEvent to the document's context.

void document_set_size(document: RID, size: Vector2i)

Sets the document's context size.

void document_update(document: RID)

Updates document's layout, called before document_draw

void free_rid(rid: RID)

Tries to free an object in the RMLServer.

RMLElement get_document_root(document: RID)

Gets a RMLElement reference to the document's root element.

bool load_font_face_from_buffer(buffer: PackedByteArray, family: String, fallback_face: bool, is_italic: bool)

Loads a font face file from buffer array.
Pass true to fallback_face to use this font face as fallback for unrecognized glyphs.
Returns true when loaded successfully.

bool load_font_face_from_path(path: String, fallback_face: bool)

Loads a font face file from path.

Pass true to fallback_face to use this font face as fallback for unrecognized glyphs.
Returns true when loaded successfully.