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

fp_Page Class Reference

#include <fp_Page.h>

List of all members.

Public Member Functions

 fp_Page (FL_DocLayout *, FV_View *, const fp_PageSize &pageSize, fl_DocSectionLayout *pOwner)
 ~fp_Page ()
UT_sint32 getWidth (void) const
const fp_PageSizegetPageSize () const
UT_sint32 getHeight (void) const
UT_sint32 getBottom (void) const
fp_PagegetNext (void) const
fp_PagegetPrev (void) const
void setNext (fp_Page *)
void setPrev (fp_Page *)
void markAllDirty (void)
UT_sint32 getColumnGap (void) const
FL_DocLayoutgetDocLayout () const
void setView (FV_View *)
bool isOnScreen (void) const
fl_DocSectionLayoutgetOwningSection (void) const
PT_DocPosition getFirstLastPos (bool bFirst) const
void mapXYToPosition (bool bNotFrames, UT_sint32 xPos, UT_sint32 yPos, PT_DocPosition &pos, bool &bBOL, bool &bEOL, bool &isTOC, bool bUseHdrFtr=false, fl_HdrFtrShadow **pShadow=NULL) const
void mapXYToPosition (UT_sint32 xPos, UT_sint32 yPos, PT_DocPosition &pos, bool &bBOL, bool &bEOL, bool &isTOC, bool bUseHdrFtr=false, fl_HdrFtrShadow **pShadow=NULL) const
void getScreenOffsets (const fp_Container *, UT_sint32 &xoff, UT_sint32 &yoff) const
void draw (dg_DrawArgs *, bool bAlaysUseWhiteBackground=false)
bool needsRedraw (void) const
UT_sint32 getFilledHeight (fp_Container *prevContainer) const
UT_sint32 getAvailableHeight (void) const
UT_sint32 getAvailableHeightForColumn (const fp_Column *pColumn) const
fp_TableContainergetContainingTable (PT_DocPosition pos)
void clearCountWrapNumber (void)
void columnHeightChanged (fp_Column *pLeader)
bool breakPage (void)
UT_sint32 countColumnLeaders (void) const
fp_ColumngetNthColumnLeader (UT_sint32 n) const
bool insertColumnLeader (fp_Column *pLeader, fp_Column *pAfter)
void removeColumnLeader (fp_Column *pLeader)
fp_ContainergetNthColumn (UT_uint32 n, fl_DocSectionLayout *pSection) const
bool isEmpty (void) const
bool containsPageBreak (void) const
fp_ContainerupdatePageForWrapping (fp_Column *&pNextCol)
void removeHdrFtr (HdrFtrType hfType)
fp_ShadowContainergetHdrFtrP (HdrFtrType hfType) const
fp_ShadowContainergetHdrFtrContainer (fl_HdrFtrSectionLayout *)
 Return the first container for pHFSL.
