Public Member Functions | Private Member Functions | Private Attributes

fp_TableContainer Class Reference

#include <fp_TableContainer.h>

Inheritance diagram for fp_TableContainer:
fp_VerticalContainer fp_Container fp_ContainerObject

List of all members.

Public Member Functions

 fp_TableContainer (fl_SectionLayout *pSectionLayout)
 fp_TableContainer (fl_SectionLayout *pSectionLayout, fp_TableContainer *pMaster)
 ~fp_TableContainer ()
void sizeRequest (fp_Requisition *pRequest)
void sizeAllocate (fp_Allocation *pAllocate)
virtual void mapXYToPosition (UT_sint32 x, UT_sint32 y, PT_DocPosition &pos, bool &bBOL, bool &bEOL, bool &isTOC)
virtual fp_PagegetPage (void) const
fp_LinegetFirstLineInColumn (fp_Column *pCol) const
fp_LinegetLastLineInColumn (fp_Column *pCol) const
void layout (void)
virtual void setY (UT_sint32 iY)
virtual UT_sint32 getHeight (void) const
virtual void setContainer (fp_Container *pContainer)
virtual void draw (dg_DrawArgs *)
virtual void draw (GR_Graphics *)
virtual UT_sint32 getMarginBefore (void) const
virtual UT_sint32 getMarginAfter (void) const
void setAdditionalMargin (UT_sint32 iMarg)
fp_ColumngetBrokenColumn (void) const
void drawLines ()
bool containsFootnoteReference (void) const
bool getFootnoteContainers (UT_GenericVector< fp_FootnoteContainer * > *pvecFoots) const
bool containsAnnotations (void) const
bool getAnnotationContainers (UT_GenericVector< fp_AnnotationContainer * > *pvecAnns) const
virtual void clearScreen (void)
virtual bool isVBreakable (void)
virtual bool isHBreakable (void)
virtual UT_sint32 wantVBreakAt (UT_sint32)
virtual UT_sint32 wantHBreakAt (UT_sint32)
UT_sint32 wantVBreakAtNoFootnotes (UT_sint32)
UT_sint32 wantVBreakAtWithFootnotes (UT_sint32)
UT_sint32 sumFootnoteHeight (void) const
virtual fp_ContainerObjectVBreakAt (UT_sint32)
void breakCellsAt (UT_sint32 vpos)
virtual fp_ContainerObjectHBreakAt (UT_sint32)
UT_sint32 getBrokenNumber (void) const
void setToAllocation (void)
void tableAttach (fp_CellContainer *pCell)
void setHomogeneous (bool bIsHomogeneous)
void setColSpacings (UT_sint32 spacing)
void setRowSpacings (UT_sint32 spacing)
void setColSpacing (UT_sint32 column, UT_sint32 spacing)
void setRowSpacing (UT_sint32 row, UT_sint32 spacing)
void resize (UT_sint32 n_rows, UT_sint32 n_cols)
void setLineThickness (UT_sint32 iLineThickness)
UT_sint32 getLineThickness (void) const
void queueResize (void)
UT_sint32 getYOfRowOrColumn (UT_sint32 row, bool bRow) const
UT_sint32 getYOfRow (UT_sint32 row, bool bBottomOffset=true) const
UT_sint32 getXOfColumn (UT_sint32 col) const
fp_CellContainergetCellAtRowColumn (UT_sint32 row, UT_sint32 column) const
fp_CellContainergetCellAtRowColumnLinear (UT_sint32 row, UT_sint32 column) const
virtual fp_ContainergetNextContainerInSection (void) const
virtual fp_ContainergetPrevContainerInSection (void) const
fp_TableContainergetMasterTable (void) const
bool isThisBroken (void) const
void setYBreakHere (UT_sint32 iBreakHere)
void setYBottom (UT_sint32 iBotContainer)
bool isInBrokenTable (const fp_CellContainer *pCell, const fp_Container *pCon) const
UT_sint32 getYBreak (void) const
UT_sint32 getYBottom (void) const
fp_TableContainergetFirstBrokenTable (void) const
fp_TableContainergetLastBrokenTable (void) const
fp_CellContainergetFirstBrokenCell (bool bCacheResultOnly=false) const
void setFirstBrokenTable (fp_TableContainer *pBroke)
void setLastBrokenTable (fp_TableContainer *pBroke)
void deleteBrokenTables (bool bClearFirst, bool bRecurseUp=true)
UT_sint32 getAdditionalBottomSpace (void) const
void setAdditionalBottomSpace (UT_sint32 space)
bool getBrokenTop (void) const
bool getBrokenBottom (void) const
void setBrokenTop (bool bTop)
void setBrokenBottom (bool bBot)
UT_sint32 getNumRows (void) const
UT_sint32 getNumCols (void) const
UT_sint32 getRowHeight (UT_sint32 iRow, UT_sint32 iMeasHeight) const
UT_sint32 getTotalTableHeight (void) const
UT_sint32 getRowOrColumnAtPosition (UT_sint32 y, bool bRow) const
void setRedrawLines (void)
bool doRedrawLines (void) const
fp_TableRowColumngetNthCol (UT_uint32 i) const
fp_TableRowColumngetNthRow (UT_uint32 i) const
bool containsNestedTables (void) const
void setRowHeightType (FL_RowHeightType iType)
void setRowHeight (UT_sint32 iHeight)
virtual void setLastWantedVBreak (UT_sint32 iBreakAt)
virtual UT_sint32 getLastWantedVBreak (void) const
virtual fp_ContainergetFirstBrokenContainer () const
virtual void deleteBrokenAfter (bool bClearFirst)

