Xmbuttonbox the button box class
#include <Xm/ButtonBox.h>
The Button Box widget manages children (usually buttons) in a single row or single column layout.
The Button Box maintains equal spacing between its children at all times and attempts to adjust its height and width as necessary so that all children will fit. If this is not possible, due to parent or application programmer constraints, the Button Box will resize its children as necessary to fit within the available space.
Note: in what follows, major direction refers to the direction of orientation, and minor direction refers to the perpendicular direction.
Button Box inherits behavior, resources, and traits from Core, Composite, Constraint, and XmManager.
The class pointer is xmButtonBoxWidgetClass.
The class name is XmButtonBox.
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. 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).
XmButtonBox Resource Set | ||||
---|---|---|---|---|
Name | Class | Type | Default | Access |
_ | _ | _ | _ | _ |
XmNequalSize | XmCEqualSize | Boolean | False | |
CSG | _ | _ | _ | _ |
_ | XmNfillOption | XmCFillOption | unsigned char | |
XmFillNone | CSG | _ | _ | _ |
_ | _ | XmNmarginHeight | XmCMargin | |
VerticalDimension | 0 | CSG | _ | _ |
_ | _ | _ | XmNmarginWidth | |
XmCMargin | HorizontalDimension | 0 | CSG | _ |
_ | _ | _ | _ | |
XmNorientation | XmCOrientation | unsigned char | XmHORIZONTAL | CSG |
_ | _ | _ | _ | _ |
XmNdefaultButton | XmCWidget | Widget | NULL | |
SG | _ | _ | _ | _ |
_ |
Specifies whether the children are to be maintained with equal sized heights and widths. The chosen height and width for the children is found by asking each child for its preferred size and taking the largest value in each direction.
Specifies how to use any extra space left over once all children have been sized according to either their preference or equalSize. There are four options:
No automatic filling is performed. Center the children in the minor direction and place the children with equal padding between them in the major direction.
Place the children with equal padding between them in the major direction, but force all the children to take on the Button Box minor dimension as their minor direction.
Center the children in the minor direction, but expand all the children in their major direction so that there is no padding between them. Expand the children such that their relative sizes remain constant.
This option combines the placement actions and sizing actions of XmFillMinor and XmFillMajor.
Regardless of the fill mode, the ButtonBox widget will always leave the specified margin between its edge and the nearest child. A new String to fillOption resource converter has been registered to convert the following strings to fill options: "none", "major", "minor", "all." This resource can therefore be set in an application defaults file.
Specifies the number of pixels to use as a margin around the entire group of children. The marginHeight value applies to both the top and bottom margins, while the marginWidth applies to the left and right margins.
Specifies whether children are to be placed in a row or a column. The orientation may be either XmHORIZONTAL or XmVERTICAL. If the orientation is XmHORIZONTAL, the children are placed in a row with the major dimension being width and the minor dimension being height. If the value is XmVERTICAL, the children are placed in a column with the major dimension being height and the minor dimension being width. The default value is XmHORIZONTAL.
Button 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 | _ |
_ | _ | _ | _ |
XmButtonBox inherits translations from XmManager.
Copyright (c) 1992 by Integrated Computer Solutions, Inc.