fl_TableLayout Class Reference

#include <fl_TableLayout.h>

Inheritance diagram for fl_TableLayout:

fl_SectionLayout fl_ContainerLayout fl_Layout

List of all members.

Public Member Functions

 fl_TableLayout (FL_DocLayout *pLayout, PL_StruxDocHandle sdh, PT_AttrPropIndex ap, fl_ContainerLayout *pMyContainerLayout)
virtual ~fl_TableLayout ()
SectionType getType (void) const
virtual bool recalculateFields (UT_uint32 iUpdateCount)
virtual bool doclistener_changeStrux (const PX_ChangeRecord_StruxChange *pcrxc)
virtual bool doclistener_deleteStrux (const PX_ChangeRecord_Strux *pcrx)
virtual bool bl_doclistener_insertCell (fl_ContainerLayout *pCell, const PX_ChangeRecord_Strux *pcrx, PL_StruxDocHandle sdh, PL_ListenerId lid, void(*pfnBindHandles)(PL_StruxDocHandle sdhNew, PL_ListenerId lid, PL_StruxFmtHandle sfhNew))
virtual bool bl_doclistener_insertBlock (fl_ContainerLayout *pCell, const PX_ChangeRecord_Strux *pcrx, PL_StruxDocHandle sdh, PL_ListenerId lid, void(*pfnBindHandles)(PL_StruxDocHandle sdhNew, PL_ListenerId lid, PL_StruxFmtHandle sfhNew))
virtual bool bl_doclistener_insertEndTable (fl_ContainerLayout *, const PX_ChangeRecord_Strux *pcrx, PL_StruxDocHandle sdh, PL_ListenerId lid, void(*pfnBindHandles)(PL_StruxDocHandle sdhNew, PL_ListenerId lid, PL_StruxFmtHandle sfhNew))
virtual bool bl_doclistener_insertTable (const PX_ChangeRecord_Strux *pcrx, SectionType iType, PL_StruxDocHandle sdh, PL_ListenerId lid, void(*pfnBindHandles)(PL_StruxDocHandle sdhNew, PL_ListenerId lid, PL_StruxFmtHandle sfhNew))
void setTableContainerProperties (fp_TableContainer *pTab)
virtual void format (void)
void attachCell (fl_ContainerLayout *pCell)
void createTableContainer (void)
void insertTableContainer (fp_TableContainer *pNewTab)
virtual void updateLayout (bool bDoFull)
void updateTable (void)
virtual void collapse (void)
virtual void markAllRunsDirty (void)
virtual bool needsReformat (void) const
virtual PT_DocPosition getPosition (bool bActualBlockPosition=false) const
UT_uint32 getLength (void)
virtual void redrawUpdate (void)
virtual fp_ContainergetNewContainer (fp_Container *pFirstContainer=NULL)
virtual fl_SectionLayoutgetSectionLayout (void) const
void markForRebuild (void)
void clearRebuild (void)
bool needsRebuild (void) const
void markForReformat (void)
bool needsReFormat (void) const
UT_sint32 getLeftOffset (void) const
void setHeightChanged (fp_CellContainer *pCell)
bool doSimpleChange (void)
UT_sint32 getRightOffset (void) const
UT_sint32 getTopOffset (void) const
UT_sint32 getBottomOffset (void) const
bool isDirty (void) const
void setDirty (void)
UT_sint32 getLineThickness (void) const
UT_sint32 getColSpacing (void) const
UT_sint32 getRowSpacing (void) const
UT_sint32 getLeftColPos (void) const
const UT_GenericVector
< fl_ColProps * > * 
getVecColProps (void) const
const UT_GenericVector
< fl_RowProps * > * 
getVecRowProps (void) const
const PP_PropertyMap::BackgroundgetBackground () const
const UT_RGBColorgetDefaultColor () const
const PP_PropertyMap::LinegetBottomStyle () const
const PP_PropertyMap::LinegetLeftStyle () const
const PP_PropertyMap::LinegetRightStyle () const
const PP_PropertyMap::LinegetTopStyle () const
UT_sint32 getNumNestedTables (void) const
void incNumNestedTables (void)
void decNumNestedTables (void)
void setEndTableIn (void)
bool isEndTableIn (void)
bool isDoingDestructor (void)