fp_ShadowContainerbuildHdrFtrContainer (fl_HdrFtrSectionLayout *, HdrFtrType hfType)
void footnoteHeightChanged (void)
UT_sint32 countFootnoteContainers (void) const
fp_FootnoteContainergetNthFootnoteContainer (UT_sint32 n) const
bool insertFootnoteContainer (fp_FootnoteContainer *pFC)
void removeFootnoteContainer (fp_FootnoteContainer *pFC)
UT_sint32 findFootnoteContainer (fp_FootnoteContainer *pFC) const
void clearScreenFootnotes (void)
UT_sint32 getFootnoteHeight (void) const
void annotationHeightChanged (void)
UT_sint32 countAnnotationContainers (void) const
fp_AnnotationContainergetNthAnnotationContainer (UT_sint32 n) const
bool insertAnnotationContainer (fp_AnnotationContainer *pFC)
void removeAnnotationContainer (fp_AnnotationContainer *pFC)
UT_sint32 findAnnotationContainer (fp_AnnotationContainer *pFC) const
void clearScreenAnnotations (void)
UT_sint32 getAnnotationHeight (void) const
UT_sint32 getAnnotationPos (UT_uint32 pid) const
void frameHeightChanged (void) const
UT_sint32 countAboveFrameContainers (void) const
UT_sint32 countBelowFrameContainers (void) const
fp_FrameContainergetNthAboveFrameContainer (UT_sint32 n) const
fp_FrameContainergetNthBelowFrameContainer (UT_sint32 n) const
bool insertFrameContainer (fp_FrameContainer *pFC)
void removeFrameContainer (fp_FrameContainer *pFC)
UT_sint32 findFrameContainer (fp_FrameContainer *pFC) const
void clearScreenFrames (void)
void markDirtyOverlappingRuns (fp_FrameContainer *pFC)
void expandDamageRect (UT_sint32 x, UT_sint32 y, UT_sint32 width, UT_sint32 height)
bool intersectsDamagedRect (fp_ContainerObject *pObj) const
void redrawDamagedFrames (dg_DrawArgs *pDA)
bool overlapsWrappedFrame (const fp_Line *pLine) const
bool overlapsWrappedFrame (const UT_Rect &rec) const
void setPageNumberInFrames (void)
UT_sint32 getPageNumber (void) const
UT_sint32 getFieldPageNumber (void) const
void setFieldPageNumber (UT_sint32 iPageNum)
void resetFieldPageNumber (void)
bool TopBotMarginChanged (void)
void setLastMappedTOC (fl_TOCLayout *pTOCL)
fl_TOCLayoutgetLastMappedTOC (void) const
fg_FillTypegetFillType (void)
const fg_FillTypegetFillType (void) const
void getAllLayouts (UT_GenericVector< fl_ContainerLayout * > &AllLayouts) const
void updateColumnX ()

Protected Member Functions

void _drawCropMarks (dg_DrawArgs *)
void _reformat (void)
void _reformatColumns (void)
void _reformatFootnotes (void)
void _reformatAnnotations (void)

Private Member Functions

 fp_Page (const fp_Page &)
void operator= (const fp_Page &)

Private Attributes

FL_DocLayoutm_pLayout
FV_Viewm_pView
fp_Pagem_pNext
fp_Pagem_pPrev
fp_PageSize m_pageSize
bool m_bNeedsRedraw
UT_GenericVector< fp_Column * > m_vecColumnLeaders
fl_DocSectionLayoutm_pOwner
fp_ShadowContainerm_pFooter
fp_ShadowContainerm_pHeader
UT_GenericVector
< fp_FootnoteContainer * > 
m_vecFootnotes
UT_GenericVector
< fp_AnnotationContainer * > 
m_vecAnnotations
fg_FillType m_FillType
UT_GenericVector
< fp_FrameContainer * > 
m_vecAboveFrames
UT_GenericVector
< fp_FrameContainer * > 
m_vecBelowFrames
fl_TOCLayoutm_pLastMappedTOC
UT_Rect m_rDamageRect
UT_sint32 m_iCountWrapPasses
UT_sint32 m_iFieldPageNumber

Constructor & Destructor Documentation

fp_Page::fp_Page ( FL_DocLayout pLayout,
FV_View pView,
const fp_PageSize pageSize,
fl_DocSectionLayout pOwner 
)
fp_Page::~fp_Page (  ) 
fp_Page::fp_Page ( const fp_Page  )  [private]

Member Function Documentation

void fp_Page::_drawCropMarks ( dg_DrawArgs pDA  )  [protected]
void fp_Page::_reformat ( void   )  [protected]
void fp_Page::_reformatAnnotations ( void   )  [protected]
void fp_Page::_reformatColumns ( void   )  [protected]
void fp_Page::_reformatFootnotes ( void   )  [protected]
void fp_Page::annotationHeightChanged ( void   ) 
bool fp_Page::breakPage ( void   ) 
fp_ShadowContainer * fp_Page::buildHdrFtrContainer ( fl_HdrFtrSectionLayout pHFSL,
HdrFtrType  hfType 
)
void fp_Page::clearCountWrapNumber ( void   ) 
void fp_Page::clearScreenAnnotations ( void   ) 
void fp_Page::clearScreenFootnotes ( void   ) 
void fp_Page::clearScreenFrames ( void   ) 
void fp_Page::columnHeightChanged ( fp_Column pLeader  ) 
bool fp_Page::containsPageBreak ( void   )  const

