本文整理汇总了C++中Action::Do方法的典型用法代码示例。如果您正苦于以下问题:C++ Action::Do方法的具体用法?C++ Action::Do怎么用?C++ Action::Do使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Action
的用法示例。
在下文中一共展示了Action::Do方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Redo
void DisplayDirector::Redo()
{
StartRefreshCycle();
Action* nextAction = lastAction->NextAction();
if (nextAction) {
nextAction->Do(this);
lastAction = nextAction;
}
FinishRefreshCycle();
ClearDeletedSelections();
ScrollToSelection();
}
示例2: WindowProc
LRESULT GlassApplication::WindowProc(UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
case WM_DO_ACTION:
case WM_DO_ACTION_LATER:
{
Action * action = (Action *)wParam;
action->Do();
if (msg == WM_DO_ACTION_LATER) {
delete action;
}
}
return 0;
case WM_CREATE:
pInstance = this;
STRACE(_T("GlassApplication: created."));
break;
case WM_DESTROY:
//Alarm clipboard dispose if any.
//Please, use RegisterClipboardViewer(NULL) instead of UnregisterClipboardViewer.
RegisterClipboardViewer(NULL);
return 0;
case WM_NCDESTROY:
// pInstance is deleted in BaseWnd::StaticWindowProc
pInstance = NULL;
STRACE(_T("GlassApplication: destroyed."));
return 0;
case WM_CHANGECBCHAIN:
if ((HWND)wParam == m_hNextClipboardView) {
m_hNextClipboardView = (HWND)lParam;
} else if (NULL != m_hNextClipboardView) {
::SendMessage(m_hNextClipboardView, WM_CHANGECBCHAIN, wParam, lParam);
}
break;
case WM_DRAWCLIPBOARD:
if (NULL != m_clipboard) {
GetEnv()->CallVoidMethod(m_clipboard, midContentChanged);
CheckAndClearException(GetEnv());
}
if (NULL != m_hNextClipboardView) {
::SendMessage(m_hNextClipboardView, WM_DRAWCLIPBOARD, wParam, lParam);
}
break;
case WM_SETTINGCHANGE:
if ((UINT)wParam != SPI_SETWORKAREA) {
break;
}
// Fall through
case WM_DISPLAYCHANGE:
GlassScreen::HandleDisplayChange();
break;
case WM_THEMECHANGED: {
JNIEnv* env = GetEnv();
jstring themeName = GlassApplication::GetThemeName(env);
jboolean result = env->CallBooleanMethod(m_grefThis, javaIDs.Application.notifyThemeChangedMID, themeName);
if (CheckAndClearException(env)) return 1;
return !result;
}
}
return ::DefWindowProc(GetHWND(), msg, wParam, lParam);
}