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

#include <STY_StyleSheet.h>

+ Inheritance diagram for STY_StyleSheet:

Public Member Functions

 STY_StyleSheet (const UT_StringHolder &source_location, STY_StyleSheetLoadMode load_mode)
 Constructor and destructor. More...
 
 STY_StyleSheet (const char *json_str, const UT_StringHolder &source_location, STY_StyleSheetLoadMode load_mode)
 
 STY_StyleSheet (const UT_JSONValue &json_value, const UT_StringHolder &source_location, STY_StyleSheetLoadMode load_mode)
 
 STY_StyleSheet (const UT_StringArray &import_files, const UT_Array< STY_StyleHandle > &styles, const STY_MaterialMap &materials, const STY_OverrideScriptMap &scripts, const STY_OverrideBlockMap &override_sets, STY_StyleSheetFlags flags)
 
 ~STY_StyleSheet ()
 
const UT_WorkBuffergetErrors () const
 Get any errors encounterd during the parsing of the stylesheet. More...
 
const UT_Array< STY_StyleHandle > & getStyles () const
 Get the style entries defined by this style sheet. More...
 
const STY_MaterialMapgetMaterialDefinitions () const
 Gets all material definitions provided by the style sheet. More...
 
const STY_OverrideScriptMapgetScripts () const
 Gets all shared script definitions provided by the style sheet. More...
 
const STY_OverrideBlockMapgetOverrideSets () const
 Gets all material definitions provided by the style sheet. More...
 
const UT_StringArraygetImportFiles () const
 Gets a list of imported style sheet files. More...
 
STY_StyleSheetFlags getFlags () const
 Gets the flags for this style sheet. More...
 
void saveStyleSheet (UT_WorkBuffer &stylesheet) const
 Saves the style sheet as text in JSON format. More...
 
- Public Member Functions inherited from UT_IntrusiveRefCounter< STY_StyleSheet >
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_IntrusiveRefCounteroperator= (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
 

Static Public Member Functions

static void setRegisteredStyleSheetMap (const UT_StringMap< UT_StringHolder > *stylesheet_map)
 
static const UT_StringHoldergetDefAttributeName ()
 Primitive/detail string attribute name that can define a style sheet. More...
 
static const UT_StringHoldergetDefParmName ()
 Object parameter name that can define a style sheet. More...
 
static const UT_StringHoldergetDefParmLabel ()
 Object parameter label in the data tree. 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_StyleSheet >
SYS_FORCE_INLINE ~UT_IntrusiveRefCounter ()
 Destructor: Only derived classes can destruct this. More...
 

Detailed Description

Style sheet definition that contains style entries (an entry specifies the target styling subject and overrides that need to be applied to the properties of that subject. It also contains extra data needed for successful overrides, such as material definitions.

Definition at line 35 of file STY_StyleSheet.h.

Constructor & Destructor Documentation

STY_StyleSheet::STY_StyleSheet ( const UT_StringHolder source_location,
STY_StyleSheetLoadMode  load_mode 
)
explicit

Constructor and destructor.

STY_StyleSheet::STY_StyleSheet ( const char *  json_str,
const UT_StringHolder source_location,
STY_StyleSheetLoadMode  load_mode 
)
explicit
STY_StyleSheet::STY_StyleSheet ( const UT_JSONValue json_value,
const UT_StringHolder source_location,
STY_StyleSheetLoadMode  load_mode 
)
explicit
STY_StyleSheet::STY_StyleSheet ( const UT_StringArray import_files,
const UT_Array< STY_StyleHandle > &  styles,
const STY_MaterialMap materials,
const STY_OverrideScriptMap scripts,
const STY_OverrideBlockMap override_sets,
STY_StyleSheetFlags  flags 
)
explicit
STY_StyleSheet::~STY_StyleSheet ( )

Member Function Documentation

static const UT_StringHolder& STY_StyleSheet::getDefAttributeName ( )
static

Primitive/detail string attribute name that can define a style sheet.

static const UT_StringHolder& STY_StyleSheet::getDefParmLabel ( )
static

Object parameter label in the data tree.

static const UT_StringHolder& STY_StyleSheet::getDefParmName ( )
static

Object parameter name that can define a style sheet.

const UT_WorkBuffer& STY_StyleSheet::getErrors ( ) const
inline

Get any errors encounterd during the parsing of the stylesheet.

Definition at line 77 of file STY_StyleSheet.h.

STY_StyleSheetFlags STY_StyleSheet::getFlags ( ) const
inline

Gets the flags for this style sheet.

Definition at line 106 of file STY_StyleSheet.h.

const UT_StringArray& STY_StyleSheet::getImportFiles ( ) const
inline

Gets a list of imported style sheet files.

Definition at line 102 of file STY_StyleSheet.h.

const STY_MaterialMap& STY_StyleSheet::getMaterialDefinitions ( ) const
inline

Gets all material definitions provided by the style sheet.

Definition at line 87 of file STY_StyleSheet.h.

const STY_OverrideBlockMap& STY_StyleSheet::getOverrideSets ( ) const
inline

Gets all material definitions provided by the style sheet.

Definition at line 97 of file STY_StyleSheet.h.

const STY_OverrideScriptMap& STY_StyleSheet::getScripts ( ) const
inline

Gets all shared script definitions provided by the style sheet.

Definition at line 92 of file STY_StyleSheet.h.

const UT_Array<STY_StyleHandle>& STY_StyleSheet::getStyles ( ) const
inline

Get the style entries defined by this style sheet.

Definition at line 82 of file STY_StyleSheet.h.

void STY_StyleSheet::saveStyleSheet ( UT_WorkBuffer stylesheet) const

Saves the style sheet as text in JSON format.

static void STY_StyleSheet::setRegisteredStyleSheetMap ( const UT_StringMap< UT_StringHolder > *  stylesheet_map)
static

Utility function to track internally defined style sheets, to allow one internal style sheet to reference another, and to treat internally defined style sheet on par with external files.


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