Returns true if there is a column with a page break in it

References fp_Column::containsPageBreak(), countColumnLeaders(), fp_Column::getFollower(), and getNthColumnLeader().

UT_sint32 fp_Page::countAboveFrameContainers ( void   )  const
UT_sint32 fp_Page::countAnnotationContainers ( void   )  const
UT_sint32 fp_Page::countBelowFrameContainers ( void   )  const
UT_sint32 fp_Page::countColumnLeaders ( void   )  const
UT_sint32 fp_Page::countFootnoteContainers ( void   )  const
void fp_Page::draw ( dg_DrawArgs pDA,
bool  bAlaysUseWhiteBackground = false 
)

References _drawCropMarks(), dg_DrawArgs::bDirtyRunsOnly, fl_SectionLayout::checkGraphicTick(), GR_Graphics::DGP_PAPER, GR_Graphics::DGP_SCREEN, fp_AnnotationContainer::draw(), fp_FootnoteContainer::draw(), fp_ShadowContainer::draw(), fp_VerticalContainer::draw(), fp_FrameContainer::draw(), GR_Painter::drawLine(), fg_FillType::Fill(), FV_View::getColorColumnLine(), fl_DocSectionLayout::getColumnLineBetween(), getDocLayout(), fl_SectionLayout::getDocLayout(), fp_Column::getDocSectionLayout(), getFillType(), fp_Column::getFollower(), fp_VerticalContainer::getHeight(), fp_FrameContainer::getHeight(), getHeight(), UT_GenericVector< T >::getItemCount(), getNthColumnLeader(), UT_GenericVector< T >::getNthItem(), getOwningSection(), fl_DocSectionLayout::getTopMargin(), FV_View::getViewMode(), fp_VerticalContainer::getWidth(), fp_FrameContainer::getWidth(), getWidth(), fp_VerticalContainer::getX(), fp_FrameContainer::getX(), fp_VerticalContainer::getY(), fp_FrameContainer::getY(), UT_Rect::height, FL_DocLayout::incrementGraphicTick(), UT_Rect::intersectsRect(), fp_FrameContainer::isTightWrapped(), UT_Rect::left, m_bNeedsRedraw, m_iCountWrapPasses, m_pFooter, m_pHeader, m_pView, m_rDamageRect, m_vecAboveFrames, m_vecAnnotations, m_vecBelowFrames, m_vecColumnLeaders, m_vecFootnotes, dg_DrawArgs::pG, GR_Graphics::queryProperties(), GR_Graphics::setColor(), fp_FrameContainer::setOverWrote(), UT_Rect::top, VIEW_PRINT, UT_Rect::width, dg_DrawArgs::xoff, xxx_UT_DEBUGMSG, and dg_DrawArgs::yoff.

Referenced by FV_View::_draw(), and FV_View::draw().

void fp_Page::expandDamageRect ( UT_sint32  x,
UT_sint32  y,
UT_sint32  width,
UT_sint32  height 
)
UT_sint32 fp_Page::findAnnotationContainer ( fp_AnnotationContainer pFC  )  const
UT_sint32 fp_Page::findFootnoteContainer ( fp_FootnoteContainer pFC  )  const
UT_sint32 fp_Page::findFrameContainer ( fp_FrameContainer pFC  )  const
void fp_Page::footnoteHeightChanged ( void   ) 
void fp_Page::frameHeightChanged ( void   )  const
void fp_Page::getAllLayouts ( UT_GenericVector< fl_ContainerLayout * > &  AllLayouts  )  const
UT_sint32 fp_Page::getAnnotationHeight ( void   )  const
UT_sint32 fp_Page::getAnnotationPos ( UT_uint32  pid  )  const
UT_sint32 fp_Page::getAvailableHeight ( void   )  const
UT_sint32 fp_Page::getAvailableHeightForColumn ( const fp_Column pColumn  )  const
UT_sint32 fp_Page::getBottom ( void   )  const
UT_sint32 fp_Page::getColumnGap ( void   )  const
fp_TableContainer * fp_Page::getContainingTable ( PT_DocPosition  pos  ) 
FL_DocLayout * fp_Page::getDocLayout ( void   )  const
UT_sint32 fp_Page::getFieldPageNumber ( void   )  const

