struct GUIStyleSheetSelectorList

List of all selectors on a particular GUI style sheet.

Public

Methods

IsMatching

bool IsMatching(const GUIRenderable &element, StringView pseudoElement = "", StringView pseudoClass = "", bool ignorePseudoClass = false) const

Checks does the selector match the provided GUI element.

IsMatching

bool IsMatching(StringView elementType, StringView elementClass = "", StringView elementId = "", StringView pseudoElement = "", StringView pseudoClass = "", bool ignorePseudoClass = false) const

Checks does the selector match a GUI element with provided type/class/id/pseudo-element/pseudo-class.

It is assumed the GUI element has no parents.

GetUniqueName

const String &GetUniqueName() const

Returns a unique name that represents all the selectors in the list.

CalculateSpecificity

u32 CalculateSpecificity() const

Calculates the weight that determines selector specificity, with higher values resulting in more specific selectors (e.g. id selector is more specific than class).

Fields

Selectors

TInlineArray<GUIStyleSheetSelector, 4> Selectors

Private

Fields

mCachedUniqueName

String mCachedUniqueName