A reference to a element in a RMLDocument document.
This class references a element inside a document and allows direct modification to class names, id, attributes and style properties, as well adding and removing childs.
|
void |
add_event_listener(name: String, listener: Callable) |
|
void |
append_child(child: RMLElement) |
|
void |
|
|
get_attribute(name: String, default_value: Variant) const |
|
|
get_child_count() const |
|
|
get_children() const |
|
|
get_class_names() const |
|
|
get_id() const |
|
|
get_inner_rml() const |
|
|
get_parent() const |
|
|
get_property(name: String, default_value: String) const |
|
|
get_rect() const |
|
|
get_tag_name() const |
|
|
get_text_content() const |
|
|
is_valid() const |
|
|
query_selector(selector: String) const |
|
|
query_selector_all(selector: String) const |
|
|
void |
remove_attribute(name: String) |
|
void |
remove_child(child: RMLElement) |
|
void |
remove_class(name: String) |
|
void |
remove_event_listener(name: String, listener: Callable) |
|
void |
remove_property(name: String) |
|
void |
set_attribute(name: String, value: Variant) |
|
void |
|
|
void |
set_class_names(names: String) |
|
void |
|
|
void |
set_inner_rml(rml: String) |
|
void |
set_property(name: String, value: String) |
|
void |
set_text_content(text: String) |
|
void |
toggle_class(name: String) |
void add_event_listener(name: String, listener: Callable)
event_id.listener is called with a Dictionary with the information about the event along with the following keys:type: The type of the event, is equal to event_id;target_element: The target element which first triggered the event;current_element: Current element which receives the event;stop_propagation or stop_immediate_propagation to true.
void append_child(child: RMLElement)
child as a child of this element.
void clear_children()
Variant get_attribute(name: String, default_value: Variant) const
name, if the element doesn't have this attribute, returns default_value.
RMLElement get_child(index: int) const
index.
int get_child_count() const
RMLElement[] get_children() const
String get_class_names() const
String get_id() const
String get_inner_rml() const
RMLElement get_parent() const
String get_property(name: String, default_value: String) const
name, if the element doesn't have this property, returns default_value.
Rect2 get_rect() const
String get_tag_name() const
PackedStringArray get_text_content() const
bool has_class(name: String) const
true if this element has class.
bool is_valid() const
true when this RMLElement references a valid element.null RMLElement, but the object can reference a null element in RmlUi. element_reference_strict=no flag which is the default, the methods does nothing and/or returns default values. RMLElement query_selector(selector: String) const
selector.
RMLElement[] query_selector_all(selector: String) const
selector.
void remove_attribute(name: String)
name from the element.
void remove_child(child: RMLElement)
child as a child of this element.
void remove_class(name: String)
class from the list of class names of this element.
void remove_event_listener(name: String, listener: Callable)
listener as a listener of the event with name event_id.
void remove_property(name: String)
name from the element.
void set_attribute(name: String, value: Variant)
name to value.
void set_class(name: String)
class in the list of class names of this element.
void set_class_names(names: String)
class_names.
void set_id(id: String)
id.
void set_inner_rml(rml: String)
rml.
void set_property(name: String, value: String)
name to value.
void set_text_content(text: String)
text as it's content.
void toggle_class(name: String)
class in the list of class names of this element.