Return the page number as indicated in a page number field run. This value depends on the section properties "section-restart" and "section-restart-value".

References m_iFieldPageNumber.

Referenced by fp_FieldPageNumberRun::calculateValue(), and fp_FieldTOCNumRun::calculateValue().

UT_sint32 fp_Page::getFilledHeight ( fp_Container prevContainer  )  const
fg_FillType & fp_Page::getFillType ( void   ) 
const fg_FillType & fp_Page::getFillType ( void   )  const

FillType class for the page.

References m_FillType.

PT_DocPosition fp_Page::getFirstLastPos ( bool  bFirst  )  const
UT_sint32 fp_Page::getFootnoteHeight ( void   )  const
fp_ShadowContainer * fp_Page::getHdrFtrContainer ( fl_HdrFtrSectionLayout pHFSL  ) 
fp_ShadowContainer * fp_Page::getHdrFtrP ( HdrFtrType  hfType  )  const
UT_sint32 fp_Page::getHeight ( void   )  const
fl_TOCLayout* fp_Page::getLastMappedTOC ( void   )  const [inline]

Referenced by FV_View::cmdSelectTOC().

fp_Page * fp_Page::getNext ( void   )  const
fp_FrameContainer * fp_Page::getNthAboveFrameContainer ( UT_sint32  n  )  const
fp_AnnotationContainer * fp_Page::getNthAnnotationContainer ( UT_sint32  n  )  const
fp_FrameContainer * fp_Page::getNthBelowFrameContainer ( UT_sint32  n  )  const
fp_Container * fp_Page::getNthColumn ( UT_uint32  n,
fl_DocSectionLayout pSection 
) const
fp_Column * fp_Page::getNthColumnLeader ( UT_sint32  n  )  const
fp_FootnoteContainer * fp_Page::getNthFootnoteContainer ( UT_sint32  n  )  const
fl_DocSectionLayout* fp_Page::getOwningSection ( void   )  const [inline]
UT_sint32 fp_Page::getPageNumber ( void   )  const
const fp_PageSize & fp_Page::getPageSize ( void   )  const

References m_pageSize.

fp_Page * fp_Page::getPrev ( void   )  const
void fp_Page::getScreenOffsets ( const fp_Container pContainer,
UT_sint32 xoff,
UT_sint32 yoff 
) const
UT_sint32 fp_Page::getWidth ( void   )  const
bool fp_Page::insertAnnotationContainer ( fp_AnnotationContainer pFC  ) 
bool fp_Page::insertColumnLeader ( fp_Column pLeader,
fp_Column pAfter 
)

Insert column leader on page

Parameters:
pLeader Leader to insert
pAfter The leader to insert after or NULL
Returns:
True

This will set the page of all columns in the row to this page.

References _reformat(), fl_DocSectionLayout::addOwnedPage(), fl_DocSectionLayout::deleteOwnedPage(), UT_GenericVector< T >::findItem(), fp_Column::getDocSectionLayout(), fp_Column::getFollower(), UT_GenericVector< T >::insertItemAt(), m_pOwner, m_vecColumnLeaders, fp_Column::setPage(), UT_ASSERT, and xxx_UT_DEBUGMSG.

Referenced by fl_DocSectionLayout::getNewContainer().

bool fp_Page::insertFootnoteContainer ( fp_FootnoteContainer pFC  ) 
bool fp_Page::insertFrameContainer ( fp_FrameContainer pFC  ) 
bool fp_Page::intersectsDamagedRect ( fp_ContainerObject pObj  )  const

Returns true if the objects intersects the damaged region

References fp_ContainerObject::getScreenRect(), UT_Rect::intersectsRect(), and m_rDamageRect.

