XmQTmenuSavvy — A widget holding this trait can become a menu child
#include <Xm/MenuT.h> typedef struct { int version; XmMenuSavvyDisableProc disableCallback; XmMenuSavvyGetAcceleratorProc getAccelerator; XmMenuSavvyGetMnemonicProc getMnemonic; XmMenuSavvyGetActivateCBNameProc getActivateCBName; } XmMenuSavvyTraitRec, *XmMenuSavvyTrait;
void (*XmMenuSavvyDisableProc)
(, , char *(*XmMenuSavvyGetAcceleratorProc)
, Keysym (*XmMenuSavvyGetMnemonicProc)
);char *(*XmMenuSavvyGetActivateCBNameProc)
();Menu parent widgets (like XmRowColumn) examine their children for the XmQTmenuSavvy trait. Only those child widgets holding the XmQTmenuSavvy trait can become menu children.
The following standard Motif primitive widgets hold this trait:
XmLabel
XmLabelGadget
XmPushButton
XmPushButtonGadget
XmSeparator
XmSeparatorGadget
XmToggleButton
XmToggleButtonGadget
XmCascadeButton
XmCascadeButtonGadget
XmDrawnButton
Among the standard Motif manager widgets, only XmRowColumn examines its children for this trait.
void disableCallback
(childWidget, enable_disable);The disableCallback trait method allows the menu parent (typically, the XmRowColumn widget) to enable or disable the activate callback associated with the child. XmRowColumn calls this trait method when its XmNentryCallback resource is set to a value other than NULL.
childWidget | Specifies the child widget that holds this trait. | |
enable_disable | Specifies whether to enable or disable the activate callback method associated with the child widget. There are two possible values for this argument: XmENABLE_CALLBACK or XmDISABLE_CALLBACK. XmENABLE_CALLBACK enables the activate callback associated with childWidget; XmDISABLE_CALLBACK disables it. |
char *getAccelerator
(childWidget);The getAccelerator trait method returns the accelerator associated with childWidget.
childWidget | Specifies a menu child widget. |
This trait method returns the accelerator associated with childWidget. If there is no accelerator associated with childWidget, getAccelerator returns NULL.
Keysym getMnemonic
(childWidget);The getMnemonic trait method returns the mnemonic associated with childWidget.
childWidget | Specifies a menu child widget. |
This trait method returns the mnemonic associated with childWidget. If there is no mnemonic associated with childWidget, getMnemonic returns NULL.
char *getActivateCBName
();The getActivateCBName trait method returns a pointer to a static string. This string names the resource that contains the activation callback list for this widget. For example, this trait method will return activateCallback for XmPushButton and valueChangedCallback for XmToggleButton.
XmRowColumn(3), XmLabel(3), XmPushButton(3), XmDrawnButton(3), XmCascadeButton(3), XmToggleButton(3), XmPushButtonGadget(3), XmToggleButtonGadget(3), XmCascadeButtonGadget(3), and ExmMenuButton(3).