class
GUIStyleSheet
Contains rulesets that determine how are GUI elements displayed.
GUI elements will perform lookup into the style sheet based on the element type, element ID, current element state and other properties.
Public
Constructors
GUIStyleSheet
Methods
~GUIStyleSheet
BuildRules
Builds the appropriate ruleset to use for a particular GUI element.
This looks up relevant rulesets based on GUI elements type and optionally its class, id, parent elements and provided pseudo-element name.
BuildRules
Builds the appropriate rules that matches a GUI element with the provided type/class/id/pseud-class/pseudo-element.
Any of the provided selectors may be empty, in which case they will be ignored in the lookup.
GetRulesets
Returns all rulesets stored in the stylesheet.
GetMatchingRulesetIndices
Populates the provided array with a list of ruleset indices matching the provided GUI element.
The ruleset indices can be used for accessing the array returned from GetRulesets().
HasRulesetForClass
Checks if the style sheet has 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.
staticParse
Attempts to parse the provided style sheet file and outputs the parsed style sheet, if successful.
staticCreate
Creates a new style sheet.
staticCreateUninitialized
Creates a new style sheet without calling Initialize().
Caller must manually call Initialize().
staticGetRttiStatic
Private
Methods
Initialize
Initializes all the internal data of this object.
Must be called right after construction for new objects, or after deserialization for deserialized objects. If requested, render proxy is created and queued for initialization on the render thread.
PopulatePotentialRulesetIndices
Builds a list of all potential ruleset indices for the specified GUI element, using the ruleset lookup map.
Note it's guaranteed that rulesets not in the set will not be a match for the provided GUI element, but rulesets in the set don't necessarily need to match - the caller needs to check for a match explicitly.
PopulatePotentialRulesetIndices
Builds a list of all potential ruleset indices for a GUI element with specified type, class and/or id selectors, using the ruleset lookup map.* Note it's guaranteed that rulesets not in the set will not be a match for the provided type/class/id, but rulesets in the set don't necessarily need to match - the caller needs to check for a match explicitly.
staticBuildCacheLookupName
Builds a string that can be used for looking up narrowed list of rulesets matching every one of the provided selectors.
Fields
mRulesets
mRulesetLookupMap
Map to avoid iterating over entire mRuleset array.