fl_HdrFtrSectionLayout Class Reference

#include <fl_SectionLayout.h>

Inheritance diagram for fl_HdrFtrSectionLayout:

fl_SectionLayout fl_ContainerLayout fl_Layout

List of all members.

Public Member Functions

 fl_HdrFtrSectionLayout (HdrFtrType iHFType, FL_DocLayout *pLayout, fl_DocSectionLayout *pDocSL, PL_StruxDocHandle sdh, PT_AttrPropIndex ap)
virtual ~fl_HdrFtrSectionLayout ()
fl_DocSectionLayoutgetDocSectionLayout (void) const
HdrFtrType getHFType (void) const
void setDocSectionLayout (fl_DocSectionLayout *pDSL)
void setHdrFtr (HdrFtrType iHFType)
virtual bool recalculateFields (UT_uint32 iUpdateCount)
bool doclistener_deleteStrux (const PX_ChangeRecord *pcr)
void checkAndAdjustCellSize (fl_ContainerLayout *pCL)
void localFormat (void)
virtual void markAllRunsDirty (void)
void checkAndRemovePages (void)
void addValidPages (void)
bool isPageHere (fp_Page *pPage)
bool isPointInHere (PT_DocPosition pos)
void collapseBlock (fl_ContainerLayout *pBlock)
virtual void format (void)
virtual fl_SectionLayoutgetSectionLayout (void) const
virtual void updateLayout (bool bDoFull)
void layout (void)
fl_ContainerLayoutfindMatchingContainer (fl_ContainerLayout *pBL)
virtual void redrawUpdate (void)
virtual fp_ContainergetNewContainer (fp_Container *pFirstContainer=NULL)
virtual fp_ContainergetFirstContainer () const
virtual fp_ContainergetLastContainer () const
fl_HdrFtrShadowgetFirstShadow (void)
fl_HdrFtrShadowfindShadow (fp_Page *pPage)
virtual bool doclistener_changeStrux (const PX_ChangeRecord_StruxChange *pcrxc)
void changeIntoHdrFtrSection (fl_DocSectionLayout *pSL)
void addPage (fp_Page *)
void deletePage (fp_Page *)
void clearScreen (void)
virtual void collapse (void)
bool bl_doclistener_insertCell (fl_ContainerLayout *pCell, const PX_ChangeRecord_Strux *pcrx, PL_StruxDocHandle sdh, PL_ListenerId lid, fl_TableLayout *pTL)
bool bl_doclistener_insertEndTable (fl_ContainerLayout *pTab, const PX_ChangeRecord_Strux *pcrx, PL_StruxDocHandle sdh, PL_ListenerId lid)
virtual bool bl_doclistener_populateSpan (fl_ContainerLayout *, const PX_ChangeRecord_Span *pcrs, PT_BlockOffset blockOffset, UT_uint32 len)
virtual bool bl_doclistener_populateObject (fl_ContainerLayout *, PT_BlockOffset blockOffset, const PX_ChangeRecord_Object *pcro)
virtual bool bl_doclistener_insertSpan (fl_ContainerLayout *, const PX_ChangeRecord_Span *pcrs)
virtual bool bl_doclistener_deleteSpan (fl_ContainerLayout *, const PX_ChangeRecord_Span *pcrs)
virtual bool bl_doclistener_changeSpan (fl_ContainerLayout *, const PX_ChangeRecord_SpanChange *pcrsc)
virtual bool bl_doclistener_deleteStrux (fl_ContainerLayout *, const PX_ChangeRecord_Strux *pcrx)
bool bl_doclistener_deleteCellStrux (fl_ContainerLayout *, const PX_ChangeRecord_Strux *pcrx)
bool bl_doclistener_deleteTableStrux (fl_ContainerLayout *, const PX_ChangeRecord_Strux *pcrx)
virtual bool bl_doclistener_changeStrux (fl_ContainerLayout *, const PX_ChangeRecord_StruxChange *pcrxc)
virtual fl_SectionLayoutbl_doclistener_insertTable (fl_ContainerLayout *, SectionType iType, const PX_ChangeRecord_Strux *pcrx, PL_StruxDocHandle sdh, PL_ListenerId lid, void(*pfnBindHandles)(PL_StruxDocHandle sdhNew, PL_ListenerId lid, PL_StruxFmtHandle sfhNew))
virtual fl_SectionLayoutbl_doclistener_insertTable (SectionType iType, const PX_ChangeRecord_Strux *pcrx, PL_StruxDocHandle sdh, PL_ListenerId lid, void(*pfnBindHandles)(PL_StruxDocHandle sdhNew, PL_ListenerId lid, PL_StruxFmtHandle sfhNew))
bool bl_doclistener_insertFirstBlock (fl_ContainerLayout *pCL, const PX_ChangeRecord_Strux *pcrx, PL_StruxDocHandle sdh, PL_ListenerId lid)
virtual bool bl_doclistener_insertBlock (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_insertSection (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_insertObject (fl_ContainerLayout *, const PX_ChangeRecord_Object *pcro)
virtual bool bl_doclistener_deleteObject (fl_ContainerLayout *, const PX_ChangeRecord_Object *pcro)
virtual bool bl_doclistener_changeObject (fl_ContainerLayout *, const PX_ChangeRecord_ObjectChange *pcroc)
virtual bool bl_doclistener_insertFmtMark (fl_ContainerLayout *, const PX_ChangeRecord_FmtMark *pcrfm)
virtual bool bl_doclistener_deleteFmtMark (fl_ContainerLayout *, const PX_ChangeRecord_FmtMark *pcrfm)
virtual bool bl_doclistener_changeFmtMark (fl_ContainerLayout *, const PX_ChangeRecord_FmtMarkChange *pcrfmc)

Private Member Functions

UT_sint32 _findShadow (fp_Page *pPage)
virtual void _lookupProperties (const PP_AttrProp *pAP)
virtual void _lookupMarginProperties (const PP_AttrProp *pAP)
void _localCollapse (void)

Private Attributes

fl_DocSectionLayoutm_pDocSL
HdrFtrType m_iHFType
UT_GenericVector
< _PageHdrFtrShadowPair * > 
m_vecPages
fp_Containerm_pHdrFtrContainer

Friends

class fl_DocListener


Constructor & Destructor Documentation

fl_HdrFtrSectionLayout::fl_HdrFtrSectionLayout ( HdrFtrType  iHFType,
FL_DocLayout pLayout,
fl_DocSectionLayout pDocSL,
PL_StruxDocHandle  sdh,
PT_AttrPropIndex  ap 
)

fl_HdrFtrSectionLayout::~fl_HdrFtrSectionLayout (  )  [virtual]


Member Function Documentation

fl_DocSectionLayout* fl_HdrFtrSectionLayout::getDocSectionLayout ( void   )  const [inline, virtual]

HdrFtrType fl_HdrFtrSectionLayout::getHFType ( void   )  const [inline]

void fl_HdrFtrSectionLayout::setDocSectionLayout ( fl_DocSectionLayout pDSL  )  [inline]

void fl_HdrFtrSectionLayout::setHdrFtr ( HdrFtrType  iHFType  )  [inline]

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

bool fl_HdrFtrSectionLayout::doclistener_deleteStrux ( const PX_ChangeRecord pcr  ) 

Remove the strux identifing this as a seperate section has been deleted so we have to remove this HdrFtrSectionLayout class and all the shadow sections attached to it. The blocks in this class are moved to the DocSectionLayout associated with this class. I do this because I expect that this will be called as part on an undo "Insert Header" command. The rest of the undo needs blocks to delete so I'm putting them there to keep the rest of the undo code happy

Parameters:
pcrx the changerecord identifying this action as necesary.
Returns:
true

References fl_ContainerLayout::add(), collapse(), fl_DocSectionLayout::format(), fl_ContainerLayout::getFirstLayout(), PX_ChangeRecord_Strux::getStruxType(), PX_ChangeRecord::getType(), PX_ChangeRecord_StruxChange::isRevisionDelete(), m_iHFType, m_pDocSL, PTX_SectionHdrFtr, PX_ChangeRecord::PXT_ChangeStrux, PX_ChangeRecord::PXT_DeleteStrux, fl_DocSectionLayout::setHdrFtr(), UT_ASSERT, UT_ASSERT_HARMLESS, UT_DEBUGMSG, and UT_SHOULD_NOT_HAPPEN.

Referenced by bl_doclistener_deleteCellStrux(), bl_doclistener_deleteStrux(), and bl_doclistener_deleteTableStrux().

void fl_HdrFtrSectionLayout::checkAndAdjustCellSize ( fl_ContainerLayout pCL  ) 

void fl_HdrFtrSectionLayout::localFormat ( void   ) 

Just format the HdrFtrSectionLayout blocks for an insertBlock method. these blocks will be collapsed afterwards.

References FL_CONTAINER_BLOCK, FL_CONTAINER_HDRFTR, fl_ContainerLayout::format(), fl_ContainerLayout::getContainerType(), getDocSectionLayout(), fl_ContainerLayout::getFirstLayout(), fl_ContainerLayout::getNext(), setHdrFtr(), UT_ASSERT, and xxx_UT_DEBUGMSG.

Referenced by format().

void fl_HdrFtrSectionLayout::markAllRunsDirty ( void   )  [virtual]

void fl_HdrFtrSectionLayout::checkAndRemovePages ( void   ) 

void fl_HdrFtrSectionLayout::addValidPages ( void   ) 

bool fl_HdrFtrSectionLayout::isPageHere ( fp_Page pPage  ) 

bool fl_HdrFtrSectionLayout::isPointInHere ( PT_DocPosition  pos  ) 

void fl_HdrFtrSectionLayout::collapseBlock ( fl_ContainerLayout pBlock  ) 

void fl_HdrFtrSectionLayout::format ( void   )  [virtual]

Format the overall HdrFtrSectionLayout in it's virtual container. Also check that all the correct pages have been found for this HdrFtr. Then format the Shadows.

Implements fl_ContainerLayout.

References addValidPages(), fl_HdrFtrShadow::format(), fl_ContainerLayout::getFirstLayout(), UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), _PageHdrFtrShadowPair::getShadow(), layout(), localFormat(), and m_vecPages.

Referenced by fl_DocListener::change(), changeIntoHdrFtrSection(), fl_DocSectionLayout::formatAllHdrFtr(), and updateLayout().

virtual fl_SectionLayout* fl_HdrFtrSectionLayout::getSectionLayout ( void   )  const [inline, virtual]

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

void fl_HdrFtrSectionLayout::layout ( void   ) 

fl_ContainerLayout * fl_HdrFtrSectionLayout::findMatchingContainer ( fl_ContainerLayout pBL  ) 

void fl_HdrFtrSectionLayout::redrawUpdate ( void   )  [virtual]

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

fp_Container * fl_HdrFtrSectionLayout::getFirstContainer ( void   )  const [virtual]

Reimplemented from fl_ContainerLayout.

References m_pHdrFtrContainer.

fp_Container * fl_HdrFtrSectionLayout::getLastContainer ( void   )  const [virtual]

Reimplemented from fl_ContainerLayout.

References m_pHdrFtrContainer.

fl_HdrFtrShadow * fl_HdrFtrSectionLayout::getFirstShadow ( void   ) 

fl_HdrFtrShadow * fl_HdrFtrSectionLayout::findShadow ( fp_Page pPage  ) 

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

void fl_HdrFtrSectionLayout::changeIntoHdrFtrSection ( fl_DocSectionLayout pSL  ) 

void fl_HdrFtrSectionLayout::addPage ( fp_Page pPage  ) 

void fl_HdrFtrSectionLayout::deletePage ( fp_Page pPage  ) 

void fl_HdrFtrSectionLayout::clearScreen ( void   ) 

void fl_HdrFtrSectionLayout::collapse ( void   )  [virtual]

bool fl_HdrFtrSectionLayout::bl_doclistener_insertCell ( fl_ContainerLayout pCell,
const PX_ChangeRecord_Strux pcrx,
PL_StruxDocHandle  sdh,
PL_ListenerId  lid,
fl_TableLayout pTL 
)

bool fl_HdrFtrSectionLayout::bl_doclistener_insertEndTable ( fl_ContainerLayout pTab,
const PX_ChangeRecord_Strux pcrx,
PL_StruxDocHandle  sdh,
PL_ListenerId  lid 
)

bool fl_HdrFtrSectionLayout::bl_doclistener_populateSpan ( fl_ContainerLayout pBL,
const PX_ChangeRecord_Span pcrs,
PT_BlockOffset  blockOffset,
UT_uint32  len 
) [virtual]

bool fl_HdrFtrSectionLayout::bl_doclistener_populateObject ( fl_ContainerLayout pBL,
PT_BlockOffset  blockOffset,
const PX_ChangeRecord_Object pcro 
) [virtual]

Now for all these methods which manipulate the shadow sections, turn off Insertion Point changes while the shadows are manipulated. Re Enabled insertion point changes for the overall hdrftrsection so it is changed just once.

Reimplemented from fl_SectionLayout.

References PD_Document::allowChangeInsPoint(), findMatchingContainer(), fl_HdrFtrShadow::findMatchingContainer(), UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), _PageHdrFtrShadowPair::getShadow(), fl_Layout::m_pDoc, m_vecPages, and PD_Document::setDontChangeInsPoint().

