本文整理汇总了C++中CDisplay::InvalidateAndUpdate方法的典型用法代码示例。如果您正苦于以下问题:C++ CDisplay::InvalidateAndUpdate方法的具体用法?C++ CDisplay::InvalidateAndUpdate怎么用?C++ CDisplay::InvalidateAndUpdate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDisplay
的用法示例。
在下文中一共展示了CDisplay::InvalidateAndUpdate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sltMachineStateChanged
void UIMachineView::sltMachineStateChanged()
{
/* Get machine state: */
KMachineState state = uisession()->machineState();
switch (state)
{
case KMachineState_Paused:
case KMachineState_TeleportingPausedVM:
{
if ( vboxGlobal().vmRenderMode() != VBoxDefs::TimerMode
&& m_pFrameBuffer
&&
( state != KMachineState_TeleportingPausedVM
|| m_previousState != KMachineState_Teleporting))
{
takePauseShotLive();
/* Fully repaint to pick up m_pauseShot: */
viewport()->update();
}
break;
}
case KMachineState_Restoring:
{
/* Only works with the primary screen currently. */
if (screenId() == 0)
{
takePauseShotSnapshot();
/* Fully repaint to pick up m_pauseShot: */
viewport()->update();
}
break;
}
case KMachineState_Running:
{
if ( m_previousState == KMachineState_Paused
|| m_previousState == KMachineState_TeleportingPausedVM
|| m_previousState == KMachineState_Restoring)
{
if (vboxGlobal().vmRenderMode() != VBoxDefs::TimerMode && m_pFrameBuffer)
{
/* Reset the pixmap to free memory: */
resetPauseShot();
/* Ask for full guest display update (it will also update
* the viewport through IFramebuffer::NotifyUpdate): */
CDisplay dsp = session().GetConsole().GetDisplay();
dsp.InvalidateAndUpdate();
}
}
break;
}
default:
break;
}
m_previousState = state;
}