Carbon


TXNCanRedo

Header: MacTextEditor.h Carbon status: Supported

Returns whether the most recently undone action is redoable and provides a value that indicates the type of action that can be redone.

Boolean TXNCanRedo (
    TXNObject iTXNObject, 
    TXNActionKey *oTXNActionKey
);
Parameter descriptions
iTXNObject

A variable of type TXNObject. Pass the text object for the document you want to examine.

oTXNActionKey

A pointer to a variable of type TXNActionKey. On return, the TXNActionKey value specifies the action that can be redone. You can use this information to customize the Redo menu item for the specific action to be redone. For example, if the value obtained by TXNCanRedo is kTXNTypingAction, you can map that value to a string that reads “Redo Typing” on a system localized for U.S. English. MLTE does not perform such a mapping; your program is responsible for mapping the key to the appropriate localized string you want displayed to the user. Pass NULL if you do not want to obtain this information.

function result

A variable of type Boolean. If true, the last command is redoable; otherwise the last command cannot be redone.

DISCUSSION

You can call TXNCanRedo to determine whether the Redo item in the Edit menu should be enabled.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)