Public Member Functions | Private Attributes

Stylist_tree Class Reference

#include <ap_Dialog_Stylist.h>

List of all members.

Public Member Functions

 Stylist_tree (PD_Document *pDoc)
virtual ~Stylist_tree (void)
bool findStyle (UT_UTF8String &sStyleName, UT_sint32 &row, UT_sint32 &col)
bool getStyleAtRowCol (UT_UTF8String &sStyle, UT_sint32 row, UT_sint32 col)
UT_sint32 getNumRows (void) const
UT_sint32 getNumCols (UT_sint32 row) const
void buildStyles (PD_Document *pDoc)
UT_sint32 getNumStyles (void) const
bool getNameOfRow (std::string &sName, UT_sint32 row) const
bool isHeading (const PD_Style *pStyle, UT_sint32 iDepth=10) const
bool isList (const PD_Style *pStyle, UT_sint32 iDepth=10) const
bool isFootnote (const PD_Style *pStyle, UT_sint32 iDepth=10) const
bool isUser (const PD_Style *pStyle) const

Private Attributes

UT_GenericVector< const
PD_Style * > 
m_vecAllStyles
UT_GenericVector< Stylist_row * > m_vecStyleRows

Constructor & Destructor Documentation

Stylist_tree::Stylist_tree ( PD_Document pDoc  ) 

This class holds the current style tree and provides a useful interface to the tree for the GUI.

References buildStyles(), UT_GenericVector< T >::clear(), m_vecAllStyles, and m_vecStyleRows.

Stylist_tree::~Stylist_tree ( void   )  [virtual]

Member Function Documentation

void Stylist_tree::buildStyles ( PD_Document pDoc  ) 
bool Stylist_tree::findStyle ( UT_UTF8String sStyleName,
UT_sint32 row,
UT_sint32 col 
)

Return the row and column address of the style given. If not found return false.

References Stylist_row::findStyle(), UT_GenericVector< T >::getNthItem(), getNumRows(), and m_vecStyleRows.

Referenced by AP_Win32Dialog_Stylist::setStyleInGUI().

bool Stylist_tree::getNameOfRow ( std::string &  sName,
UT_sint32  row 
) const

return the name of the row given. If the row is invalid return false;

References UT_GenericVector< T >::getNthItem(), getNumRows(), Stylist_row::getRowName(), and m_vecStyleRows.

Referenced by AP_Win32Dialog_Stylist::_fillTree(), and AP_UnixDialog_Stylist::_fillTree().

UT_sint32 Stylist_tree::getNumCols ( UT_sint32  row  )  const
UT_sint32 Stylist_tree::getNumRows ( void   )  const
UT_sint32 Stylist_tree::getNumStyles ( void   )  const

Return the total number of styles in the tree.

References UT_GenericVector< T >::getItemCount(), and m_vecAllStyles.

Referenced by AP_Dialog_Stylist::getNumStyles().

bool Stylist_tree::getStyleAtRowCol ( UT_UTF8String sStyle,
UT_sint32  row,
UT_sint32  col 
)
bool Stylist_tree::isFootnote ( const PD_Style pStyle,
UT_sint32  iDepth = 10 
) const

Returns true if the style is withinthe "Footnote/Endnote" type of styles.

References PD_Style::getBasedOn(), and PD_Style::getName().

Referenced by buildStyles().

bool Stylist_tree::isHeading ( const PD_Style pStyle,
UT_sint32  iDepth = 10 
) const

Returns true if the style is withinthe "Heading" type of styles.

References PD_Style::getBasedOn(), and PD_Style::getName().

Referenced by buildStyles().

bool Stylist_tree::isList ( const PD_Style pStyle,
UT_sint32  iDepth = 10 
) const

Returns true if the style is withinthe "List" type of styles.

References PD_Style::getBasedOn(), and PD_Style::getName().

Referenced by buildStyles().

bool Stylist_tree::isUser ( const PD_Style pStyle  )  const

Returns true if the style is a userdefined style.

References PD_Style::isUserDefined().

Referenced by buildStyles().


Member Data Documentation


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