[ Previous | Next | Contents | Glossary | Home | Search ]
Motif 2.1 Widget Writer's Guide


XmQTmenuSavvy

A widget holding this trait can become a menu child

Format

#include <Xm/MenuT.h>
 
typedef struct {
        	int     				version;
        	XmMenuSavvyDisableProc  		disableCallback;
        	XmMenuSavvyGetAcceleratorProc   	getAccelerator;
        	XmMenuSavvyGetMnemonicProc      	getMnemonic;
        	XmMenuSavvyGetActivateCBNameProc        getActivateCBName;
} XmMenuSavvyTraitRec, *XmMenuSavvyTrait;
void
(*XmMenuSavvyDisableProc)WidgetXtActivateState
char
*(*XmMenuSavvyGetAcceleratorProc)Widget
Keysym
(*XmMenuSavvyGetMnemonicProc)Widget
char
*(*XmMenuSavvyGetActivateCBNameProc)(VOID)

DESCRIPTION

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:

  1. XmLabel

  2. XmLabelGadget

  3. XmPushButton

  4. XmPushButtonGadget

  5. XmSeparator

  6. XmSeparatorGadget

  7. XmToggleButton

  8. XmToggleButtonGadget

  9. XmCascadeButton

  10. XmCascadeButtonGadget

  11. XmDrawnButton

    Among the standard Motif manager widgets, only XmRowColumn examines its children for this trait.

  12. The disableCallback Trait Method
    void disableCallbackWidget
    childWidgetXtActivateState
    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.

    The getAccelerator Trait Method
    char *getAcceleratorWidget
    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.

    The getMnemonic Trait Method
    Keysym getMnemonicWidget
    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.

    The getActivateCBName Trait Method
    char *getActivateCBName(VOID)

    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.

    RELATED

    XmRowColumn(3), XmLabel(3), XmPushButton(3), XmDrawnButton(3), XmCascadeButton(3), XmToggleButton(3), XmPushButtonGadget(3), XmToggleButtonGadget(3), XmCascadeButtonGadget(3), and ExmMenuButton(3).


    [ Previous | Next | Contents | Glossary | Home | Search ]