Public Member Functions | |
(id) | - init [implementation] |
(void) | - registerUndoWithTarget:selector:object: [implementation] |
(id) | - prepareWithInvocationTarget: [implementation] |
(CPMethodSignature) | - methodSignatureForSelector: [implementation] |
(void) | - forwardInvocation: [implementation] |
(BOOL) | - canRedo [implementation] |
(BOOL) | - canUndo [implementation] |
(void) | - undo [implementation] |
(void) | - undoNestedGroup [implementation] |
(void) | - redo [implementation] |
(void) | - beginUndoGrouping [implementation] |
(void) | - endUndoGrouping [implementation] |
(void) | - enableUndoRegistration [implementation] |
(BOOL) | - groupsByEvent [implementation] |
(void) | - setGroupsByEvent: [implementation] |
(unsigned) | - groupingLevel [implementation] |
(void) | - disableUndoRegistration [implementation] |
(BOOL) | - isUndoRegistrationEnabled [implementation] |
(BOOL) | - isUndoing [implementation] |
(BOOL) | - isRedoing [implementation] |
(void) | - removeAllActions [implementation] |
(void) | - removeAllActionsWithTarget: [implementation] |
(void) | - setActionName: [implementation] |
(CPString) | - redoActionName [implementation] |
(CPString) | - undoActionName [implementation] |
(CPArray) | - runLoopModes [implementation] |
(void) | - setRunLoopModes: [implementation] |
(void) | - beginUndoGroupingForEvent [implementation] |
(id) | - initWithCoder: [implementation] |
(void) | - encodeWithCoder: [implementation] |
[[CPUndoManager alloc] init]
message.
Definition at line 157 of file CPUndoManager.j.
- (void) beginUndoGrouping | [implementation] |
Starts a new grouping of undo tasks, and makes it the current grouping.
Definition at line 379 of file CPUndoManager.j.
- (void) beginUndoGroupingForEvent | [implementation] |
Definition at line 623 of file CPUndoManager.j.
- (BOOL) canRedo | [implementation] |
Returns YES
if the user can perform a redo operation.
Definition at line 280 of file CPUndoManager.j.
- (BOOL) canUndo | [implementation] |
Returns YES
if the user can perform an undo operation.
Definition at line 288 of file CPUndoManager.j.
- (void) disableUndoRegistration | [implementation] |
Disables undo registrations.
Definition at line 487 of file CPUndoManager.j.
- (void) enableUndoRegistration | [implementation] |
Enables undo registrations. Calls to this method must be balanced with calls to disableUndoRegistration. So, if two disable calls were made, two enable calls are required to actually enable undo registration again.
Definition at line 428 of file CPUndoManager.j.
- (void) encodeWithCoder: | (CPCoder) | aCoder | [implementation] |
Definition at line 694 of file CPUndoManager.j.
- (void) endUndoGrouping | [implementation] |
Closes the current undo grouping.
CPInternalInconsistencyException | if no undo group is open |
Definition at line 388 of file CPUndoManager.j.
- (void) forwardInvocation: | (CPInvocation) | anInvocation | [implementation] |
Records the specified invocation as an undo operation. Sets the target on the invocation, and adds it to the current grouping.
anInvocation | the message to record |
Definition at line 255 of file CPUndoManager.j.
- (unsigned) groupingLevel | [implementation] |
Returns the number of undo/redo groups.
Definition at line 472 of file CPUndoManager.j.
- (BOOL) groupsByEvent | [implementation] |
Returns YES
if the manager groups undo operations at every iteration of the run loop.
Definition at line 440 of file CPUndoManager.j.
- (id) init | [implementation] |
Initializes the undo manager
Definition at line 178 of file CPUndoManager.j.
- (id) initWithCoder: | (CPCoder) | aCoder | [implementation] |
Definition at line 672 of file CPUndoManager.j.
- (BOOL) isRedoing | [implementation] |
Returns YES
if the manager is currently performing a redo.
Definition at line 512 of file CPUndoManager.j.
- (BOOL) isUndoing | [implementation] |
Returns YES
if the manager is currently performing an undo.
Definition at line 504 of file CPUndoManager.j.
- (BOOL) isUndoRegistrationEnabled | [implementation] |
Returns YES
if undo registration is enabled.
Definition at line 495 of file CPUndoManager.j.
- (CPMethodSignature) methodSignatureForSelector: | (SEL) | aSelector | [implementation] |
Definition at line 242 of file CPUndoManager.j.
- (id) prepareWithInvocationTarget: | (id) | aTarget | [implementation] |
Prepares the specified target for the undo action.
aTarget | the target to receive the action |
Definition at line 231 of file CPUndoManager.j.
- (void) redo | [implementation] |
Performs the redo operation using the last grouping on the redo stack.
Definition at line 340 of file CPUndoManager.j.
- (CPString) redoActionName | [implementation] |
If the receiver can perform a redo, this method returns the action name previously associated with the top grouping with -setActionName:
. This name should identify the action to be redone.
nil
if no there's no redo on the stack. Definition at line 578 of file CPUndoManager.j.
- (void) registerUndoWithTarget: | (id) | aTarget | ||
selector: | (SEL) | aSelector | ||
object: | (id) | anObject | ||
[implementation] |
Registers an undo operation. You invoke this method with the target of the undo action providing the selector which can perform the undo with the provided object. The object is often a dictionary of the identifying the attribute and their values before the change. The invocation will be added to the current grouping. If the registrations have been disabled through -disableUndoRegistration
, this method does nothing.
aTarget | the target for the undo invocation | |
aSelector | the selector for the action message | |
anObject | the argument for the action message |
CPInternalInconsistencyException | if no undo group is currently open |
Definition at line 205 of file CPUndoManager.j.
- (void) removeAllActions | [implementation] |
Clears all redo and undo operations and enables undo registrations.
Definition at line 521 of file CPUndoManager.j.
- (void) removeAllActionsWithTarget: | (id) | aTarget | [implementation] |
Removes any redo and undo operations that use the specified target.
aTarget | the target for which operations should be removed. |
Definition at line 532 of file CPUndoManager.j.
- (CPArray) runLoopModes | [implementation] |
Returns the CPRunLoopModes in which the receiver registers the -endUndoGrouping
processing when it -groupsByEvent
.
Definition at line 599 of file CPUndoManager.j.
- (void) setActionName: | (CPString) | anActionName | [implementation] |
Sets the name associated with the actions of the current group. Typically, you can call this method while registering the actions for the current group.
anActionName | the new name for the current group |
Definition at line 567 of file CPUndoManager.j.
- (void) setGroupsByEvent: | (BOOL) | aFlag | [implementation] |
Sets whether the manager should group undo operations at every iteration of the run loop.
aFlag | YES groups undo operations |
Definition at line 449 of file CPUndoManager.j.
- (void) setRunLoopModes: | (CPArray) | modes | [implementation] |
Sets the modes in which the receiver registers the calls with the current run loop to invoke -endUndoGrouping
when it -groupsByEvent
. This method first cancels any pending registrations in the old modes and registers the invocation in the new modes.
modes | the modes in which calls are registered |
Definition at line 612 of file CPUndoManager.j.
- (void) undo | [implementation] |
Ends the current grouping, and performs an 'undo' operation.
Definition at line 300 of file CPUndoManager.j.
- (CPString) undoActionName | [implementation] |
If the receiver can perform an undo, this method returns the action name previously associated with the top grouping with -setActionName:
. This name should identify the action to be undone.
nil
if no if there's no undo on the stack. Definition at line 589 of file CPUndoManager.j.
- (void) undoNestedGroup | [implementation] |
Performs an undo on the last undo group.
Definition at line 311 of file CPUndoManager.j.