#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 | _isThisBroken (fp_Container *pCon) |
| void | _setLastWantedVBreak (fp_Container *pCon, UT_sint32 iBreakAt) |
| UT_sint32 | _getLastWantedVBreak (fp_Container *pCon) |
| bool | _breakCON (fp_Container *&pOffendingContainer, fp_Container *&pLastContainerToKeep, int iMaxColHeight, int iWorkingColHeight, int iContainerMarginAfter) |
| bool | _breakTable (fp_Container *&pOffendingContainer, fp_Container *&pLastContainerToKeep, int iMaxColHeight, int iWorkingColHeight, int iContainerMarginAfter) |
| bool | _breakTOC (fp_Container *&pOffendingContainer, fp_Container *&pLastContainerToKeep, int iMaxColHeight, int iWorkingColHeight, int iContainerMarginAfter) |
| 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] |
| bool fb_ColumnBreaker::_breakCON | ( | fp_Container *& | pOffendingContainer, | |
| fp_Container *& | pLastContainerToKeep, | |||
| int | iMaxColHeight, | |||
| int | iWorkingColHeight, | |||
| int | iContainerMarginAfter | |||
| ) | [private] |
Breaks the given breakabke container, if appropriate.
References _breakTable(), _breakTOC(), and fp_ContainerObject::getContainerType().
Referenced by _breakSection().
References _breakCON(), _displayAnnotations(), _getLastWantedVBreak(), _getNext(), _isThisBroken(), _setLastWantedVBreak(), fp_VerticalContainer::addContainer(), breakSection(), fp_VerticalContainer::bumpContainers(), fl_DocSectionLayout::completeBreakSection(), 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, FP_CONTAINER_TOC, 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_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(), fl_DocSectionLayout::getNextDocSection(), fp_Page::getNthColumnLeader(), UT_GenericVector< T >::getNthItem(), fp_AnnotationContainer::getPage(), fp_FootnoteContainer::getPage(), fp_Container::getPage(), fp_Column::getPage(), fp_Container::getPrev(), fp_TableContainer::getPrevContainerInSection(), 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, fl_DocSectionLayout::needsSectionBreak(), fp_Page::removeAnnotationContainer(), fp_VerticalContainer::removeContainer(), fp_Page::removeFootnoteContainer(), fp_Page::removeFrameContainer(), fp_ContainerObject::setAllowDelete(), fp_Container::setContainer(), FL_DocLayout::setFramePageNumbers(), fp_VerticalContainer::setHeight(), FL_DocLayout::setSaveContainerPointer(), fp_Page::updatePageForWrapping(), UT_ASSERT, UT_ASSERT_HARMLESS, UT_DEBUGMSG, UT_SHOULD_NOT_HAPPEN, UT_UNUSED, fp_ContainerObject::VBreakAt(), fp_ContainerObject::wantVBreakAt(), and xxx_UT_DEBUGMSG.
Referenced by breakSection().
| bool fb_ColumnBreaker::_breakTable | ( | fp_Container *& | pOffendingContainer, | |
| fp_Container *& | pLastContainerToKeep, | |||
| int | iMaxColHeight, | |||
| int | iWorkingColHeight, | |||
| int | iContainerMarginAfter | |||
| ) | [private] |
Breaks the given table, if appropriate.
References fp_TableContainer::deleteBrokenTables(), fp_ContainerObject::getContainerType(), fp_TableContainer::getFirstBrokenTable(), fp_ContainerObject::getHeight(), fp_TableContainer::getHeight(), fp_TableContainer::getLastBrokenTable(), fp_Container::getNext(), fp_TableContainer::getPrevContainerInSection(), fp_VerticalContainer::getY(), fp_TableContainer::isThisBroken(), fp_TableContainer::setLastWantedVBreak(), UT_ASSERT, fp_TableContainer::VBreakAt(), fp_TableContainer::wantVBreakAt(), and xxx_UT_DEBUGMSG.
Referenced by _breakCON().
| bool fb_ColumnBreaker::_breakTOC | ( | fp_Container *& | pOffendingContainer, | |
| fp_Container *& | pLastContainerToKeep, | |||
| int | iMaxColHeight, | |||
| int | iWorkingColHeight, | |||
| int | iContainerMarginAfter | |||
| ) | [private] |
Breaks the given TOC, if appropriate.
References fp_TOCContainer::deleteBrokenTOCs(), fp_ContainerObject::getContainerType(), fp_TOCContainer::getFirstBrokenTOC(), fp_TOCContainer::getHeight(), fp_TOCContainer::getLastBrokenTOC(), fp_Container::getNext(), fp_VerticalContainer::getY(), fp_TOCContainer::isThisBroken(), fp_TOCContainer::setLastWantedVBreak(), UT_ASSERT, UT_DEBUGMSG, UT_UNUSED, fp_TOCContainer::VBreakAt(), fp_TOCContainer::wantVBreakAt(), and xxx_UT_DEBUGMSG.
Referenced by _breakCON().
| 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().
| UT_sint32 fb_ColumnBreaker::_getLastWantedVBreak | ( | fp_Container * | pCon | ) | [private] |
References fp_ContainerObject::getContainerType(), and fp_TOCContainer::getLastWantedVBreak().
Referenced by _breakSection().
| 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().
| bool fb_ColumnBreaker::_isThisBroken | ( | fp_Container * | pCon | ) | [private] |
References fp_ContainerObject::getContainerType().
Referenced by _breakSection().
| void fb_ColumnBreaker::_setLastWantedVBreak | ( | fp_Container * | pCon, | |
| UT_sint32 | iBreakAt | |||
| ) | [private] |
References fp_ContainerObject::getContainerType().
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().
1.7.1