#include <fl_DocListener.h>
The fl_DocListener class handles notifications from a PD_Document to its associated FL_DocLayout.
fl_DocListener::fl_DocListener | ( | PD_Document * | doc, | |
FL_DocLayout * | pLayout | |||
) |
Create DocListener
doc | Client of this DocListener | |
pLayout | Layout notified by this DocListener |
References GR_Graphics::DGP_SCREEN, FL_DocLayout::getGraphics(), AV_View::getParentData(), FL_DocLayout::getView(), m_bCacheChanges, m_bEndFootnoteProcessedInBlock, m_bFootnoteInProgress, m_bScreen, m_chgMaskCached, m_iFilled, m_iGlobCounter, m_pCurrentSL, m_pDoc, m_pLayout, m_pStatusBar, m_sLastContainerLayout, UT_Stack::push(), and GR_Graphics::queryProperties().
fl_DocListener::~fl_DocListener | ( | ) | [virtual] |
Destruct DocListener
References UT_Stack::getDepth(), m_sLastContainerLayout, and UT_ASSERT.
bool fl_DocListener::change | ( | fl_ContainerLayout * | sfh, | |
const PX_ChangeRecord * | pcr | |||
) | [virtual] |
Change a strux or span.
Implements PL_Listener.
References FV_View::_setPoint(), FV_View::addCaret(), FL_DocLayout::addHdrFtrSection(), AV_CHG_FMTBLOCK, AV_CHG_HDRFTR, AV_CHG_NONE, fl_SectionLayout::bl_doclistener_changeFmtMark(), fl_HdrFtrSectionLayout::bl_doclistener_changeFmtMark(), fl_SectionLayout::bl_doclistener_changeObject(), fl_HdrFtrSectionLayout::bl_doclistener_changeObject(), fl_SectionLayout::bl_doclistener_changeSpan(), fl_HdrFtrSectionLayout::bl_doclistener_changeSpan(), fl_SectionLayout::bl_doclistener_changeStrux(), fl_HdrFtrSectionLayout::bl_doclistener_changeStrux(), fl_SectionLayout::bl_doclistener_deleteFmtMark(), fl_HdrFtrSectionLayout::bl_doclistener_deleteFmtMark(), fl_SectionLayout::bl_doclistener_deleteObject(), fl_HdrFtrSectionLayout::bl_doclistener_deleteObject(), fl_SectionLayout::bl_doclistener_deleteSpan(), fl_HdrFtrSectionLayout::bl_doclistener_deleteSpan(), fl_SectionLayout::bl_doclistener_deleteStrux(), fl_HdrFtrSectionLayout::bl_doclistener_deleteStrux(), fl_SectionLayout::bl_doclistener_insertFmtMark(), fl_HdrFtrSectionLayout::bl_doclistener_insertFmtMark(), fl_SectionLayout::bl_doclistener_insertObject(), fl_HdrFtrSectionLayout::bl_doclistener_insertObject(), fl_SectionLayout::bl_doclistener_insertSpan(), fl_HdrFtrSectionLayout::bl_doclistener_insertSpan(), FL_DocLayout::changeDocSections(), fl_HdrFtrSectionLayout::changeIntoHdrFtrSection(), fl_TOCLayout::doclistener_changeStrux(), fl_FrameLayout::doclistener_changeStrux(), fl_CellLayout::doclistener_changeStrux(), fl_TableLayout::doclistener_changeStrux(), fl_DocSectionLayout::doclistener_changeStrux(), fl_BlockLayout::findRunAtOffset(), FL_DocLayout::findSectionForHdrFtr(), FL_HDRFTR_NONE, fl_HdrFtrSectionLayout::format(), gchar, PP_AttrProp::getAttribute(), PD_Document::getAttrProp(), PX_ChangeRecord_Object::getBlockOffset(), fl_ContainerLayout::getContainerType(), FL_DocLayout::getDocument(), PX_ChangeRecord_Glob::getFlags(), fl_ContainerLayout::getHdrFtrSectionLayout(), PX_ChangeRecord::getIndexAP(), getLayout(), fp_BookmarkRun::getName(), PX_ChangeRecord_Object::getObjectType(), PX_ChangeRecord::getPosition(), PP_AttrProp::getProperty(), fl_ContainerLayout::getSectionLayout(), fl_BlockLayout::getSectionLayout(), fl_Layout::getStruxDocHandle(), PX_ChangeRecord_Strux::getStruxType(), fp_Run::getType(), fl_SectionLayout::getType(), fl_Layout::getType(), PX_ChangeRecord::getType(), fl_BlockLayout::getView(), FL_DocLayout::getView(), AV_View::incTick(), FV_View::isActive(), fl_ContainerLayout::isCollapsed(), PX_ChangeRecord_StruxChange::isRevisionDelete(), fp_BookmarkRun::isStartOfBookmark(), m_bCacheChanges, m_chgMaskCached, m_iGlobCounter, m_pDoc, m_pLayout, PD_Document::miniDump(), FV_View::notifyListeners(), PT_DOCPROP_ATTRIBUTE_NAME, PTX_Block, PTX_EndAnnotation, PTX_EndCell, PTX_EndEndnote, PTX_EndFootnote, PTX_EndFrame, PTX_EndTable, PTX_EndTOC, PTX_Section, PTX_SectionAnnotation, PTX_SectionCell, PTX_SectionEndnote, PTX_SectionFootnote, PTX_SectionFrame, PTX_SectionHdrFtr, PTX_SectionTable, PTX_SectionTOC, PX_ChangeRecord_Glob::PXF_MultiStepEnd, PX_ChangeRecord_Glob::PXF_MultiStepStart, PX_ChangeRecord_Glob::PXF_Null, PX_ChangeRecord_Glob::PXF_UserAtomicEnd, PX_ChangeRecord_Glob::PXF_UserAtomicStart, PX_ChangeRecord::PXT_ChangeDocProp, PX_ChangeRecord::PXT_ChangeFmtMark, PX_ChangeRecord::PXT_ChangeObject, PX_ChangeRecord::PXT_ChangePoint, PX_ChangeRecord::PXT_ChangeSpan, PX_ChangeRecord::PXT_ChangeStrux, PX_ChangeRecord::PXT_CreateDataItem, PX_ChangeRecord::PXT_DeleteFmtMark, PX_ChangeRecord::PXT_DeleteObject, PX_ChangeRecord::PXT_DeleteSpan, PX_ChangeRecord::PXT_DeleteStrux, PX_ChangeRecord::PXT_GlobMarker, PX_ChangeRecord::PXT_InsertFmtMark, PX_ChangeRecord::PXT_InsertObject, PX_ChangeRecord::PXT_InsertSpan, PX_ChangeRecord::PXT_InsertStrux, PX_ChangeRecord::PXT_ListUpdate, PX_ChangeRecord::PXT_RemoveList, PX_ChangeRecord::PXT_StopList, PX_ChangeRecord::PXT_UpdateField, PX_ChangeRecord::PXT_UpdateLayout, FL_DocLayout::refreshRunProperties(), s_convertToHdrFtrType(), fl_Layout::setAttrPropIndex(), fl_HdrFtrSectionLayout::setDocSectionLayout(), FL_DocLayout::setDocViewPageSize(), fl_HdrFtrSectionLayout::setHdrFtr(), fl_DocSectionLayout::setHdrFtr(), FL_DocLayout::setNeedsRedraw(), FL_DocLayout::updateLayout(), FV_View::updateScreen(), FL_DocLayout::updateTOCsOnBookmarkChange(), UT_ASSERT, UT_ASSERT_HARMLESS, UT_DEBUGMSG, UT_return_val_if_fail, UT_SHOULD_NOT_HAPPEN, UT_WARNINGMSG, and xxx_UT_DEBUGMSG.
void fl_DocListener::deferNotifications | ( | void | ) | [virtual] |
Reimplemented from PL_Listener.
References m_bCacheChanges, and m_chgMaskCached.
const FL_DocLayout* fl_DocListener::getLayout | ( | ) | const [inline] |
fl_ContainerLayout * fl_DocListener::getTopContainerLayout | ( | void | ) | [private] |
View the topmost containerLayout on the stack.
References m_sLastContainerLayout, and UT_Stack::viewTop().
Referenced by populateStrux().
virtual PLListenerType fl_DocListener::getType | ( | void | ) | const [inline, virtual] |
Reimplemented from PL_Listener.
bool fl_DocListener::holdTableLayout | ( | void | ) | [inline] |
Referenced by populateStrux().
bool fl_DocListener::insertStrux | ( | fl_ContainerLayout * | sfh, | |
const PX_ChangeRecord * | pcr, | |||
pf_Frag_Strux * | sdh, | |||
PL_ListenerId | lid, | |||
void(*)(pf_Frag_Strux *sdhNew, PL_ListenerId lid, fl_ContainerLayout *sfhNew) | pfnBindHandles | |||
) | [virtual] |
Implements PL_Listener.
References fl_TableLayout::bl_doclistener_insertBlock(), fl_HdrFtrSectionLayout::bl_doclistener_insertBlock(), fl_SectionLayout::bl_doclistener_insertBlock(), fl_TableLayout::bl_doclistener_insertCell(), fl_CellLayout::bl_doclistener_insertEndCell(), fl_EmbedLayout::bl_doclistener_insertEndEmbed(), fl_FrameLayout::bl_doclistener_insertEndFrame(), fl_TOCLayout::bl_doclistener_insertEndTOC(), fl_SectionLayout::bl_doclistener_insertFrame(), fl_SectionLayout::bl_doclistener_insertSection(), fl_TableLayout::bl_doclistener_insertTable(), fl_SectionLayout::bl_doclistener_insertTable(), FL_SECTION_ANNOTATION, FL_SECTION_DOC, FL_SECTION_ENDNOTE, FL_SECTION_FOOTNOTE, FL_SECTION_FRAME, FL_SECTION_HDRFTR, FL_SECTION_TABLE, FL_SECTION_TOC, fl_ContainerLayout::getContainerType(), fl_ContainerLayout::getHdrFtrSectionLayout(), PX_ChangeRecord::getPosition(), fl_ContainerLayout::getPrev(), fl_ContainerLayout::getSectionLayout(), fl_Layout::getStruxDocHandle(), fl_SectionLayout::getType(), fl_Layout::getType(), PX_ChangeRecord::getType(), m_pCurrentSL, m_pDoc, PD_Document::miniDump(), fl_ContainerLayout::myContainingLayout(), PTX_Block, PTX_EndAnnotation, PTX_EndCell, PTX_EndEndnote, PTX_EndFootnote, PTX_EndFrame, PTX_EndTable, PTX_EndTOC, PTX_Section, PTX_SectionAnnotation, PTX_SectionCell, PTX_SectionEndnote, PTX_SectionFootnote, PTX_SectionFrame, PTX_SectionHdrFtr, PTX_SectionTable, PTX_SectionTOC, UT_ASSERT, UT_DEBUGMSG, UT_return_val_if_fail, UT_SHOULD_NOT_HAPPEN, and xxx_UT_DEBUGMSG.
fl_ContainerLayout * fl_DocListener::popContainerLayout | ( | void | ) | [private] |
Pop the most recent ContainerLayout off the top of the stack.
References m_sLastContainerLayout, and UT_Stack::pop().
Referenced by populateStrux().
bool fl_DocListener::populate | ( | fl_ContainerLayout * | sfh, | |
const PX_ChangeRecord * | pcr | |||
) | [virtual] |
Implements PL_Listener.
References fl_SectionLayout::bl_doclistener_insertFmtMark(), fl_HdrFtrSectionLayout::bl_doclistener_insertFmtMark(), fl_SectionLayout::bl_doclistener_populateObject(), fl_HdrFtrSectionLayout::bl_doclistener_populateObject(), fl_SectionLayout::bl_doclistener_populateSpan(), fl_HdrFtrSectionLayout::bl_doclistener_populateSpan(), fl_BlockLayout::findRunAtOffset(), FL_SECTION_HDRFTR, PX_ChangeRecord_Object::getBlockOffset(), PX_ChangeRecord_Span::getBlockOffset(), fl_ContainerLayout::getHdrFtrSectionLayout(), PX_ChangeRecord_Span::getLength(), fp_BookmarkRun::getName(), PX_ChangeRecord_Object::getObjectType(), fl_Layout::getStruxDocHandle(), fp_Run::getType(), fl_SectionLayout::getType(), fl_Layout::getType(), PX_ChangeRecord::getType(), fp_BookmarkRun::isStartOfBookmark(), m_iGlobCounter, m_pDoc, m_pLayout, PD_Document::miniDump(), PX_ChangeRecord::PXT_InsertFmtMark, PX_ChangeRecord::PXT_InsertObject, PX_ChangeRecord::PXT_InsertSpan, FL_DocLayout::updateLayout(), FL_DocLayout::updateTOCsOnBookmarkChange(), UT_ASSERT, UT_ASSERT_HARMLESS, UT_DEBUGMSG, UT_return_val_if_fail, and UT_SHOULD_NOT_HAPPEN.
bool fl_DocListener::populateStrux | ( | pf_Frag_Strux * | sdh, | |
const PX_ChangeRecord * | pcr, | |||
fl_ContainerLayout ** | psfh | |||
) | [virtual] |
Implements PL_Listener.
References FL_DocLayout::addHdrFtrSection(), FL_DocLayout::addSection(), fl_ContainerLayout::append(), fl_TableLayout::attachCell(), FL_DocLayout::bgcrGrammar, FL_DocLayout::bgcrSpelling, countStrux, FL_DocLayout::findSectionForHdrFtr(), FL_HDRFTR_NONE, FL_SECTION_HDRFTR, fl_TableLayout::format(), fl_ContainerLayout::format(), fl_DocSectionLayout::format(), FV_DOCPOS_BOD, gchar, XAP_App::getApp(), PP_AttrProp::getAttribute(), PD_Document::getAttrProp(), fl_ContainerLayout::getContainerType(), fl_BlockLayout::getDocSectionLayout(), fl_ContainerLayout::getDocSectionLayout(), FL_DocLayout::getDocSize(), fl_ContainerLayout::getFirstLayout(), FL_DocLayout::getFirstSection(), fl_ContainerLayout::getHdrFtrLayout(), PX_ChangeRecord::getIndexAP(), fl_ContainerLayout::getLastContainer(), XAP_App::getLastFocussedFrame(), FL_DocLayout::getLastSection(), fl_ContainerLayout::getNext(), FV_View::getPoint(), fl_ContainerLayout::getPrev(), fl_ContainerLayout::getSectionLayout(), XAP_App::getStringSet(), getTopContainerLayout(), fl_SectionLayout::getType(), PX_ChangeRecord::getType(), XAP_StringSet::getValue(), FL_DocLayout::getView(), holdTableLayout(), FL_DocLayout::isLayoutFilling(), m_bEndFootnoteProcessedInBlock, m_bFootnoteInProgress, m_bScreen, m_iFilled, m_iGlobCounter, m_pCurrentSL, m_pDoc, m_pLayout, m_pStatusBar, PD_Document::miniDump(), FV_View::moveInsPtTo(), XAP_Frame::nullUpdate(), popContainerLayout(), PTX_Block, PTX_EndAnnotation, PTX_EndCell, PTX_EndEndnote, PTX_EndFootnote, PTX_EndFrame, PTX_EndTable, PTX_EndTOC, PTX_Section, PTX_SectionAnnotation, PTX_SectionCell, PTX_SectionEndnote, PTX_SectionFootnote, PTX_SectionFrame, PTX_SectionHdrFtr, PTX_SectionTable, PTX_SectionTOC, pushContainerLayout(), s_convertToHdrFtrType(), fl_TableLayout::setDirty(), PD_Document::setDontImmediatelyLayout(), fl_Layout::setEndStruxDocHandle(), fl_TableLayout::setEndTableIn(), fl_EmbedLayout::setFootnoteEndIn(), fl_DocSectionLayout::setHdrFtr(), FL_DocLayout::setPercentFilled(), AP_StatusBar::setStatusMessage(), AP_StatusBar::setStatusProgressValue(), fl_BlockLayout::updateEnclosingBlockIfNeeded(), FL_DocLayout::updateLayout(), UT_ASSERT, UT_DEBUGMSG, UT_return_val_if_fail, UT_SHOULD_NOT_HAPPEN, UT_UTF8String_sprintf(), and xxx_UT_DEBUGMSG.
void fl_DocListener::processDeferredNotifications | ( | void | ) | [virtual] |
Reimplemented from PL_Listener.
References AV_CHG_NONE, getLayout(), FL_DocLayout::getView(), fl_BlockLayout::getView(), AV_View::incTick(), m_bCacheChanges, m_chgMaskCached, and FV_View::notifyListeners().
void fl_DocListener::pushContainerLayout | ( | fl_ContainerLayout * | pCL | ) | [private] |
Push the given ContainerLayout onto the top of the stack.
References m_sLastContainerLayout, and UT_Stack::push().
Referenced by populateStrux().
void fl_DocListener::setHoldTableLayout | ( | bool | bHold | ) | [inline] |
Referenced by FL_DocLayout::fillLayouts().
bool fl_DocListener::signal | ( | UT_uint32 | iSignal | ) | [virtual] |
Implements PL_Listener.
References AV_CHG_DIRTY, AV_CHG_FILENAME, FL_DocLayout::formatAll(), FL_DocLayout::getView(), m_pLayout, FL_DocLayout::notifyListeners(), PD_SIGNAL_DOCCLOSED, PD_SIGNAL_DOCDIRTY_CHANGED, PD_SIGNAL_DOCNAME_CHANGED, PD_SIGNAL_DOCPROPS_CHANGED_NO_REBUILD, PD_SIGNAL_DOCPROPS_CHANGED_REBUILD, PD_SIGNAL_REFORMAT_LAYOUT, PD_SIGNAL_REVISION_MODE_CHANGED, PD_SIGNAL_SAVEDOC, PD_SIGNAL_UPDATE_LAYOUT, FL_DocLayout::updateLayout(), FL_DocLayout::updatePropsNoRebuild(), FL_DocLayout::updatePropsRebuild(), FV_View::updateRevisionMode(), FV_View::updateScreen(), UT_ASSERT, and UT_SHOULD_NOT_HAPPEN.
bool fl_DocListener::m_bCacheChanges [private] |
Referenced by change(), deferNotifications(), fl_DocListener(), and processDeferredNotifications().
bool fl_DocListener::m_bEndFootnoteProcessedInBlock [private] |
Referenced by fl_DocListener(), and populateStrux().
bool fl_DocListener::m_bFootnoteInProgress [private] |
Referenced by fl_DocListener(), and populateStrux().
bool fl_DocListener::m_bHoldTableLayout [private] |
bool fl_DocListener::m_bScreen [private] |
Set when the document is drawn on screen.
Referenced by fl_DocListener(), and populateStrux().
AV_ChangeMask fl_DocListener::m_chgMaskCached [private] |
Referenced by change(), deferNotifications(), fl_DocListener(), and processDeferredNotifications().
UT_sint32 fl_DocListener::m_iFilled [private] |
Referenced by fl_DocListener(), and populateStrux().
UT_uint32 fl_DocListener::m_iGlobCounter [private] |
Counter used to keep track of when to update the Layout.
In case of multi-step changes, updating is suspended.
Referenced by change(), fl_DocListener(), populate(), and populateStrux().
fl_SectionLayout* fl_DocListener::m_pCurrentSL [private] |
SectionLayout currently being constructed (multi-step change related?!?).
Referenced by fl_DocListener(), insertStrux(), and populateStrux().
PD_Document* fl_DocListener::m_pDoc [private] |
Document which is client of this DocListener.
Referenced by change(), fl_DocListener(), insertStrux(), populate(), and populateStrux().
FL_DocLayout* fl_DocListener::m_pLayout [private] |
The Layout notified by this DocListener.
Referenced by change(), fl_DocListener(), populate(), populateStrux(), and signal().
AP_StatusBar* fl_DocListener::m_pStatusBar [private] |
Referenced by fl_DocListener(), and populateStrux().
Referenced by fl_DocListener(), getTopContainerLayout(), popContainerLayout(), pushContainerLayout(), and ~fl_DocListener().