1XmScrolledWindow(library call) XmScrolledWindow(library call)
2
3
4
6 XmScrolledWindow — The ScrolledWindow widget class
7
9 #include <Xm/ScrolledW.h>
10
12 The ScrolledWindow widget combines one or two ScrollBar widgets and a
13 viewing area to implement a visible window onto some other (usually
14 larger) data display. The visible part of the window can be scrolled
15 through the larger display by the use of ScrollBars.
16
17 To use ScrolledWindow, an application first creates a ScrolledWindow
18 widget, any needed ScrollBar widgets, and a widget capable of display‐
19 ing any desired data as the work area of ScrolledWindow. ScrolledWindow
20 positions the work area widget and displays the ScrollBars if so
21 requested. When the user performs some action on the ScrollBar, the
22 application is notified through the normal ScrollBar callback inter‐
23 face.
24
25 ScrolledWindow can be configured to operate automatically so that it
26 performs all scrolling and display actions with no need for application
27 program involvement. It can also be configured to provide a minimal
28 support framework in which the application is responsible for process‐
29 ing all user input and making all visual changes to the displayed data
30 in response to that input.
31
32 When ScrolledWindow is performing automatic scrolling it creates a
33 clipping window and automatically creates the scroll bars. Conceptu‐
34 ally, this window becomes the viewport through which the user examines
35 the larger underlying data area. The application simply creates the
36 desired data, then makes that data the work area of the ScrolledWindow.
37 When the user moves the slider to change the displayed data, the
38 workspace is moved under the viewing area so that a new portion of the
39 data becomes visible.
40
41 Sometimes it is impractical for an application to create a large data
42 space and simply display it through a small clipping window. For exam‐
43 ple, in a text editor, creating a single data area that consisted of a
44 large file would involve an undesirable amount of overhead. The appli‐
45 cation needs to use a ScrolledWindow (a small viewport onto some larger
46 data), but needs to be notified when the user scrolls the viewport so
47 it can bring in more data from storage and update the display area. For
48 these cases, the ScrolledWindow can be configured so that it provides
49 only visual layout support. No clipping window is created, and the
50 application must maintain the data displayed in the work area, as well
51 as respond to user input on the ScrollBars.
52
53 The user can specify resources in a resource file for the automatically
54 created widgets that contain the horizontal and vertical scrollbars and
55 the clipping area of the ScrolledWindow widget. The names of these wid‐
56 gets are HorScrollBar, VertScrollBar, and ClipWindow respectively, and
57 remain consistent whether created by XmCreateScrolledList, XmCreate‐
58 ScrolledText or XmCreateScrolledWindow.
59
60 ScrolledWindow uses the XmQTnavigator trait, and holds the XmQTscroll‐
61 Frame trait.
62
63 Descendants
64 ScrolledWindow automatically creates the descendants shown in the fol‐
65 lowing table. An application can use XtNameToWidget to gain access to
66 the named descendant. In addition, a user or an application can use the
67 named descendant when specifying resource values.
68
69 ┌─────────────────┬──────────────┬───────────────────────┐
70 │Named Descendant │ Class │ Identity │
71 ├─────────────────┼──────────────┼───────────────────────┤
72 ├─────────────────┼──────────────┼───────────────────────┤
73 ├─────────────────┼──────────────┼───────────────────────┤
74 │VertScrollBar │ XmScrollBar │ vertical scroll bar │
75 ├─────────────────┼──────────────┼───────────────────────┤
76 │HorScrollBar │ XmScrollBar │ horizontal scroll bar │
77 ├─────────────────┼──────────────┼───────────────────────┤
78 │ClipWindow │ XmClipWindow │ clip window │
79 ├─────────────────┼──────────────┼───────────────────────┤
80 └─────────────────┴──────────────┴───────────────────────┘
81 Classes
82 ScrolledWindow inherits behavior, resources, and traits from Core, Com‐
83 posite, Constraint, and XmManager.
84
85 The class pointer is xmScrolledWindowWidgetClass.
86
87 The class name is XmScrolledWindow.
88
89 New Resources
90 The following table defines a set of widget resources used by the pro‐
91 grammer to specify data. The programmer can also set the resource val‐
92 ues for the inherited classes to set attributes for this widget. To
93 reference a resource by name or by class in a .Xdefaults file, remove
94 the XmN or XmC prefix and use the remaining letters. To specify one of
95 the defined values for a resource in a .Xdefaults file, remove the Xm
96 prefix and use the remaining letters (in either lowercase or uppercase,
97 but include any underscores between words). The codes in the access
98 column indicate if the given resource can be set at creation time (C),
99 set by using XtSetValues (S), retrieved by using XtGetValues (G), or is
100 not applicable (N/A).
101
102 ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
103 │ │ XmScrolledWindow Reso│urce Set │ │ │
104 │Name │ Class │ Type │ Default │ Access │
105 ├──────────────────────────────┼───────────────────────────────┼────────────────┼───────────────────────┼────────┤
106 │XmNautoDragModel │ XmCAutoDragModel │ XtEnum │ XmAUTO_DRAG_ENABLED │ CSG │
107 ├──────────────────────────────┼───────────────────────────────┼────────────────┼───────────────────────┼────────┤
108 │XmNclipWindow │ XmCClipWindow │ Widget │ dynamic │ G │
109 ├──────────────────────────────┼───────────────────────────────┼────────────────┼───────────────────────┼────────┤
110 │XmNhorizontalScrollBar │ XmCHorizontalScrollBar │ Widget │ dynamic │ CSG │
111 ├──────────────────────────────┼───────────────────────────────┼────────────────┼───────────────────────┼────────┤
112 │XmNscrollBarDisplayPolicy │ XmCScrollBarDisplayPolicy │ unsigned char │ dynamic │ CSG │
113 ├──────────────────────────────┼───────────────────────────────┼────────────────┼───────────────────────┼────────┤
114 │XmNscrollBarPlacement │ XmCScrollBarPlacement │ unsigned char │ XmBOTTOM_RIGHT │ CSG │
115 ├──────────────────────────────┼───────────────────────────────┼────────────────┼───────────────────────┼────────┤
116 │XmNscrolledWindowMarginHeight │ XmCScrolledWindowMarginHeight │ Dimension │ 0 │ CSG │
117 ├──────────────────────────────┼───────────────────────────────┼────────────────┼───────────────────────┼────────┤
118 │XmNscrolledWindowMarginWidth │ XmCScrolledWindowMarginWidth │ Dimension │ 0 │ CSG │
119 ├──────────────────────────────┼───────────────────────────────┼────────────────┼───────────────────────┼────────┤
120 │XmNscrollingPolicy │ XmCScrollingPolicy │ unsigned char │ XmAPPLICATION_DEFINED │ CG │
121 ├──────────────────────────────┼───────────────────────────────┼────────────────┼───────────────────────┼────────┤
122 │XmNspacing │ XmCSpacing │ Dimension │ 4 │ CSG │
123 ├──────────────────────────────┼───────────────────────────────┼────────────────┼───────────────────────┼────────┤
124 │XmNtraverseObscuredCallback │ XmCCallback │ XtCallbackList │ NULL │ CSG │
125 ├──────────────────────────────┼───────────────────────────────┼────────────────┼───────────────────────┼────────┤
126 │XmNverticalScrollBar │ XmCVerticalScrollBar │ Widget │ dynamic │ CSG │
127 ├──────────────────────────────┼───────────────────────────────┼────────────────┼───────────────────────┼────────┤
128 │XmNvisualPolicy │ XmCVisualPolicy │ unsigned char │ dynamic │ G │
129 ├──────────────────────────────┼───────────────────────────────┼────────────────┼───────────────────────┼────────┤
130 │XmNworkWindow │ XmCWorkWindow │ Widget │ NULL │ CSG │
131 ├──────────────────────────────┼───────────────────────────────┼────────────────┼───────────────────────┼────────┤
132 └──────────────────────────────┴───────────────────────────────┴────────────────┴───────────────────────┴────────┘
133 XmNautoDragModel
134 Indicates whether automatic drag is enabled
135 (XmAUTO_DRAG_ENABLED or disabled (XmAUTO_DRAG_DISABLED). By
136 default it is enabled.
137
138 XmNclipWindow
139 Specifies the widget ID of the clipping area. This is auto‐
140 matically created by ScrolledWindow when the XmNvisualPolicy
141 resource is set to XmCONSTANT and can only be read by the
142 application. Any attempt to set this resource to a new value
143 causes a warning message to be printed by the scrolled win‐
144 dow. If the XmNvisualPolicy resource is set to XmVARIABLE,
145 this resource is set to NULL, and no clipping window is cre‐
146 ated.
147
148 XmNhorizontalScrollBar
149 Specifies the widget ID of the horizontal ScrollBar. This is
150 automatically created by ScrolledWindow when the XmN‐
151 scrollingPolicy is initialized to XmAUTOMATIC; otherwise, the
152 default is NULL.
153
154 XmNscrollBarDisplayPolicy
155 Controls the automatic placement of the ScrollBars. If it is
156 set to XmAS_NEEDED and if XmNscrollingPolicy is set to XmAU‐
157 TOMATIC, ScrollBars are displayed only if the workspace
158 exceeds the clip area in one or both dimensions. A resource
159 value of XmSTATIC causes the ScrolledWindow to display the
160 ScrollBars whenever they are managed, regardless of the rela‐
161 tionship between the clip window and the work area. This
162 resource must be XmSTATIC when XmNscrollingPolicy is XmAPPLI‐
163 CATION_DEFINED. The default is XmAS_NEEDED when XmN‐
164 scrollingPolicy is XmAUTOMATIC, and XmSTATIC otherwise.
165
166 XmNscrollBarPlacement
167 Specifies the positioning of the ScrollBars in relation to
168 the work window. The values are
169
170 XmTOP_LEFT
171 The horizontal ScrollBar is placed above the work
172 window; the vertical ScrollBar to is placed the
173 left.
174
175 XmBOTTOM_LEFT
176 The horizontal ScrollBar is placed below the work
177 window; the vertical ScrollBar to is placed the
178 left.
179
180 XmTOP_RIGHT
181 The horizontal ScrollBar is placed above the work
182 window; the vertical ScrollBar to is placed the
183 right.
184
185 XmBOTTOM_RIGHT
186 The horizontal ScrollBar is placed below the work
187 window; the vertical ScrollBar to is placed the
188 right.
189
190 The default value depends on the value of the XmNlayoutDirec‐
191 tion resource of the widget.
192
193 XmNscrolledWindowMarginHeight
194 Specifies the margin height on the top and bottom of the
195 ScrolledWindow. In order to use the autoscroll drag feature
196 of the Motif drag and drop facility, a user must be able to
197 hold a drag icon over the margin of a scrolled window. Though
198 drag and drop will work with the default margin size of zero,
199 a user may find it difficult to position the icon precisely
200 enough to use the feature easily. The application programmer
201 should ensure that the window margins are set to an adequate
202 size, if the use of the autoscroll drag feature is desired.
203
204 XmNscrolledWindowMarginWidth
205 Specifies the margin width on the right and left sides of the
206 ScrolledWindow. Please refer to the warning concerning the
207 default margin size for the XmNscrolledWindowMarginHeight
208 resource, above.
209
210 XmNscrollingPolicy
211 Performs automatic scrolling of the work area with no appli‐
212 cation interaction. If the value of this resource is XmAUTO‐
213 MATIC, ScrolledWindow automatically creates the ScrollBars;
214 attaches callbacks to the ScrollBars; sets the visual policy
215 to XmCONSTANT; and automatically moves the work area through
216 the clip window in response to any user interaction with the
217 ScrollBars. An application can also add its own callbacks to
218 the ScrollBars. This allows the application to be notified of
219 a scroll event without having to perform any layout proce‐
220 dures.
221
222 NOTE: Since the ScrolledWindow adds callbacks to the Scroll‐
223 Bars, an application should not perform an XtRemoveAllCall‐
224 backs on any of the ScrollBar widgets.
225
226 When XmNscrollingPolicy is set to XmAPPLICATION_DEFINED, the
227 application is responsible for all aspects of scrolling. The
228 ScrollBars must be created by the application, and it is
229 responsible for performing any visual changes in the work
230 area in response to user input.
231
232 This resource must be set to the desired policy at the time
233 the ScrolledWindow is created. It cannot be changed through
234 SetValues.
235
236 XmNspacing
237 Specifies the distance that separates the ScrollBars from the
238 work window.
239
240 XmNtraverseObscuredCallback
241 Specifies a list of callbacks that is called when traversing
242 to a widget or gadget that is obscured due to its position in
243 the work area relative to the location of the ScrolledWindow
244 viewport. This resource is valid only when XmNscrollingPol‐
245 icy is XmAUTOMATIC. If this resource is NULL, an obscured
246 widget cannot be traversed to. The callback reason is
247 XmCR_OBSCURED_TRAVERSAL.
248
249 XmNverticalScrollBar
250 Specifies the widget ID of the vertical ScrollBar. This is
251 automatically created by ScrolledWindow when the XmN‐
252 scrollingPolicy is initialized to XmAUTOMATIC; otherwise, the
253 default is NULL.
254
255 XmNvisualPolicy
256 Enlarges the ScrolledWindow to match the size of the work
257 area. It can also be used as a static viewport onto a larger
258 data space. If the visual policy is XmVARIABLE, the Scrolled‐
259 Window forces the ScrollBar display policy to XmSTATIC and
260 allows the work area to grow or shrink at any time and
261 adjusts its layout to accommodate the new size. When the pol‐
262 icy is XmCONSTANT, the work area grows or shrinks as
263 requested, but a clipping window forces the size of the visi‐
264 ble portion to remain constant. The only time the viewing
265 area can grow is in response to a resize from the Scrolled‐
266 Window's parent. The default is XmCONSTANT when XmN‐
267 scrollingPolicy is XmAUTOMATIC, and XmVARIABLE otherwise.
268
269 NOTE: This resource must be set to the desired policy at the
270 time the ScrolledWindow is created. It cannot be changed
271 through SetValues.
272
273 XmNworkWindow
274 Specifies the widget ID of the viewing area.
275
276 ┌────────────────────────────────────────────────────────────────────────────────────────────────────┐
277 │ │ XmScrolledWindow Constraint│Resource Set │ │ │
278 │Name │ Class │ Type │ Default │ Access │
279 ├───────────────────────────┼────────────────────────────┼───────────────┼──────────────────┼────────┤
280 │XmNscrolledWindowChildType │ XmCScrolledWindowChildType │ unsigned char │ RESOURCE_DEFAULT │ CSG │
281 ├───────────────────────────┼────────────────────────────┼───────────────┼──────────────────┼────────┤
282 └───────────────────────────┴────────────────────────────┴───────────────┴──────────────────┴────────┘
283 XmNscrolledWindowChildType
284 Specifies what the child is. ScrolledWindow supports a number
285 of child types. The possible values are:
286
287 XmWORK_AREA
288 Indicates a work area child. This specifies that
289 both ScrollBars are limited to moving the child
290 inside the clipping window. If the scrolling policy
291 is XmAUTOMATIC, the work area child can move in
292 both directions.
293
294 XmHOR_SCROLLBAR
295 Indicates a horizontal child widget; the child must
296 have the XmQTnavigator trait installed. For exam‐
297 ple, the XmScrollBar widget has the XmQTnavigator
298 trait installed.
299
300 XmVERT_SCROLLBAR
301 Indicates a vertical child widget; the child must
302 have the XmQTnavigator trait installed.
303
304 XmSCROLL_HOR
305 Indicates that only the horizontal ScrollBar moves
306 the child. This value is only meaningful if the
307 scrolling policy is XmAUTOMATIC.
308
309 XmSCROLL_VERT
310 Indicates that only the vertical ScrollBar moves
311 the child. This value is only meaningful if the
312 scrolling policy is XmAUTOMATIC.
313
314 XmNO_SCROLL
315 Indicates that the child does not move with the
316 ScrollBars. This value is only meaningful if the
317 scrolling policy is XmAUTOMATIC.
318
319 Inherited Resources
320 ScrolledWindow inherits behavior and resources from the superclasses
321 described in the following tables. For a complete description of each
322 resource, refer to the reference page for that superclass.
323
324 ┌────────────────────────────────────────────────────────────────────────────────────────────────────┐
325 │ │ XmManager │Resource Set │ │ │
326 │Name │ Class │ Type │ Default │ Access │
327 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
328 │XmNbottomShadowColor │ XmCBottomShadowColor │ Pixel │ dynamic │ CSG │
329 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
330 │XmNbottomShadowPixmap │ XmCBottomShadowPixmap │ Pixmap │ XmUNSPECIFIED_PIXMAP │ CSG │
331 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
332 │XmNforeground │ XmCForeground │ Pixel │ dynamic │ CSG │
333 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
334 │XmNhelpCallback │ XmCCallback │ XtCallbackList │ NULL │ C │
335 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
336 │XmNhighlightColor │ XmCHighlightColor │ Pixel │ dynamic │ CSG │
337 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
338 │XmNhighlightPixmap │ XmCHighlightPixmap │ Pixmap │ dynamic │ CSG │
339 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
340 │XmNinitialFocus │ XmCInitialFocus │ Widget │ NULL │ CSG │
341 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
342 │XmNlayoutDirection │ XmCLayoutDirection │ XmDirection │ dynamic │ CG │
343 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
344 │XmNnavigationType │ XmCNavigationType │ XmNavigationType │ XmTAB_GROUP │ CSG │
345 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
346 │XmNpopupHandlerCallback │ XmCCallback │ XtCallbackList │ NULL │ C │
347 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
348 │XmNshadowThickness │ XmCShadowThickness │ Dimension │ dynamic │ CSG │
349 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
350 │XmNstringDirection │ XmCStringDirection │ XmStringDirection │ dynamic │ CG │
351 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
352 │XmNtopShadowColor │ XmCTopShadowColor │ Pixel │ dynamic │ CSG │
353 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
354 │XmNtopShadowPixmap │ XmCTopShadowPixmap │ Pixmap │ dynamic │ CSG │
355 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
356 │XmNtraversalOn │ XmCTraversalOn │ Boolean │ True │ CSG │
357 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
358 │XmNunitType │ XmCUnitType │ unsigned char │ dynamic │ CSG │
359 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
360 │XmNuserData │ XmCUserData │ XtPointer │ NULL │ CSG │
361 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
362 └────────────────────────┴───────────────────────┴───────────────────┴──────────────────────┴────────┘
363 ┌───────────────────────────────────────────────────────────────────────┐
364 │ │ Composite Reso│urce Set │ │ │
365 │Name │ Class │ Type │ Default │ Access │
366 ├──────────────────┼───────────────────┼─────────────┼─────────┼────────┤
367 │XmNchildren │ XmCReadOnly │ WidgetList │ NULL │ G │
368 ├──────────────────┼───────────────────┼─────────────┼─────────┼────────┤
369 │XmNinsertPosition │ XmCInsertPosition │ XtOrderProc │ NULL │ CSG │
370 ├──────────────────┼───────────────────┼─────────────┼─────────┼────────┤
371 │XmNnumChildren │ XmCReadOnly │ Cardinal │ 0 │ G │
372 ├──────────────────┼───────────────────┼─────────────┼─────────┼────────┤
373 └──────────────────┴───────────────────┴─────────────┴─────────┴────────┘
374 ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
375 │ │ Core Resource Se│t │ │ │
376 │Name │ Class │ Type │ Default │ Access │
377 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
378 │XmNaccelerators │ XmCAccelerators │ XtAccelerators │ dynamic │ CSG │
379 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
380 │XmNancestorSensitive │ XmCSensitive │ Boolean │ dynamic │ G │
381 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
382 │XmNbackground │ XmCBackground │ Pixel │ dynamic │ CSG │
383 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
384 │XmNbackgroundPixmap │ XmCPixmap │ Pixmap │ XmUNSPECIFIED_PIXMAP │ CSG │
385 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
386 │XmNborderColor │ XmCBorderColor │ Pixel │ XtDefaultForeground │ CSG │
387 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
388 │XmNborderPixmap │ XmCPixmap │ Pixmap │ XmUNSPECIFIED_PIXMAP │ CSG │
389 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
390 │XmNborderWidth │ XmCBorderWidth │ Dimension │ 0 │ CSG │
391 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
392 │XmNcolormap │ XmCColormap │ Colormap │ dynamic │ CG │
393 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
394 │XmNdepth │ XmCDepth │ int │ dynamic │ CG │
395 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
396 │XmNdestroyCallback │ XmCCallback │ XtCallbackList │ NULL │ C │
397 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
398 │XmNheight │ XmCHeight │ Dimension │ dynamic │ CSG │
399 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
400 │XmNinitialResourcesPersistent │ XmCInitialResourcesPersistent │ Boolean │ True │ C │
401 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
402 │XmNmappedWhenManaged │ XmCMappedWhenManaged │ Boolean │ True │ CSG │
403 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
404 │XmNscreen │ XmCScreen │ Screen * │ dynamic │ CG │
405 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
406 │XmNsensitive │ XmCSensitive │ Boolean │ True │ CSG │
407 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
408 │XmNtranslations │ XmCTranslations │ XtTranslations │ dynamic │ CSG │
409 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
410 │XmNwidth │ XmCWidth │ Dimension │ dynamic │ CSG │
411 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
412 │XmNx │ XmCPosition │ Position │ 0 │ CSG │
413 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
414 │XmNy │ XmCPosition │ Position │ 0 │ CSG │
415 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
416 └──────────────────────────────┴───────────────────────────────┴────────────────┴──────────────────────┴────────┘
417 Callback Information
418 The application must use the ScrollBar callbacks to be notified of user
419 input.
420
421 ScrolledWindow defines a callback structure for use with XmNtraverseOb‐
422 scuredCallback callbacks. The XmNtraverseObscuredCallback resource pro‐
423 vides a mechanism for traversal to obscured widgets (or gadgets) due to
424 their position in the work area of a ScrolledWindow. The XmNtraverseOb‐
425 scuredCallback routine has responsibility for adjusting the position of
426 the work area such that the specified traversal destination widget is
427 positioned within the viewport of the ScrolledWindow. A NULL XmNtra‐
428 verseObscuredCallback resource causes obscured widgets within the
429 ScrolledWindow to be nontraversable.
430
431 Traversal to an obscured widget or gadget requires these conditions to
432 be met: the widget or gadget can be obscured only due to its position
433 in the work area of a ScrolledWindow relative to the viewport; the
434 viewport of the associated ScrolledWindow is fully visible, or can be
435 made so by virtue of ancestral XmNtraverseObscuredCallback routines;
436 and the XmNtraverseObscuredCallback resource must be non-NULL.
437
438 When ScrolledWindow widgets are nested, the XmNtraverseObscuredCallback
439 routine for each ScrolledWindow that obscures the traversal destination
440 is called in ascending order within the given hierarchy.
441
442 A pointer to the following structure is passed to callbacks for XmNtra‐
443 verseObscuredCallback.
444
445 typedef struct
446 {
447 int reason;
448 XEvent *event:
449 Widget traversal_destination;
450 XmTraversalDirection direction;
451 } XmTraverseObscuredCallbackStruct;
452
453 reason Indicates why the callback was invoked.
454
455 event Points to the XEvent that triggered the callback.
456
457 traversal_destination
458 Specifies the widget or gadget to traverse to, which will be
459 a descendant of the work window.
460
461 direction Specifies the direction of traversal. See the description of
462 the direction parameter in the XmProcessTraversal reference
463 page for an explanation of the valid values.
464
465 Translations
466 XmScrolledWindow includes the translations from XmManager.
467
468 Additional Behavior
469 This widget has the following additional behavior:
470
471 <Key><osfPageUp>:
472 If XmNscrollingPolicy is XmAUTOMATIC, scrolls the window up
473 the height of the viewport. The distance scrolled may be
474 reduced to provide some overlap. The actual distance
475 scrolled depends on the XmNpageIncrement resource of the ver‐
476 tical ScrollBar.
477
478 <Key><osfPageDown>:
479 If XmNscrollingPolicy is XmAUTOMATIC, scrolls the window down
480 the height of the viewport. The distance scrolled may be
481 reduced to provide some overlap. The actual distance
482 scrolled depends on the XmNpageIncrement resource of the ver‐
483 tical ScrollBar.
484
485 <Key><osfPageLeft>:
486 If XmNscrollingPolicy is XmAUTOMATIC, scrolls the window left
487 the width of the viewport. The distance scrolled may be
488 reduced to provide some overlap. The actual distance
489 scrolled depends on the XmNpageIncrement resource of the hor‐
490 izontal ScrollBar.
491
492 <Key><osfPageRight>:
493 If XmNscrollingPolicy is XmAUTOMATIC, scrolls the window
494 right the width of the viewport. The distance scrolled may
495 be reduced to provide some overlap. The actual distance
496 scrolled depends on the XmNpageIncrement resource of the hor‐
497 izontal ScrollBar.
498
499 <Key><osfBeginLine>:
500 If XmNscrollingPolicy is XmAUTOMATIC, scrolls the window hor‐
501 izontally to the edge corresponding to the horizontal Scroll‐
502 Bar's minimum value.
503
504 <Key><osfEndLine>:
505 If XmNscrollingPolicy is XmAUTOMATIC, scrolls the window hor‐
506 izontally to the edge corresponding to the horizontal Scroll‐
507 Bar's maximum value.
508
509 <Key><osfBeginData>:
510 If XmNscrollingPolicy is XmAUTOMATIC, scrolls the window ver‐
511 tically to the edge corresponding to the vertical ScrollBar's
512 minimum value.
513
514 <Key><osfEndData>:
515 If XmNscrollingPolicy is XmAUTOMATIC, scrolls the window ver‐
516 tically to the edge corresponding to the vertical ScrollBar's
517 maximum value.
518
519 Certain applications will want to replace the page bindings with ones
520 that are specific to the content of the scrolled area.
521
522 Virtual Bindings
523 The bindings for virtual keys are vendor specific. For information
524 about bindings for virtual buttons and keys, see VirtualBindings(3).
525
527 Composite(3), Constraint(3), Core(3), XmCreateScrolledWindow(3), XmMan‐
528 ager(3), XmProcessTraversal(3), XmScrollBar(3), XmScrollVisible(3),
529 XmScrolledWindowSetAreas(3), XmVaCreateScrolledWindow(3), and XmVaCre‐
530 ateManagedScrolledWindow(3).
531
532
533
534 XmScrolledWindow(library call)