HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
STY_Style Class Reference

Represents a style sheet entry that contains a target and overrides. More...

#include <STY_Style.h>

+ Inheritance diagram for STY_Style:

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_StringHoldergetLabel () const
 Returns the label given to this style entry. More...
 
const UT_StringHoldergetPath () const
 Returns the node path for this style entry. More...
 
const STY_TargetHandlegetTarget () const
 Returns the target the style sheet entry is intended for. More...
 
const STY_OverrideBlockMapgetOverrideSets () const
 
const UT_StringArraygetOverrideSetsNames () const
 
const UT_StringArraygetOverrideBindingDataNames () 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_StylecloneWithOverridesRemoved (const STY_OverrideNames &override_names) const
 
- Public Member Functions inherited from UT_IntrusiveRefCounter< STY_Style >
SYS_FORCE_INLINE UT_IntrusiveRefCounter ()
 Default constructor: Sets counter to 0. More...
 
SYS_FORCE_INLINE UT_IntrusiveRefCounter (const UT_IntrusiveRefCounter &)
 Copy constructor: Sets counter to 0. More...
 
UT_IntrusiveRefCounteroperator= (const UT_IntrusiveRefCounter &)
 Assignment operator: Does not modify counter. More...
 
SYS_FORCE_INLINE uint32 use_count () const
 Return current counter. More...
 

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_NonCopyableoperator= (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...
 

Detailed Description

Represents a style sheet entry that contains a target and overrides.

Definition at line 28 of file STY_Style.h.

Constructor & Destructor Documentation

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 ( )

Member Function Documentation

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.

STY_StyleFlags STY_Style::getFlags ( ) const
inline

Gets the flags for this style entry.

Definition at line 73 of file STY_Style.h.

const UT_StringHolder& STY_Style::getLabel ( ) const
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.

const STY_OverrideBlockMap& STY_Style::getOverrideSets ( ) const
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.

const UT_StringArray& STY_Style::getOverrideSetsNames ( ) const
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.

const UT_StringHolder& STY_Style::getPath ( ) const
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.

STY_SourceLocation STY_Style::getSourceLocation ( ) const
inline

Definition at line 76 of file STY_Style.h.

const STY_TargetHandle& STY_Style::getTarget ( ) const
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.


The documentation for this class was generated from the following file: