Traits(5)

NAME
Traits — Lists the traits used by the Motif Toolkit.

DESCRIPTION

A trait is a characteristic of a widget. A widget holding a particular trait is announcing a particular ability to other widgets. The following table summarizes the standard Motif traits.

Purpose of Each Trait
Trait NameT{
A Widget Holding This Trait Can Do The Following:
T}
__
XmQTaccessTextualDisplay one primary text parcel.
__
XmQTactivatableT{
Become a command button in a dialog box.
T}
__
XmQTcareParentVisualT{
Borrow its parent's visual information.
T}
__
XmQTcontainerManage container item children.
__
XmQTcontainerItemT{
Become a child of a container widget.
T}
__
XmQTdialogShellSavvyBecome a child of a DialogShell.
__
XmQTjoinSideT{
Attach itself to one side of a suitable parent.
T}
__
XmQTmenuSavvyBecome a menu child.
__
XmQTmenuSystemManage a menu system.
__
XmQTnavigatorT{
Act as a navigator to a scrollable widget.
T}
__
XmQTscrollFrameT{
Handle one or more navigator widgets.
T}
__
XmQTspecifyRenderTableT{
Supply the names of its default render tables.
T}
__
XmQTtakesDefaultT{
Change its appearance to show that it is the default button.
T}
__
XmQTtransferT{
Transfer data to other widgets and/or receive data from other
widgets
T}
__

Traits are not often used in Motif application programs. However, traits are very important to widget writers. For complete details on traits, see the Motif Widget Writer's Guide.

The following table lists the names of all widgets and gadgets in the standard Motif widget set that hold a particular trait. For example, the following table shows that the XmQTcontainerItem trait is held by the XmIconGadget. As the table suggests, some traits are held by many of the standard Motif widgets.

Trait Installation in Standard Widget Set
Trait NameT{
Is Installed on The Following Widgets:
T}
__
XmQTaccessTextualT{
XmLabel and all its subclasses; XmLabelGadget
and all its subclasses; XmText; XmTextField
T}
__
XmQTactivatableT{
XmArrowButton; XmArrowButtonGadget; XmDrawnButton; XmPushButton;
XmPushButtonGadget
T}
__
XmQTcareParentVisualT{
All the subclasses of XmGadget (but not
XmGadget itself);
XmPrimitive and all its subclasses
T}
__
XmQTcontainerXmContainer
__
XmQTcontainerItemXmIconGadget
__
XmQTdialogShellSavvyXmBulletinBoard
__
XmQTjoinSideNo widgets install this trait
__
XmQTmenuSavvyT{
XmLabel; XmDrawnButton; XmCascadeButton; XmPushButton;
XmToggleButton; XmLabelGadget; XmCascadeButtonGadget;
XmPushButtonGadget; XmToggleButtonGadget
T}
__
XmQTmenuSystemXmRowColumn
__
XmQTnavigatorXmScrollBar; XmSpinBox
__
XmQTscrollFrameXmNotebook; XmScrolledWindow
__
XmQTspecifyRenderTableT{
XmBulletinBoard and all its subclasses;
XmMenuShell; XmVendorShell
T}
__
XmQTtakesDefaultXmPushButton; XmPushButtonGadget
__
XmQTtransferT{
XmContainer; XmLabel and all its subclasses;
XmLabelGadget and all its subclasses;
XmList; XmScale; XmText; XmTextField
T}
__

