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

  1. .NH 2
  2. Viewport Widget
  3. .LP
  4. .XS
  5.     Viewport Widget
  6. .XE
  7. .IN "Viewport widget" "" "@DEF@"
  8. .Ds 0
  9. .TA 2.0i
  10. .ta 2.0i
  11. .sp
  12. Application Header file    <X11/Xaw/Viewport.h>
  13. .IN "Viewport.h" ""
  14. Class Header file    <X11/Xaw/ViewportP.h>
  15. .IN "ViewportP.h" ""
  16. Class        viewportWidgetClass
  17. .IN "viewportWidgetClass" ""
  18. Class Name    Viewport
  19. .IN "Viewport widget" "class name"
  20. Superclass    Form
  21. .sp
  22. .De
  23. .LP
  24. The Viewport widget consists of a frame window, one or two Scrollbars,
  25. and an inner window.  The size of the frame window is determined by the
  26. viewing size of the data that is to be displayed and the dimensions to
  27. which the Viewport is created.  The inner window is the full size of the
  28. data that is to be displayed and is clipped by the frame window.  The
  29. Viewport widget controls the scrolling of the data directly.  No
  30. application callbacks are required for scrolling.
  31. .LP
  32. When the geometry of the frame window is equal in size to the inner
  33. window, or when the data does not require scrolling, the Viewport widget
  34. automatically removes any scrollbars.  The \fBforceBars\fP option causes
  35. the Viewport widget to display all scrollbars permanently.
  36. .NH 3
  37. Resources
  38. .LP
  39. When creating a Viewport widget instance, the following resources are
  40. retrieved from the argument list or the resource database:
  41. .LP
  42. .IN "Viewport widget" "resources"
  43. .ps 9
  44. .nr PS 9
  45. .vs 11
  46. .nr VS 11
  47. .TS H
  48. lw(1i) lw(1i) lw(1i) lw(.5i) lw(2i).
  49. _
  50. .sp 3p
  51. .TB
  52. Name    Class    Type    Notes    Default Value
  53. .sp 3p
  54. _
  55. .TH
  56. .R
  57. .sp 3p
  58. accelerators    Accelerators    AcceleratorTable        NULL
  59. allowHoriz    Boolean    Boolean        False
  60. allowVert    Boolean    Boolean        False
  61. ancestorSensitive    AncestorSensitive    Boolean    D    True
  62. background    Background    Pixel        XtDefaultBackground
  63. backgroundPixmap    Pixmap    Pixmap        XtUnspecifiedPixmap
  64. borderColor    BorderColor    Pixel        XtDefaultForeground
  65. borderPixmap    Pixmap    Pixmap        XtUnspecifiedPixmap
  66. borderWidth    BorderWidth    Dimension        1
  67. children    ReadOnly    WidgetList    R    NULL
  68. colormap    Colormap    Colormap        Parent's Colormap
  69. depth    Depth    int    C    Parent's Depth
  70. destroyCallback    Callback    XtCallbackList        NULL
  71. forceBars    Boolean    Boolean        False
  72. height    Height    Dimension        height of the child
  73. mappedWhenManaged    MappedWhenManaged    Boolean        True
  74. numChildren    ReadOnly    Cardinal    R    0
  75. reportCallback    ReportCallback    XtCallbackList        NULL
  76. screen    Screen    Screen    R    Parent's Screen
  77. sensitive    Sensitive    Boolean        True
  78. translations    Translations    TranslationTable        NULL
  79. useBottom    Boolean    Boolean        False
  80. useRight    Boolean    Boolean        False
  81. width    Width    Dimension        width of the child
  82. x    Position    Position        0
  83. y    Position    Position        0
  84. .sp 3p
  85. _
  86. .TE
  87. .ps 11
  88. .nr PS 11
  89. .vs 13
  90. .nr VS 13
  91. .Ac
  92. .IP \fBallowHoriz\fP 1.5i
  93. .br
  94. .ns
  95. .IP \fBallowVert\fP 1.5i
  96. If these resources are \fBFalse\fP then the Viewport will never create
  97. a scrollbar in this direction.  If it is \fBTrue\fP then the scrollbar will
  98. only appear when it is needed, unless \fBforceBars\fP is \fBTrue\fP.
  99. .As
  100. .Bg
  101. .Gp
  102. .Bc
  103. .Bp
  104. .Bw
  105. .Ch
  106. .Cm
  107. .Dp
  108. .Dc
  109. .IP \fBforceBars\fP 1.5i
  110. When \fBTrue\fP the scrollbars that have been \fIallowed\fP will always be
  111. visible on the screen.  If \fBFalse\fP the scrollbars will be visible only
  112. when the inner window is larger than the frame.
  113. .Hw
  114. .Mm
  115. .Nc
  116. .IP \fBreportCallback\fP 1.5i
  117. These callbacks will be executed whenever the Viewport adjusts the viewed
  118. area of the child.  The call_data parameter is a pointer to an XawPannerReport
  119. structure.
  120. .Sc
  121. .Se
  122. .Tr
  123. .IP \fBuseBottom\fP 1.5i
  124. .br
  125. .ns
  126. .IP \fBuseRight\fP 1.5i
  127. By default the scrollbars appear on the left and top of the screen.
  128. These resources allow the vertical scrollbar to be placed on the right
  129. edge of the Viewport, and the horizontal scrollbar on the bottom edge of
  130. the Viewport.
  131. .Xy
  132. .NH 3
  133. Layout Semantics
  134. .LP
  135. .IN "Viewport widget" "layout semantics"
  136. The Viewport widget manages a single child widget.  When the size of the
  137. child is larger than the size of the Viewport, the user can interactively
  138. move the child within the Viewport by repositioning the scrollbars.
  139. .LP
  140. The default size of the Viewport before it is realized is the width and/or
  141. height of the child.  After it is realized, the Viewport will allow its
  142. child to grow vertically or horizontally if \fBallowVert\fP or
  143. \fBallowHoriz\fP are set, respectively.  If the corresponding vertical
  144. or horizontal scrollbar is not enabled, the Viewport will propagate the
  145. geometry request to its own parent and the child will be allowed to change
  146. size only if the Viewport's parent allows it.  Regardless of whether or not
  147. scrollbars are enabled in the corresponding direction, if the child requests
  148. a new size smaller than the Viewport size, the change will be allowed only
  149. if the parent of the Viewport allows the Viewport to shrink to the
  150. appropriate dimension.
  151. .LP
  152. The scrollbar children of the Viewport are named \fBhorizontal\fP and
  153. \fBvertical\fP.  By using these names the programmer can specify resources
  154. for the individual scrollbars.  \fBXtSetValues\fP can be used to modify
  155. the resources dynamically once the widget ID has been obtained with
  156. \fBXtNameToWidget\fP.
  157. .IN "XtNameToWidget" ""
  158. .NT
  159. Although the Viewport is a Subclass of the Form, no resources for the Form
  160. my be supplied for any of the children of the Viewport.  These constraints
  161. are managed internally, and are not meant for public consumption.
  162. .NE
  163.