#include <fp_Column.h>
Public Member Functions | |
fp_Column (fl_SectionLayout *pSectionLayout) | |
~fp_Column () | |
fl_DocSectionLayout * | getDocSectionLayout (void) const |
void | setLeader (fp_Column *p) |
void | setFollower (fp_Column *p) |
fp_Column * | getLeader (void) const |
fp_Column * | getFollower (void) const |
bool | containsPageBreak (void) const |
void | setPage (fp_Page *pPage) |
virtual fp_Page * | getPage (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 | |
fp_Column * | m_pLeader |
fp_Column * | m_pFollower |
fp_Page * | m_pPage |
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 | ( | ) |
References fp_Container::countCons(), and xxx_UT_DEBUGMSG.
void fp_Column::_drawBoundaries | ( | dg_DrawArgs * | pDA | ) | [protected, virtual] |
Draw column outline
pDA | Draw arguments |
This differs from the container function in that it will use draw the outline based on the tallest column in the row.
Reimplemented from fp_VerticalContainer.
References GR_Graphics::CAP_PROJECTING, GR_Graphics::DGP_SCREEN, GR_Painter::drawLine(), fp_Page::getDocLayout(), getFollower(), fp_ContainerObject::getGraphics(), fp_VerticalContainer::getHeight(), getLeader(), getMaxHeight(), getPage(), FV_View::getShowPara(), fp_VerticalContainer::getView(), FL_DocLayout::getView(), fp_VerticalContainer::getWidth(), GR_Graphics::JOIN_MITER, GR_Graphics::LINE_SOLID, dg_DrawArgs::pG, GR_Graphics::queryProperties(), GR_Graphics::setColor(), GR_Graphics::setLineProperties(), GR_Graphics::tlu(), dg_DrawArgs::xoff, and dg_DrawArgs::yoff.
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 |
Returns true of the column contains a page break.
References fp_Line::containsForcedPageBreak(), fp_ContainerObject::getContainerType(), and fp_VerticalContainer::getLastContainer().
Referenced by fb_ColumnBreaker::_breakSection(), and fp_Page::containsPageBreak().
UT_sint32 fp_Column::getColumnIndex | ( | void | ) |
fl_DocSectionLayout * fp_Column::getDocSectionLayout | ( | void | ) | const |
References FL_SECTION_DOC, FL_SECTION_ENDNOTE, FL_SECTION_HDRFTR, fp_ContainerObject::getSectionLayout(), and UT_ASSERT.
Referenced by fb_ColumnBreaker::_breakSection(), fp_Page::_drawCropMarks(), fp_Page::_reformatAnnotations(), fp_Page::_reformatColumns(), fp_Page::_reformatFootnotes(), fp_Page::breakPage(), fp_Page::draw(), fp_Page::getAvailableHeightForColumn(), fp_Page::getBottom(), getColumnIndex(), fp_Page::getFilledHeight(), fl_DocSectionLayout::getNewContainer(), fp_Page::getNthColumn(), fp_Page::insertColumnLeader(), fp_Page::redrawDamagedFrames(), fp_Page::removeColumnLeader(), fl_BlockLayout::setFramesOnPage(), and fp_Page::updateColumnX().
fp_Column* fp_Column::getFollower | ( | void | ) | const [inline] |
Referenced by fb_ColumnBreaker::_breakSection(), _drawBoundaries(), fp_Page::_reformatColumns(), fp_Page::breakPage(), fp_Page::containsPageBreak(), fl_DocSectionLayout::deleteEmptyColumns(), fp_Page::draw(), fp_Page::getAllLayouts(), fp_Page::getAvailableHeightForColumn(), fp_FrameContainer::getBlocksAroundFrame(), fp_Page::getContainingTable(), fp_Page::getFilledHeight(), fl_DocSectionLayout::getNewContainer(), FV_View::getTopRulerInfo(), fp_Page::insertColumnLeader(), fp_Page::mapXYToPosition(), fp_Page::markDirtyOverlappingRuns(), FV_View::notifyListeners(), fp_Page::removeColumnLeader(), fp_Page::updateColumnX(), and fp_Page::updatePageForWrapping().
fp_Column* fp_Column::getLeader | ( | void | ) | const [inline] |
UT_sint32 fp_Column::getMaxHeight | ( | void | ) | const |
Get container's max height
Reimplemented from fp_VerticalContainer.
References fp_Page::getAvailableHeightForColumn(), fp_VerticalContainer::getMaxHeight(), and getPage().
Referenced by fb_ColumnBreaker::_breakSection(), _drawBoundaries(), and layout().
virtual fp_Page* fp_Column::getPage | ( | void | ) | const [inline, virtual] |
Reimplemented from fp_Container.
Referenced by fb_ColumnBreaker::_breakSection(), _drawBoundaries(), fl_HdrFtrSectionLayout::addValidPages(), FV_View::cmdInsertPositionedGraphic(), fl_DocSectionLayout::collapse(), fl_DocSectionLayout::deleteEmptyColumns(), getColumnIndex(), getMaxHeight(), fl_DocSectionLayout::getNewContainer(), fp_TableContainer::getPage(), fp_CellContainer::getScreenPositions(), 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.
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] |
Referenced by fl_DocSectionLayout::getNewContainer().
void fp_Column::setLeader | ( | fp_Column * | p | ) | [inline] |
Referenced by fl_DocSectionLayout::getNewContainer().
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().
fp_Column* fp_Column::m_pFollower [private] |
fp_Column* fp_Column::m_pLeader [private] |
fp_Page* fp_Column::m_pPage [private] |
Referenced by setPage().