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

#include <OP_StyleManager.h>

Public Member Functions

 OP_StyleManager (OP_Director *dir)
 
 ~OP_StyleManager ()
 
bool save (std::ostream &os, int binary) const
 For saving to and loading from a hip file. More...
 
bool load (UT_IStream &is)
 
bool addStyle (const UT_StringHolder &name, const UT_StringHolder &description, const UT_StringHolder &style)
 Creation and deletion of styles. More...
 
bool renameStyle (const UT_StringHolder &old_name, const UT_StringHolder &new_name)
 
bool reorderStyles (const UT_StringArray &names)
 
void removeStyle (const UT_StringRef &name)
 
void removeAll ()
 
bool hasStyle (const UT_StringRef &name) const
 Fetching information about existing styles. More...
 
const UT_StringArraygetStyleNames () const
 
const UT_StringHoldergetStyleDescription (const UT_StringRef &name) const
 
const UT_StringHoldergetStyleSheet (const UT_StringRef &name) const
 
int getStyleVersion (const UT_StringRef &name) const
 
DEP_MicroNodegetMicroNode ()
 
DEP_MicroNodegetMicroNode (const UT_StringRef &name)
 
const UT_StringMap
< UT_StringHolder > & 
getStyleSheetMap () const
 Get a reference to the internal style sheet map. More...
 
void handleOpMoved (const OP_NodeList &src_nodes, const OP_NodeList &dest_nodes)
 

Detailed Description

Definition at line 28 of file OP_StyleManager.h.

Constructor & Destructor Documentation

OP_StyleManager::OP_StyleManager ( OP_Director dir)
OP_StyleManager::~OP_StyleManager ( )

Member Function Documentation

bool OP_StyleManager::addStyle ( const UT_StringHolder name,
const UT_StringHolder description,
const UT_StringHolder style 
)

Creation and deletion of styles.

DEP_MicroNode& OP_StyleManager::getMicroNode ( )

Get the micronode for tracking the set of available styles. Propagates dirtiness when a style is added or removed.

DEP_MicroNode* OP_StyleManager::getMicroNode ( const UT_StringRef name)

Get the micronode for tracking a articular style. Propagates dirtiness when the style is changed or removed.

const UT_StringHolder& OP_StyleManager::getStyleDescription ( const UT_StringRef name) const
const UT_StringArray& OP_StyleManager::getStyleNames ( ) const
const UT_StringHolder& OP_StyleManager::getStyleSheet ( const UT_StringRef name) const
const UT_StringMap<UT_StringHolder>& OP_StyleManager::getStyleSheetMap ( ) const
inline

Get a reference to the internal style sheet map.

Definition at line 72 of file OP_StyleManager.h.

int OP_StyleManager::getStyleVersion ( const UT_StringRef name) const

A simpe way to check for changes in a specific style without using micro-nodes for dependency tracking. Good for maintaining a cache. Version numbers will be unique for all style sheets within this Houdini session.

void OP_StyleManager::handleOpMoved ( const OP_NodeList src_nodes,
const OP_NodeList dest_nodes 
)

Update references to moved SHOPs (called from OP_Node::moveAndUpdateDependencies).

bool OP_StyleManager::hasStyle ( const UT_StringRef name) const

Fetching information about existing styles.

bool OP_StyleManager::load ( UT_IStream is)
void OP_StyleManager::removeAll ( )
void OP_StyleManager::removeStyle ( const UT_StringRef name)
bool OP_StyleManager::renameStyle ( const UT_StringHolder old_name,
const UT_StringHolder new_name 
)
bool OP_StyleManager::reorderStyles ( const UT_StringArray names)
bool OP_StyleManager::save ( std::ostream &  os,
int  binary 
) const

For saving to and loading from a hip file.


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