bool fp_Page::isEmpty ( void   )  const
bool fp_Page::isOnScreen ( void   )  const
void fp_Page::mapXYToPosition ( bool  bNotFrames,
UT_sint32  x,
UT_sint32  y,
PT_DocPosition pos,
bool &  bBOL,
bool &  bEOL,
bool &  isTOC,
bool  bUseHdrFtr = false,
fl_HdrFtrShadow **  pShadow = NULL 
) const

This method maps an x,y location on the page to the position in the document of the corrsponding element. This variation looks in the header/footer region and returns the SectionLayout shadow of the

Parameters:
bNotFrames if true don't look inside frames
x coordinate
y coordinate
bBOL 
bEOL 
Returns:
pos The Document position corresponding the text at location x,y
pShadow A pointer to the shadow corresponding to this header/footer

References countAboveFrameContainers(), countAnnotationContainers(), countBelowFrameContainers(), countFootnoteContainers(), FL_DocLayout::displayAnnotations(), fp_VerticalContainer::distanceFromPoint(), getDocLayout(), fp_VerticalContainer::getFirstContainer(), fp_Column::getFollower(), fl_FrameLayout::getFrameType(), fp_FrameContainer::getFullHeight(), fp_FrameContainer::getFullWidth(), fp_FrameContainer::getFullX(), fp_FrameContainer::getFullY(), FL_DocLayout::getGraphics(), fp_VerticalContainer::getHeight(), fp_FrameContainer::getHeight(), UT_GenericVector< T >::getItemCount(), getNthAboveFrameContainer(), getNthAnnotationContainer(), getNthBelowFrameContainer(), getNthFootnoteContainer(), UT_GenericVector< T >::getNthItem(), fl_ContainerLayout::getPosition(), fp_ContainerObject::getSectionLayout(), fp_ShadowContainer::getShadow(), FV_View::getViewMode(), fp_VerticalContainer::getWidth(), fp_VerticalContainer::getX(), fp_FrameContainer::getX(), fp_VerticalContainer::getY(), fp_FrameContainer::getY(), m_pFooter, m_pHeader, m_pLayout, m_pView, m_vecColumnLeaders, fp_VerticalContainer::mapXYToPosition(), GR_Graphics::tlu(), and UT_ASSERT.

Referenced by FV_View::_getMouseContext(), FV_View::_moveInsPtNextPrevLine(), FV_View::_moveInsPtNextPrevScreen(), FL_DocLayout::AnchoredObjectHelper(), FV_View::cmdHyperlinkStatusBar(), FV_View::extSelToXY(), FV_View::extSelToXYword(), FV_View::getDocPositionFromXY(), FV_View::isLeftMargin(), FV_View::isMathSelected(), FV_View::isXYSelected(), mapXYToPosition(), FV_SelectionHandles::updateSelectionEnd(), FV_SelectionHandles::updateSelectionStart(), and FV_View::warpInsPtToXY().

void fp_Page::mapXYToPosition ( UT_sint32  xPos,
UT_sint32  yPos,
PT_DocPosition pos,
bool &  bBOL,
bool &  bEOL,
bool &  isTOC,
bool  bUseHdrFtr = false,
fl_HdrFtrShadow **  pShadow = NULL 
) const

References mapXYToPosition().

void fp_Page::markAllDirty ( void   )  [inline]

Referenced by fl_BlockLayout::_delete().

void fp_Page::markDirtyOverlappingRuns ( fp_FrameContainer pFC  ) 
bool fp_Page::needsRedraw ( void   )  const

References m_bNeedsRedraw.

Referenced by FV_View::_draw().

void fp_Page::operator= ( const fp_Page  )  [private]
bool fp_Page::overlapsWrappedFrame ( const fp_Line pLine  )  const

Returns true if the supplied rectangle overlaps with one wrapped frame on the page.

References fp_Line::getScreenRect().

Referenced by updatePageForWrapping().

bool fp_Page::overlapsWrappedFrame ( const UT_Rect rec  )  const

Returns true if the supplied rectangle overlaps with one wrapped frame on the page. The rectangle is relative to the screen.

References countAboveFrameContainers(), getNthAboveFrameContainer(), fp_FrameContainer::isWrappingSet(), and fp_FrameContainer::overlapsRect().