Referenced by fl_SectionLayout::bl_doclistener_populateObject(), and fl_DocListener::populate().

bool fl_HdrFtrSectionLayout::bl_doclistener_insertSpan ( fl_ContainerLayout pBL,
const PX_ChangeRecord_Span pcrs 
) [virtual]

bool fl_HdrFtrSectionLayout::bl_doclistener_deleteSpan ( fl_ContainerLayout pBL,
const PX_ChangeRecord_Span pcrs 
) [virtual]

bool fl_HdrFtrSectionLayout::bl_doclistener_changeSpan ( fl_ContainerLayout pBL,
const PX_ChangeRecord_SpanChange pcrsc 
) [virtual]

bool fl_HdrFtrSectionLayout::bl_doclistener_deleteStrux ( fl_ContainerLayout pBL,
const PX_ChangeRecord_Strux pcrx 
) [virtual]

bool fl_HdrFtrSectionLayout::bl_doclistener_deleteCellStrux ( fl_ContainerLayout pBL,
const PX_ChangeRecord_Strux pcrx 
)

bool fl_HdrFtrSectionLayout::bl_doclistener_deleteTableStrux ( fl_ContainerLayout pBL,
const PX_ChangeRecord_Strux pcrx 
)

bool fl_HdrFtrSectionLayout::bl_doclistener_changeStrux ( fl_ContainerLayout pBL,
const PX_ChangeRecord_StruxChange pcrxc 
) [virtual]

fl_SectionLayout * fl_HdrFtrSectionLayout::bl_doclistener_insertTable ( fl_ContainerLayout pBL,
SectionType  iType,
const PX_ChangeRecord_Strux pcrx,
PL_StruxDocHandle  sdh,
PL_ListenerId  lid,
void(*)(PL_StruxDocHandle sdhNew, PL_ListenerId lid, PL_StruxFmtHandle sfhNew)  pfnBindHandles 
) [virtual]

fl_SectionLayout * fl_HdrFtrSectionLayout::bl_doclistener_insertTable ( SectionType  iType,
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_HdrFtrSectionLayout::bl_doclistener_insertFirstBlock ( fl_ContainerLayout pCL,
const PX_ChangeRecord_Strux pcrx,
PL_StruxDocHandle  sdh,
PL_ListenerId  lid 
)

Insert the first