#include <ophist.h>
Inheritance diagram for OpRedo:
Public Member Functions | |
OpRedo () | |
Constructs an OpRedo object. | |
void | Do (OpDescriptor *) |
Actually "DO" a redo operation. | |
Static Public Member Functions | |
static BOOL | Init () |
Create an OpDescriptor for the Redo operation. | |
static OpState | GetState (String_256 *, OpDescriptor *) |
Find the state of the OpRedo operation. |
Definition at line 274 of file ophist.h.
|
Constructs an OpRedo object.
Definition at line 1390 of file ophist.cpp. 01390 : Operation() 01391 { 01392 }
|
|
Actually "DO" a redo operation.
Reimplemented from Operation. Definition at line 1409 of file ophist.cpp. 01410 { 01411 // ENSURE(FALSE,"Someone's trying to Redo!"); 01412 01413 // Remember our document, because in debug builds we need to access it after End() 01414 // has been called, and End() deletes the operation. 01415 Document *pDoc = pOurDoc; 01416 pDoc->GetOpHistory().RedoNext(); 01417 End(); 01418 01419 #ifdef _DEBUG 01420 // Ensure that the size of the operation history is valid 01421 pDoc->GetOpHistory().DebugSizeCheck(); 01422 #endif 01423 }
|
|
Find the state of the OpRedo operation.
Definition at line 1443 of file ophist.cpp. 01444 { 01445 OpState OpSt; 01446 01447 // Undo always works on the selected document... 01448 Document *pDocument = Document::GetSelected(); 01449 01450 if (pDocument) 01451 { 01452 OperationHistory *pOpHist = &(pDocument->GetOpHistory()); 01453 01454 // Is there an Operation History? 01455 if (pOpHist) 01456 { 01457 // The Redo operation can only be invoked if there are any operations to redo. 01458 if (pOpHist->CanRedo()) 01459 { 01460 // Temporary String used for Operation Name 01461 String_256 OpName; 01462 01463 // Get the name of operation to be undone 01464 pOpHist->GetRedoOpName(&OpName); 01465 01466 //Concatenate The Menu Description with the operation name 01467 String Space = _T(" "); 01468 *UIDescription += Space; 01469 *UIDescription += OpName; 01470 01471 return OpSt; 01472 } 01473 } 01474 } 01475 01476 //ELSE set to state to disabled 01477 01478 OpSt.Greyed = TRUE; 01479 01480 // Load reason why operation is disabled 01481 String_256 DisableReason(_R(IDS_REDO_DISABLED)); 01482 01483 *UIDescription = DisableReason; 01484 01485 return(OpSt); 01486 }
|
|
Create an OpDescriptor for the Redo operation.
Reimplemented from SimpleCCObject. Definition at line 1505 of file ophist.cpp. 01506 { 01507 return(Operation::RegisterOpDescriptor( 01508 0, 01509 _R(IDS_EDIT_REDO), 01510 CC_RUNTIME_CLASS(OpRedo), 01511 OPTOKEN_REDO, 01512 OpRedo::GetState, 01513 HID_EDIT_REDO, 01514 _R(IDBBL_REDOOP), 01515 _R(IDD_BARCONTROLSTORE), 01516 _R(IDC_BTN_EDITREDO), 01517 SYSTEMBAR_EDIT 01518 ) 01519 ); 01520 01521 }
|