本文整理汇总了C++中CanRedo函数的典型用法代码示例。如果您正苦于以下问题:C++ CanRedo函数的具体用法?C++ CanRedo怎么用?C++ CanRedo使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CanRedo函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: BBAssertDebug
void BatchCommand::Redo()
{
BBAssertDebug(CanRedo());
for (RestorableCommandCollection::iterator it = restorableCommands.begin(); it != restorableCommands.end(); ++it)
(*it)->Redo();
}
开发者ID:Darkttd,项目名称:Bibim,代码行数:7,代码来源:BatchCommand.cpp
示例2: Redo
// Redo the last command
void PaintModel::Redo() {
if (CanRedo()) {
mUndoStack.push(mRedoStack.top());
mUndoStack.top()->Redo(shared_from_this());
mRedoStack.pop();
}
}
开发者ID:connor-k,项目名称:ProPaint,代码行数:8,代码来源:PaintModel.cpp
示例3: Redo
void wxTextCtrl::Redo()
{
if (CanRedo())
{
::SendMessage(GetBuddyHwnd(), EM_UNDO, 0, 0);
}
}
开发者ID:ACanadianKernel,项目名称:pcsx2,代码行数:7,代码来源:textctrlce.cpp
示例4: wxCHECK_RET
void wxTextEntry::Redo()
{
wxCHECK_RET( GetTextPeer(), "Must create the control first" );
if (CanRedo())
GetTextPeer()->Redo() ;
}
开发者ID:chromylei,项目名称:third_party,代码行数:7,代码来源:textentry_osx.cpp
示例5: CheckState
bool UTransBuffer::Redo()
{
CheckState();
if (!CanRedo())
{
RedoDelegate.Broadcast(FUndoSessionContext(), false);
return false;
}
// Apply the redo changes.
GIsTransacting = true;
{
FTransaction& Transaction = UndoBuffer[ UndoBuffer.Num() - UndoCount-- ];
UE_LOG(LogEditorTransaction, Log, TEXT("Redo %s"), *Transaction.GetTitle().ToString() );
CurrentTransaction = &Transaction;
BeforeRedoUndoDelegate.Broadcast(Transaction.GetContext());
Transaction.Apply();
RedoDelegate.Broadcast(Transaction.GetContext(), true);
CurrentTransaction = nullptr;
}
GIsTransacting = false;
CheckState();
return true;
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:30,代码来源:EditorTransaction.cpp
示例6: InternalRollForward
bool History::InternalRollForward(void)
{
if(!CanRedo())return false;
Undoable *u = *m_curpos;
u->Run(true);
m_curpos++;
return true;
}
开发者ID:Blokkendoos,项目名称:heekscad,代码行数:8,代码来源:History.cpp
示例7:
BString
UndoContext::RedoLabel() const
{
if (CanRedo())
return ((Action*)fHistory->ItemAt(fAt))->Label();
else
return "";
}
开发者ID:Admixior,项目名称:ResourceEdit,代码行数:8,代码来源:UndoContext.cpp
示例8: Redo
void CHistory::Redo()
{
if (CanRedo())
{
m_commands[m_nextCommandIndex]->Execute(); // может выбросить исключение
++m_nextCommandIndex;
}
}
开发者ID:Andrey540,项目名称:faststart_Egoshin_Andrey,代码行数:8,代码来源:History.cpp
示例9: Redo
void wxTextCtrl::Redo()
{
if (CanRedo())
{
if (m_bIsMLE)
::WinSendMsg(GetHwnd(), MLM_UNDO, 0, 0);
// Simple entryfields cannot be undone
}
} // end of wxTextCtrl::Redo
开发者ID:EdgarTx,项目名称:wx,代码行数:9,代码来源:textctrl.cpp
示例10: OnMenuRedo
void ProjectManager::OnMenuRedo()
{
if(CanRedo())
{
projetConfig=configHistory[configHistory.size()-currentHistoryNavigation];
currentHistoryNavigation--;
LoadCurrentProject(false);
Init();
}
}
开发者ID:Ezio47,项目名称:I-Simpa,代码行数:10,代码来源:projet_undo_redo.cpp
示例11:
bool cActionManager::Redo()
{
if (CanRedo())
{
cAction* action = mRedoList.front();
RemoveTopAction(REDO);
action->Accept( cRedoActionVisitor::Global() );
AddAction(UNDO, action);
return true;
}
return false;
}
开发者ID:eriser,项目名称:wired,代码行数:12,代码来源:cActionManager.cpp
示例12: UICommandAction
void CUICommandHistory::UICommandAction(CommandType type)
{
CUICommandNode* pOldNode;
CUICommandNode* pNewNode;
if(type == cmdRedo)
{
if(!CanRedo())
return;
pOldNode = m_lstCommandNodes.GetAt(m_lstCommandNodes.FindIndex(m_nCommandIndex));
pNewNode = new CUICommandNode(pOldNode->m_pBefore, pOldNode->m_pAfter, pOldNode->m_ActionType);
m_nCommandIndex++;
}
else
{
if(!CanUndo())
return;
m_nCommandIndex--;
pOldNode = m_lstCommandNodes.GetAt(m_lstCommandNodes.FindIndex(m_nCommandIndex));
ActionType action;
switch(pOldNode->m_ActionType)
{
case actionAdd:
action = actionDelete;
break;
case actionModify:
action = actionModify;
break;
case actionDelete:
action = actionAdd;
break;
}
pNewNode = new CUICommandNode(pOldNode->m_pAfter, pOldNode->m_pBefore, action);
}
switch(pNewNode->m_ActionType)
{
case actionAdd:
ActionAdd(pNewNode->m_pAfter);
break;
case actionModify:
ActionModify(pNewNode->m_pAfter);
break;
case actionDelete:
ActionDelete(pNewNode->m_pBefore);
break;
}
delete pNewNode;
}
开发者ID:DayDayUpCQ,项目名称:misc,代码行数:52,代码来源:UICommandHistory.cpp
示例13: GetRedoContext
FUndoSessionContext UTransBuffer::GetRedoContext()
{
FUndoSessionContext Context;
FText Title;
if( !CanRedo( &Title ) )
{
Context.Title = Title;
return Context;
}
const FTransaction* Transaction = &UndoBuffer[ UndoBuffer.Num() - UndoCount ];
return Transaction->GetContext();
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:13,代码来源:EditorTransaction.cpp
示例14: Redo
void CEditWnd::Redo()
{
if (!CanRedo()) return;
CPoint ptCursorPos;
if (m_pTextBuffer->Redo(ptCursorPos))
{
ASSERT_VALIDTEXTPOS(ptCursorPos);
SetAnchor(ptCursorPos);
SetSelection(ptCursorPos, ptCursorPos);
SetCursorPos(ptCursorPos);
EnsureVisible(ptCursorPos);
}
}
开发者ID:kosfango,项目名称:fips,代码行数:13,代码来源:EditWnd.cpp
示例15: Redo
//-----------------------------------------------------------------------------
// Purpose:
// Input : *exp -
//-----------------------------------------------------------------------------
void CExpression::Redo( void )
{
if ( !CanRedo() )
return;
Assert( m_nUndoCurrent >= 1 );
Assert( m_nUndoCurrent <= undo.Size() );
CExpUndoInfo *u = undo[ --m_nUndoCurrent ];
Assert( u );
memcpy( setting, u->redosetting, GLOBAL_STUDIO_FLEX_CONTROL_COUNT * sizeof( float ) );
memcpy( weight, u->redoweight, GLOBAL_STUDIO_FLEX_CONTROL_COUNT * sizeof( float ) );
}
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:18,代码来源:expression.cpp
示例16: Redo
void CommandManager::Redo(){
std::string feedback;
if (CanRedo()){
UndoRedoCount++;
Command* pCommand = getLastRedoCommand();
redoList.pop_back();
if (pCommand->execute(_taskList,feedback)){
AddUndo(pCommand);
} else {
delete pCommand;
pCommand = NULL;
}
}
}
开发者ID:terencelimzhengwei,项目名称:cs2103jan2014-t17-3c,代码行数:14,代码来源:CommandManager.cpp
示例17: GetUndoMenuLabel
void wxCommandProcessor::SetMenuStrings()
{
#if wxUSE_MENUS
if (m_commandEditMenu)
{
wxString undoLabel = GetUndoMenuLabel();
wxString redoLabel = GetRedoMenuLabel();
m_commandEditMenu->SetLabel(wxID_UNDO, undoLabel);
m_commandEditMenu->Enable(wxID_UNDO, CanUndo());
m_commandEditMenu->SetLabel(wxID_REDO, redoLabel);
m_commandEditMenu->Enable(wxID_REDO, CanRedo());
}
#endif // wxUSE_MENUS
}
开发者ID:rsperberg,项目名称:wxWidgets,代码行数:16,代码来源:cmdproc.cpp
示例18: while
bool cActionManager::Redo(int id)
{
while (42)
{
if (CanRedo())
{
cAction* action = mRedoList.front();
RemoveTopAction(REDO);
action->Accept( cRedoActionVisitor::Global() );
AddAction(UNDO, action);
if (action->m_Id == id)
return true;
}
else
return false;
}
return false;
}
开发者ID:eriser,项目名称:wired,代码行数:18,代码来源:cActionManager.cpp
示例19: CheckState
bool UTransBuffer::Redo()
{
CheckState();
if( !CanRedo() )
{
return false;
}
// Apply the redo changes.
FTransaction& Transaction = UndoBuffer[ UndoBuffer.Num() - UndoCount-- ];
UE_LOG(LogEditorTransaction, Log, TEXT("Redo %s"), *Transaction.GetTitle().ToString() );
Transaction.Apply();
CheckState();
return true;
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:18,代码来源:EditorTransaction.cpp
示例20: ASSERT
BOOL CCrystalTextBuffer::Redo(CPoint &ptCursorPos)
{
ASSERT(CanRedo());
ASSERT((m_aUndoBuf[0].m_dwFlags & UNDO_BEGINGROUP) != 0);
ASSERT((m_aUndoBuf[m_nUndoPosition].m_dwFlags & UNDO_BEGINGROUP) != 0);
for (;;)
{
const SUndoRecord &ur = m_aUndoBuf[m_nUndoPosition];
if (ur.m_dwFlags & UNDO_INSERT)
{
int nEndLine, nEndChar;
VERIFY(InternalInsertText(NULL, ur.m_ptStartPos.y, ur.m_ptStartPos.x, ur.m_pcText, nEndLine, nEndChar));
#ifdef _ADVANCED_BUGCHECK
ASSERT(ur.m_ptEndPos.y == nEndLine);
ASSERT(ur.m_ptEndPos.x == nEndChar);
#endif
ptCursorPos = ur.m_ptEndPos;
}
else
{
#ifdef _ADVANCED_BUGCHECK
CString text;
GetText(ur.m_ptStartPos.y, ur.m_ptStartPos.x, ur.m_ptEndPos.y, ur.m_ptEndPos.x, text);
ASSERT(lstrcmp(text, ur.m_pcText) == 0);
#endif
VERIFY(InternalDeleteText(NULL, ur.m_ptStartPos.y, ur.m_ptStartPos.x, ur.m_ptEndPos.y, ur.m_ptEndPos.x));
ptCursorPos = ur.m_ptStartPos;
}
m_nUndoPosition ++;
if (m_nUndoPosition == m_aUndoBuf.GetSize())
break;
if ((m_aUndoBuf[m_nUndoPosition].m_dwFlags & UNDO_BEGINGROUP) != 0)
break;
}
if (m_bModified && m_nSyncPosition == m_nUndoPosition)
SetModified(FALSE);
if (! m_bModified && m_nSyncPosition != m_nUndoPosition)
SetModified(TRUE);
return TRUE;
}
开发者ID:AndySze,项目名称:OpenServo,代码行数:40,代码来源:CCrystalTextBuffer.cpp
注:本文中的CanRedo函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论