HDK
|
Represents a style sheet entry that contains a target and overrides. More...
#include <STY_Style.h>
Public Member Functions | |
STY_Style (const UT_JSONValue *json, const STY_LoadContext *load_context, STY_StyleSheetLoadMode load_mode, const char *file_name) | |
STY_Style (const UT_StringHolder &label, const STY_TargetHandle &target, const UT_StringArray &import_overrides, const STY_OverrideBlockHandle &local_overrides, STY_StyleFlags flags) | |
STY_Style (const STY_Style &src, const STY_OverrideBlockHandle &local_overrides) | |
~STY_Style () | |
const UT_StringHolder & | getLabel () const |
Returns the label given to this style entry. More... | |
const UT_StringHolder & | getPath () const |
Returns the node path for this style entry. More... | |
const STY_TargetHandle & | getTarget () const |
Returns the target the style sheet entry is intended for. More... | |
const STY_OverrideBlockMap & | getOverrideSets () const |
const UT_StringArray & | getOverrideSetsNames () const |
const UT_StringArray & | getOverrideBindingDataNames () const |
STY_StyleFlags | getFlags () const |
Gets the flags for this style entry. More... | |
STY_SourceLocation | getSourceLocation () const |
void | saveStyleSheets (UT_JSONValue *values, STY_TargetMatchClosureHandle *closures, const exint num_values, const STY_TargetHandle &target, bool evaluate_scripts_if_possible, bool save_verbose, bool save_path) const |
Create a JSON map for saving to a style sheet. Not reference counted. More... | |
void | getResults (STY_Results **results, STY_TargetMatchClosureHandle *closures, bool all_closures_identical, const exint num_values, const STY_ResultsFilter &filter) const |
Calculate override values from this style for an array of closures. More... | |
void | getOverrideNames (STY_OverrideNames &override_names) const |
const STY_Style * | cloneWithOverridesRemoved (const STY_OverrideNames &override_names) const |
Public Member Functions inherited from UT_IntrusiveRefCounter< STY_Style > | |
SYS_FORCE_INLINE | UT_IntrusiveRefCounter () noexcept |
Default constructor: Sets counter to 0. More... | |
SYS_FORCE_INLINE | UT_IntrusiveRefCounter (const UT_IntrusiveRefCounter &) noexcept |
Copy constructor: Sets counter to 0. More... | |
UT_IntrusiveRefCounter & | operator= (const UT_IntrusiveRefCounter &) noexcept |
Assignment operator: Does not modify counter. More... | |
SYS_FORCE_INLINE uint32 | use_count () const noexcept |
Return current counter. More... | |
SYS_FORCE_INLINE bool | conditionalAddRef () noexcept |
Additional Inherited Members | |
Protected Member Functions inherited from UT_NonCopyableNS::UT_NonCopyable | |
UT_NonCopyable ()=default | |
~UT_NonCopyable ()=default | |
UT_NonCopyable (const UT_NonCopyable &)=delete | |
UT_NonCopyable & | operator= (const UT_NonCopyable &)=delete |
Protected Member Functions inherited from UT_IntrusiveRefCounter< STY_Style > | |
SYS_FORCE_INLINE | ~UT_IntrusiveRefCounter () |
Destructor: Only derived classes can destruct this. More... | |
Represents a style sheet entry that contains a target and overrides.
Definition at line 28 of file STY_Style.h.
STY_Style::STY_Style | ( | const UT_JSONValue * | json, |
const STY_LoadContext * | load_context, | ||
STY_StyleSheetLoadMode | load_mode, | ||
const char * | file_name | ||
) |
STY_Style::STY_Style | ( | const UT_StringHolder & | label, |
const STY_TargetHandle & | target, | ||
const UT_StringArray & | import_overrides, | ||
const STY_OverrideBlockHandle & | local_overrides, | ||
STY_StyleFlags | flags | ||
) |
STY_Style::STY_Style | ( | const STY_Style & | src, |
const STY_OverrideBlockHandle & | local_overrides | ||
) |
STY_Style::~STY_Style | ( | ) |
const STY_Style* STY_Style::cloneWithOverridesRemoved | ( | const STY_OverrideNames & | override_names | ) | const |
Returns a style entry identical to this one but without any overrides that match the passed in overrides parameter. Returns nullptr if there are no overrides left after removing these. Returns this if no overrides are removed.
|
inline |
Gets the flags for this style entry.
Definition at line 73 of file STY_Style.h.
|
inline |
Returns the label given to this style entry.
Definition at line 47 of file STY_Style.h.
const UT_StringArray& STY_Style::getOverrideBindingDataNames | ( | ) | const |
Obtains the list of data names that the entry's override scripts are interested in for their input argument binding.
void STY_Style::getOverrideNames | ( | STY_OverrideNames & | override_names | ) | const |
Gather just the categories and names of the overrides that would be set by this style if it were to match.
|
inline |
Returns the overrides referenced by the style sheet entry, and any defined within the style entry (in the map with an empty string key).
Definition at line 60 of file STY_Style.h.
|
inline |
Return the names of referenced overrides in the order specified in the JSON array. This will include the names of sets that could not actually be found in the load context.
Definition at line 65 of file STY_Style.h.
|
inline |
Returns the node path for this style entry.
Definition at line 51 of file STY_Style.h.
void STY_Style::getResults | ( | STY_Results ** | results, |
STY_TargetMatchClosureHandle * | closures, | ||
bool | all_closures_identical, | ||
const exint | num_values, | ||
const STY_ResultsFilter & | filter | ||
) | const |
Calculate override values from this style for an array of closures.
|
inline |
Definition at line 76 of file STY_Style.h.
|
inline |
Returns the target the style sheet entry is intended for.
Definition at line 55 of file STY_Style.h.
void STY_Style::saveStyleSheets | ( | UT_JSONValue * | values, |
STY_TargetMatchClosureHandle * | closures, | ||
const exint | num_values, | ||
const STY_TargetHandle & | target, | ||
bool | evaluate_scripts_if_possible, | ||
bool | save_verbose, | ||
bool | save_path | ||
) | const |
Create a JSON map for saving to a style sheet. Not reference counted.