Librocket API Document

From FreeSpace Wiki
Jump to: navigation, search
Librocket API references
Elements
Documents
Contexts
Events
API Reference

Documents derive from elements, so inherit their interface. The document-specific interface is similar to the C++ interface; refer there for the full functional documentation.

Properties

Lua property Brief description Equivalent C++ methods
context Retrieves the document’s context. GetContext()
title Gets / sets the document’s title. GetTitle(), SetTitle()

Methods

Lua method Brief description
CreateElement() Creates an element by tag name.
CreateTextNode() Creates a text element.
Close() Closes the document and destroys all child elements.
Hide() Hides the document.
PullToFront() Pulls to the document to the front of others with a similar z-index.
PushToBack() Pushes to the document behind others with a similar z-index.
Show(flags = FOCUS) Shows the document, optionally with focus flags.

The flags available for the Show() are referenced in Luaas:

  • NONE
  • FOCUS
  • MODAL