VkMenuConfirmFirstAction(3x)VkMenuConfirmFirstAction(3x)NAMEVkMenuConfirmFirstAction - A menu action that requires user confirmation
INHERITS FROM
VkMenuAction : VkMenuItem : VkComponent : VkCallbackObject
HEADER FILE
#include <Vk/VkMenuItem.h>
PUBLIC PROTOCOL SUMMARY
Constructor/Destructor
VkMenuConfirmFirstAction(const char *name,
XtCallbackProc doitCallback,
XtPointer clientData);
VkMenuConfirmFirstAction(const char *name,
XtCallbackProc doitCallback,
XtCallbackProc undoCallback ,
XtPointer clientData);
~VkMenuConfirmFirstAction();
Manipulating Menu Items
virtual void undo();
Access Functions
virtual const char* className();
virtual VkMenuItemType menuType();
Boolean hasUndo()CLASS DESCRIPTION
This class supports menu actions (See VkMenuAction(3X)) that require user
confirmation before being executed. This class is used exactly the same
as VkMenuAction, but when a user selects a VkMenuConfirmAction menu item,
the ViewKit posts a confirmation dialog before executing the command.
Only if the user selects the dialog's OK button is the command actually
executed.
The question displayed in the confirmation dialog os determined by
the value of a resource "noUndoQuestion", which is retrieved
relative to the menu item. If no value is set of this resource the
question defaults to a generic English-language question. For
example, assume an action named "quit", added as follows:
aMenuPane->addConfirmFirstAction("quit", quitApplication, NULL);
Page 1
VkMenuConfirmFirstAction(3x)VkMenuConfirmFirstAction(3x)
An application could specify a resource in the application's app-
defaults file like this:
*quit.noUndoQuestion: Do you really want to quit?
FUNCTION DESCRIPTIONSVkMenuConfirmFirstAction
VkMenuConfirmFirstAction(const char *name,
XtCallbackProc doitCallback,
XtPointer clientData);
VkMenuConfirmFirstAction(const char *name,
XtCallbackProc doitCallback,
XtCallbackProc undoCallback,
XtPointer clientData);
Initialize an instance of VkMenuConfirmAction.
~VkMenuConfirmFirstAction
~VkMenuConfirmFirstAction();
Clean up.
Manipulating Menu Items
virtual void undo();
className
virtual const char* className();
Returns "VkMenuConfirmFirstAction".
menuType
virtual VkMenuItemType menuType();
Returns VkMenuItem::CONFIRMFIRSTACTION.
Boolean hasUndo()
Returns TRUE if an undoCallback has been registered.
Page 2
VkMenuConfirmFirstAction(3x)VkMenuConfirmFirstAction(3x)EXAMPLESINHERITED MEMBER FUNCTIONS
Inherited from VkMenuAction
undo(), 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
VkDialogManager
KNOWN CLASSES THAT USE THIS CLASS
VkMenu
SEE ALSO
VkMenuAction, VkMenuItem, VkComponent, VkDialogManager, VkMenu
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
Page 3