XmIconGadget(library call) XmIconGadget(library call)
NAME [Toc] [Back]
XmIconGadget - The IconGadget widget class
SYNOPSIS [Toc] [Back]
#include <Xm/IconG.h>
DESCRIPTION [Toc] [Back]
IconGadget is an instantiable widget used to display both text and a
pixmap in various combinations. Other widgets that hold the
XmQTcontainer trait, such as Container, can use IconGadget to
represent objects.
IconGadget text is a compound string. If no text is supplied, then the
compound string is generated from the gadget name. IconGadget text is
placed relative to the type of associated pixmap.
Depending upon the XmNviewType resource, IconGadget can display two
views:
XmLARGE_ICON [Toc] [Back]
The IconGadget text string is displayed below the pixmap,
and centered.
XmSMALL_ICON [Toc] [Back]
The IconGadget text string is placed on the side of the
small icon, in the widget's XmNlayoutDirection.
A bitmap mask can be supplied for each pixmap to clip the pixmap into
some shape other than a rectangle. The XmNlargeIconMask and
XmNsmallIconMask resources specify the large and small bitmap masks
respectively. Visual emphasis for the IconGadget is provided with the
XmNvisualEmphasis resource. IconGadget's XmNdetail and XmNdetailCount
resources provide a detail view for IconGadgets, enabling the display
of Strings alongside the IconGadget. The exact layout ordering of the
strings depends on the associated containing widget.
IconGadget uses the XmQTcontainer and XmQTspecifyRenderTable traits,
and holds the XmQTcareParentVisual and XmQTcontainerItem traits.
Classes [Toc] [Back]
IconGadget inherits behaviour, resources, and traits from Object,
RectObject, and XmGadget classes.
The class pointer is xmIconGadgetClass.
The class name is XmIconGadget.
New Resources [Toc] [Back]
The following table defines a set of widget resources used by the
programmer to specify data. The programmer can also set the resource
values for the inherited classes to set attributes for this widget.
- 1 - Formatted: January 24, 2005
XmIconGadget(library call) XmIconGadget(library call)
To reference a resource by name or by class in a .Xdefaults file,
remove the XmN or XmC prefix and use the remaining letters. To
specify one of the defined values for a resource in a .Xdefaults file,
remove the Xm prefix and use the remaining letters (in either
lowercase or uppercase, but include any underscores between words).
The codes in the access column indicate whether the given resource can
be set at creation time (C), set by using XtSetValues (S), retrieved
by using XtGetValues (G), or is not applicable (N/A).
________________________________________________________________________________________
| XmIconGadget Resource Set |
|Name Class Type Default Access |
|___________________|___________________|_______________|______________________|________|
|Xmalignment | XmCAlignment | unsigned char | XmALIGNMENT_CENTER | CSG |
|___________________|___________________|_______________|______________________|________|
|XmNdetail | XmCDetail | XmStringTable | NULL | CSG |
|___________________|___________________|_______________|______________________|________|
|XmNdetailCount | XmCDetailCount | Cardinal | 0 | CSG |
|___________________|___________________|_______________|______________________|________|
|XmNfontList | XmCFontList | XmFontList | NULL | CSG |
|___________________|___________________|_______________|______________________|________|
|XmNlabelString | XmCXmString | XmString | dynamic | CSG |
|___________________|___________________|_______________|______________________|________|
|XmNlargeIconMask | XmCIconMask | Pixmap | dynamic | CSG |
|___________________|___________________|_______________|______________________|________|
|XmNlargeIconPixmap | XmCIconPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG |
|___________________|___________________|_______________|______________________|________|
|XmNmarginHeight | XmCMarginHeight | Dimension | 2 | CSG |
|___________________|___________________|_______________|______________________|________|
|XmNmarginWidth | XmCMarginWidth | Dimension | 2 | CSG |
|___________________|___________________|_______________|______________________|________|
|XmNrenderTable | XmCRenderTable | XmRenderTable | dynamic | CSG |
|___________________|___________________|_______________|______________________|________|
|XmNsmallIconMask | XmCIconMask | Pixmap | dynamic | CSG |
|___________________|___________________|_______________|______________________|________|
|XmNsmallIconPixmap | XmCIconPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG |
|___________________|___________________|_______________|______________________|________|
|XmNviewType | XmCViewType | unsigned char | XmLARGE_ICON | CSG |
|___________________|___________________|_______________|______________________|________|
|XmNvisualEmphasis | XmCVisualEmphasis | unsigned char | XmNOT_SELECTED | CSG |
|___________________|___________________|_______________|______________________|________|
|XmNspacing | XmCSpacing | Dimension | 4 | CSG |
|___________________|___________________|_______________|______________________|________|
|___________________|___________________|_______________|______________________|________|
XmNalignment [Toc] [Back]
Specifies the horizontal alignment of the pixmap with
respect to the label when the icon is in LARGE_ICON view.
Valid values are XmALIGNMENT_BEGINNING, XmALIGNMENT_CENTER,
and XmALIGNMENT_END.
- 2 - Formatted: January 24, 2005
XmIconGadget(library call) XmIconGadget(library call)
XmNdetail Specifies an array of XmStrings that are the detail
information associated with the gadget.
XmNdetailCount [Toc] [Back]
Specifies the size of the XmNdetail array.
XmNfontList [Toc] [Back]
Specifies the font list associated with XmIconGadget. The
font list is an obsolete construct, and has been superseded
by the render table. It is included for compatibility with
earlier versions of Motif, and for applications that do not
easily support render tables. The default font list is
derived from the default render table, and if both a font
list and a render table are specified, the render table
takes precedence.
XmNlabelString [Toc] [Back]
Specifies the compound string. If this value is NULL, it is
initialized by converting the name of the gadget to a
compound string. Refer to XmString(3) for more information
on the creation and structure of compound strings.
XmNlargeIconMask [Toc] [Back]
Specifies the icon mask used when XmNviewType is
XmLARGE_ICON.
XmNlargeIconPixmap [Toc] [Back]
Specifies the pixmap when XmNviewType is XmLARGE_ICON. If
this resource's value is XmUNSPECIFIED_PIXMAP, there is no
pixmap. If a large icon pixmap is specified, and if during
conversion an associated mask can be fetched, then the
XmNlargeIconMask resource is set to that mask.
XmNmarginHeight [Toc] [Back]
Specifies the amount of vertical space between the highlight
and the inside (pixmap and label).
XmNmarginWidth [Toc] [Back]
Specifies the amount of horizontal space between the
highlight and the inside (pixmap and label).
XmNrenderTable [Toc] [Back]
Specifies the XmRenderTable of the text used in the gadget.
If XmNrenderTable is NULL when the IconGadget is created,
the parent's render table resource value is used if there is
a render table. If the parent does not have a render table,
the parent hierarchy of the widget is searched for a widget
that holds the XmQTspecifyRenderTable trait. If such an
ancestor is found, the render table is initialized to the
XmLABEL_RENDER_TABLE value of the ancestor widget. If no
such widget is found, the default is implementation
- 3 - Formatted: January 24, 2005
XmIconGadget(library call) XmIconGadget(library call)
dependent. Refer to XmRenderTable(3) for more information
on the creation and structure of a XmRenderTable. If both a
render table and a font list are specified, the render table
will take precedence.
XmNsmallIconMask [Toc] [Back]
Specifies the icon mask used when XmNviewType is
XmSMALL_ICON.
XmNsmallIconPixmap [Toc] [Back]
Specifies the pixmap when XmNviewType is XmSMALL_ICON. If
this resource's value is XmUNSPECIFIED_PIXMAP, there is no
pixmap. If a small icon pixmap is specified, and if during
conversion an associated mask can be fetched, then the
XmNsmallIconMask resource is set to that mask.
XmNspacing [Toc] [Back]
Specifies the amount of space between the pixmap and the
label parts of the icon.
XmNviewType [Toc] [Back]
Specifies the view (combination of pixmaps/text) that will
be displayed. If the IconGadget is a child of a Container
widget, however, then the specification of this resource
will be taken from the Container- if Container's
XmNentryViewType is either XmLARGE_ICON or XmSMALL_ICON,
then IconGadget's XmNviewType takes that value; otherwise,
the default is XmLARGE_ICON. This resource is set to one of
the following:
XmLARGE_ICON [Toc] [Back]
The pixmap specified by XmNlargeIconPixmap is
displayed with the XmNlabelString beneath it.
XmSMALL_ICON [Toc] [Back]
The pixmap specified by XmNsmallIconPixmap is
displayed with the XmNlabelString displayed in the
direction of the XmNlayoutDirection resource.
XmNvisualEmphasis [Toc] [Back]
Specifies the visual state of the IconGadget. If the
IconGadget is in a selected state all visuals are displayed
using the Container XmNselectColor resource. It is set to
one of the following:
XmSELECTED [Toc] [Back]
The IconGadget is in the selected state and
displays the appropriate visuals.
XmNOT_SELECTED [Toc] [Back]
The IconGadget is not in the selected state.
- 4 - Formatted: January 24, 2005
XmIconGadget(library call) XmIconGadget(library call)
Inherited Resources [Toc] [Back]
IconGadget inherits behavior and resources from the superclasses
described in the following tables. For a complete description of each
resource, refer to the reference page for that superclass.
__________________________________________________________________________________________________
| XmGadget Resource Set |
|Name Class Type Default Access |
|______________________|_______________________|__________________|______________________|________|
|XmNbackground | XmCBackground | Pixel | dynamic | CSG |
|______________________|_______________________|__________________|______________________|________|
|XmNbackgroundPixmap | XmCPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG |
|______________________|_______________________|__________________|______________________|________|
|XmNbottomShadowColor | XmCBottomShadowColor | Pixel | dynamic | CSG |
|______________________|_______________________|__________________|______________________|________|
|XmNbottomShadowPixmap | XmCBottomShadowPixmap | Pixmap | dynamic | CSG |
|______________________|_______________________|__________________|______________________|________|
|XmNhelpCallback | XmCCallback | XtCallbackList | NULL | C |
|______________________|_______________________|__________________|______________________|________|
|XmNforeground | XmCForeground | Pixel | dynamic | CSG |
|______________________|_______________________|__________________|______________________|________|
|XmNhighlightColor | XmCHighlightColor | Pixel | dynamic | CSG |
|______________________|_______________________|__________________|______________________|________|
|XmNhighlightOnEnter | XmCHighlightOnEnter | Boolean | False | CSG |
|______________________|_______________________|__________________|______________________|________|
|XmNhighlightPixmap | XmCHighlightPixmap | Pixmap | dynamic | CSG |
|______________________|_______________________|__________________|______________________|________|
|XmNhighlightThickness | XmCHighlightThickness | Dimension | 0 | CSG |
|______________________|_______________________|__________________|______________________|________|
|XmNlayoutDirection | XmNCLayoutDirection | XmDirection | dynamic | CG |
|______________________|_______________________|__________________|______________________|________|
|XmNnavigationType | XmCNavigationType | XmNavigationType | XmNONE | CSG |
|______________________|_______________________|__________________|______________________|________|
|XmNshadowThickness | XmCShadowThickness | Dimension | 0 | CSG |
|______________________|_______________________|__________________|______________________|________|
|XmNtopShadowColor | XmCTopShadowColor | Pixel | dynamic | CSG |
|______________________|_______________________|__________________|______________________|________|
|XmNtopShadowPixmap | XmCTopShadowPixmap | Pixmap | dynamic | CSG |
|______________________|_______________________|__________________|______________________|________|
|XmNtraversalOn | XmCTraversalOn | Boolean | False | CSG |
|______________________|_______________________|__________________|______________________|________|
|XmNunitType | XmCUnitType | unsigned char | dynamic | CSG |
|______________________|_______________________|__________________|______________________|________|
|XmNuserData | XmCUserData | XtPointer | NULL | CSG |
|______________________|_______________________|__________________|______________________|________|
|______________________|_______________________|__________________|______________________|________|
- 5 - Formatted: January 24, 2005
XmIconGadget(library call) XmIconGadget(library call)
______________________________________________________________________
| RectObj Resource Set |
|Name Class Type Default Access |
|_____________________|________________|___________|_________|________|
|XmNancestorSensitive | XmCSensitive | Boolean | dynamic | G |
|_____________________|________________|___________|_________|________|
|XmNborderWidth | XmCBorderWidth | Dimension | 0 | N/A |
|_____________________|________________|___________|_________|________|
|XmNheight | XmCHeight | Dimension | dynamic | CSG |
|_____________________|________________|___________|_________|________|
|XmNsensitive | XmCSensitive | Boolean | True | CSG |
|_____________________|________________|___________|_________|________|
|XmNwidth | XmCWidth | Dimension | dynamic | CSG |
|_____________________|________________|___________|_________|________|
|XmNx | XmCPosition | Position | 0 | CSG |
|_____________________|________________|___________|_________|________|
|XmNy | XmCPosition | Position | 0 | CSG |
|_____________________|________________|___________|_________|________|
|_____________________|________________|___________|_________|________|
______________________________________________________________________
| Object Resource Set |
|Name Class Type Default Access |
|___________________|_____________|________________|_________|________|
|XmNdestroyCallback | XmCCallback | XtCallbackList | NULL | C |
|___________________|_____________|________________|_________|________|
|___________________|_____________|________________|_________|________|
Additional Behavior [Toc] [Back]
IconGadget has no behavior.
Virtual Bindings [Toc] [Back]
The bindings for virtual keys are vendor specific. For information
about bindings for virtual buttons and keys, see VirtualBindings(3).
Errors/Warnings
The toolkit will display a warning if an incorrect value is given for
an enumeration resource.
RELATED [Toc] [Back]
Core(3), XmContainer(3), XmCreateIconGadget(3), and XmGadget(3).
- 6 - Formatted: January 24, 2005 [ Back ] |