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

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, pf_Frag_Strux *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, pf_Frag_Strux *sdh, PL_ListenerId lid, fl_TableLayout *pTL)
bool bl_doclistener_insertEndTable (fl_ContainerLayout *pTab, const PX_ChangeRecord_Strux *pcrx, pf_Frag_Strux *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, pf_Frag_Strux *sdh, PL_ListenerId lid, void(*pfnBindHandles)(pf_Frag_Strux *sdhNew, PL_ListenerId lid, fl_ContainerLayout *sfhNew))
virtual fl_SectionLayoutbl_doclistener_insertTable (SectionType iType, const PX_ChangeRecord_Strux *pcrx, pf_Frag_Strux *sdh, PL_ListenerId lid, void(*pfnBindHandles)(pf_Frag_Strux *sdhNew, PL_ListenerId lid, fl_ContainerLayout *sfhNew))
bool bl_doclistener_insertFirstBlock (fl_ContainerLayout *pCL, const PX_ChangeRecord_Strux *pcrx, pf_Frag_Strux *sdh, PL_ListenerId lid)
virtual bool bl_doclistener_insertBlock (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_insertSection (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_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,
pf_Frag_Strux sdh,
PT_AttrPropIndex  ap 
)

Member Function Documentation

void fl_HdrFtrSectionLayout::_localCollapse ( void   )  [private]

Just collapse the HdrFtrSectionLayout blocks for an insertBlock method. This removes all lines and references to containers but leaves the blocks and runs intact.

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

Referenced by collapse().

void fl_HdrFtrSectionLayout::_lookupMarginProperties ( const PP_AttrProp pAP  )  [private, virtual]
void fl_HdrFtrSectionLayout::_lookupProperties ( const PP_AttrProp pAP  )  [private, virtual]

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

Implements fl_ContainerLayout.

void fl_HdrFtrSectionLayout::addValidPages ( void   ) 
virtual bool fl_HdrFtrSectionLayout::bl_doclistener_insertBlock ( fl_ContainerLayout ,
const PX_ChangeRecord_Strux pcrx,
pf_Frag_Strux sdh,
PL_ListenerId  lid,
void(*)(pf_Frag_Strux *sdhNew, PL_ListenerId lid, fl_ContainerLayout *sfhNew)  pfnBindHandles 
) [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().

void fl_HdrFtrSectionLayout::changeIntoHdrFtrSection ( fl_DocSectionLayout pSL  ) 
bool fl_HdrFtrSectionLayout::doclistener_changeStrux ( const PX_ChangeRecord_StruxChange pcrxc  )  [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:
pcr 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, PX_ChangeRecord::PXT_DeleteStrux, fl_DocSectionLayout::setHdrFtr(), UT_ASSERT, UT_ASSERT_HARMLESS, UT_DEBUGMSG, UT_SHOULD_NOT_HAPPEN, and UT_UNUSED.

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

fl_HdrFtrShadow * fl_HdrFtrSectionLayout::findShadow ( fp_Page pPage  ) 
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().

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.

fp_Container * fl_HdrFtrSectionLayout::getNewContainer ( fp_Container pFirstContainer = NULL  )  [virtual]
virtual fl_SectionLayout* fl_HdrFtrSectionLayout::getSectionLayout ( void   )  const [inline, virtual]
bool fl_HdrFtrSectionLayout::isPageHere ( fp_Page pPage  ) 
void fl_HdrFtrSectionLayout::layout ( void   ) 
void fl_HdrFtrSectionLayout::localFormat ( void   ) 

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

References 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::setDocSectionLayout ( fl_DocSectionLayout pDSL  )  [inline]
void fl_HdrFtrSectionLayout::setHdrFtr ( HdrFtrType  iHFType  )  [inline]

Friends And Related Function Documentation

friend class fl_DocListener [friend]

Reimplemented from fl_SectionLayout.


Member Data Documentation


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