Public Member Functions | Protected Member Functions | Protected Attributes

PD_Style Class Reference

#include <pd_Style.h>

Inheritance diagram for PD_Style:
PD_BuiltinStyle

List of all members.

Public Member Functions

 PD_Style (pt_PieceTable *pPT, PT_AttrPropIndex indexAP, const char *szName=NULL, bool bDisplayed=true)
virtual ~PD_Style ()
PT_AttrPropIndex getIndexAP (void) const
bool setIndexAP (PT_AttrPropIndex indexAP)
bool getProperty (const gchar *szName, const gchar *&szValue) const
const PP_PropertyTypegetPropertyType (const gchar *szName, tProperty_type Type) const
bool getAttribute (const gchar *szName, const gchar *&szValue) const
bool getPropertyExpand (const gchar *szName, const gchar *&szValue) const
bool getAttributeExpand (const gchar *szName, const gchar *&szValue) const
PD_StylegetBasedOn (void) const
PD_StylegetFollowedBy (void) const
virtual bool isUserDefined (void) const
void used (UT_sint32 count)
bool isUsed (void) const
bool isCharStyle (void) const
bool isList (void) const
bool isDisplayed (void) const
bool addProperty (const gchar *szName, const gchar *szValue)
bool addProperties (const gchar **pProperties)
bool setAllAttributes (const gchar **pAtts)
bool addAttributes (const gchar **pAtts)
bool getAllProperties (UT_Vector *vProps, UT_sint32 depth) const
bool getAllAttributes (UT_Vector *vAttribs, UT_sint32 depth) const
size_t getPropertyCount (void) const
size_t getAttributeCount (void) const
bool getNthProperty (int ndx, const gchar *&szName, const gchar *&szValue) const
bool getNthAttribute (int ndx, const gchar *&szName, const gchar *&szValue) const
const char * getName (void) const

Protected Member Functions

bool _getPropertyExpand (const gchar *szName, const gchar *&szValue, UT_sint32 iDepth) const
bool _getAttributeExpand (const gchar *szName, const gchar *&szValue, UT_sint32 iDepth) const

Protected Attributes

pt_PieceTablem_pPT
PT_AttrPropIndex m_indexAP
char * m_szName
bool m_bDisplayed
UT_sint32 m_iUsed
PD_Stylem_pBasedOn
PD_Stylem_pFollowedBy

Constructor & Destructor Documentation

PD_Style::PD_Style ( pt_PieceTable pPT,
PT_AttrPropIndex  indexAP,
const char *  szName = NULL,
bool  bDisplayed = true 
)

References m_szName.

PD_Style::~PD_Style (  )  [virtual]

References FREEP, and m_szName.


Member Function Documentation

bool PD_Style::_getAttributeExpand ( const gchar *  szName,
const gchar *&  szValue,
UT_sint32  iDepth 
) const [protected]
bool PD_Style::_getPropertyExpand ( const gchar *  szName,
const gchar *&  szValue,
UT_sint32  iDepth 
) const [protected]
bool PD_Style::addProperties ( const gchar **  pProperties  ) 

This method adds the properties defined in pProperties to the already defined set. If a property already exists in the definition, its value is replaced.

Parameters:
const gchar ** pProperties string of properties

References pt_VarSet::addIfUniqueAP(), PP_AttrProp::cloneWithReplacements(), pt_PieceTable::getAttrProp(), pt_PieceTable::getVarSet(), m_indexAP, m_pPT, and PP_AttrProp::markReadOnly().

bool PD_Style::addProperty ( const gchar *  szName,
const gchar *  szValue 
)
bool PD_Style::getAllAttributes ( UT_Vector vAttribs,
UT_sint32  depth 
) const

This method fills a vector structure with all the attributes defined in this style, including the basedon style.

Parameters:
vProps the vector containing const gchar * (name,value) pairs

References UT_GenericVector< T >::addItem(), gchar, getAllAttributes(), getAttributeCount(), getBasedOn(), UT_GenericVector< T >::getItemCount(), getNthAttribute(), UT_GenericVector< T >::getNthItem(), pp_BASEDON_DEPTH_LIMIT, and szName.

Referenced by PP_AttrProp::explodeStyle(), getAllAttributes(), and pt_VarSet::mergeAP().

bool PD_Style::getAllProperties ( UT_Vector vProps,
UT_sint32  depth 
) const

This method fills a vector structure with all the properties defined in this style, including the basedon style.

Parameters:
vProps the vector containing const gchar * (name,value) pairs

References UT_GenericVector< T >::addItem(), gchar, getAllProperties(), getBasedOn(), UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), getNthProperty(), getPropertyCount(), pp_BASEDON_DEPTH_LIMIT, and szName.

Referenced by pt_PieceTable::_realChangeSpanFmt(), pt_PieceTable::_realChangeStruxFmt(), PP_AttrProp::explodeStyle(), getAllProperties(), pt_VarSet::mergeAP(), and AP_Dialog_Styles::updateCurrentStyle().

size_t PD_Style::getAttributeCount ( void   )  const
bool PD_Style::getAttributeExpand ( const gchar *  szName,
const gchar *&  szValue 
) const
bool PD_Style::getNthAttribute ( int  ndx,
const gchar *&  szName,
const gchar *&  szValue 
) const
bool PD_Style::getPropertyExpand ( const gchar *  szName,
const gchar *&  szValue 
) const
const PP_PropertyType * PD_Style::getPropertyType ( const gchar *  szName,
tProperty_type  Type 
) const
bool PD_Style::isList ( void   )  const
bool PD_Style::setAllAttributes ( const gchar **  pAtts  ) 

This method replaces the previous set of attributes/properties with a new one defined in pAtts. It is imperitive that updateDocForStyleChange be called after this method.

Parameters:
const gchar ** pAtts list of attributes with an extended properties string

References pt_PieceTable::getVarSet(), m_indexAP, m_pBasedOn, m_pFollowedBy, m_pPT, and pt_VarSet::storeAP().

bool PD_Style::setIndexAP ( PT_AttrPropIndex  indexAP  ) 

Member Data Documentation

bool PD_Style::m_bDisplayed [protected]

Referenced by isUsed(), and used().

PD_Style* PD_Style::m_pBasedOn [mutable, protected]
char* PD_Style::m_szName [protected]

Referenced by PD_Style(), and ~PD_Style().


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