Application Header file | <Xraw/Box.h> |
---|---|
Class Header file | <Xraw/BoxP.h> |
Class | boxWidgetClass |
Class Name | Box |
Superclass | Composit --> Core |
The Box widget provides geometry management of arbitrary widgets in a box of a specified dimension. The children are rearranged when resizing events occur either on the Box or its children, or when children are managed or unmanaged. The Box widget always attempts to pack its children as tightly as possible within the geometry allowed by its parent. Box widgets are commonly used to manage a related set of buttons and are often called ButtonBox widgets, but the children are not limited to buttons. The Box's children are arranged on a background that has its own specified dimensions and color.
          C | - resource can be set at the widget creating time; |
          S | - resource can be set by using XtSetValues routine; |
          G | - resource can be retrieved by using XtGetValues routine. |
Box class resources | ||||
---|---|---|---|---|
Name | Class | Type | Notes | Default Value |
hSpace | HSpace | Dimension | CSG | 4 |
vSpace | VSpace | Dimension | CSG | 4 |
orientation | Orientation | Orientation | CSG | XtorientVertical |
hSpace vSpace |
The amount of space, in pixels, to leave between the children. This resource specifies the amount of space left between the outermost children and the edge of the box. |
---|---|
orientation |
Specifies whether the preferred shape of the box (i.e.
the result returned by the query_geometry class method)
is tall and narrow XtorientVertical or
short and wide
XtorientHorizontal . When the Box is a child of a
parent which enforces width constraints, it is usually
better to specify XtorientVertical (the default).
When
the parent enforces height constraints, it is usually
better to specify XtorientHorizontal .
A converter is registered for this resource that
will convert the following strings:
horizontal and vertical .
|
Composit class resources | ||||
---|---|---|---|---|
Name | Class | Type | Notes | Default Value |
children | ReadOnly | WidgetList | C | NULL |
insertPosition | InsertPosition | XtOrderProc | CSG | Insert new children at the end of the child list |
numChildren | ReadOnly | Cardinal | C | 0 |
Core class resources | ||||
---|---|---|---|---|
Name | Class | Type | Notes | Default Value |
accelerators | Accelerators | XtAccelerators | CSG | NULL |
ancestorSensitive | AncestorSensitive | Boolean | G | True |
background | Background | Pixel | CSG | XtDefaultBackground |
backgroundPixmap | Pixmap | Pixmap | CSG | XtUnspecifiedPixmap |
borderColor | BorderColor | Pixel | CSG | XtDefaultForeground |
borderPixmap | Pixmap | Pixmap | CSG | XtUnspecifiedPixmap |
borderWidth | BorderWidth | Dimension | CSG | 1 |
colormap | Colormap | Colormap | CG | Parent's Colormap |
depth | Depth | int | CG | Parent's Depth |
destroyCallback | Callback | XtCallbackList | C | NULL |
height | Height | Dimension | CSG |
See Layout Semantics |
initialResourcesPersistent | InitialResourcesPersistent | Boolean | C | True |
mappedWhenManaged | MappedWhenManaged | Boolean | CSG | True |
screen | Screen | Screen | CG | Parent's Screen |
sensitive | Sensitive | Boolean | CSG | True |
translations | Translations | XtTranslations | CSG | NULL |
width | Width | Dimension | CSG |
See Layout Semantics |
x | Position | Position | CSG | 0 |
y | Position | Position | CSG | 0 |
XtorientVertical
|
When the next child does not fit on the current row, a new row is started. If a child is wider than the width of the box, the box will request a larger width from its parent and will begin the layout process from the beginning if a new width is granted. |
XtorientHorizontal
|
When the next child does not fit in the current column, a new column is started. If a child is taller than the height of the box, the box will request a larger height from its parent and will begin the layout process from the beginning if a new height is granted. After positioning all children, the Box widget attempts to shrink its own size to the minimum dimensions required for the layout. |