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 Name A Widget Holding This Trait Can Do The Following:
_ _
XmQTaccessTextual
Display one primary text parcel. _
_
XmQTactivatable Become a command button in a dialog box.
_ _
XmQTcareParentVisual
Borrow its parent's visual information. _
_
XmQTcontainer Manage container item children.
_ _
XmQTcontainerItem
Become a child of a container widget. _
_
XmQTdialogShellSavvy Become a child of a DialogShell.
_ _
XmQTjoinSide
Attach itself to one side of a suitable parent. _
_
XmQTmenuSavvy Become a menu child.
_ _
XmQTmenuSystem
Manage a menu system. _
_
XmQTnavigator Act as a navigator to a scrollable widget.
_ _
XmQTscrollFrame
Handle one or more navigator widgets. _
_
XmQTspecifyRenderTable Supply the names of its default render tables.
_ _
XmQTtakesDefault
Change its appearance to show that it is the default button. _
_
XmQTtransfer Transfer data to other widgets and/or receive data from other widgets
_ _

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 Name
Is Installed on The Following Widgets: _
_
XmQTaccessTextual XmLabel and all its subclasses; XmLabelGadget and all its subclasses; XmText; XmTextField
_ _
XmQTactivatable
XmArrowButton; XmArrowButtonGadget; XmDrawnButton; XmPushButton; XmPushButtonGadget _
_
XmQTcareParentVisual All the subclasses of XmGadget (but not XmGadget itself); XmPrimitive and all its subclasses
_ _
XmQTcontainer
XmContainer _
_
XmQTcontainerItem XmIconGadget
_ _
XmQTdialogShellSavvy
XmBulletinBoard _
_
XmQTjoinSide No widgets install this trait
_ _
XmQTmenuSavvy
XmLabel; XmDrawnButton; XmCascadeButton; XmPushButton; XmToggleButton; XmLabelGadget; XmCascadeButtonGadget; XmPushButtonGadget; XmToggleButtonGadget _
_
XmQTmenuSystem XmRowColumn
_ _
XmQTnavigator
XmScrollBar; XmSpinBox _
_
XmQTscrollFrame XmNotebook; XmScrolledWindow
_ _
XmQTspecifyRenderTable
XmBulletinBoard and all its subclasses; XmMenuShell; XmVendorShell _
_
XmQTtakesDefault XmPushButton; XmPushButtonGadget
_ _
XmQTtransfer
XmContainer; XmLabel and all its subclasses; XmLabelGadget and all its subclasses; XmList; XmScale; XmText; XmTextField _
_

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 Name Installs These Traits
_ _
=
_
_
XmArrowButton XmQTactivatable, XmQTcareParentVisual
_ _
XmArrowButtonGadget
XmQTactivatable, XmQTcareParentVisual _
_
XmBulletinBoard XmQTdialogShellSavvy, XmQTspecifyRenderTable
_ _
XmCascadeButton
XmQTaccessTextual, XmQTcareParentVisual, XmQTmenuSavvy, XmQTtransfer _
_
XmCascadeButtonGadget XmQTaccessTextual, XmQTcareParentVisual, XmQTmenuSavvy, XmQTtransfer XmComboBox
_ _
XmCommand
XmQTspecifyRenderTable _
_
XmContainer XmQTcontainer, XmQTtransfer
_ _
XmDialogShell
None _
_
XmDisplay None
_ _
XmDragContext
None _
_
XmDragIcon None
_ _
XmDrawingArea
None _
_
XmDrawnButton XmQTaccessTextual, XmQTactivatable, XmQTcareParentVisual, XmQTmenuSavvy, XmQTtransfer
_ _
XmDropTransfer
None _
_
XmFileSelectionBox XmQTspecifyRenderTable
_ _
XmForm
XmQTspecifyRenderTable _
_
XmFrame None
_ _
XmGadget
None _
_
XmIconGadget XmQTcareParentVisual, XmQTcontainerItem
_ _
XmLabel
XmQTaccessTextual, XmQTcareParentVisual, XmQTmenuSavvy, XmQTtransfer _
_
XmLabelGadget XmQTaccessTextual, XmQTcareParentVisual, XmQTmenuSavvy, XmQTtransfer
_ _
XmList
XmQTcareParentVisual, XmQTtransfer _
_
XmMainWindow
_ _
XmManager
_
_
XmMenuShell XmQTspecifyRenderTable
_ _
XmMessageBox
XmQTspecifyRenderTable _
_
XmNotebook XmQTscrollFrame
_ _
XmPanedWindow
_
_
XmPrimitive XmQTcareParentVisual
_ _
XmPushButton
XmQTaccessTextual, XmQTactivatable, XmQTcareParentVisual, XmQTmenuSavvy, XmQTtakesDefault, XmQTtransfer _
_
XmPushButtonGadget XmQTaccessTextual, XmQTactivatable, XmQTcareParentVisual, XmQTmenuSavvy, XmQTtakesDefault, XmQTtransfer
_ _
XmRowColumn
XmQTmenuSystem _
_
XmScale XmQTtransfer
_ _
XmScreen
_
_
XmScrollbar XmQTcareParentVisual, XmQTnavigator
_ _
XmScrolledWindow
XmQTscrollFrame _
_
XmSelectionBox XmQTspecifyRenderTable
_ _
XmSeparator
XmQTcareParentVisual _
_
XmSeparatorGadget XmQTcareParentVisual
_ _
XmSpinBox
XmQTnavigator _
_
XmText XmQTaccessTextual, XmQTcareParentVisual, XmQTtransfer
_ _
XmTextField
XmQTaccessTextual, XmQTcareParentVisual, XmQTtransfer _
_
XmToggleButton XmQTaccessTextual, XmQTcareParentVisual, XmQTtransfer
_ _
XmToggleButtonGadget
XmQTaccessTextual, XmQTcareParentVisual, XmQTtransfer _
_
VendorShell XmQTspecifyRenderTable
_ _

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
Widget Accesses These Traits: Calls These Trait Methods:
_ _ _
XmArrowButton None
None _ _
_ XmArrowButtonGadget
None None _
_ _
XmBulletinBoard XmQTtakesDefault None
_ _ _
XmBulletinBoard XmQTspecifyRenderTable
getRenderTable _ _
_ XmCascadeButton
XmQTmenuSystem Many _
_ _
XmCascadeButton XmQTspecifyRenderTable getRenderTable
_ _ _
XmCascadeButtonGadget XmQTmenuSystem
Many _ _
_ XmCascadeButtonGadget
XmQTspecifyRenderTable getRenderTable _
_ _
XmComboBox XmQTaccessTextual getValue, setValue
_ _ _
XmCommand None
None _ _
_ XmContainer
XmQTcontainerItem getValues, setValues _
_ _
XmContainer XmQTscrollFrame getInfo
_ _ _
XmDialogShell XmQTdialogShellSavvy
callMapUnmapCB _ _
_ XmDisplay
None None _
_ _
XmDragContext None None
_ _ _
XmDragIcon None
None _ _
_ XmDrawingArea
None None _
_ _
XmDrawnButton XmQTmenuSystem Many
_ _ _
XmDrawnButton XmQTspecifyRenderTable
getRenderTable _ _
_ XmDropTransfer
None None _
_ _
XmFileSelectionBox XmQTactivatable None
_ _ _
XmForm None
None _ _
_ XmFrame
None None _
_ _
XmGadget None None
_ _ _
XmIconGadget XmQTcontainer
getValues _ _
_ XmIconGadget
XmQTspecifyRenderTable getRenderTable _
_ _
XmLabel XmQTmenuSystem various methods
_ _ _
XmLabel XmQTspecifyRenderTable
getRenderTable _ _
_ XmLabelGadget
XmQTmenuSystem various methods _
_ _
XmLabelGadget XmQTspecifyRenderTable getRenderTable
_ _ _
XmList XmQTnavigator
getValues _ _
_ XmList
XmQTscrollFrame getInfo, init _
_ _
XmList XmQTspecifyRenderTable getRenderTable
_ _ _
XmMainWindow XmQTmenuSystem
various methods _ _
_ XmManager
None None _
_ _
XmMenuShell XmQTmenuSystem various methods
_ _ _
XmMenuShell XmQTspecifyRenderTable
getRenderTable _ _
_ XmMessageBox
XmQTactivatable None _
_ _
XmNotebook XmQTscrollFrame init, addNavigator, removeNavigator
_ _ _
XmNotebook XmQTnavigator
getValue _ _
_ XmNotebook
XmQTactivatable changeCB _
_ _
XmNotebook XmQTaccessTextual None
_ _ _
XmPanedWindow None
None _ _
_ XmPrimitive
None None _
_ _
XmPushButton XmQTmenuSystem various methods
_ _ _
XmPushButton XmQTspecifyRenderTable
getRenderTable _ _
_ XmPushButtonGadget
XmQTmenuSystem various methods _
_ _
XmPushButtonGadget XmQTspecifyRenderTable getRenderTable
_ _ _
XmRowColumn XmQTmenuSavvy
getAccelerator, getMnemonic, getActivateCBName _ _
_ XmRowColumn
XmQTmenuSystem various methods _
_ _
XmScale XmQTspecifyRenderTable getRenderTable
_ _ _
XmScreen None
None _ _
_ XmScrollbar
None None _
_ _
XmScrolledWindow XmQTnavigator getValue
_ _ _
XmScrolledWindow XmQTscrollFrame
init, addNavigator _ _
_ XmSelectionBox
XmQTaccessTextual setValue; _
_ _
XmSelectionBox XmQTactivatable None
_ _ _
XmSeparator None
None _ _
_ XmSeparatorGadget
None None _
_ _
XmSpinBox XmQTaccessTextual setValue
_ _ _
XmText XmQTaccessTextual
getValue, setValue _ _
_ XmText
XmQTnavigator getValue _
_ _
XmText XmQTscrollFrame getInfo, init
_ _ _
XmText XmQTspecifyRenderTable
getRenderTable _ _
_ XmTextField
XmQTspecifyRenderTable getRenderTable _
_ _
XmToggleButton XmQTmenuSystem various methods
_ _ _
XmToggleButton XmQTspecifyRenderTable
getRenderTable _ _
_ XmToggleButtonGadget
XmQTmenuSystem various methods _
_ _
XmToggleButtonGadget XmQTspecifyRenderTable getRenderTable
_ _ _
VendorShell XmQTspecifyRenderTable
getRenderTable _ _
_

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).