Private Member Functions

void _size_request_init (void)
void _size_request_pass1 (void)
void _size_request_pass2 (void)
void _size_request_pass3 (void)
void _size_allocate_init (void)
void _size_allocate_pass1 (void)
void _size_allocate_pass2 (void)
UT_uint32 _getBottomOfLastContainer (void) const
void _drawBoundaries (dg_DrawArgs *pDA)
void _drawBrokenBoundaries (dg_DrawArgs *pDA)
void _brokenDraw (dg_DrawArgs *pDA)

Private Attributes

UT_sint32 m_iRows
UT_sint32 m_iCols
bool m_bIsHomogeneous
std::vector< fp_TableRowColumn * > m_vecRows
std::vector< fp_TableRowColumn * > m_vecColumns
fp_Allocation m_MyAllocation
fp_Requisition m_MyRequest
UT_sint32 m_iRowSpacing
UT_sint32 m_iColSpacing
fp_TableContainerm_pFirstBrokenTable
fp_TableContainerm_pLastBrokenTable
bool m_bIsBroken
fp_TableContainerm_pMasterTable
UT_sint32 m_iYBreakHere
UT_sint32 m_iYBottom
UT_sint32 m_iAdditionalBottomSpace
bool m_bBrokenTop
bool m_bBrokenBottom
bool m_bRedrawLines
UT_sint32 m_iLineThickness
FL_RowHeightType m_iRowHeightType
UT_sint32 m_iRowHeight
UT_sint32 m_iLastWantedVBreak
UT_sint32 m_iNextWantedVBreak
fp_CellContainerm_pFirstBrokenCell
UT_sint32 m_iAdditionalMarginAfter

Constructor & Destructor Documentation

fp_TableContainer::fp_TableContainer ( fl_SectionLayout pSectionLayout  ) 

Create a Master Table container. This is broken across other vertical Containers.

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

References fp_ContainerObject::getSectionLayout(), fl_SectionLayout::markAllRunsDirty(), and fl_SectionLayout::setNeedsRedraw().

Referenced by VBreakAt().

