class Document

  • supers: RmlUi.Element

  • namespace: RmlUi

Document derives from Element. Document has no constructor; it must be instantiated through a Context object instead, either by loading an external RML file or creating an empty document. It has the following functions and properties:

[source]


methods


Document.PullToFront


function Document.PullToFront()

Pulls the document in front of other documents within its context with a similar z-index.

[source]

Document.PushToBack


function Document.PushToBack()

Pushes the document behind other documents within its context with a similar z-index.

[source]

Document.Show


function Document.Show(
  modal: RmlUi.RmlModalFlag?,
  focus: RmlUi.RmlFocusFlag?
)

@param modal - Defaults to Focus

Shows the document.

[source]

Document.Hide


function Document.Hide()

Hides the document.

[source]

Document.Close


function Document.Close()

Hides and closes the document, destroying its contents.

[source]

Document.CreateElement


function Document.CreateElement(tag_name: string) ->  RmlUi.ElementPtr

Instances an element with a tag of tag_name.

[source]

Document.CreateTextNode


function Document.CreateTextNode(text: string) ->  RmlUi.ElementPtr

Instances a text element containing the string text.

[source]

Document.ReloadStyleSheet


function Document.ReloadStyleSheet(load: boolean?)

Reload the active style sheet.

[source]

Document.LoadInlineScript


function Document.LoadInlineScript(
  content: string,
  source: string?,
  source_line: integer?
)

Load scripts as if it were in the script tag.

[source]

Document.LoadExternalScript


function Document.LoadExternalScript(source_path: string)

Load an external script.

[source]

Document.UpdateDocument


function Document.UpdateDocument()

Update the Document.

[source]

Document.AppendToStyleSheet


function Document.AppendToStyleSheet(content: string)

Append text to style sheet.

[source]

fields


Document.title


Document.title : string

[source]

Document.context


Document.context : RmlUi.Context {
    dimensions: RmlUi.Vector2i,
    dp_ratio: number,
    documents: RmlUi.Document[],
    focus_element: RmlUi.Element,
    hover_element: RmlUi.Element,
    name: string,
    root_element: RmlUi.Element,
}

[source]

Document.url


Document.url : string

[source]

Document.modal


Document.modal : boolean

[source] Is it modal?

Document.widget


Document.widget: table

[source] A table of data that can be accessed in onevent attributes. It doesn’t have to be a widget.