Protected Member Functions

virtual void _lookupProperties (const PP_AttrProp *pSectionAP)
virtual void _lookupMarginProperties (const PP_AttrProp *pAP)
void _purgeLayout ()

Private Attributes

bool m_bNeedsRebuild
FL_TableJustification m_iJustification
UT_sint32 m_iLeftOffset
double m_dLeftOffsetUserUnits
UT_sint32 m_iRightOffset
double m_dRightOffsetUserUnits
UT_sint32 m_iTopOffset
double m_dTopOffsetUserUnits
UT_sint32 m_iBottomOffset
double m_dBottomOffsetUserUnits
bool m_bIsHomogeneous
bool m_bSameRowOnTopOfPage
UT_sint32 m_iRowNumberForTop
UT_sint32 m_iNumberOfRows
UT_sint32 m_iNumberOfColumns
bool m_bColumnsPositionedOnPage
bool m_bRowsPositionedOnPage
bool m_bIsDirty
bool m_bDontImmediatelyLayout
UT_sint32 m_iLineThickness
UT_sint32 m_iColSpacing
UT_sint32 m_iRowSpacing
UT_sint32 m_iLeftColPos
bool m_bRecursiveFormat
UT_GenericVector< fl_ColProps * > m_vecColProps
UT_GenericVector< fl_RowProps * > m_vecRowProps
FL_RowHeightType m_iRowHeightType
UT_sint32 m_iRowHeight
PP_PropertyMap::Background m_background
UT_RGBColor m_colorDefault
PP_PropertyMap::Line m_lineBottom
PP_PropertyMap::Line m_lineLeft
PP_PropertyMap::Line m_lineRight
PP_PropertyMap::Line m_lineTop
UT_sint32 m_iNumNestedTables
bool m_bIsEndTableIn
UT_sint32 m_iHeightChanged
fp_CellContainerm_pNewHeightCell
bool m_bDoingDestructor

Friends

class fl_DocListener


Constructor & Destructor Documentation

fl_TableLayout::fl_TableLayout ( FL_DocLayout pLayout,
PL_StruxDocHandle  sdh,
PT_AttrPropIndex  ap,
fl_ContainerLayout pMyContainerLayout 
)

fl_TableLayout::~fl_TableLayout (  )  [virtual]


Member Function Documentation

SectionType fl_TableLayout::getType ( void   )  const [inline]

Reimplemented from fl_SectionLayout.

bool fl_TableLayout::recalculateFields ( UT_uint32  iUpdateCount  )  [virtual]

bool fl_TableLayout::doclistener_changeStrux ( const PX_ChangeRecord_StruxChange pcrxc  )  [virtual]

bool fl_TableLayout::doclistener_deleteStrux ( const PX_ChangeRecord_Strux pcrx  )  [virtual]

bool fl_TableLayout::bl_doclistener_insertCell ( fl_ContainerLayout pCell,
const PX_ChangeRecord_Strux pcrx,
PL_StruxDocHandle  sdh,
PL_ListenerId  lid,
void(*)(PL_StruxDocHandle sdhNew, PL_ListenerId lid, PL_StruxFmtHandle sfhNew)  pfnBindHandles 
) [virtual]

bool fl_TableLayout::bl_doclistener_insertBlock ( fl_ContainerLayout pCell,
const PX_ChangeRecord_Strux pcrx,
PL_StruxDocHandle  sdh,
PL_ListenerId  lid,
void(*)(PL_StruxDocHandle sdhNew, PL_ListenerId lid, PL_StruxFmtHandle sfhNew)  pfnBindHandles 
) [virtual]

bool fl_TableLayout::bl_doclistener_insertEndTable ( fl_ContainerLayout ,
const PX_ChangeRecord_Strux pcrx,
PL_StruxDocHandle  sdh,
PL_ListenerId  lid,
void(*)(PL_StruxDocHandle sdhNew, PL_ListenerId lid, PL_StruxFmtHandle sfhNew)  pfnBindHandles 
) [virtual]

