本文整理汇总了C++中FV_View::updateCarets方法的典型用法代码示例。如果您正苦于以下问题:C++ FV_View::updateCarets方法的具体用法?C++ FV_View::updateCarets怎么用?C++ FV_View::updateCarets使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FV_View
的用法示例。
在下文中一共展示了FV_View::updateCarets方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: bl_doclistener_insertEndFrame
bool fl_FrameLayout::bl_doclistener_insertEndFrame(fl_ContainerLayout*,
const PX_ChangeRecord_Strux * pcrx,
PL_StruxDocHandle sdh,
PL_ListenerId lid,
void (* pfnBindHandles)(PL_StruxDocHandle sdhNew,
PL_ListenerId lid,
PL_StruxFmtHandle sfhNew))
{
// The endFrame strux actually needs a format handle to to this Frame layout.
// so we bind to this layout.
PL_StruxFmtHandle sfhNew = static_cast<PL_StruxFmtHandle>(this);
pfnBindHandles(sdh,lid,sfhNew);
//
// increment the insertion point in the view.
//
FV_View* pView = m_pLayout->getView();
if (pView && (pView->isActive() || pView->isPreview()))
{
pView->setPoint(pcrx->getPosition() + fl_BLOCK_STRUX_OFFSET);
}
else if(pView && pView->getPoint() > pcrx->getPosition())
{
pView->setPoint(pView->getPoint() + fl_BLOCK_STRUX_OFFSET);
}
if(pView)
pView->updateCarets(pcrx->getPosition(),1);
m_bHasEndFrame = true;
return true;
}
示例2: insertBlockAfter
/*!
* This code actually inserts a block AFTER the frame in the docsectionlayout
* Code copied from tablelayout
*/
bool fl_FrameLayout::insertBlockAfter(fl_ContainerLayout* /*pLBlock*/,
const PX_ChangeRecord_Strux * pcrx,
PL_StruxDocHandle sdh,
PL_ListenerId lid,
void (* pfnBindHandles)(PL_StruxDocHandle sdhNew,
PL_ListenerId lid,
PL_StruxFmtHandle sfhNew))
{
UT_ASSERT(pcrx->getType()==PX_ChangeRecord::PXT_InsertStrux);
UT_ASSERT(pcrx->getStruxType()==PTX_Block);
fl_ContainerLayout * pNewCL = NULL;
fl_ContainerLayout * pMyCL = myContainingLayout();
pNewCL = pMyCL->insert(sdh,this,pcrx->getIndexAP(), FL_CONTAINER_BLOCK);
fl_BlockLayout * pBlock = static_cast<fl_BlockLayout *>(pNewCL);
//
// Set the sectionlayout of this frame to that of the block since it is that scope
//
pBlock->setSectionLayout(static_cast<fl_SectionLayout *>(myContainingLayout()));
pNewCL->setContainingLayout(myContainingLayout());
// Must call the bind function to complete the exchange of handles
// with the document (piece table) *** before *** anything tries
// to call down into the document (like all of the view
// listeners).
PL_StruxFmtHandle sfhNew = static_cast<PL_StruxFmtHandle>(pNewCL);
pfnBindHandles(sdh,lid,sfhNew);
//
// increment the insertion point in the view.
//
FV_View* pView = m_pLayout->getView();
if (pView && (pView->isActive() || pView->isPreview()))
{
pView->setPoint(pcrx->getPosition() + fl_BLOCK_STRUX_OFFSET);
}
else if(pView && pView->getPoint() > pcrx->getPosition())
{
pView->setPoint(pView->getPoint() + fl_BLOCK_STRUX_OFFSET);
}
if(pView)
pView->updateCarets(pcrx->getPosition(),1);
return true;
}