The following table lists the traits installed on each widget. For example, the following table indicates that the XmArrowButton widget holds both the XmQTactivatable and XmQTcareParentVisual traits.
Trait Use by
Widget
Widget NameInstalls These Traits
__
__
XmArrowButtonT{
XmQTactivatable, XmQTcareParentVisual
T}
__
XmArrowButtonGadgetT{
XmQTactivatable, XmQTcareParentVisual
T}
__
XmBulletinBoardT{
XmQTdialogShellSavvy, XmQTspecifyRenderTable
T}
__
XmCascadeButtonT{
XmQTaccessTextual, XmQTcareParentVisual, XmQTmenuSavvy,
XmQTtransfer
T}
__
XmCascadeButtonGadgetT{
XmQTaccessTextual, XmQTcareParentVisual, XmQTmenuSavvy,
XmQTtransfer
XmComboBox
T}
__
XmCommandXmQTspecifyRenderTable
__
XmContainerXmQTcontainer, XmQTtransfer
__
XmDialogShellNone
__
XmDisplayNone
__
XmDragContextNone
__
XmDragIconNone
__
XmDrawingAreaNone
__
XmDrawnButtonT{
XmQTaccessTextual, XmQTactivatable, XmQTcareParentVisual,
XmQTmenuSavvy, XmQTtransfer
T}
__
XmDropTransferNone
__
XmFileSelectionBoxXmQTspecifyRenderTable
__
XmFormXmQTspecifyRenderTable
__
XmFrameNone
__
XmGadgetNone
__
XmIconGadgetT{
XmQTcareParentVisual, XmQTcontainerItem
T}
__
XmLabelT{
XmQTaccessTextual, XmQTcareParentVisual, XmQTmenuSavvy,
XmQTtransfer
T}
__
XmLabelGadgetT{
XmQTaccessTextual, XmQTcareParentVisual, XmQTmenuSavvy,
XmQTtransfer
T}
__
XmListXmQTcareParentVisual, XmQTtransfer
__
XmMainWindow
__
XmManager
__
XmMenuShellXmQTspecifyRenderTable
__
XmMessageBoxXmQTspecifyRenderTable
__
XmNotebookXmQTscrollFrame
__
XmPanedWindow
__
XmPrimitiveXmQTcareParentVisual
__
XmPushButtonT{
XmQTaccessTextual, XmQTactivatable, XmQTcareParentVisual,
XmQTmenuSavvy, XmQTtakesDefault, XmQTtransfer
T}
__
XmPushButtonGadgetT{
XmQTaccessTextual, XmQTactivatable, XmQTcareParentVisual,
XmQTmenuSavvy, XmQTtakesDefault, XmQTtransfer
T}
__
XmRowColumnXmQTmenuSystem
__
XmScaleXmQTtransfer
__
XmScreen
__
XmScrollbarXmQTcareParentVisual, XmQTnavigator
__
XmScrolledWindowXmQTscrollFrame
__
XmSelectionBoxXmQTspecifyRenderTable
__
XmSeparatorXmQTcareParentVisual
__
XmSeparatorGadgetXmQTcareParentVisual
__
XmSpinBoxXmQTnavigator
__
XmTextT{
XmQTaccessTextual, XmQTcareParentVisual, XmQTtransfer
T}
__
XmTextFieldT{
XmQTaccessTextual, XmQTcareParentVisual,
XmQTtransfer
T}
__
XmToggleButtonT{
XmQTaccessTextual, XmQTcareParentVisual,
XmQTtransfer
T}
__
XmToggleButtonGadgetT{
XmQTaccessTextual, XmQTcareParentVisual, XmQTtransfer
T}
__
VendorShellXmQTspecifyRenderTable
__

The following table summarizes how the standard Motif widgets access traits. There are two general ways for a widget to access the traits of another widget.

One way is for a widget to ask another widget if it holds a particular trait. For example, XmBulletinBoard asks each of its children widgets if they hold the XmQTtakesDefault trait. XmBulletinBoard calls none of the trait methods of XmQTtakesDefault.

