本文整理汇总了C++中FV_View::setPoint方法的典型用法代码示例。如果您正苦于以下问题:C++ FV_View::setPoint方法的具体用法?C++ FV_View::setPoint怎么用?C++ FV_View::setPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FV_View
的用法示例。
在下文中一共展示了FV_View::setPoint方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: bl_doclistener_insertEndEmbed
bool fl_EmbedLayout::bl_doclistener_insertEndEmbed(fl_ContainerLayout*,
const PX_ChangeRecord_Strux * pcrx,
pf_Frag_Strux* sdh,
PL_ListenerId lid,
void (* pfnBindHandles)(pf_Frag_Strux* sdhNew,
PL_ListenerId lid,
fl_ContainerLayout* sfhNew))
{
// The endFootnote strux actually needs a format handle to to this Footnote layout.
// so we bind to this layout.
fl_ContainerLayout* sfhNew = 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);
}
m_bHasEndFootnote = true;
fl_BlockLayout * pBL = static_cast<fl_BlockLayout *>(getFirstLayout());
pBL->updateEnclosingBlockIfNeeded();
return true;
}
示例3: 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;
}
示例4: DECLARE_ABI_PLUGIN_METHOD
//.........这里部分代码省略.........
off_t size = myFileStat.st_size;
UT_usleep(100000); // wait 100 milliseconds (so program may have time to write something)
ok = stat(szTmp.c_str(),&myFileStat);
while((mod_time != myFileStat.st_mtime) || !size || (size > 0 && size != myFileStat.st_size))
{
mod_time = myFileStat.st_mtime;
size = myFileStat.st_size;
ok = stat(szTmp.c_str(),&myFileStat);
UT_usleep(500000); // wait a while, let program write its data
// just make sure the program is still running, otherwise we could get stuck in a loop
if (!isProcessStillAlive(procInfo))
{
pFrame->showMessageBox("External image editor appears to have been terminated unexpectedly.",
XAP_Dialog_MessageBox::b_O,XAP_Dialog_MessageBox::a_OK);
//procInfo.hProcess = 0;
goto Cleanup;
}
}
mod_time = myFileStat.st_mtime;
UT_usleep(100000); // wait a while just to make sure program is done with file
//
// OK replace the current image with this.
//
IEGraphicFileType iegft = IEGFT_Unknown;
FG_Graphic* pFG;
UT_Error errorCode;
#ifdef ENABLE_BMP
//
// Convert bmp back to png (as we can not assume AbiWord has builtin BMP support [as its now an optional plugin])
// NOTE: probably looses detail/information though!!! so if possible use only PNG
//
if (!bLeaveImageAsPNG)
{
if (convertBMP2PNG(szTmp.c_str(), szTmpPng.c_str()))
{
pFrame->showMessageBox("Unable to convert BMP image data back to PNG for AbiWord to import!", XAP_Dialog_MessageBox::b_O,XAP_Dialog_MessageBox::a_OK);
UT_ASSERT(UT_SHOULD_NOT_HAPPEN);
goto Cleanup;
}
}
#endif
errorCode = IE_ImpGraphic::loadGraphic(szTmpPng.c_str(), iegft, &pFG);
if(errorCode)
{
UT_ASSERT(UT_SHOULD_NOT_HAPPEN);
pFrame->showMessageBox("Error making pFG. Could not put image back into Abiword", XAP_Dialog_MessageBox::b_O,XAP_Dialog_MessageBox::a_OK);
goto Cleanup;
}
unlockGUI(d);
pView->cmdUnselectSelection();
pView->setPoint(pos);
pView->extSelHorizontal(true, 1); // move point forward one
errorCode = pView->cmdInsertGraphic(pFG);
if (errorCode)
{
pFrame->showMessageBox("Could not put image back into Abiword", XAP_Dialog_MessageBox::b_O,XAP_Dialog_MessageBox::a_OK);
UT_ASSERT(UT_SHOULD_NOT_HAPPEN);
DELETEP(pFG);
goto Cleanup;
}
DELETEP(pFG);
//
// Reselect the image
//
pView->setPoint(pos);
pView->extSelHorizontal(true, 1); // move point forward one
lockGUI(d);
}
}
}
//
// Normal exit, delete the tempfile and return success
//
remove(szTmpPng.c_str());
remove(szTmp.c_str()); // should silently fail if exporting as PNG file
unlockGUI(d);
return true;
//
// Something went wrong.
//
Cleanup:
remove(szTmpPng.c_str());
remove(szTmp.c_str()); // should silently fail if exporting as PNG file
unlockGUI(d);
//
// Kill the image editor.
//
endProcess(procInfo);
return false;
}