bool fl_TableLayout::bl_doclistener_insertTable ( const PX_ChangeRecord_Strux pcrx,
SectionType  iType,
PL_StruxDocHandle  sdh,
PL_ListenerId  lid,
void(*)(PL_StruxDocHandle sdhNew, PL_ListenerId lid, PL_StruxFmtHandle sfhNew)  pfnBindHandles 
) [virtual]

void fl_TableLayout::setTableContainerProperties ( fp_TableContainer pTab  ) 

void fl_TableLayout::format ( void   )  [virtual]

void fl_TableLayout::attachCell ( fl_ContainerLayout pCell  ) 

void fl_TableLayout::createTableContainer ( void   ) 

void fl_TableLayout::insertTableContainer ( fp_TableContainer pNewTab  ) 

void fl_TableLayout::updateLayout ( bool  bDoFull  )  [virtual]

void fl_TableLayout::updateTable ( void   ) 

void fl_TableLayout::collapse ( void   )  [virtual]

void fl_TableLayout::markAllRunsDirty ( void   )  [virtual]

bool fl_TableLayout::needsReformat ( void   )  const [virtual]

PT_DocPosition fl_TableLayout::getPosition ( bool  bActualBlockPosition = false  )  const [virtual]

Return the position of the table strux.

Reimplemented from fl_ContainerLayout.

References fl_ContainerLayout::getPosition().

Referenced by FV_View::cmdTableToText(), and FV_View::isInTable().

UT_uint32 fl_TableLayout::getLength ( void   ) 

Return the total length of the table including nested tables. This length includes the table and endtable struxs so if you add it to the position of the table strux you will get the first position past the endtable strux

References PD_Document::getBounds(), fl_Layout::getStruxDocHandle(), PD_Document::getStruxPosition(), and fl_Layout::m_pDoc.

Referenced by FV_View::isInTable().

void fl_TableLayout::redrawUpdate ( void   )  [virtual]

fp_Container * fl_TableLayout::getNewContainer ( fp_Container pFirstContainer = NULL  )  [virtual]

Create a new Table container and plug it into the linked list of Table containers.

Parameters:
If pPrevTab is non-null place the new cell after this in the linked list, otherwise just append it to the end.
Returns:
The newly created Table container

Implements fl_SectionLayout.

References createTableContainer(), fl_ContainerLayout::getFirstContainer(), insertTableContainer(), fp_Container::setNext(), fp_Container::setPrev(), and UT_ASSERT.

Referenced by format().

fl_SectionLayout * fl_TableLayout::getSectionLayout ( void   )  const [virtual]

void fl_TableLayout::markForRebuild ( void   )  [inline]

void fl_TableLayout::clearRebuild ( void   )  [inline]

bool fl_TableLayout::needsRebuild ( void   )  const [inline]

void fl_TableLayout::markForReformat ( void   )  [inline]

bool fl_TableLayout::needsReFormat ( void   )  const [inline]

UT_sint32 fl_TableLayout::getLeftOffset ( void   )  const

References m_iLeftOffset.

void fl_TableLayout::setHeightChanged ( fp_CellContainer pCell  ) 

Rather than do a complete new relayout, if we have a simple change of height for one cell, just updated the positions of the cells below it.

References m_iHeightChanged, and m_pNewHeightCell.

bool fl_TableLayout::doSimpleChange ( void   ) 

UT_sint32 fl_TableLayout::getRightOffset ( void   )  const

References m_iRightOffset.

UT_sint32 fl_TableLayout::getTopOffset ( void   )  const

References m_iTopOffset.

Referenced by fp_TableContainer::layout().

UT_sint32 fl_TableLayout::getBottomOffset ( void   )  const

bool fl_TableLayout::isDirty ( void   )  const [inline]

Referenced by format(), and updateLayout().

void fl_TableLayout::setDirty ( void   ) 

UT_sint32 fl_TableLayout::getLineThickness ( void   )  const

References m_iLineThickness.

Referenced by s_cell_border_style().

UT_sint32 fl_TableLayout::getColSpacing ( void   )  const

