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

  1. .NH 2
  2. Form Widget
  3. .LP
  4. .XS
  5.     Form Widget
  6. .XE
  7. .IN "Form widget" "" "@DEF@"
  8. .Ds 0
  9. .TA 2.0i
  10. .ta 2.0i
  11. .sp
  12. Application Header file    <X11/Xaw/Form.h>
  13. .IN "Form.h" ""
  14. Class Header file    <X11/Xaw/FormP.h>
  15. .IN "FormP.h" ""
  16. Class        formWidgetClass
  17. .IN "formWidgetClass" ""
  18. Class Name    Form
  19. .IN "Form widget" "class name"
  20. Superclass    Constraint
  21. .sp
  22. .De
  23. .LP
  24. The Form widget can contain an arbitrary number of children or
  25. subwidgets.  The Form provides geometry management for its children,
  26. which allows individual control of the position of each child.  Any
  27. combination of children can be added to a Form.  The initial positions
  28. of the children may be computed relative to the positions of previously
  29. created children.  When the Form is resized, it computes new positions and
  30. sizes for its children.  This computation is based upon information
  31. provided when a child is added to the Form.
  32. .LP
  33. The default width of the Form is the minimum width needed to
  34. enclose the children after computing their initial layout, with a
  35. margin of \fBdefaultDistance\fP
  36. at the right and bottom edges.  If a width and height is assigned
  37. to the Form that is too small for the layout, the children will
  38. be clipped by the right and bottom edges of the Form.
  39. .NH 3
  40. Resources
  41. .LP
  42. When creating an Form widget instance, the following resources are
  43. retrieved from the argument list or from the resource database:
  44. .LP
  45. .IN "Form widget" "resources"
  46. .ps 9
  47. .nr PS 9
  48. .vs 11
  49. .nr VS 11
  50. .TS H
  51. lw(1i) lw(1i) lw(1i) lw(.5i) lw(2i).
  52. _
  53. .sp 3p
  54. .TB
  55. Name    Class    Type    Notes    Default Value
  56. .sp 3p
  57. _
  58. .TH
  59. .R
  60. .sp 3p
  61. accelerators    Accelerators    AcceleratorTable        NULL
  62. ancestorSensitive    AncestorSensitive    Boolean    D    True
  63. background    Background    Pixel        XtDefaultBackground
  64. backgroundPixmap    Pixmap    Pixmap        XtUnspecifiedPixmap
  65. borderColor    BorderColor    Pixel        XtDefaultForeground
  66. borderPixmap    Pixmap    Pixmap        XtUnspecifiedPixmap
  67. borderWidth    BorderWidth    Dimension        1
  68. children    ReadOnly    WidgetList    R    NULL
  69. colormap    Colormap    Colormap        Parent's Colormap
  70. defaultDistance    Thickness    int        4
  71. depth    Depth    int    C    Parent's Depth
  72. destroyCallback    Callback    XtCallbackList        NULL
  73. height    Height    Dimension    A    Enough space to contain all children
  74. mappedWhenManaged    MappedWhenManaged    Boolean        True
  75. numChildren    ReadOnly    Cardinal    R    0
  76. screen    Screen    Screen    R    Parent's Screen
  77. sensitive    Sensitive    Boolean        True
  78. translations    Translations    TranslationTable        NULL
  79. width    Width    Dimension    A    Enough space to contain all children
  80. x    Position    Position        0
  81. y    Position    Position        0
  82. .sp 3p
  83. _
  84. .TE
  85. .ps 11
  86. .nr PS 11
  87. .vs 13
  88. .nr VS 13
  89. .Ac
  90. .As
  91. .Bg
  92. .Gp
  93. .Bc
  94. .Bp
  95. .Bw
  96. .Ch
  97. .Cm
  98. .Dd Bold
  99. .Dp
  100. .Dc
  101. .Hw
  102. .Mm
  103. .Nc
  104. .Sc
  105. .Se
  106. .Tr
  107. .Xy
  108. .NH 3
  109. Constraint Resources
  110. .LP
  111. .IN "Form widget" "constraint resources"
  112. Each child of the Form widget may request special layout resources
  113. be applied to it.  These \fIconstraint\fP resources allow the Form
  114. widget's children to specify individual layout requirements.
  115. .LP
  116. .LP
  117. .ps 9
  118. .nr PS 9
  119. .vs 11
  120. .nr VS 11
  121. .TS H
  122. lw(1i) lw(1i) lw(1i) lw(.5i) lw(2i).
  123. _
  124. .sp 3p
  125. .TB
  126. Name    Class    Type    Notes    Default Value
  127. .sp 3p
  128. _
  129. .TH
  130. .R
  131. .sp 3p
  132. bottom    Edge    XawEdgeType        XawRubber
  133. fromHoriz    Widget    Widget        NULL (left edge of Form)
  134. fromVert    Widget    Widget         NULL (top edge of Form)
  135. horizDistance    Thickness    int        \fBdefaultDistance\fP resource
  136. left    Edge    XawEdgeType        XawRubber
  137. .IN "XawEdgeType" ""
  138. resizable    Boolean    Boolean        FALSE
  139. right    Edge    XawEdgeType        XawRubber
  140. .IN "XawRubber" ""
  141. top    Edge    XawEdgeType        XawRubber
  142. vertDistance    Thickness    int        \fBdefaultDistance\fP resource
  143. .sp 3p
  144. _
  145. .TE
  146. .ps 11
  147. .nr PS 11
  148. .vs 13
  149. .nr VS 13
  150. .Bt Bold
  151. .Fh Bold
  152. .Hd Bold
  153. .Rl Bold
  154. .NH 3
  155. Layout Semantics
  156. .LP
  157. .Lt Form
  158. .LP
  159. .ps 9
  160. .nr PS 9
  161. .vs 11
  162. .nr VS 11
  163. .TS H
  164. lw(1.5i) lw(1i) lw(3i).
  165. _
  166. .sp 3p
  167. .TB
  168. Edge Type    Resource Name    Description
  169. .sp 3p
  170. _
  171. .TH
  172. .R
  173. .sp 3p
  174. XawChainBottom    ChainBottom    Edge remains a fixed distance from bottom of Form
  175. .IN "XawChainBottom" ""
  176. XawChainLeft    ChainLeft    Edge remains a fixed distance from left of Form
  177. .IN "XawChainLeft" ""
  178. XawChainRight    ChainRight    Edge remains a fixed distance from right of Form
  179. .IN "XawChainRight" ""
  180. XawChainTop    ChainTop    Edge remains a fixed distance from top of Form
  181. .IN "XawChainTop" ""
  182. XawRubber    Rubber    Edges will move a proportional distance
  183. .IN "XawRubber" ""
  184. .sp 3p
  185. _
  186. .TE
  187. .ps 11
  188. .nr PS 11
  189. .vs 13
  190. .nr VS 13
  191. .NH 4
  192. Example
  193. .LP
  194. If you wish to force the Form to never resize one or more of its
  195. children, then set \fBleft\fP and \fBright\fP to \fBXawChainLeft\fP and
  196. \fBtop\fP and \fBbottom\fP to \fBXawChainTop\fP.  This will cause the
  197. child to remain a fixed distance from the top and left edges of the
  198. Form, and never to resize.
  199. .NH 3
  200. Convenience Routines
  201. .LP
  202. To force or defer a re-layout of the Form, use
  203. .PN XawFormDoLayout .
  204. .IN "Form widget" "re-layout"
  205. .IN "XawFormDoLayout" "" "@DEF@"
  206. .FD 0
  207. void XawFormDoLayout(\fIw\fP, \fIdo_layout\fP)
  208. .br
  209.      Widget \fIw\fP;
  210. .br
  211.      Boolean \fIdo_layout\fP;
  212. .FN
  213. .IP \fIw\fP 1i
  214. Specifies the Form widget.
  215. .IP \fIdo_layout\fP 1i
  216. Specifies whether the layout of the Form widget is enabled (\fBTrue\fP)
  217. or disabled (\fBFalse\fP).
  218. .LP
  219. When making several changes to the children of a Form widget
  220. after the Form has been realized, it is a good idea to disable
  221. relayout until after all changes have been made.
  222.  
  223.