class GUIStyleSheetCascade

Contains a set of multiple style sheets, sorted by importance.

Public

Methods

BuildRules

GUIStyleSheetRules BuildRules(const GUIRenderable &guiElement, StringView pseudoElement = "", StringView pseudoClass = "", const GUIStyleSheetRules *inheritedRules = nullptr) const

Same as GUIStyleSheet::BuildRules(const GUIRenderable & , StringView, StringView, const GUIStyleSheetRules*), except it gathers rules for all style sheets in the cascade.

BuildRules

GUIStyleSheetRules BuildRules(StringView elementType, StringView elementClass = "", StringView elementId = "", StringView pseudoElement = "", StringView pseudoClass = "", const GUIStyleSheetRules *inheritedRules = nullptr) const

Same as GUIStyleSheet::BuildRuleset(StringView, StringView, StringView, StringView, StringView, const GUIStyleSheetRules*), except it gathers rules for all style sheets in the cascade.

BuildStateRulesets

SPtr<const GUIStyleSheetStateRulesets> BuildStateRulesets(const GUIRenderable &guiElement, StringView pseudoElement = "") const

Same as GUIStyleSheet::BuildStateRulesets(const GUIRenderable & , StringView), except it gathers rules for all style sheets in the cascade.

HasRulesetForClass

bool HasRulesetForClass(StringView elementClass, StringView elementType = "") const

Checks if the cascade has any style sheets with a ruleset for this particular class.

elementClass
Class name to check.
elementType
Optional name of the GUI element type. If not empty, only classes matching this element will be considered.

Returns: True if there is at least one ruleset for the class.

RegisterStyleSheet

void RegisterStyleSheet(const HGUIStyleSheet &styleSheet, i32 importance)

Registers a new style sheet in the cascade.

styleSheet
Style sheet to register.
importance
Style sheets with higher importance will override style sheet rules from ones with lower importance.

Private

Fields

mStyleSheets

TInlineArray<StyleSheetWithImportance, 4> mStyleSheets

mCachedStateRulesets

TSharedUnorderedSet<GUIStyleSheetStateRulesets> mCachedStateRulesets

Cached state rulesets to avoid re-building them on every call.