void fp_Page::redrawDamagedFrames ( dg_DrawArgs pDA  ) 
void fp_Page::removeAnnotationContainer ( fp_AnnotationContainer pFC  ) 
void fp_Page::removeColumnLeader ( fp_Column pLeader  ) 
void fp_Page::removeFootnoteContainer ( fp_FootnoteContainer pFC  ) 
void fp_Page::removeFrameContainer ( fp_FrameContainer pFC  ) 
void fp_Page::removeHdrFtr ( HdrFtrType  hfType  ) 
void fp_Page::resetFieldPageNumber ( void   ) 
void fp_Page::setFieldPageNumber ( UT_sint32  iPageNum  ) 
void fp_Page::setLastMappedTOC ( fl_TOCLayout pTOCL  )  [inline]
void fp_Page::setNext ( fp_Page p  ) 
void fp_Page::setPageNumberInFrames ( void   ) 
void fp_Page::setPrev ( fp_Page p  ) 
void fp_Page::setView ( FV_View pView  ) 

References m_pView.

Referenced by FL_DocLayout::setView().

bool fp_Page::TopBotMarginChanged ( void   ) 
void fp_Page::updateColumnX (  ) 
fp_Container * fp_Page::updatePageForWrapping ( fp_Column *&  pNextCol  ) 

This method scans the page, looking for lines that overlap wrapped positioned frames. As it finds them it records the line and the block After scanning the page it calls a method in the block to rebreak the papargraph starting from the line supplied, but now making sure to not overlap any wrapped objects. If it does a re-break of any paragraph it returns the first container in the page. and sets pNextColumn to the first column on the page. fp_ColumnBreaker then lays out the page again. If there are no rebreaks it returns NULL and fp_ColumnBreaker moves on to the next page. pNextCol is the next column fb_ColumnBreaker will evaluate it is used as an output..

References UT_GenericVector< T >::addItem(), UT_GenericVector< T >::clear(), clearCountWrapNumber(), fl_BlockLayout::collapse(), countAboveFrameContainers(), countColumnLeaders(), fp_Container::countCons(), fp_VerticalContainer::countWrapped(), fl_BlockLayout::findLineInBlock(), FL_DocLayout::findPage(), fl_BlockLayout::format(), fl_BlockLayout::formatWrappedFromHere(), fp_Line::genOverlapRects(), fp_Line::getBlock(), fp_Container::getColumn(), fp_Line::getColumn(), fl_ContainerLayout::getContainerType(), fp_ContainerObject::getContainerType(), getDocLayout(), fl_ContainerLayout::getFirstContainer(), fl_BlockLayout::getFirstRun(), fp_Column::getFollower(), UT_GenericVector< T >::getItemCount(), fp_Run::getLine(), fp_Container::getNext(), fl_ContainerLayout::getNext(), getNext(), getNthAboveFrameContainer(), getNthColumnLeader(), fp_Container::getNthCon(), UT_GenericVector< T >::getNthItem(), fp_VerticalContainer::getNumWrapped(), fp_Container::getPage(), fp_Container::getPrev(), fl_ContainerLayout::getPrev(), getPrev(), fp_Line::getScreenRect(), fp_Line::getY(), UT_Rect::height, fp_Line::isSameYAsPrevious(), fp_Line::isWrapped(), fp_FrameContainer::isWrappingSet(), UT_Rect::left, m_iCountWrapPasses, _BL::m_pBL, _BL::m_pL, overlapsWrappedFrame(), fp_Line::setSameYAsPrevious(), fp_Line::setWrapped(), UT_Rect::top, UT_ASSERT, UT_DEBUGMSG, UT_SHOULD_NOT_HAPPEN, UT_VECTOR_PURGEALL, UT_Rect::width, and xxx_UT_DEBUGMSG.

Referenced by fb_ColumnBreaker::_breakSection().


Member Data Documentation

bool fp_Page::m_bNeedsRedraw [private]

Referenced by draw(), and needsRedraw().

Referenced by getFillType().

Referenced by getPageSize().

Referenced by getNext(), and setNext().

Referenced by getPrev(), and setPrev().


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