#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 |
| void | setPage (fp_Page *pPage) |
| virtual fp_Page * | getPage (void) const |
| 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 |
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.
| 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 fp_Page::_drawCropMarks(), fp_Page::_reformatAnnotations(), fp_Page::_reformatColumns(), fp_Page::_reformatFootnotes(), fp_Page::breakPage(), fp_Page::draw(), fp_Page::getAvailableHeight(), fp_Page::getAvailableHeightForColumn(), fp_Page::getBottom(), fp_Page::getFilledHeight(), fp_Page::insertColumnLeader(), fp_Page::redrawDamagedFrames(), fp_Page::removeColumnLeader(), and fp_Page::updateColumnX().
| void fp_Column::setLeader | ( | fp_Column * | p | ) | [inline] |
Referenced by fl_DocSectionLayout::getNewContainer().
| void fp_Column::setFollower | ( | fp_Column * | p | ) | [inline] |
Referenced by fl_DocSectionLayout::getNewContainer().
| fp_Column* fp_Column::getLeader | ( | void | ) | const [inline] |
Referenced by _drawBoundaries(), FV_View::_moveInsPtNextPrevLine(), fl_HdrFtrSectionLayout::changeIntoHdrFtrSection(), fl_DocSectionLayout::collapse(), fp_Page::columnHeightChanged(), fl_DocSectionLayout::deleteEmptyColumns(), fp_Page::getAvailableHeightForColumn(), FV_View::getTopRulerInfo(), and FV_View::notifyListeners().
| fp_Column* fp_Column::getFollower | ( | void | ) | const [inline] |
Referenced by _drawBoundaries(), fp_Page::_reformatColumns(), fp_Page::breakPage(), fb_ColumnBreaker::breakSection(), 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().
| 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().
| virtual fp_Page* fp_Column::getPage | ( | void | ) | const [inline, virtual] |
Reimplemented from fp_Container.
Referenced by _drawBoundaries(), fl_HdrFtrSectionLayout::addValidPages(), fb_ColumnBreaker::breakSection(), fl_HdrFtrSectionLayout::changeIntoHdrFtrSection(), FV_View::cmdInsertPositionedGraphic(), fl_DocSectionLayout::collapse(), fl_DocSectionLayout::deleteEmptyColumns(), getMaxHeight(), fl_DocSectionLayout::getNewContainer(), fp_VerticalContainer::getOffsets(), fp_TableContainer::getPage(), fp_VerticalContainer::getScreenOffsets(), fp_CellContainer::getScreenPositions(), and layout().
| 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 _drawBoundaries(), and fb_ColumnBreaker::breakSection().
| 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_CONTAINER_ANNOTATION, FP_CONTAINER_FOOTNOTE, FP_CONTAINER_LINE, FP_CONTAINER_TABLE, FP_CONTAINER_TOC, fp_Line::getBlock(), fp_ContainerObject::getContainerType(), fp_ContainerObject::getGraphics(), fp_VerticalContainer::getHeight(), fp_Line::getHeight(), fp_TOCContainer::getHeight(), fp_TableContainer::getHeight(), fp_ContainerObject::getHeight(), UT_GenericVector< T >::getItemCount(), fp_Container::getMarginAfter(), fp_Line::getMaxWidth(), fl_DocSectionLayout::getNextDocSection(), fp_Container::getNthCon(), UT_GenericVector< T >::getNthItem(), fp_Page::getOwningSection(), getPage(), fp_Container::getPrev(), 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, and xxx_UT_DEBUGMSG.
Referenced by fb_ColumnBreaker::breakSection(), and FL_DocLayout::insertEndnoteContainer().
| 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_CONTAINER_ENDNOTE, fp_ContainerObject::getContainerType(), fp_Container::getNthCon(), fp_ContainerObject::getSectionLayout(), and fp_Container::justRemoveNthCon().
Referenced by fl_DocSectionLayout::collapse().
| UT_uint32 fp_Column::_getBottomOfLastContainer | ( | void | ) | const [protected] |
| void fp_Column::_drawBoundaries | ( | dg_DrawArgs * | pDA | ) | [protected, virtual] |
Draw column outline
| pDA | Draw arguments |
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.
fp_Column* fp_Column::m_pLeader [private] |
fp_Column* fp_Column::m_pFollower [private] |
fp_Page* fp_Column::m_pPage [private] |
Referenced by setPage().
1.5.5