Another kind of access is when one widget calls another widget's trait method(s). For example, XmBulletinBoard calls the getRenderTable trait method of the XmQTspecifyRenderTable trait.
Trait Access By
Widget
WidgetAccesses These Traits:Calls These Trait Methods:
___
XmArrowButtonNoneNone
___
XmArrowButtonGadgetNoneNone
___
XmBulletinBoardXmQTtakesDefaultNone
___
XmBulletinBoardXmQTspecifyRenderTablegetRenderTable
___
XmCascadeButtonXmQTmenuSystemMany
___
XmCascadeButtonXmQTspecifyRenderTablegetRenderTable
___
XmCascadeButtonGadgetXmQTmenuSystemMany
___
XmCascadeButtonGadgetXmQTspecifyRenderTablegetRenderTable
___
XmComboBoxXmQTaccessTextualgetValue, setValue
___
XmCommandNoneNone
___
XmContainerXmQTcontainerItemgetValues, setValues
___
XmContainerXmQTscrollFramegetInfo
___
XmDialogShellXmQTdialogShellSavvycallMapUnmapCB
___
XmDisplayNoneNone
___
XmDragContextNoneNone
___
XmDragIconNoneNone
___
XmDrawingAreaNoneNone
___
XmDrawnButtonXmQTmenuSystemMany
___
XmDrawnButtonXmQTspecifyRenderTablegetRenderTable
___
XmDropTransferNoneNone
___
XmFileSelectionBoxXmQTactivatableNone
___
XmFormNoneNone
___
XmFrameNoneNone
___
XmGadgetNoneNone
___
XmIconGadgetXmQTcontainergetValues
___
XmIconGadgetXmQTspecifyRenderTablegetRenderTable
___
XmLabelXmQTmenuSystemvarious methods
___
XmLabelXmQTspecifyRenderTablegetRenderTable
___
XmLabelGadgetXmQTmenuSystemvarious methods
___
XmLabelGadgetXmQTspecifyRenderTablegetRenderTable
___
XmListXmQTnavigatorgetValues
___
XmListXmQTscrollFramegetInfo, init
___
XmListXmQTspecifyRenderTablegetRenderTable
___
XmMainWindowXmQTmenuSystemvarious methods
___
XmManagerNoneNone
___
XmMenuShellXmQTmenuSystemvarious methods
___
XmMenuShellXmQTspecifyRenderTablegetRenderTable
___
XmMessageBoxXmQTactivatableNone
___
XmNotebookXmQTscrollFrameinit, addNavigator, removeNavigator
___
XmNotebookXmQTnavigatorgetValue
___
XmNotebookXmQTactivatablechangeCB
___
XmNotebookXmQTaccessTextualNone
___
XmPanedWindowNoneNone
___
XmPrimitiveNoneNone
___
XmPushButtonXmQTmenuSystemvarious methods
___
XmPushButtonXmQTspecifyRenderTablegetRenderTable
___
XmPushButtonGadgetXmQTmenuSystemvarious methods
___
XmPushButtonGadgetXmQTspecifyRenderTablegetRenderTable
___
XmRowColumnXmQTmenuSavvyT{
getAccelerator, getMnemonic, getActivateCBName
T}
___
XmRowColumnXmQTmenuSystemvarious methods
___
XmScaleXmQTspecifyRenderTablegetRenderTable
___
XmScreenNoneNone
___
XmScrollbarNoneNone
___
XmScrolledWindowXmQTnavigatorgetValue
___
XmScrolledWindowXmQTscrollFrameinit, addNavigator
___
XmSelectionBoxXmQTaccessTextualsetValue;
___
XmSelectionBoxXmQTactivatableNone
___
XmSeparatorNoneNone
___
XmSeparatorGadgetNoneNone
___
XmSpinBoxXmQTaccessTextualsetValue
___
XmTextXmQTaccessTextualgetValue, setValue
___
XmTextXmQTnavigatorgetValue
___
XmTextXmQTscrollFramegetInfo, init
___
XmTextXmQTspecifyRenderTablegetRenderTable
___
XmTextFieldXmQTspecifyRenderTablegetRenderTable
___
XmToggleButtonXmQTmenuSystemvarious methods
___
XmToggleButtonXmQTspecifyRenderTablegetRenderTable
___
XmToggleButtonGadgetXmQTmenuSystemvarious methods
___
XmToggleButtonGadgetXmQTspecifyRenderTablegetRenderTable
___
VendorShellXmQTspecifyRenderTablegetRenderTable
___

RELATED

The following reference pages are documented in the Motif Widget Writer's Guide: XmeTraitSet(3), XmeTraitGet(3), XmQTaccessTextual(3), XmQTactivatable(3), XmQTcareParentVisual(3), XmQTcontainer(3), XmQTcontainerItem(3), XmQTdialogShellSavvy(3), XmQTjoinSide(3), XmQTmenuSavvy(3), XmQTmenuSystem(3), XmQTnavigator(3), XmQTscrollFrame(3), XmQTspecifyRenderTable(3), and XmQTtakesDefault(3).