Nebula
Loading...
Searching...
No Matches
Nebula.Ui.Element Class Reference

Detailed Description

An RmlUi element.

Holding one after RmlUi destroys it is safe, it stops being valid

Inherits IEquatable.

Inherited by Nebula.Ui.Document.

Public Member Functions

Element GetElementById (string id)
 Find an element by id in this element's subtree.
unsafe string GetAttribute (string name)
void SetAttribute (string name, string value)
void RemoveAttribute (string name)
void SetClass (string name, bool active)
bool IsClassSet (string name)
bool SetProperty (string name, string value)
 Set an RCSS property from its string form ("width", "50%"), false if it doesn't parse.
void RemoveProperty (string name)
bool Focus ()
EventListener AddEventListener (string eventName, Action< UiEvent > handler)
 Listen for an event ("click", "change", "mouseover"...).
bool Equals (Element other)
override bool Equals (object obj)
override int GetHashCode ()

Protected Attributes

readonly ulong handle

Package Functions

 Element (ulong handle)

Static Package Functions

static Element FromHandle (ulong handle)

Properties

ulong Handle [get]
bool IsValid [get]
 Whether the element still exists.
Document Document [get]
 The document the element is in.
unsafe string InnerRml [get, set]
 The element's content as RML.
unsafe string Value [get, set]
 The value of a form control (input, select, textarea).

Constructor & Destructor Documentation

◆ Element()

Nebula.Ui.Element.Element ( ulong handle)
inlinepackage

Member Function Documentation

◆ AddEventListener()

EventListener Nebula.Ui.Element.AddEventListener ( string eventName,
Action< UiEvent > handler )
inline

Listen for an event ("click", "change", "mouseover"...).

Dispose the listener to stop listening, it also stops when the element is destroyed

◆ Equals() [1/2]

bool Nebula.Ui.Element.Equals ( Element other)
inline

◆ Equals() [2/2]

override bool Nebula.Ui.Element.Equals ( object obj)
inline

◆ Focus()

bool Nebula.Ui.Element.Focus ( )
inline

◆ FromHandle()

Element Nebula.Ui.Element.FromHandle ( ulong handle)
inlinestaticpackage

◆ GetAttribute()

unsafe string Nebula.Ui.Element.GetAttribute ( string name)
inline

◆ GetElementById()

Element Nebula.Ui.Element.GetElementById ( string id)
inline

Find an element by id in this element's subtree.

◆ GetHashCode()

override int Nebula.Ui.Element.GetHashCode ( )
inline

◆ IsClassSet()

bool Nebula.Ui.Element.IsClassSet ( string name)
inline

◆ RemoveAttribute()

void Nebula.Ui.Element.RemoveAttribute ( string name)
inline

◆ RemoveProperty()

void Nebula.Ui.Element.RemoveProperty ( string name)
inline

◆ SetAttribute()

void Nebula.Ui.Element.SetAttribute ( string name,
string value )
inline

◆ SetClass()

void Nebula.Ui.Element.SetClass ( string name,
bool active )
inline

◆ SetProperty()

bool Nebula.Ui.Element.SetProperty ( string name,
string value )
inline

Set an RCSS property from its string form ("width", "50%"), false if it doesn't parse.

Member Data Documentation

◆ handle

readonly ulong Nebula.Ui.Element.handle
protected

Property Documentation

◆ Document

Document Nebula.Ui.Element.Document
get

The document the element is in.

◆ Handle

ulong Nebula.Ui.Element.Handle
get

◆ InnerRml

unsafe string Nebula.Ui.Element.InnerRml
getset

The element's content as RML.

◆ IsValid

bool Nebula.Ui.Element.IsValid
get

Whether the element still exists.

◆ Value

unsafe string Nebula.Ui.Element.Value
getset

The value of a form control (input, select, textarea).


The documentation for this class was generated from the following file:
  • /github/workspace/code/addons/rmlui/nsharp/NebulaUi/Ui.cs