[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]
Motif 2.1 Widget Writer's Guide
XmQTcontainerItem
A widget holding this trait can serve as a child of a widget holding the
XmQTcontainer trait
Format
#include <Xm/ContItemT.h>
typedef struct {
Mask valueMask;
unsigned char view_type;
unsigned char visual_emphasis;
Dimension icon_width;
Cardinal detail_count;
} XmContainerItemDataRec, *XmContainerItemData;
typedef struct {
int version;
XmContainerItemSetValuesProc setValues;
XmContainerItemGetValuesProc getValues;
} XmContainerItemTraitRec, *XmContainerItemTrait;
void
(*XmContainerItemSetValuesProc)WidgetXmContainerItemData
void
(*XmContainerItemGetValuesProc)WidgetXmContainerItemData
DESCRIPTION
A widget holding the XmQTcontainerItem trait can serve as a child
to a widget holding the XmQTcontainer trait.
XmIconGadget is the only standard Motif class holding the
XmQTcontainerItem trait. XmContainer is the only standard Motif
widget that examines its children for this trait.
void setValuesWidget
containerChildWidgetXmContainerItemData
containerItemData
A container widget (such as XmContainer) calls the setValues
trait method of its containerChildWidget in order to set certain
visual properties.
containerChildWidgetSpecifies the container child widget that is holding this trait.
containerItemDataSpecifies an XmContainerItemData structure. This structure holds five
fields, but only the first three fields are meaningful to the
setValues trait method. Following is a description of those three
fields:
valueMaskSpecifies a bit mask. Each bit in the bit mask symbolizes a visual
property affected by the setValues trait method. If a particular
bit is set to 1, setValues modifies the associated visual property.
If this same bit holds a 0, setValues does not modify the
associated visual property. To help you set bits, the ContItemT.h
header file provides three relevant constants.
ContItemViewTypeSets the view_type visual property bit to 1.
ContItemVisualEmphasisSets the setValues visual property bit to 1.
ContItemAllValidSets both visual property bits to 1.
view_typeSpecifies the view type of widget. For example, when XmContainer
calls setValues, it passes a view_type value of either
XmLARGE_ICON or XmSMALL_ICON. (See the XmIconGadget(3) reference
page for a description of XmLARGE_ICON and XmSMALL_ICON.)
visual_emphasisSpecifies the visual emphasis of widget. For example, when
XmContainer calls setValues, it passes a visualEmphasis
value of either XmSELECTED or XmNOT_SELECTED. See the
XmIconGadget(3) reference page for a description of XmSELECTED and
XmNOT_SELECTED.
void getValuesWidget
containerChildWidgetXmContainerItemData
containerItemData
A container widget calls the getValues trait method of its
containerChildWidget to determine what visual properties the
containerChildWidget provides.
containerChildWidgetSpecifies the child widget that is holding this trait.
containerItemDataSpecifies an XmContainerItemData structure. This structure holds the
following five fields:
valueMaskSpecifies a bit mask. Each bit in the bit mask symbolizes a visual
property returned by the getValues trait method. If the caller sets
a particular bit to 1, getValues returns meaningful information
about the associated visual property. However, if the caller places a 0 in
this same bit, then getValues does not return meaningful
information about the associated visual property. In short, the
valueMask lets the caller specify the visual properties that it is
interested in. To help you set bits, the ContItemT.h header file
provides the following five constants:
ContItemViewTypeSets the view_type visual property bit to 1.
ContItemVisualEmphasisSets the visual_emphasis visual property bit to 1.
ContItemIconWidthSets the icon_width visual property bit to 1.
ContItemDetailCountSets the detail_count visual property bit to 1.
ContItemAllValidSets all four visual property bits to 1.
view_typeReturns the view type of childContainerWidget. If XmContainer is
managing containerChildWidget, XmContainer expects that the returned
value will be either XmLARGE_ICON or XmSMALL_ICON. See the
XmIconGadget(3) reference page for a description of these two
values.
visual_emphasisReturns the visual emphasis of childContainerWidget. If
XmContainer is managing widget, XmContainer expects that the returned
value will be either XmSELECTED or XmNOT_SELECTED. (See the
XmIconGadget(3) reference page for a description of these two
values.)
icon_widthReturns the width of the icon. (This width will not include the width of
any associated detail strings.)
detail_countReturns the number of details strings in this container child.
RELATED
ExmGrid(3), XmContainer(3),
XmIconGadget(3), and XmQTcontainer(3).
[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]