References m_iColSpacing.

UT_sint32 fl_TableLayout::getRowSpacing ( void   )  const

References m_iRowSpacing.

UT_sint32 fl_TableLayout::getLeftColPos ( void   )  const [inline]

const UT_GenericVector<fl_ColProps*>* fl_TableLayout::getVecColProps ( void   )  const [inline]

const UT_GenericVector<fl_RowProps*>* fl_TableLayout::getVecRowProps ( void   )  const [inline]

const PP_PropertyMap::Background& fl_TableLayout::getBackground (  )  const [inline]

const UT_RGBColor& fl_TableLayout::getDefaultColor (  )  const [inline]

Referenced by s_cell_border_style().

const PP_PropertyMap::Line& fl_TableLayout::getBottomStyle (  )  const [inline]

const PP_PropertyMap::Line& fl_TableLayout::getLeftStyle (  )  const [inline]

const PP_PropertyMap::Line& fl_TableLayout::getRightStyle (  )  const [inline]

const PP_PropertyMap::Line& fl_TableLayout::getTopStyle (  )  const [inline]

UT_sint32 fl_TableLayout::getNumNestedTables ( void   )  const

void fl_TableLayout::incNumNestedTables ( void   ) 

void fl_TableLayout::decNumNestedTables ( void   ) 

References m_iNumNestedTables.

Referenced by doclistener_deleteStrux().

void fl_TableLayout::setEndTableIn ( void   )  [inline]

bool fl_TableLayout::isEndTableIn ( void   )  [inline]

Referenced by IE_Imp_RTF::insertStrux().

bool fl_TableLayout::isDoingDestructor ( void   )  [inline]

void fl_TableLayout::_lookupProperties ( const PP_AttrProp pSectionAP  )  [protected, virtual]

this function is only to be called by fl_ContainerLayout::lookupProperties() all other code must call lookupProperties() instead

Implements fl_ContainerLayout.

References UT_GenericVector< T >::addItem(), AP_PREF_KEY_RulerUnits, UT_String::c_str(), UT_GenericVector< T >::clear(), GR_Graphics::DGP_PAPER, dim, DIM_CM, DIM_IN, DIM_MM, DIM_none, DIM_PERCENT, DIM_PI, DIM_PT, DIM_PX, FL_ROW_HEIGHT_AT_LEAST, FL_ROW_HEIGHT_AUTO, FL_ROW_HEIGHT_EXACTLY, FL_ROW_HEIGHT_NOT_DEFINED, gchar, XAP_App::getApp(), fl_SectionLayout::getDocLayout(), FL_DocLayout::getGraphics(), UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), PP_AttrProp::getProperty(), FL_DocLayout::getView(), FV_View::getViewMode(), m_background, m_bIsHomogeneous, m_colorDefault, m_dBottomOffsetUserUnits, m_dLeftOffsetUserUnits, m_dRightOffsetUserUnits, m_dTopOffsetUserUnits, m_iBottomOffset, m_iColSpacing, fl_ColProps::m_iColWidth, m_iLeftColPos, m_iLeftOffset, m_iLineThickness, m_iRightOffset, fl_RowProps::m_iRowHeight, m_iRowHeight, m_iRowHeightType, m_iRowSpacing, m_iTopOffset, m_lineBottom, m_lineLeft, m_lineRight, m_lineTop, fl_SectionLayout::m_pLayout, m_vecColProps, m_vecRowProps, GR_Graphics::queryProperties(), PP_PropertyMap::Background::reset(), s_background_properties(), s_border_properties(), UT_String::size(), UT_ASSERT_HARMLESS, UT_convertDimensionless(), UT_convertToLogicalUnits(), UT_DEBUGMSG, UT_determineDimension(), UT_parseColor(), UT_return_if_fail, UT_SHOULD_NOT_HAPPEN, UT_VECTOR_PURGEALL, VIEW_NORMAL, VIEW_WEB, and xxx_UT_DEBUGMSG.

void fl_TableLayout::_lookupMarginProperties ( const PP_AttrProp pAP  )  [protected, virtual]