Public Member Functions | Protected Member Functions | Private Attributes | Friends

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, pf_Frag_Strux *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, pf_Frag_Strux *sdh, PL_ListenerId lid, void(*pfnBindHandles)(pf_Frag_Strux *sdhNew, PL_ListenerId lid, fl_ContainerLayout *sfhNew))
virtual bool bl_doclistener_insertBlock (fl_ContainerLayout *pCell, const PX_ChangeRecord_Strux *pcrx, pf_Frag_Strux *sdh, PL_ListenerId lid, void(*pfnBindHandles)(pf_Frag_Strux *sdhNew, PL_ListenerId lid, fl_ContainerLayout *sfhNew))
virtual bool bl_doclistener_insertEndTable (fl_ContainerLayout *, const PX_ChangeRecord_Strux *pcrx, pf_Frag_Strux *sdh, PL_ListenerId lid, void(*pfnBindHandles)(pf_Frag_Strux *sdhNew, PL_ListenerId lid, fl_ContainerLayout *sfhNew))
virtual bool bl_doclistener_insertTable (const PX_ChangeRecord_Strux *pcrx, SectionType iType, pf_Frag_Strux *sdh, PL_ListenerId lid, void(*pfnBindHandles)(pf_Frag_Strux *sdhNew, PL_ListenerId lid, fl_ContainerLayout *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)
double getTableRelWidth (void) const
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) const
bool isDoingDestructor (void) const
bool isInitialLayoutCompleted (void) const
bool isTableReadyForLayout (void) const
UT_sint32 getTableWaitIndex (void) const
double getMaxExtraMargin (void) const
void setMaxExtraMargin (double margin)

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
bool m_bInitialLayoutCompleted
UT_sint32 m_iTableWaitIndex
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
UT_sint32 m_iTableWidth
double m_dTableRelWidth
double m_dMaxExtraMargin

Friends

class fl_DocListener

Constructor & Destructor Documentation

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

Member Function Documentation

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, gchar, fl_DocSectionLayout::getActualColumnWidth(), XAP_App::getApp(), fl_SectionLayout::getDocLayout(), fl_ContainerLayout::getDocSectionLayout(), 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, fl_ColProps::m_dColRelWidth, m_dLeftOffsetUserUnits, m_dMaxExtraMargin, m_dRightOffsetUserUnits, m_dTableRelWidth, 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_iTableWaitIndex, m_iTableWidth, 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_determineDimension(), UT_parseColor(), UT_return_if_fail, UT_SHOULD_NOT_HAPPEN, UT_VECTOR_PURGEALL, and xxx_UT_DEBUGMSG.

void fl_TableLayout::_purgeLayout ( void   )  [protected]

This method removes all layout structures contained by this layout structure.

Reimplemented from fl_SectionLayout.

References fl_ContainerLayout::getFirstLayout(), and fl_ContainerLayout::getNext().

Referenced by ~fl_TableLayout().

void fl_TableLayout::clearRebuild ( void   )  [inline]
void fl_TableLayout::decNumNestedTables ( void   ) 

References m_iNumNestedTables.

Referenced by doclistener_deleteStrux().

const PP_PropertyMap::Background& fl_TableLayout::getBackground (  )  const [inline]
const PP_PropertyMap::Line& fl_TableLayout::getBottomStyle (  )  const [inline]
UT_sint32 fl_TableLayout::getColSpacing ( void   )  const

References m_iColSpacing.

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

Referenced by s_cell_border_style().

UT_sint32 fl_TableLayout::getLeftColPos ( void   )  const [inline]
const PP_PropertyMap::Line& fl_TableLayout::getLeftStyle (  )  const [inline]
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.

UT_sint32 fl_TableLayout::getLineThickness ( void   )  const

References m_iLineThickness.

Referenced by s_cell_border_style().

double fl_TableLayout::getMaxExtraMargin ( void   )  const [inline]
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().

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

Return the position of the table strux.

Reimplemented from fl_ContainerLayout.

Referenced by FV_View::cmdTableToText().

UT_sint32 fl_TableLayout::getRightOffset ( void   )  const
const PP_PropertyMap::Line& fl_TableLayout::getRightStyle (  )  const [inline]
UT_sint32 fl_TableLayout::getRowSpacing ( void   )  const

References m_iRowSpacing.

fl_SectionLayout * fl_TableLayout::getSectionLayout ( void   )  const [virtual]
double fl_TableLayout::getTableRelWidth ( void   )  const [inline]
const PP_PropertyMap::Line& fl_TableLayout::getTopStyle (  )  const [inline]
SectionType fl_TableLayout::getType ( void   )  const [inline]

Reimplemented from fl_SectionLayout.

const UT_GenericVector<fl_ColProps*>* fl_TableLayout::getVecColProps ( void   )  const [inline]
const UT_GenericVector<fl_RowProps*>* fl_TableLayout::getVecRowProps ( void   )  const [inline]
void fl_TableLayout::incNumNestedTables ( void   ) 
bool fl_TableLayout::isDirty ( void   )  const [inline]

Referenced by format(), and updateLayout().

bool fl_TableLayout::isDoingDestructor ( void   )  const [inline]
bool fl_TableLayout::isEndTableIn ( void   )  const [inline]
bool fl_TableLayout::isInitialLayoutCompleted ( void   )  const [inline]
bool fl_TableLayout::isTableReadyForLayout ( void   )  const

References getTableWaitIndex(), and isEndTableIn().

Referenced by format(), and updateTable().

void fl_TableLayout::markForRebuild ( void   )  [inline]
void fl_TableLayout::markForReformat ( void   )  [inline]
bool fl_TableLayout::needsRebuild ( void   )  const [inline]
bool fl_TableLayout::needsReFormat ( void   )  const [inline]
bool fl_TableLayout::recalculateFields ( UT_uint32  iUpdateCount  )  [virtual]
void fl_TableLayout::setDirty ( void   ) 
void fl_TableLayout::setEndTableIn ( void   )  [inline]
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.

void fl_TableLayout::setMaxExtraMargin ( double  margin  ) 

References m_dMaxExtraMargin.


Friends And Related Function Documentation

friend class fl_DocListener [friend]

Reimplemented from fl_SectionLayout.


Member Data Documentation

Referenced by format(), and setDirty().

Referenced by format().

Referenced by _lookupProperties().


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