fp_TableContainer::fp_TableContainer ( fl_SectionLayout pSectionLayout,
fp_TableContainer pMaster 
)

Create a broken Table container. This is placed between the cells and drawing. A vertical offset is subtracted from the Cells Y location for all manipulations.

Parameters:
iType Container type
pSectionLayout Section layout type used for this container
fp_TableContainer::~fp_TableContainer (  ) 

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(), deleteBrokenTables(), m_pMasterTable, m_vecColumns, m_vecRows, setContainer(), fp_Container::setNext(), fp_Container::setPrev(), UT_std_vector_purgeall(), and xxx_UT_DEBUGMSG.


Member Function Documentation

UT_uint32 fp_TableContainer::_getBottomOfLastContainer ( void   )  const [private]
void fp_TableContainer::_size_request_pass2 ( void   )  [private]
void fp_TableContainer::breakCellsAt ( UT_sint32  vpos  ) 
bool fp_TableContainer::containsNestedTables ( void   )  const
bool fp_TableContainer::doRedrawLines ( void   )  const [inline]
virtual void fp_TableContainer::draw ( GR_Graphics  )  [inline, virtual]

Reimplemented from fp_VerticalContainer.

UT_sint32 fp_TableContainer::getAdditionalBottomSpace ( void   )  const [inline]
bool fp_TableContainer::getBrokenBottom ( void   )  const [inline]
UT_sint32 fp_TableContainer::getBrokenNumber ( void   )  const
bool fp_TableContainer::getBrokenTop ( void   )  const [inline]
fp_CellContainer * fp_TableContainer::getCellAtRowColumnLinear ( UT_sint32  row,
UT_sint32  col 
) const
fp_Container * fp_TableContainer::getFirstBrokenContainer (  )  const [virtual]

Reimplemented from fp_VerticalContainer.

References getFirstBrokenTable().

fp_Line * fp_TableContainer::getFirstLineInColumn ( fp_Column pCol  )  const
virtual UT_sint32 fp_TableContainer::getLastWantedVBreak ( void   )  const [inline, virtual]

Reimplemented from fp_VerticalContainer.

UT_sint32 fp_TableContainer::getLineThickness ( void   )  const [inline]
UT_sint32 fp_TableContainer::getMarginBefore ( void   )  const [virtual]
UT_sint32 fp_TableContainer::getRowOrColumnAtPosition ( UT_sint32  y,
bool  bRow 
) const
UT_sint32 fp_TableContainer::getXOfColumn ( UT_sint32  col  )  const
UT_sint32 fp_TableContainer::getYOfRowOrColumn ( UT_sint32  row,
bool  bRow 
) const

References getXOfColumn(), and getYOfRow().

virtual fp_ContainerObject* fp_TableContainer::HBreakAt ( UT_sint32   )  [inline, virtual]

Reimplemented from fp_VerticalContainer.

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

Reimplemented from fp_VerticalContainer.

bool fp_TableContainer::isVBreakable ( void   )  [virtual]

Returns true since a table can be broken vertically.

Reimplemented from fp_VerticalContainer.

void fp_TableContainer::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

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.

References fp_Container::countCons(), getCellAtRowColumn(), getFirstBrokenTable(), fp_VerticalContainer::getFirstContainer(), getMasterTable(), getRowOrColumnAtPosition(), fp_VerticalContainer::getX(), fp_VerticalContainer::getY(), getYBottom(), getYBreak(), isThisBroken(), fp_VerticalContainer::mapXYToPosition(), UT_ASSERT_HARMLESS, UT_SHOULD_NOT_HAPPEN, and xxx_UT_DEBUGMSG.

Referenced by fp_VerticalContainer::mapXYToPosition().

void fp_TableContainer::setAdditionalBottomSpace ( UT_sint32  space  )  [inline]

Referenced by wantVBreakAtNoFootnotes().

