.. index:: pair: class; EE::UI::CSS::StyleSheetProperty .. _doxid-class_e_e_1_1_u_i_1_1_c_s_s_1_1_style_sheet_property: class EE::UI::CSS::StyleSheetProperty ===================================== .. toctree:: :hidden: Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class StyleSheetProperty { public: // construction :target:`StyleSheetProperty`(); :target:`StyleSheetProperty`(const :ref:`PropertyDefinition`* definition, const std::string& value, const :ref:`Uint32`& index = 0, bool trimValue = true, bool cachedProperty = false); :target:`StyleSheetProperty`(const std::string& name, const std::string& value, bool trimValue = true, const :ref:`Int64`& specificity = 0, const :ref:`Uint32`& index = 0); :target:`StyleSheetProperty`(const std::string& name, const std::string& value, const :ref:`Int64`& specificity, bool isVolatile = false, const :ref:`Uint32`& index = 0); // methods :ref:`Uint32` :ref:`getId`() const; :ref:`PropertyId` :ref:`getPropertyId`() const; :ref:`ShorthandId` :ref:`getShorthandId`() const; const std::string& :target:`getName`() const; const :ref:`String::HashType`& :ref:`getNameHash`() const; const std::string& :target:`getValue`() const; const std::string& :target:`value`() const; const :ref:`Int64`& :target:`getSpecificity`() const; void :target:`setSpecificity`(const :ref:`Int64`& specificity); bool :target:`isEmpty`() const; void :target:`setName`(const std::string& name); void :target:`setValue`(const std::string& value, bool updateHash = false); bool :target:`isVolatile`() const; void :target:`setVolatile`(bool isVolatile); bool :target:`operator==`(const StyleSheetProperty& property) const; bool :target:`operator!=`(const StyleSheetProperty& property) const; std::string :target:`asString`(const std::string& defaultValue = "") const; template :ref:`Type` :target:`asType`(:ref:`Type` defaultValue) const; int :target:`asInt`(int defaultValue = 0) const; unsigned int :target:`asUint`(unsigned int defaultValue = 0) const; double :target:`asDouble`(double defaultValue = 0) const; float :target:`asFloat`(float defaultValue = 0) const; long long :target:`asLlong`(long long defaultValue = 0) const; unsigned long long :target:`asUllong`(unsigned long long defaultValue = 0) const; bool :target:`asBool`(bool defaultValue = false) const; :ref:`Color` :target:`asColor`() const; :ref:`Float` :target:`asDpDimension`(const std::string& defaultValue = "") const; int :target:`asDpDimensionI`(const std::string& defaultValue = "") const; :ref:`Uint32` :target:`asDpDimensionUint`(const std::string& defaultValue = "") const; :ref:`OriginPoint` :target:`asOriginPoint`() const; :ref:`BlendMode` :target:`asBlendMode`() const; :ref:`Vector2f` :target:`asDpDimensionVector2f`(const :ref:`Vector2f`& defaultValue = :ref:`Vector2f::Zero`) const; :ref:`Vector2i` :target:`asDpDimensionVector2i`(const :ref:`Vector2i`& defaultValue = :ref:`Vector2i::Zero`) const; :ref:`Vector2f` :target:`asDpDimensionSizef`(const :ref:`Sizef`& defaultValue = :ref:`Sizef::Zero`) const; :ref:`Vector2i` :target:`asDpDimensionSizei`(const :ref:`Sizei`& defaultValue = :ref:`Sizei::Zero`) const; :ref:`Vector2f` :target:`asVector2f`(const :ref:`Vector2f`& defaultValue = :ref:`Vector2f::Zero`) const; :ref:`Vector2i` :target:`asVector2i`(const :ref:`Vector2i`& defaultValue = :ref:`Vector2i::Zero`) const; :ref:`Sizef` :target:`asSizef`(const :ref:`Sizef`& defaultValue = :ref:`Sizef::Zero`) const; :ref:`Sizei` :target:`asSizei`(const :ref:`Sizei`& defaultValue = :ref:`Sizei::Zero`) const; :ref:`Rect` :target:`asRect`(const :ref:`Rect`& defaultValue = :ref:`Rect`()) const; :ref:`Rectf` :target:`asRectf`(const :ref:`Rectf`& defaultValue = :ref:`Rectf::Zero`) const; :ref:`Uint32` :target:`asTextDecoration`() const; :ref:`Uint32` :target:`asFontStyle`() const; :ref:`Time` :target:`asTime`(const :ref:`Time`& defaultTime = Seconds(0)); :ref:`Ease::Interpolation` :target:`asInterpolation`(const :ref:`Ease::Interpolation`& defaultInterpolation = :ref:`Ease::Linear`); const :ref:`PropertyDefinition`* :target:`getPropertyDefinition`() const; const :ref:`ShorthandDefinition`* :target:`getShorthandDefinition`() const; bool :target:`isVarValue`() const; bool :target:`isLightDarkValue`() const; bool :target:`needsValueSubstitution`() const; size_t :target:`getPropertyIndexCount`() const; const StyleSheetProperty& :target:`getPropertyIndex`(const :ref:`Uint32`& index) const; StyleSheetProperty* :target:`getPropertyIndexRef`(const :ref:`Uint32`& index); const :ref:`Uint32`& :target:`getIndex`() const; :ref:`Float` :target:`asDpDimension`(:ref:`UINode`* node, const std::string& defaultValue = "") const; int :target:`asDpDimensionI`(:ref:`UINode`* node, const std::string& defaultValue = "") const; :ref:`Uint32` :target:`asDpDimensionUint`(:ref:`UINode`* node, const std::string& defaultValue = "") const; :ref:`Vector2f` :target:`asDpDimensionVector2f`(:ref:`UINode`* node, const :ref:`Vector2f`& defaultValue = :ref:`Vector2f::Zero`) const; :ref:`Vector2i` :target:`asDpDimensionVector2i`(:ref:`UINode`* node, const :ref:`Vector2i`& defaultValue = :ref:`Vector2i::Zero`) const; :ref:`Vector2f` :target:`asDpDimensionSizef`(:ref:`UINode`* node, const :ref:`Sizef`& defaultValue = :ref:`Sizef::Zero`) const; :ref:`Vector2i` :target:`asDpDimensionSizei`(:ref:`UINode`* node, const :ref:`Sizei`& defaultValue = :ref:`Sizei::Zero`) const; :ref:`Vector2f` :target:`asVector2f`(:ref:`UINode`* node, const :ref:`Vector2f`& defaultValue = :ref:`Vector2f::Zero`) const; :ref:`Vector2i` :target:`asVector2i`(:ref:`UINode`* node, const :ref:`Vector2i`& defaultValue = :ref:`Vector2i::Zero`) const; :ref:`Sizef` :target:`asSizef`(:ref:`UINode`* node, const :ref:`Sizef`& defaultValue = :ref:`Sizef::Zero`) const; :ref:`Sizei` :target:`asSizei`(:ref:`UINode`* node, const :ref:`Sizei`& defaultValue = :ref:`Sizei::Zero`) const; :ref:`StyleSheetLength` :target:`asStyleSheetLength`() const; const :ref:`String::HashType`& :target:`getValueHash`() const; std::span`> :target:`getVarCache`() const; StyleSheetProperty& :target:`setCachedProperty`(bool cached); bool :target:`isCachedProperty`() const; void :target:`setImportant`(bool important); }; .. _details-class_e_e_1_1_u_i_1_1_c_s_s_1_1_style_sheet_property: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Methods ------- .. index:: pair: function; getId .. _doxid-class_e_e_1_1_u_i_1_1_c_s_s_1_1_style_sheet_property_1a11afe0d1bf723e13440849d9c0288846: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`Uint32` getId() const Returns the stable name hash used as the key in StyleSheetProperties maps. This is not a dense PropertyId or ShorthandId. Unknown and data-\* properties also return their own name hash here. .. index:: pair: function; getPropertyId .. _doxid-class_e_e_1_1_u_i_1_1_c_s_s_1_1_style_sheet_property_1a2e6d150a1c7d5124e854f7ba931728ab: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`PropertyId` getPropertyId() const Returns the dense longhand identity, or :ref:`PropertyId::Invalid `. .. index:: pair: function; getShorthandId .. _doxid-class_e_e_1_1_u_i_1_1_c_s_s_1_1_style_sheet_property_1adde5b531a71e7e2dcb1eaa9b9517fac2: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`ShorthandId` getShorthandId() const Returns the dense shorthand identity, or :ref:`ShorthandId::Invalid `. .. index:: pair: function; getNameHash .. _doxid-class_e_e_1_1_u_i_1_1_c_s_s_1_1_style_sheet_property_1a6949c6f99caaa5a81ac3302e5a16e479: .. ref-code-block:: cpp :class: doxyrest-title-code-block const :ref:`String::HashType`& getNameHash() const Returns the stable hash of :ref:`getName() `; this is not a dense ID.