Public Member Functions | Private Attributes

fp_TOCContainer Class Reference

#include <fp_TOCContainer.h>

Inheritance diagram for fp_TOCContainer:
fp_VerticalContainer fp_Container fp_ContainerObject

List of all members.

Public Member Functions

 fp_TOCContainer (fl_SectionLayout *pSectionLayout)
 fp_TOCContainer (fl_SectionLayout *pSectionLayout, fp_TOCContainer *pMaster)
virtual ~fp_TOCContainer ()
virtual void mapXYToPosition (UT_sint32 x, UT_sint32 y, PT_DocPosition &pos, bool &bBOL, bool &bEOL, bool &isTOC)
UT_sint32 getValue (void)
void layout (void)
void forceClearScreen (void)
UT_sint32 getTotalTOCHeight (void) const
virtual UT_sint32 getHeight (void) const
virtual void clearScreen (void)
virtual void draw (dg_DrawArgs *)
virtual void draw (GR_Graphics *)
virtual void setContainer (fp_Container *pContainer)
virtual void setY (UT_sint32 iY)
virtual fp_ContainergetNextContainerInSection (void) const
virtual fp_ContainergetPrevContainerInSection (void) const
fp_ColumngetBrokenColumn (void)
virtual bool isVBreakable (void)
virtual bool isHBreakable (void)
virtual UT_sint32 wantVBreakAt (UT_sint32)
virtual UT_sint32 wantHBreakAt (UT_sint32)
virtual fp_ContainerObjectVBreakAt (UT_sint32)
virtual fp_ContainerObjectHBreakAt (UT_sint32)
fl_DocSectionLayoutgetDocSectionLayout (void)
void setSelected (bool bIsSelected)
fp_TOCContainergetMasterTOC (void) const
bool isThisBroken (void) const
void setYBreakHere (UT_sint32 iBreakHere)
void setYBottom (UT_sint32 iBotContainer)
bool isInBrokenTOC (fp_Container *pCon)
UT_sint32 getYBreak (void) const
UT_sint32 getYBottom (void) const
fp_TOCContainergetFirstBrokenTOC (void) const
fp_TOCContainergetLastBrokenTOC (void) const
void setFirstBrokenTOC (fp_TOCContainer *pBroke)
void setLastBrokenTOC (fp_TOCContainer *pBroke)
void deleteBrokenTOCs (bool bClearFirst)
void adjustBrokenTOCs (void)
UT_sint32 getBrokenTop (void)
UT_sint32 getBrokenBot (void)
void setBrokenTop (UT_sint32 iTop)
void setBrokenBot (UT_sint32 iBot)
UT_sint32 getBrokenNumber (void)
virtual void setLastWantedVBreak (UT_sint32 iBreakAt)
virtual UT_sint32 getLastWantedVBreak (void) const
virtual fp_ContainergetFirstBrokenContainer () const
virtual void deleteBrokenAfter (bool bClearFirst)

Private Attributes

fp_TOCContainerm_pFirstBrokenTOC
fp_TOCContainerm_pLastBrokenTOC
bool m_bIsBroken
fp_TOCContainerm_pMasterTOC
UT_sint32 m_iYBreakHere
UT_sint32 m_iYBottom
UT_sint32 m_iBrokenTop
UT_sint32 m_iBrokenBottom
UT_sint32 m_iLastWantedVBreak

Constructor & Destructor Documentation

fp_TOCContainer::fp_TOCContainer ( fl_SectionLayout pSectionLayout  ) 

Create Table Of Contents container

Parameters:
iType Container type
pSectionLayout Section layout type used for this container

Referenced by VBreakAt().

fp_TOCContainer::fp_TOCContainer ( fl_SectionLayout pSectionLayout,
fp_TOCContainer pMaster 
)

References setY().

fp_TOCContainer::~fp_TOCContainer (  )  [virtual]

Destruct container

Note:
The Containers in vector of the container are not destructed. They are owned by the logical hierarchy (i.e., the fl_Container classes like fl_BlockLayout), not the physical hierarchy.

References fp_Container::clearCons(), deleteBrokenTOCs(), m_pMasterTOC, setContainer(), fp_Container::setNext(), fp_Container::setPrev(), and UT_DEBUGMSG.


Member Function Documentation

void fp_TOCContainer::adjustBrokenTOCs ( void   ) 
void fp_TOCContainer::draw ( GR_Graphics  )  [virtual]

Draw container content

Parameters:
pDA Draw arguments

Reimplemented from fp_VerticalContainer.

UT_sint32 fp_TOCContainer::getBrokenBot ( void   ) 
UT_sint32 fp_TOCContainer::getBrokenNumber ( void   ) 
UT_sint32 fp_TOCContainer::getBrokenTop ( void   ) 
fp_Container * fp_TOCContainer::getFirstBrokenContainer (  )  const [virtual]

Reimplemented from fp_VerticalContainer.

References getFirstBrokenTOC().

UT_sint32 fp_TOCContainer::getHeight ( void   )  const [virtual]
fp_TOCContainer * fp_TOCContainer::getLastBrokenTOC ( void   )  const
virtual UT_sint32 fp_TOCContainer::getLastWantedVBreak ( void   )  const [inline, virtual]

