XmIconBox(3X)XmIconBox(3X)NAMEXmIconBox — The IconBox widget class
SYNOPSIS
#include <Xm/IconBox.h>
DESCRIPTION
The Icon Box widget lays out its children on a grid with each child
forced to be the same size and with the location of each child speci‐
fied as an X and Y location on the grid.
The size of the Icon Box, its children, and the number of cells dis‐
played are calculated as described below. The general idea is that all
children are always be shown and should be given their desired size
whenever possible. The user may add or delete cells by resizing this
window using the window manager widget.
The preferred size is calculated by using the maximum desired child
height or width and making sure that these are no smaller than the min‐
imum sizes. This size is multiplied by the number of cells along the
axis and properly padded to come up with a preferred size. The number
of cells is the maximum of the largest cellX or cellY value and the
minimum number of horizontal or vertical cells.
If the Icon box is forced larger than its preferred size more cells are
added at the bottom-right of the widget while the children all remain
at their preferred sizes.
If the Icon box is forced smaller than its preferred size each cell is
forced to be smaller in order to allow all children to fit within the
Icon Box. All children will be forced to the same smaller size.
Classes
Icon Box inherits behavior, resources, and traits from Core, Composite,
Constraint, and XmManager.
The class pointer is xmIconBoxWidgetClass.
The class name is XmIconBox.
New Resources
The following table defines a set of widget resources used by the pro‐
grammer to specify data. The programmer can also set the resource val‐
ues for the inherited classes to set attributes for this widget. 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 if 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).
┌──────────────────────────────────────────────────────────────────────────────┐
│ │XmIconBox Resource Set │ │ │
│Name │ Class │ Type │ Default │ Access │
├──────────────────────────┼────────────────────┼───────────┼─────────┼────────┤
│XmNhorizontalMargin │ XmCMargin │ Dimension │ 4 │ CSG │
├──────────────────────────┼────────────────────┼───────────┼─────────┼────────┤
│XmNminimumHorizontalCells │ XmCDefaultCells │ int │ 8 │ CSG │
├──────────────────────────┼────────────────────┼───────────┼─────────┼────────┤
│XmNminimumVerticalCells │ XmCDefaultCells │ int │ 4 │ CSG │
├──────────────────────────┼────────────────────┼───────────┼─────────┼────────┤
│XmNminimumCellHeight │ XmCMinimumCellSize │ Dimension │ 10 │ CSG │
├──────────────────────────┼────────────────────┼───────────┼─────────┼────────┤
│XmNminimumCellWidth │ XmCMinimumCellSize │ Dimension │ 20 │ CSG │
├──────────────────────────┼────────────────────┼───────────┼─────────┼────────┤
│XmNverticalMargin │ XmCMargin │ Dimension │ 4 │ CSG │
├──────────────────────────┼────────────────────┼───────────┼─────────┼────────┤
└──────────────────────────┴────────────────────┴───────────┴─────────┴────────┘
XmNhorizontalMargin
XmNverticalMargin
The amount of space between each cell and its neighbor or the
edge of the Icon Box.
XmNminimumHorizontalCells
XmNminimumVerticalCells
The minimum number of cells to display in the horizontal and
vertical directions. This number of cells will always be
displayed.
XmNminimumCellWidth
XmNminimumCellHeight
The smallest size the cells are allowed to be in the direc‐
tion specified.
Constraint Resources
┌────────────────────────────────────────────────────────┐
│ │ XmIconBox│Constraint Resource Set │ │
│Name │ Class │ Type │ Default │ Access │
├─────────┼──────────┼───────┼──────────────────┼────────┤
│XmNcellX │ XmCCellX │ Short │ XmIconBoxAnyCell │ CSG │
├─────────┼──────────┼───────┼──────────────────┼────────┤
│XmNcellY │ XmCCellY │ Short │ XmIconBoxAnyCell │ CSG │
├─────────┼──────────┼───────┼──────────────────┼────────┤
└─────────┴──────────┴───────┴──────────────────┴────────┘
XmNcellX
XmNcellY The location of this cell in cell space. These coordinates
may be any positive integer. They determine where this widget
will be placed relative to its neighbors. Having two chil‐
dren at the same cell X and cell Y location will result in
undefined behavior. To place a cell at any empty cell, set
cell X and cell Y to the value XmIconBoxAnyCell.
Inherited Resources
Icon Box 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.
┌────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ │ XmManager Resource Set │ │ │
│Name │ Class │ Type │ Default │ Access │
├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
│XmNbottomShadowColor │ XmCBottomShadowColor │ Pixel │ dynamic │ CSG │
├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
│XmNbottomShadowPixmap │ XmCBottomShadowPixmap │ Pixmap │ XmUNSPECIFIED_PIXMAP │ CSG │
├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
│XmNforeground │ XmCForeground │ Pixel │ dynamic │ CSG │
├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
│XmNhelpCallback │ XmCCallback │ XtCallbackList │ NULL │ C │
├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
│XmNhighlightColor │ XmCHighlightColor │ Pixel │ dynamic │ CSG │
├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
│XmNhighlightPixmap │ XmCHighlightPixmap │ Pixmap │ dynamic │ CSG │
├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
│XmNinitialFocus │ XmCInitialFocus │ Widget │ dynamic │ CSG │
├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
│XmNlayoutDirection │ XmCLayoutDirection │ XmDirection │ dynamic │ CG │
├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
│XmNnavigationType │ XmCNavigationType │ XmNavigationType │ XmTAB_GROUP │ CSG │
├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
│XmNpopupHandlerCallback │ XmCCallback │ XtCallbackList │ NULL │ C │
├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
│XmNshadowThickness │ XmCShadowThickness │ Dimension │ dynamic │ CSG │
├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
│XmNstringDirection │ XmCStringDirection │ XmStringDirection │ dynamic │ CG │
├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
│XmNtopShadowColor │ XmCTopShadowColor │ Pixel │ dynamic │ CSG │
├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
│XmNtopShadowPixmap │ XmCTopShadowPixmap │ Pixmap │ dynamic │ CSG │
├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
│XmNtraversalOn │ XmCTraversalOn │ Boolean │ True │ CSG │
├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
│XmNunitType │ XmCUnitType │ unsigned char │ dynamic │ CSG │
├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
│XmNuserData │ XmCUserData │ XtPointer │ NULL │ CSG │
├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
└────────────────────────┴───────────────────────┴───────────────────┴──────────────────────┴────────┘
┌───────────────────────────────────────────────────────────────────────┐
│ │ Composite Resource Set │ │ │
│Name │ Class │ Type │ Default │ Access │
├──────────────────┼───────────────────┼─────────────┼─────────┼────────┤
│XmNchildren │ XmCReadOnly │ WidgetList │ NULL │ G │
├──────────────────┼───────────────────┼─────────────┼─────────┼────────┤
│XmNinsertPosition │ XmCInsertPosition │ XtOrderProc │ NULL │ CSG │
├──────────────────┼───────────────────┼─────────────┼─────────┼────────┤
│XmNnumChildren │ XmCReadOnly │ Cardinal │ 0 │ G │
├──────────────────┼───────────────────┼─────────────┼─────────┼────────┤
└──────────────────┴───────────────────┴─────────────┴─────────┴────────┘
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ │ Core Resource Set │ │ │
│Name │ Class │ Type │ Default │ Access │
├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
│XmNaccelerators │ XmCAccelerators │ XtAccelerators │ dynamic │ N/A │
├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
│XmNancestorSensitive │ XmCSensitive │ Boolean │ dynamic │ G │
├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
│XmNbackground │ XmCBackground │ Pixel │ dynamic │ CSG │
├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
│XmNbackgroundPixmap │ XmCPixmap │ Pixmap │ XmUNSPECIFIED_PIXMAP │ CSG │
├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
│XmNborderColor │ XmCBorderColor │ Pixel │ XtDefaultForeground │ CSG │
├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
│XmNborderPixmap │ XmCPixmap │ Pixmap │ XmUNSPECIFIED_PIXMAP │ CSG │
├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
│XmNborderWidth │ XmCBorderWidth │ Dimension │ 0 │ CSG │
├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
│XmNcolormap │ XmCColormap │ Colormap │ dynamic │ CG │
├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
│XmNdepth │ XmCDepth │ int │ dynamic │ CG │
├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
│XmNdestroyCallback │ XmCCallback │ XtCallbackList │ NULL │ C │
├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
│XmNheight │ XmCHeight │ Dimension │ dynamic │ CSG │
├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
│XmNinitialResourcesPersistent │ XmCInitialResourcesPersistent │ Boolean │ True │ C │
├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
│XmNmappedWhenManaged │ XmCMappedWhenManaged │ Boolean │ True │ CSG │
├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
│XmNscreen │ XmCScreen │ Screen * │ dynamic │ CG │
├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
│XmNsensitive │ XmCSensitive │ Boolean │ True │ CSG │
├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
│XmNtranslations │ XmCTranslations │ XtTranslations │ dynamic │ CSG │
├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
│XmNwidth │ XmCWidth │ Dimension │ dynamic │ CSG │
├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
│XmNx │ XmCPosition │ Position │ 0 │ CSG │
├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
│XmNy │ XmCPosition │ Position │ 0 │ CSG │
├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
└──────────────────────────────┴───────────────────────────────┴────────────────┴──────────────────────┴────────┘
Translations
XmIconBox inherits translations from XmManager.
RELATEDComposite(3), Constraint(3), Core(3), XmCreateIconBox(3), XmIconBoxIs‐
CellEmpty(3), XmManager(3), XmVaCreateIconBox(3), and XmVaCreateMan‐
agedIconBox(3).
COPYRIGHT
Copyright (c) 1992 by Integrated Computer Solutions, Inc.
XmIconBox(3X)