VkMenuUndoManager(3x)

VkMenuUndoManager - Support for an undo facility

Showing IRIX 6.5.30 (default release). Unchanged since IRIX 6.5.

NAME
     VkMenuUndoManager - Support for an undo facility

INHERITS FROM
     VkMenuAction : VkMenuItem : VkComponent : VkCallbackObject

HEADER FILE
     #include <Vk/VkMenuItem.h>


PUBLIC PROTOCOL SUMMARY
   Constructor/Destructor
           VkMenuUndoManager(const char *, XtCallbackProc, XtPointer);
           ~VkMenuUndoManager();


   Manipulating Menu Items
           virtual void undo();


   Access Functions
           virtual const char* className();
           virtual VkMenuItemType menuType ();
           Boolean hasUndo()


CLASS DESCRIPTION
     This class support undoable commands in the ViewKit. Application actions
     can be registered with the undo manager along with a function to be
     called to undo the operation. If an instance of VkMenuUndoManager is
     added to a menu, the menu automatically reflects the last undoable
     command to be registered. Menu actions that have undo callbacks provided
     automatically register with the undo manager.  Applications can also
     register functions or use the VkAction class to support undoable
     operations outside the menu system.

     Applications should not directly instantiate a VkMenuUndoManager object.
     This object is instantiated automatically, and can be referenced by
     including VkMenuItem.h and referencing theUndoManager.

FUNCTION DESCRIPTIONS
   VkMenuUndoManager
           VkMenuUndoManager(const char * name);


          Initialize a VkMenuUndoManager object. Objects are not normally
          instantiated by applications directly.

   ~VkMenuUndoManager
           ~VkMenuUndoManager();
          Clean up when a VkMenuUndoManager object is destroyed.
          VkMenuUndoManager objects are not normally deleted by applications.

   reset
           void reset();


          Clear all actions registered with the undo manager.

   add
           void add(VkMenuAction *menuObject);
           void add(const char *name,
                          XtCallbackProc undocallback,
                          XtPointer clientData);


          Registers an action with the undo manager. The first form is used
          automatically by the other menu classes when an undoable action is
          executed. The second form may be used by applications. The first
          argument is a name for the action, to appear in the the undo menu
          item, if it is present in a menu. The callback must be an Xt-style
          callback function to be called to undo the action, while the final
          argument supplies any data to be passed to the callback function
          when it is invoked.

   multiLevel
             void multiLevel(Boolean flag)


          If flag is TRUE, the undo manager will allow multiple levels of
          undo. Commands are kept in a stack. Undoing one command pops it from
          the stack, revealing the previously executed command. Once a user
          has undone one command, executing any new command clears the undo
          stack.  If flag is FALSE, only the most recent command is
          remembered.  In either case, executing any undoable command from the
          menu always clears the undo stack. Applications can also explicitly
          clear the stack using reset().

   historyList
             VkComponentList *historylist()


          Returns a list of objects representing commands that have been
          executed and that are currently available to be undone. The objects
          will all be subclasses of VkMenuItem. Actions registered explicitly
          or using VkAction objects will be returned as VkMenuActionStub
          objects.  VkMenuActionStub is an empty subclass of VkMenuAction.

   className
              virtual const char* className();
          Returns "VkMenuUndoManager"

   menuType
              virtual VkMenuItemType menuType ();


          Returns VkMenuItem::ACTION.

INHERITED MEMBER FUNCTIONS
   Inherited from VkMenuAction
          menuType(), hasUndo(),  _undoCallback, _func,  _data,


   Inherited from VkMenuItem
          show(), hide(), , manageAll(), setLabel(), setPosition(),
          activate(), deactivate(), remove(), show(), isContainer(),
          _position, _isBuilt, _sensitive, _parentMenu, _label, _isHidden,
          _unmanagedWidgets, _numUnmanagedWidgets,


   Inherited from VkComponent
          installDestroyHandler(), removeDestroyHandler(), widgetDestroyed(),
          setDefaultResources(), getResources(), manage(), unmanage(),
          baseWidget(), okToQuit(), _name, _baseWidget, _w, deleteCallback


   Inherited from VkCallbackObject
          callCallbacks(), addCallback(), removeCallback(),
          removeAllCallbacks()


CLASSES USED BY THIS CLASS
     VkComponent, VkComponentList, VkMenuAction, VkMenuItem

KNOWN CLASSES THAT USE THIS CLASS
     VkAction

SEE ALSO
     VkMenuAction, VkMenuItem, VkComponent, VkAction, VkComponentList
     ViewKit Programmer's Guide
     The X Window System, DEC Press, Bob Sheifler and Jim Gettys
     The X Window System Toolkit, DEC Press, Paul Asente and Ralph Swick
     The OSF/Motif Programmers Reference, Prentice Hall, OSF