#include <fb_ColumnBreaker.h>
Public Member Functions | |
fb_ColumnBreaker (fl_DocSectionLayout *pDSL) | |
virtual | ~fb_ColumnBreaker (void) |
UT_sint32 | breakSection (void) |
void | setStartPage (fp_Page *pPage) |
fp_Page * | getStartPage (void) |
fp_Page * | needsRebreak (void) |
Private Member Functions | |
fp_Page * | _getLastValidPage (void) |
UT_sint32 | _breakSection (fp_Page *pStartPage) |
bool | _checkVBreakableContainer (fp_Container *pContainer, UT_sint32 iAvail) |
fp_Container * | _getNext (fp_Container *pCon) |
bool | _displayAnnotations (void) |
Private Attributes | |
fp_Page * | m_pStartPage |
bool | m_bStartFromStart |
bool | m_bReBreak |
fl_DocSectionLayout * | m_pDocSec |
fl_BlockLayout * | m_pCurrentBlock |
fb_ColumnBreaker::fb_ColumnBreaker | ( | fl_DocSectionLayout * | pDSL | ) |
virtual fb_ColumnBreaker::~fb_ColumnBreaker | ( | void | ) | [inline, virtual] |
References _checkVBreakableContainer(), _displayAnnotations(), _getNext(), fp_VerticalContainer::addContainer(), breakSection(), fp_VerticalContainer::bumpContainers(), fp_TableContainer::containsAnnotations(), fp_Line::containsAnnotations(), fp_TableContainer::containsFootnoteReference(), fp_Line::containsFootnoteReference(), fp_Line::containsForcedColumnBreak(), fp_Line::containsForcedPageBreak(), fp_Column::containsPageBreak(), fp_Container::countCons(), fp_Container::findCon(), fp_Page::findFrameContainer(), FL_DocLayout::findPage(), FP_CONTAINER_FOOTNOTE, FP_CONTAINER_LINE, FP_CONTAINER_TABLE, fl_DocSectionLayout::getActualColumnHeight(), fp_TableContainer::getAnnotationContainers(), fp_Line::getAnnotationContainers(), fp_Container::getColumn(), fp_Container::getContainer(), fp_ContainerObject::getContainerString(), fl_ContainerLayout::getContainerType(), fp_ContainerObject::getContainerType(), fl_SectionLayout::getDocLayout(), fp_Column::getDocSectionLayout(), fl_ContainerLayout::getDocSectionLayout(), fp_ContainerObject::getDocSectionLayout(), fp_TableContainer::getFirstBrokenTable(), fp_VerticalContainer::getFirstContainer(), fl_DocSectionLayout::getFirstContainer(), fl_ContainerLayout::getFirstContainer(), fl_ContainerLayout::getFirstLayout(), fp_Column::getFollower(), fp_TableContainer::getFootnoteContainers(), fp_Line::getFootnoteContainers(), fp_Line::getHeight(), fp_ContainerObject::getHeight(), fp_VerticalContainer::getHeight(), UT_GenericVector< T >::getItemCount(), fp_VerticalContainer::getLastContainer(), fl_DocSectionLayout::getLastContainer(), fp_Container::getMarginAfter(), fp_Column::getMaxHeight(), fl_DocSectionLayout::getNewContainer(), fp_Container::getNext(), fl_ContainerLayout::getNext(), fp_ContainerObject::getNextContainerInSection(), fp_Page::getNthColumnLeader(), UT_GenericVector< T >::getNthItem(), fp_AnnotationContainer::getPage(), fp_FootnoteContainer::getPage(), fp_Container::getPage(), fp_Column::getPage(), fp_Container::getPrev(), fp_ContainerObject::getPrevContainerInSection(), fl_BlockLayout::getProp_KeepTogether(), fl_BlockLayout::getProp_Orphans(), fl_BlockLayout::getProp_Widows(), FL_DocLayout::getRebuiltBlock(), FL_DocLayout::getSavedContainerPointer(), fp_ContainerObject::getSectionLayout(), fp_Page::insertAnnotationContainer(), fp_Container::insertConAt(), fp_Page::insertFootnoteContainer(), fp_Page::insertFrameContainer(), fp_Line::isSameYAsPrevious(), fp_TableContainer::isThisBroken(), fp_ContainerObject::isVBreakable(), fp_Column::layout(), m_bReBreak, m_bStartFromStart, m_pDocSec, m_pStartPage, fp_Page::removeAnnotationContainer(), fp_VerticalContainer::removeContainer(), fp_Page::removeFootnoteContainer(), fp_Page::removeFrameContainer(), fp_ContainerObject::setAllowDelete(), fp_Container::setContainer(), FL_DocLayout::setFramePageNumbers(), FL_DocLayout::setSaveContainerPointer(), fp_TableContainer::sumFootnoteHeight(), fp_Page::updatePageForWrapping(), UT_ASSERT, UT_ASSERT_HARMLESS, UT_DEBUGMSG, UT_SHOULD_NOT_HAPPEN, UT_UNUSED, and xxx_UT_DEBUGMSG.
Referenced by breakSection().
bool fb_ColumnBreaker::_checkVBreakableContainer | ( | fp_Container * | pContainer, | |
UT_sint32 | iAvail | |||
) | [private] |
References fp_VerticalContainer::deleteBrokenAfter(), FP_TABLE_MIN_BROKEN_HEIGHT, fp_ContainerObject::getContainerType(), fp_VerticalContainer::getFirstBrokenContainer(), fp_ContainerObject::getHeight(), fp_VerticalContainer::getHeight(), fp_VerticalContainer::getLastWantedVBreak(), fp_Container::getNext(), fp_VerticalContainer::setLastWantedVBreak(), UT_ASSERT, UT_ASSERT_HARMLESS, UT_DEBUGMSG, UT_SHOULD_NOT_HAPPEN, fp_VerticalContainer::VBreakAt(), fp_VerticalContainer::wantVBreakAt(), and xxx_UT_DEBUGMSG.
Referenced by _breakSection().
bool fb_ColumnBreaker::_displayAnnotations | ( | void | ) | [private] |
Returns true if Annotations are to be display
References FL_DocLayout::displayAnnotations(), fl_SectionLayout::getDocLayout(), and m_pDocSec.
Referenced by _breakSection().
fp_Page * fb_ColumnBreaker::_getLastValidPage | ( | void | ) | [private] |
References FL_DocLayout::countPages(), fl_SectionLayout::getDocLayout(), FL_DocLayout::getNthPage(), fp_Page::getOwningSection(), and m_pDocSec.
Referenced by needsRebreak().
fp_Container * fb_ColumnBreaker::_getNext | ( | fp_Container * | pCon | ) | [private] |
References fp_ContainerObject::getContainerType(), fp_ContainerObject::getDocSectionLayout(), fl_DocSectionLayout::getFirstEndnoteContainer(), fp_Container::getNext(), fp_ContainerObject::getNextContainerInSection(), m_pDocSec, UT_ASSERT, UT_return_val_if_fail, and xxx_UT_DEBUGMSG.
Referenced by _breakSection().
UT_sint32 fb_ColumnBreaker::breakSection | ( | void | ) |
Layout sections on pages
This is the function that controls how sections and thereby columns, blocks, and lines are laid out on the pages. Doing so it refers to the various layout configurations such as orphan/widow controls and break Runs embedded in the text. At the eof the break we check to see that that all the text has been layed out. If it hasn't we rebreak from invalid page forward. FIXME we should try to detect the error in the code rather than rebreak.
References _breakSection(), fp_Page::countFootnoteContainers(), FL_DocLayout::deleteEmptyColumnsAndPages(), FL_DocLayout::findPage(), fp_Page::getAvailableHeight(), fl_SectionLayout::getDocLayout(), fp_Page::getNthFootnoteContainer(), fp_Page::getPrev(), m_bStartFromStart, m_pDocSec, m_pStartPage, needsRebreak(), fp_Page::removeFootnoteContainer(), fl_DocSectionLayout::setNeedsSectionBreak(), and UT_DEBUGMSG.
Referenced by _breakSection(), fl_DocSectionLayout::completeBreakSection(), fl_DocSectionLayout::format(), fl_DocSectionLayout::redrawUpdate(), and fl_DocSectionLayout::updateLayout().
fp_Page* fb_ColumnBreaker::getStartPage | ( | void | ) | [inline] |
Referenced by fl_DocSectionLayout::collapse(), and fl_DocSectionLayout::setNeedsSectionBreak().
fp_Page * fb_ColumnBreaker::needsRebreak | ( | void | ) |
Returns NULL if no rebreak is required. Otherwise returns a pointer to the page requiring the rebreak.
References _getLastValidPage(), fl_DocSectionLayout::getActualColumnHeight(), fl_ContainerLayout::getContainerType(), fp_VerticalContainer::getHeight(), fl_ContainerLayout::getLastContainer(), fl_ContainerLayout::getLastLayout(), fp_Page::getNthColumnLeader(), fp_Line::getPage(), fl_ContainerLayout::getPrevBlockInDocument(), fp_Line::getY(), and m_pDocSec.
Referenced by breakSection().
void fb_ColumnBreaker::setStartPage | ( | fp_Page * | pPage | ) |
bool fb_ColumnBreaker::m_bReBreak [private] |
Referenced by _breakSection().
bool fb_ColumnBreaker::m_bStartFromStart [private] |
Referenced by _breakSection(), breakSection(), and setStartPage().
fl_BlockLayout* fb_ColumnBreaker::m_pCurrentBlock [private] |
fl_DocSectionLayout* fb_ColumnBreaker::m_pDocSec [private] |
Referenced by _breakSection(), _displayAnnotations(), _getLastValidPage(), _getNext(), breakSection(), needsRebreak(), and setStartPage().
fp_Page* fb_ColumnBreaker::m_pStartPage [private] |
Referenced by _breakSection(), breakSection(), and setStartPage().