Public Member Functions | Protected Member Functions | Private Attributes

fp_Column Class Reference

#include <fp_Column.h>

Inheritance diagram for fp_Column:
fp_VerticalContainer fp_Container fp_ContainerObject

List of all members.

Public Member Functions

 fp_Column (fl_SectionLayout *pSectionLayout)
 ~fp_Column ()
fl_DocSectionLayoutgetDocSectionLayout (void) const
void setLeader (fp_Column *p)
void setFollower (fp_Column *p)
fp_ColumngetLeader (void) const
fp_ColumngetFollower (void) const
bool containsPageBreak (void) const
void setPage (fp_Page *pPage)
virtual fp_PagegetPage (void) const
UT_sint32 getColumnIndex (void)
UT_sint32 getMaxHeight (void) const
void layout (void)
void collapseEndnotes (void)

Protected Member Functions

UT_uint32 _getBottomOfLastContainer (void) const
void _drawBoundaries (dg_DrawArgs *pDA)

Private Attributes


Constructor & Destructor Documentation

fp_Column::fp_Column ( fl_SectionLayout pSectionLayout  ) 

Create column

pSectionLayout Section layout type used for this container

The section the column is created in specifies the number of column rows. There is always created columns for all rows at the same time. The first (left-most) column is the leader.

I suspect BIDI does not work with multiple columns since the leader would then have to be the right-most column.

fp_Column::~fp_Column (  ) 

Member Function Documentation

UT_uint32 fp_Column::_getBottomOfLastContainer ( void   )  const [protected]
void fp_Column::collapseEndnotes ( void   ) 

This method should be called before a docsection collapse since we can't be sure that the docsection that owns this column also contains the endnote in this column

References fl_EndnoteLayout::collapse(), fp_Container::countCons(), fp_Container::findCon(), fp_ContainerObject::getContainerType(), fp_Container::getNthCon(), fp_ContainerObject::getSectionLayout(), and fp_Container::justRemoveNthCon().

Referenced by fl_DocSectionLayout::collapse().

bool fp_Column::containsPageBreak ( void   )  const
UT_sint32 fp_Column::getMaxHeight ( void   )  const

Get container's max height

Max height

Reimplemented from fp_VerticalContainer.

References fp_Page::getAvailableHeightForColumn(), fp_VerticalContainer::getMaxHeight(), and getPage().

Referenced by fb_ColumnBreaker::_breakSection(), _drawBoundaries(), and layout().

void fp_Column::layout ( void   ) 

Layout lines in the column

This function iterates over the lines in the column and computes their screen position from their accumulative heights in layout units.

Since this code accumulates fractions of the conversion process, the difference between Y positions of two lines may differ from the pre-computed height of the upper line. This is due to simple rounding errors and general lack of precision (screen coordinates are integer while the computation yields fractions).

To make XY/position conversion precise, remove the gaps by updating the line heights. Note that the line heights get updated next time there's a line lookup - so this does not in any way affect layout, only the precision of the XY/position conversion code.

Sevior: I put in the 0.5 to deal with truncation errors and the +1 to deal with the last line.

See also:
fp_Line::setAssignedScreenHeight, fp_Container::recalcHeight

References fp_VerticalContainer::_getMaxContainerHeight(), fp_VerticalContainer::_setMaxContainerHeight(), UT_GenericVector< T >::addItem(), fp_VerticalContainer::addWrappedLine(), fp_ContainerObject::clearScreen(), fp_Line::clearScreen(), fp_VerticalContainer::clearWrappedLines(), fp_Page::columnHeightChanged(), fp_Container::countCons(), fp_Line::getBlock(), fp_ContainerObject::getContainerType(), fp_ContainerObject::getGraphics(), fp_VerticalContainer::getHeight(), fp_TOCContainer::getHeight(), fp_TableContainer::getHeight(), fp_ContainerObject::getHeight(), fp_Line::getHeight(), UT_GenericVector< T >::getItemCount(), fp_Container::getMarginAfter(), getMaxHeight(), fp_Line::getMaxWidth(), fl_DocSectionLayout::getNextDocSection(), fp_Container::getNthCon(), UT_GenericVector< T >::getNthItem(), fp_Page::getOwningSection(), getPage(), fp_Container::getPrev(), fp_VerticalContainer::getWidth(), fp_Line::getWidth(), fp_Line::getX(), fp_ContainerObject::getY(), fp_VerticalContainer::getY(), fp_Line::getY(), fp_Line::isSameYAsPrevious(), fp_Line::isWrapped(), fp_VerticalContainer::m_iRedrawHeight, fp_Container::setAssignedScreenHeight(), fp_Line::setAssignedScreenHeight(), fl_BlockLayout::setFramesOnPage(), fp_VerticalContainer::setHeight(), fl_DocSectionLayout::setNeedsSectionBreak(), fp_ContainerObject::setY(), fp_Line::setY(), UT_ASSERT, UT_DEBUGMSG, UT_SHOULD_NOT_HAPPEN, and xxx_UT_DEBUGMSG.

Referenced by fb_ColumnBreaker::_breakSection(), and FL_DocLayout::insertEndnoteContainer().

void fp_Column::setFollower ( fp_Column p  )  [inline]
void fp_Column::setLeader ( fp_Column p  )  [inline]
void fp_Column::setPage ( fp_Page pPage  ) 

Get page container is located on


References fp_Page::getFillType(), fp_Container::getFillType(), m_pPage, and fg_FillType::setParent().

Referenced by fp_Page::insertColumnLeader(), and fp_Page::removeColumnLeader().

Member Data Documentation

Referenced by setPage().

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