void fp_TableContainer::setAdditionalMargin ( UT_sint32  iMarg  )  [inline]
void fp_TableContainer::setBrokenBottom ( bool  bBot  )  [inline]
void fp_TableContainer::setBrokenTop ( bool  bTop  )  [inline]
void fp_TableContainer::setColSpacing ( UT_sint32  column,
UT_sint32  spacing 
)
void fp_TableContainer::setColSpacings ( UT_sint32  spacing  ) 
void fp_TableContainer::setFirstBrokenTable ( fp_TableContainer pBroke  ) 
void fp_TableContainer::setHomogeneous ( bool  bIsHomogeneous  ) 
void fp_TableContainer::setLastBrokenTable ( fp_TableContainer pBroke  ) 
virtual void fp_TableContainer::setLastWantedVBreak ( UT_sint32  iBreakAt  )  [inline, virtual]

Reimplemented from fp_VerticalContainer.

void fp_TableContainer::setLineThickness ( UT_sint32  iLineThickness  )  [inline]
void fp_TableContainer::setRedrawLines ( void   )  [inline]
void fp_TableContainer::setRowHeight ( UT_sint32  iHeight  )  [inline]
void fp_TableContainer::setRowHeightType ( FL_RowHeightType  iType  )  [inline]
void fp_TableContainer::setRowSpacing ( UT_sint32  row,
UT_sint32  spacing 
)
void fp_TableContainer::setRowSpacings ( UT_sint32  spacing  ) 
void fp_TableContainer::setYBottom ( UT_sint32  iBotContainer  ) 
void fp_TableContainer::setYBreakHere ( UT_sint32  iBreakHere  ) 

References m_iYBreakHere, and xxx_UT_DEBUGMSG.

Referenced by VBreakAt().

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

This method creates a new broken tablecontainer, broken at the offset given. If the new tablecontainer is broken from a pre-existing broken table it is inserted into the holding vertical container after the old broken table. It also inserted into the linked list of containers in the vertical container. vpos is relative to the either the start of the table 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(), breakCellsAt(), fp_Container::countCons(), fp_Container::findCon(), FP_CONTAINER_CELL, fp_TableContainer(), fp_Container::getContainer(), fp_ContainerObject::getContainerType(), getFirstBrokenTable(), getHeight(), getLastBrokenTable(), getMasterTable(), fp_ContainerObject::getSectionLayout(), getTotalTableHeight(), fp_VerticalContainer::getY(), getYBottom(), getYBreak(), fp_Container::insertConAt(), isThisBroken(), m_iNextWantedVBreak, setContainer(), setFirstBrokenTable(), fp_VerticalContainer::setHeight(), setLastBrokenTable(), fp_Container::setNext(), fp_Container::setPrev(), setY(), setYBottom(), setYBreakHere(), UT_ASSERT, UT_return_val_if_fail, VBreakAt(), and xxx_UT_DEBUGMSG.

Referenced by fp_CellContainer::drawBroken(), fp_CellContainer::layout(), fp_FrameContainer::layout(), setY(), VBreakAt(), fp_CellContainer::VBreakAt(), and wantVBreakAt().

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

Reimplemented from fp_VerticalContainer.

UT_sint32 fp_TableContainer::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 fl_ContainerLayout::containsAnnotationLayouts(), fl_ContainerLayout::containsFootnoteLayouts(), FL_DocLayout::displayAnnotations(), fl_SectionLayout::getDocLayout(), getFirstBrokenTable(), fp_ContainerObject::getSectionLayout(), isThisBroken(), UT_ASSERT, VBreakAt(), wantVBreakAt(), wantVBreakAtNoFootnotes(), and wantVBreakAtWithFootnotes().

Referenced by wantVBreakAt().

UT_sint32 fp_TableContainer::wantVBreakAtWithFootnotes ( UT_sint32  vpos  ) 

Member Data Documentation

Referenced by isThisBroken().

Referenced by drawLines().


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