Layer | AV_Layer |
Object | AVUndo |
The AVUndo object represents an undo record for a document. An undo record allows a client to associate private data with a particular AVDoc for the purpose of undoing and redoing changes to the document. The client provides private data that encapsulates the changes, and an AVUndoHandler that contains callbacks which interpret the data when Undo and Redo commands are issued.
The AVUndo object itself has an AVUndoNew() method, and methods such as AVUndoGetData() and AVUndoSetData() for getting and setting properties. However, you initiate and control an undo or redo operation from the document (which you can obtain with AVUndoGetAVDoc()), using methods such as AVDocBeginUndoOperation(), AVDocEndUndoOperation(), and AVDocClearUndos().
Typedef | ||
---|---|---|
AVUndo
An opaque data type to be used with AVUndo APIs.
|
||
AVUndoHandler | ||
AVUndoHandlerData
Private data for use by callbacks in the AVUndoHandler.
|
||
AVUndoHandlerRec |
Structure | ||
---|---|---|
_t_AVUndoHandler
Contains a callback procedure for an AVUndo record that performs the undo and redo operations.
|
Callback | ||
---|---|---|
AVUndoBeginEndProc
A callback type for AVUndoHandler. The beginUndoRedo procedure is called when the user initiates an Undo or Redo command and the AVUndoVerifyProc() returns true. The endUndoRedo procedure is called when execution of the operation is complete. Use callbacks of this type to notify the handler that an undo or redo operation is beginning or ending.
|
||
AVUndoExecuteProc
A callback for AVUndoHandler. It is called when the user initiates an Undo or Redo command and the AVUndoVerifyProc returns true. Use this to perform the requested operation.
|
||
AVUndoGetTitleProc
A callback for AVUndoHandler. It is called when the user initiates an Undo or Redo command and the AVUndoVerifyProc() returns true. Use this to return the user interface title string for the undo record.
|
||
AVUndoReleaseProc
A callback for AVUndoHandler. It is called when the undo object is no longer needed. Use this to free any dynamic data that was associated with the object by the handler.
|
||
AVUndoVerifyProc
A callback for AVUndoHandler. It is called when the user initiates an Undo or Redo command. Use this to verify that the undo record is still valid and the operation can be performed.
|
Method | ||
---|---|---|
AVDoc AVUndoGetAVDoc(AVUndo undo)
Gets the document whose undo list contains the undo record.
|
||
AVUndoHandlerData AVUndoGetData(AVUndo undo)
Gets the client-defined private data for the undo record, as specified upon creation. The handler data can be accessed by any of the callbacks listed in the AVUndoHandler.
|
||
const char* AVUndoGetType(AVUndo undo)
Gets the type of the undo record, as specified in the AVUndoHandler. The type is a client-defined string that can be matched for retrieval by AVDocGetTopUndo().
|
||
Creates a new AVUndo record for a document's undo list.
|
||
Sets or replaces the client-defined private data for the undo record. The handler data can be accessed by any of the callbacks listed in the AVUndoHandler.
|
AVUndo |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
typedef struct _t_AVUndo* AVUndo;
An opaque data type to be used with AVUndo
APIs.
File: AVExpT.h |
Line: 9774 |
AVUndoHandler |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
typedef _t_AVUndoHandler AVUndoHandler;
File: AVExpT.h |
Line: 9887 |
AVUndoHandlerData |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
typedef void* AVUndoHandlerData;
Private data for use by callbacks in the AVUndoHandler.
See Also
File: AVExpT.h |
Line: 9783 |
AVUndoHandlerRec |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
typedef _t_AVUndoHandler AVUndoHandlerRec;
File: AVExpT.h |
Line: 9887 |
_t_AVUndoHandler |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
struct _t_AVUndoHandler {
ASSize_t size;
const char* type;
AVUndoVerifyProc VerifyUndo;
AVUndoExecuteProc Undo;
AVUndoVerifyProc VerifyRedo;
AVUndoExecuteProc Redo;
AVUndoGetTitleProc GetUndoTitle;
AVUndoGetTitleProc GetRedoTitle;
AVUndoReleaseProc Release;
AVUndoBeginEndProc BeginUndoRedo;
AVUndoBeginEndProc EndUndoRedo;
}
Contains a callback procedure for an AVUndo record that performs the undo and redo operations.
See Also
File: AVExpT.h |
Line: 9862 |
size | The size of the data structure. It must be set to |
|
type | The type of the undo record. It can be any client-defined string. It can be matched for retrieval by AVDocGetTopUndo(). |
|
AVUndoBeginEndProc |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
A callback type for AVUndoHandler. The beginUndoRedo
procedure is called when the user initiates an Undo or Redo command and the AVUndoVerifyProc() returns true
. The endUndoRedo
procedure is called when execution of the operation is complete. Use callbacks of this type to notify the handler that an undo or redo operation is beginning or ending.
These callbacks are optional. They can be used to allocate and deallocate memory for the operations, for example, or, when grouping undo records, to suspend user interface updates during the operation.
See Also
File: AVExpT.h |
Line: 9850 |
AVUndoExecuteProc |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
A callback for AVUndoHandler. It is called when the user initiates an Undo or Redo command and the AVUndoVerifyProc returns true
. Use this to perform the requested operation.
See Also
File: AVExpT.h |
Line: 9815 |
AVUndoGetTitleProc |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
A callback for AVUndoHandler. It is called when the user initiates an Undo or Redo command and the AVUndoVerifyProc() returns true. Use this to return the user interface title string for the undo record.
See Also
File: AVExpT.h |
Line: 9828 |
AVUndoReleaseProc |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
void (*AVUndoReleaseProc)(AVUndo undo)
A callback for AVUndoHandler. It is called when the undo object is no longer needed. Use this to free any dynamic data that was associated with the object by the handler.
See Also
File: AVExpT.h |
Line: 9805 |
AVUndoVerifyProc |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
A callback for AVUndoHandler. It is called when the user initiates an Undo or Redo command. Use this to verify that the undo record is still valid and the operation can be performed.
See Also
File: AVExpT.h |
Line: 9795 |
AVUndoGetAVDoc | () |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
Gets the document whose undo list contains the undo record.
Parameters
undo — | The undo record whose document is obtained. |
The AVDoc object. |
See Also
Since
File: AVProcs.h |
Line: 8666 |
AVUndoGetData | () |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
AVUndoHandlerData AVUndoGetData(AVUndo undo)
Gets the client-defined private data for the undo record, as specified upon creation. The handler data can be accessed by any of the callbacks listed in the AVUndoHandler.
Parameters
undo — |
See Also
Since
File: AVProcs.h |
Line: 8652 |
AVUndoGetType | () |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
const char* AVUndoGetType(AVUndo undo)
Gets the type of the undo record, as specified in the AVUndoHandler. The type is a client-defined string that can be matched for retrieval by AVDocGetTopUndo().
Parameters
undo — | The undo record whose type is obtained. |
The client-defined type string for the undo record. |
See Also
Since
File: AVProcs.h |
Line: 8679 |
AVUndoNew | () |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
AVUndo AVUndoNew(AVDoc doc, AVUndoHandler handler, AVUndoHandlerData undoData)
Creates a new AVUndo record for a document's undo list.
Parameters
doc — | The document whose undo list contains this undo record. |
|
handler — | The handler structure containing callbacks that perform the undo and redo operations. |
|
undoData — |
The new AVUndo object. |
See Also
Since
File: AVProcs.h |
Line: 8628 |
AVUndoSetData | () |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
void AVUndoSetData(AVUndo undo, AVUndoHandlerData handlerData)
Sets or replaces the client-defined private data for the undo record. The handler data can be accessed by any of the callbacks listed in the AVUndoHandler.
Parameters
undo — | ||
handlerData — | The client-defined private data to be set in the undo record. |
See Also
Since
File: AVProcs.h |
Line: 8640 |