16#ifndef AEONGUI_ELEMENT_H
17#define AEONGUI_ELEMENT_H
24#include "aeongui/AttributeMap.hpp"
25#include "aeongui/StyleSheet.hpp"
26#include "aeongui/dom/DOMString.hpp"
31 typedef struct lwc_string_s lwc_string;
53 DLL
Element (
const DOMString& aTagName, AttributeMap&& aAttributes,
Node* aParent );
63 const DOMString&
tagName()
const;
67 const DOMString&
id()
const;
71 const std::vector<lwc_string*>&
classes()
const;
80 std::vector<lwc_string*> mClasses{};
81 DLL
void OnAncestorChanged()
override;
Abstract 2D rendering surface.
Definition Canvas.hpp:39
Represents a DOM Document.
Definition Document.hpp:38
const std::vector< lwc_string * > & classes() const
Get the element's CSS class list.
Definition Element.cpp:323
NodeType nodeType() const final
Get the node type (always ELEMENT_NODE).
Definition Element.cpp:311
AttributeMap mAttributes
The element's attribute map.
Definition Element.hpp:83
StyleSheetPtr mInlineStyleSheet
Inline style parsed from the style attribute.
Definition Element.hpp:84
virtual ~Element()
Virtual destructor.
Definition Element.cpp:251
const AttributeMap & attributes() const
Get the element's attribute map.
Definition Element.cpp:327
const DOMString & id() const
Get the element's ID attribute value.
Definition Element.cpp:319
css_select_results * GetParentComputedStyles() const
Get computed styles from the parent element.
Definition Element.cpp:259
css_select_results * GetComputedStyles() const
Get this element's computed styles.
Definition Element.cpp:274
Element(const DOMString &aTagName, AttributeMap &&aAttributes, Node *aParent)
Construct an element.
Definition Element.cpp:163
const DOMString & tagName() const
Get the tag name.
Definition Element.cpp:315
SelectResultsPtr mComputedStyles
Computed CSS styles for this element.
Definition Element.hpp:85
NodeType
DOM node type constants.
Definition Node.hpp:44
Node(Node *aParent=nullptr)
Construct a node with an optional parent.
Definition Node.cpp:25