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


XmQTactivatable

A widget holding this trait will be treated as a command button in a DialogBox or as a major tab in a Notebook

Format

#include <Xm/ActivatableT.h>
 
typedef struct {
        	int                             version;
        	XmActivatableCallBackProc       changeCB;
} XmActivatableTraitRec, *XmActivatableTrait;
void
(*XmActivatableCallBackProc)WidgetXtCallbackProcXtPointerBoolean

DESCRIPTION

A widget holding the XmQTactivatable trait wishes to be treated as a command button when its parent widget is a DialogBox. The standard Motif DialogBox widgets (XmMessageBox, XmSelectionBox, and XmFileSelectionBox) place child widgets having this trait at the bottom of the DialogBox widget, underneath the separator.

In addition, if the XmNotebook widget is the parent of a widget having this trait, then XmNotebook sets the default value of the XmNnotebookChildType constraint to XmMAJOR_TAB.

The following standard Motif primitive widgets and gadgets hold this trait:

  1. XmPushButton

  2. XmDrawnButton

  3. XmArrowButton

  4. XmPushButtonGadget

  5. XmArrowButtonGadget

    In addition, the following standard Motif manager widgets examine their children for this trait:

    1. XmMessageBox

    2. XmSelectionBox

    3. XmFileSelectionBox

    4. XmNotebook

    5. The changeCB Trait Method
      void changeCBWidget
      widgetXtCallbackProc
      activCBXtPointer clientDataBoolean
      setunset

      The changeCB trait method is responsible for adding or removing callback activCB from the list of callbacks. A child widget holding this trait should provide a callback resource that is called when the widget is activated. (This resource is typically named XmNactivateCallback; however, you could give this resource a different name if you prefer.)

      widget
      Specifies the child widget that is to have its list of callbacks modified.

      activCB
      Specifies the callback that is to be added or removed from the list of callbacks.

      clientData
      Specifies additional data to be passed to the callback.

      setunset
      Specifies a Boolean value. If this value is True, the setValue trait method adds activCB to the list of callbacks. If this value is False, the activCB is removed from the list of callbacks.

      RELATED

      XmMessageBox(3), XmSelectionBox(3), XmFileSelectionBox(3), XmNotebook(3), XmPushButton(3), XmDrawnButton(3), XmArrowButton(3), XmDrawnButtonGadget(3), XmArrowButtonGadget(3), and ExmCommandButton(3).


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