Reimplemented from fp_VerticalContainer.

UT_sint32 fp_TOCContainer::getTotalTOCHeight ( void   )  const
UT_sint32 fp_TOCContainer::getValue ( void   ) 

This method returns the value of the TOC reference (or anchor)

References fp_ContainerObject::getSectionLayout(), and fl_TOCLayout::getTOCPID().

UT_sint32 fp_TOCContainer::getYBottom ( void   )  const [inline]
UT_sint32 fp_TOCContainer::getYBreak ( void   )  const [inline]
virtual fp_ContainerObject* fp_TOCContainer::HBreakAt ( UT_sint32   )  [inline, virtual]

Reimplemented from fp_VerticalContainer.

virtual bool fp_TOCContainer::isHBreakable ( void   )  [inline, virtual]

Reimplemented from fp_VerticalContainer.

bool fp_TOCContainer::isVBreakable ( void   )  [virtual]

Reimplemented from fp_VerticalContainer.

void fp_TOCContainer::mapXYToPosition ( UT_sint32  x,
UT_sint32  y,
PT_DocPosition pos,
bool &  bBOL,
bool &  bEOL,
bool &  isTOC 
) [virtual]

Find document position from X and Y coordinates. Note that the TOC only has one document position, so that mapXYToPosition is rather unhelpful for scrolling purposes.

Parameters:
x X coordinate
y Y coordinate
Return values:
pos Document position
bBOL True if position is at begining of line, otherwise false
bEOL True if position is at end of line, otherwise false

Reimplemented from fp_VerticalContainer.

void fp_TOCContainer::setBrokenBot ( UT_sint32  iBot  )  [inline]
void fp_TOCContainer::setBrokenTop ( UT_sint32  iTop  )  [inline]
void fp_TOCContainer::setFirstBrokenTOC ( fp_TOCContainer pBroke  ) 
void fp_TOCContainer::setLastBrokenTOC ( fp_TOCContainer pBroke  ) 
virtual void fp_TOCContainer::setLastWantedVBreak ( UT_sint32  iBreakAt  )  [inline, virtual]

Reimplemented from fp_VerticalContainer.

void fp_TOCContainer::setSelected ( bool  bIsSelected  ) 
void fp_TOCContainer::setYBottom ( UT_sint32  iBotContainer  ) 

References m_iYBottom.

Referenced by adjustBrokenTOCs(), deleteBrokenAfter(), and VBreakAt().

void fp_TOCContainer::setYBreakHere ( UT_sint32  iBreakHere  ) 

References m_iYBreakHere, and xxx_UT_DEBUGMSG.

Referenced by adjustBrokenTOCs(), and VBreakAt().

fp_ContainerObject * fp_TOCContainer::VBreakAt ( UT_sint32  vpos  )  [virtual]

This method creates a new broken toccontainer, broken at the offset given. If the new TOCcontainer is broken from a pre-existing broken TOC it is inserted into the holding vertical container after the old broken TOC. It also inserted into the linked list of containers in the vertical container. vpos is relative to the either the start of the TOC if it's the first non-zero vpos or relative to the previous ybreak if it's further down.

Reimplemented from fp_VerticalContainer.

References fp_Container::addCon(), fp_Container::countCons(), fp_Container::findCon(), fp_TOCContainer(), fp_Container::getContainer(), getFirstBrokenTOC(), getHeight(), fp_VerticalContainer::getHeight(), getLastBrokenTOC(), getMasterTOC(), fp_ContainerObject::getSectionLayout(), getTotalTOCHeight(), fp_VerticalContainer::getY(), getYBreak(), fp_Container::insertConAt(), isThisBroken(), setContainer(), setFirstBrokenTOC(), fp_VerticalContainer::setHeight(), setLastBrokenTOC(), fp_Container::setNext(), fp_Container::setPrev(), setY(), setYBottom(), setYBreakHere(), UT_ASSERT, UT_DEBUGMSG, UT_SHOULD_NOT_HAPPEN, VBreakAt(), and xxx_UT_DEBUGMSG.

Referenced by setY(), and VBreakAt().

virtual UT_sint32 fp_TOCContainer::wantHBreakAt ( UT_sint32   )  [inline, virtual]

Reimplemented from fp_VerticalContainer.

UT_sint32 fp_TOCContainer::wantVBreakAt ( UT_sint32  vpos  )  [virtual]

The caller to this method requests a break at the vertical height given. It returns the actual break height, which will always be less than or equal to the requested height. The function returns -1 if the table does not need to be broken.

Reimplemented from fp_VerticalContainer.

References fp_Container::countCons(), FP_TABLE_MIN_BROKEN_HEIGHT, fp_Line::getHeight(), fp_Line::getMarginAfter(), getMasterTOC(), fp_Container::getNthCon(), getTotalTOCHeight(), fp_Line::getY(), isThisBroken(), and wantVBreakAt().

Referenced by wantVBreakAt().


Member Data Documentation


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