本文整理汇总了C++中XAP_Frame::nullUpdate方法的典型用法代码示例。如果您正苦于以下问题:C++ XAP_Frame::nullUpdate方法的具体用法?C++ XAP_Frame::nullUpdate怎么用?C++ XAP_Frame::nullUpdate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XAP_Frame
的用法示例。
在下文中一共展示了XAP_Frame::nullUpdate方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: start
bool Presentation::start(AV_View * view)
{
EV_EditMethodContainer * pEMC = m_pApp->getEditMethodContainer();
g_return_val_if_fail (pEMC != 0, FALSE);
m_pView = static_cast<FV_View *>(view);
m_sPrevBindings = m_pApp->getInputMode();
_loadPresentationBindings(view);
UT_sint32 i = m_pApp->setInputMode("Presentation");
if(i < 0 )
return false;
// get a handle to the actual EditMethod
EV_EditMethod * pFullScreen = pEMC->findEditMethodByName ("viewFullScreen");
g_return_val_if_fail (pFullScreen != 0, false);
const char * sz ="";
EV_EditMethodCallData calldata(sz,0);
calldata.m_xPos = 0;
calldata.m_yPos = 0;
m_iPage = 0;
XAP_Frame * pFrame = static_cast<XAP_Frame*>(m_pView->getParentData());
m_OldZoomType = pFrame->getZoomType();
m_iOldZoom = pFrame->getZoomPercentage();
pFrame->hideMenuScroll(true);
bool b = false;
b = (pFullScreen->Fn(view,&calldata) ? TRUE : FALSE);
GR_Graphics * pG = m_pView->getGraphics();
//
// Let all the configure events propagate to their full extent
//
for(i= 0; i<20;i++)
pFrame->nullUpdate();
pFrame->setZoomType(XAP_Frame::z_PAGEWIDTH);
i = m_pView-> calculateZoomPercentForPageWidth();
pFrame->quickZoom(i);
for(i= 0; i<20;i++)
pFrame->nullUpdate();
b= showNextPage();
if(pG)
pG->allCarets()->disable();
return b;
}
示例2:
static bool
Presentation_context (AV_View * v, EV_EditMethodCallData * d)
{
FV_View * pView = static_cast<FV_View *>(v);
XAP_Frame * pFrame = static_cast<XAP_Frame *> (pView->getParentData());
UT_sint32 xPos = d->m_xPos;
UT_sint32 yPos = d->m_yPos;
const char * szContextMenuName = XAP_App::getApp()->getMenuFactory()->FindContextMenu(PresentationContextID);
UT_DEBUGMSG(("Context Menu Name is........ %s \n",szContextMenuName));
if (!szContextMenuName)
return false;
bool res = pFrame->runModalContextMenu(pView,szContextMenuName,
xPos,yPos);
pFrame->nullUpdate();
GR_Graphics * pG = pView->getGraphics();
if(pG)
pG->allCarets()->disable();
return res;
}
示例3: DECLARE_ABI_PLUGIN_METHOD
//.........这里部分代码省略.........
//
struct stat myFileStat;
int ok = stat(szTmp.c_str(),&myFileStat);
if(ok < 0)
{
UT_ASSERT(UT_SHOULD_NOT_HAPPEN);
remove(szTmpPng.c_str());
remove(szTmp.c_str()); // should silently fail if exporting as PNG file
return false;
}
time_t mod_time = myFileStat.st_mtime;
//
// Fire up the image editor...
//
ProcessInfo procInfo;
if (!createChildProcess(imageApp.c_str(), szTmp.c_str(), &procInfo))
{
UT_String msg = "Unable to run program: "; msg += imageApp + " " + szTmp;
pFrame->showMessageBox(msg.c_str(), XAP_Dialog_MessageBox::b_O,XAP_Dialog_MessageBox::a_OK);
// failed to spawn stuff, so do some cleanup and return failure
remove(szTmpPng.c_str());
remove(szTmp.c_str()); // should silently fail if exporting as PNG file
return false;
}
lockGUI(d);
while (isProcessStillAlive(procInfo))
{
UT_usleep(10000); // wait 10 milliseconds
pFrame->nullUpdate();
ok = stat(szTmp.c_str(),&myFileStat);
if(ok == 0)
{
if(myFileStat.st_mtime != mod_time)
{
// wait for changes to settle (program done writing changes)
// we use both modified time & file size, but really we
// could just use file size as mod time doesn't appear to change for small images
mod_time = myFileStat.st_mtime;
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
//