home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / doc / Xaw / Box < prev    next >
Encoding:
Text File  |  1991-07-29  |  4.2 KB  |  147 lines

  1. .NH 2
  2. Box Widget
  3. .LP
  4. .XS
  5.     Box Widget
  6. .XE
  7. .IN "Box widget" "" "@DEF@"
  8. .Ds 0
  9. .TA 2.0i
  10. .ta 2.0i
  11. .sp
  12. Application Header file    <X11/Xaw/Box.h>
  13. .IN "Box.h" ""
  14. Class Header file    <X11/Xaw/BoxP.h>
  15. .IN "BoxP.h" ""
  16. Class        boxWidgetClass
  17. .IN "boxWidgetClass" ""
  18. Class Name    Box
  19. .IN "Box widget" "class name"
  20. Superclass    Composite
  21. .sp
  22. .De
  23. .LP
  24. The Box widget provides geometry management of arbitrary widgets in a
  25. box of a specified dimension.  The children are rearranged when
  26. resizing events occur either on the Box or its children, or when
  27. children are managed or unmanaged.  The Box widget always attempts to
  28. pack its children as tightly as possible within the geometry allowed by
  29. its parent.  
  30. .LP
  31. Box widgets are commonly used to manage a related set of buttons and
  32. are often called ButtonBox widgets, but the children are not
  33. limited to buttons.  The Box's children are arranged on a background that
  34. has its own specified dimensions and color.
  35. .NH 3
  36. Resources
  37. .LP
  38. When creating a Box widget instance, the following resources are
  39. retrieved from the argument list or from the resource database:
  40. .LP
  41. .IN "Box widget" "resources"
  42. .ps 9
  43. .nr PS 9
  44. .vs 11
  45. .nr VS 11
  46. .TS H
  47. lw(1i) lw(1i) lw(1i) lw(.5i) lw(2i).
  48. _
  49. .sp 3p
  50. .TB
  51. Name    Class    Type    Notes    Default Value
  52. .sp 3p
  53. _
  54. .TH
  55. .R
  56. .sp 3p
  57. accelerators    Accelerators    AcceleratorTable        NULL
  58. ancestorSensitive    AncestorSensitive    Boolean    D    True
  59. background    Background    Pixel        XtDefaultBackground
  60. backgroundPixmap    Pixmap    Pixmap        XtUnspecifiedPixmap
  61. borderColor    BorderColor    Pixel        XtDefaultForeground
  62. borderPixmap    Pixmap    Pixmap        XtUnspecifiedPixmap
  63. borderWidth    BorderWidth    Dimension        1
  64. children    ReadOnly    WidgetList    R    NULL
  65. colormap    Colormap    Colormap        Parent's Colormap
  66. depth    Depth    int    C    Parent's Depth
  67. destroyCallback    Callback    XtCallbackList        NULL
  68. height    Height    Dimension    A    see \fBLayout Semantics\fP
  69. hSpace    HSpace    Dimension        4
  70. mappedWhenManaged    MappedWhenManaged    Boolean        True
  71. numChildren    ReadOnly    Cardinal    R    0
  72. orientation    Orientation    Orientation        XtorientVertical
  73. screen    Screen    Screen    R    Parent's Screen
  74. sensitive    Sensitive    Boolean        True
  75. vSpace    VSpace    Dimension        4
  76. translations    Translations    TranslationTable        NULL
  77. width    Width    Dimension    A    see \fBLayout Semantics\fP
  78. x    Position    Position        0
  79. y    Position    Position        0
  80. .sp 3p
  81. _
  82. .TE
  83. .ps 11
  84. .nr PS 11
  85. .vs 13
  86. .nr VS 13
  87. .Ac
  88. .As
  89. .Bg
  90. .Gp
  91. .Bc
  92. .Bp
  93. .Bw
  94. .Ch
  95. .Cm
  96. .Dp
  97. .Dc
  98. .Hw
  99. .IP \fBhSpace\fP 1.5i
  100. .br
  101. .ns
  102. .IP \fBvSpace\fP 1.5i
  103. The amount of space, in pixels, to leave between the children.  This
  104. resource specifies the amount of space left between the outermost
  105. children and the edge of the box. 
  106. .Mm
  107. .Nc
  108. .IP \fBorientation\fP 1.5i
  109. Specifies whether the preferred shape of the box (i.e. the result
  110. returned by the query_geometry class method) is tall and narrow
  111. \fBXtorientVertical\fP or short and wide \fPXtorientHorizontal\fP.
  112. .IN "XtorientVertical" ""
  113. .IN "XtorientHorizontal" ""
  114. .IN "conversions" "Orientation"
  115. When the Box is a child of a parent which enforces width constraints, it
  116. is usually better to specify \fBXtorientVertical\fP (the default).
  117. When the parent enforces height constraints, it is usually better to
  118. specify \fBXtorientHorizontal\fP.
  119. .Rs "horizontal \fPand\fB vertical"
  120. .Sc
  121. .Se
  122. .Tr
  123. .Xy
  124. .NH 3
  125. Layout Semantics
  126. .IN "Box widget" "layout semantics"
  127. .LP
  128. Each time a child is managed or unmanaged, the Box widget will attempt
  129. to reposition the remaining children to compact the box.  Children are
  130. positioned in order left to right, top to bottom.  The packing
  131. algorithm used depends on the \fBorientation\fP of the Box.
  132. .IP \fBXtorientVertical\fP 1.5i
  133. .IN "XtorientVertical" "" @DEF@
  134. When the next child does not fit on the current row, a new row is
  135. started.  If a child is wider than the width of the box, the box will
  136. request a larger width from its parent and will begin the layout
  137. process from the beginning if a new width is granted.
  138. .IP \fBXtorientHorizontal\fP 1.5i
  139. .IN "XtorientHorizontal" "" @DEF@
  140. When the next child does not fit in the current column, a new column is
  141. started.  If a child is taller than the height of the box, the box will
  142. request a larger height from its parent and will begin the layout
  143. process from the beginning if a new height is granted.
  144. .LP
  145. After positioning all children, the Box widget attempts to shrink its
  146. own size to the minimum dimensions required for the layout.
  147.