1XmPanedWindow(library call) XmPanedWindow(library call)
2
3
4
6 XmPanedWindow — The PanedWindow widget class
7
9 #include <Xm/PanedW.h>
10
12 PanedWindow is a composite widget that lays out children in a verti‐
13 cally tiled format. Children appear in top-to-bottom fashion, with the
14 first child inserted appearing at the top of the PanedWindow and the
15 last child inserted appearing at the bottom. The PanedWindow grows to
16 match the width of its widest child and all other children are forced
17 to this width. The height of the PanedWindow is equal to the sum of the
18 heights of all its children, the spacing between them, and the size of
19 the top and bottom margins.
20
21 The user can also adjust the size of the panes. To facilitate this
22 adjustment, a pane control sash is created for most children. The sash
23 appears as a square box positioned on the bottom of the pane that it
24 controls. The user can adjust the size of a pane by using the mouse or
25 keyboard.
26
27 The PanedWindow is also a constraint widget, which means that it cre‐
28 ates and manages a set of constraints for each child. You can specify a
29 minimum and maximum size for each pane. The PanedWindow does not allow
30 a pane to be resized below its minimum size or beyond its maximum size.
31 Also, when the minimum size of a pane is equal to its maximum size, no
32 control sash is presented for that pane or for the lowest pane.
33
34 The default XmNinsertPosition procedure for PanedWindow causes all
35 panes to appear first in the XmNchildren list and all sashes to appear
36 after the panes. For a pane child, it returns the value of XmNposi‐
37 tionIndex if one has been specified for the child. Otherwise, it
38 returns the number of panes in the PanedWindow's XmNchildren list.
39 Other than the fact that all sashes appear after all panes, the inser‐
40 tion order of sashes is unspecified. This procedure also causes non‐
41 sash widgets to be inserted after other nonsash children but before any
42 sashes. The behavior of PanedWindow is undefined if XmNinsertPosition
43 is set to a procedure other than the default.
44
45 All panes and sashes in a PanedWindow must be tab groups. When a pane
46 is inserted as a child of the PanedWindow, if the pane's XmNnavigation‐
47 Type is not XmEXCLUSIVE_TAB_GROUP, PanedWindow sets it to
48 XmSTICKY_TAB_GROUP.
49
50 Descendants
51 PanedWindow automatically creates for each paned window the descendants
52 shown in the following table. An application can use XtName and the
53 child list information to gain access to the named descendant. In
54 addition, a user or an application can use the named descendant when
55 specifying resource values.
56
57 ┌─────────────────┬─────────────────────────┬────────────────────────────────────┐
58 │Named Descendant │ Class │ Identity │
59 ├─────────────────┼─────────────────────────┼────────────────────────────────────┤
60 ├─────────────────┼─────────────────────────┼────────────────────────────────────┤
61 ├─────────────────┼─────────────────────────┼────────────────────────────────────┤
62 │Sash │ subclass of XmPrimitive │ sash │
63 ├─────────────────┼─────────────────────────┼────────────────────────────────────┤
64 │Separator │ XmSeparatorGadget │ dividing line between window panes │
65 ├─────────────────┼─────────────────────────┼────────────────────────────────────┤
66 └─────────────────┴─────────────────────────┴────────────────────────────────────┘
67 Classes
68 PanedWindow inherits behavior and resources from the Core, Composite,
69 Constraint, and XmManager classes.
70
71 The class pointer is xmPanedWindowWidgetClass.
72
73 The class name is XmPanedWindow.
74
75 New Resources
76 The following table defines a set of widget resources used by the pro‐
77 grammer to specify data. The programmer can also set the resource val‐
78 ues for the inherited classes to set attributes for this widget. To
79 reference a resource by name or by class in a .Xdefaults file, remove
80 the XmN or XmC prefix and use the remaining letters. To specify one of
81 the defined values for a resource in a .Xdefaults file, remove the Xm
82 prefix and use the remaining letters (in either lowercase or uppercase,
83 but include any underscores between words). The codes in the access
84 column indicate if the given resource can be set at creation time (C),
85 set by using XtSetValues (S), retrieved by using XtGetValues (G), or is
86 not applicable (N/A).
87
88 ┌──────────────────────────────────────────────────────────────────────────────────┐
89 │ │ XmPanedWindow Res│ource Set │ │ │
90 │Name │ Class │ Type │ Default │ Access │
91 ├───────────────────────┼────────────────────┼───────────────┼────────────┼────────┤
92 │XmNmarginHeight │ XmCMarginHeight │ Dimension │ 3 │ CSG │
93 ├───────────────────────┼────────────────────┼───────────────┼────────────┼────────┤
94 │XmNmarginWidth │ XmCMarginWidth │ Dimension │ 3 │ CSG │
95 ├───────────────────────┼────────────────────┼───────────────┼────────────┼────────┤
96 │XmNorientation │ XmCOrientation │ unsigned char │ XmVERTICAL │ CSG │
97 ├───────────────────────┼────────────────────┼───────────────┼────────────┼────────┤
98 │XmNrefigureMode │ XmCBoolean │ Boolean │ True │ CSG │
99 ├───────────────────────┼────────────────────┼───────────────┼────────────┼────────┤
100 │XmNsashHeight │ XmCSashHeight │ Dimension │ 10 │ CSG │
101 ├───────────────────────┼────────────────────┼───────────────┼────────────┼────────┤
102 │XmNsashIndent │ XmCSashIndent │ Position │ -10 │ CSG │
103 ├───────────────────────┼────────────────────┼───────────────┼────────────┼────────┤
104 │XmNsashShadowThickness │ XmCShadowThickness │ Dimension │ dynamic │ CSG │
105 ├───────────────────────┼────────────────────┼───────────────┼────────────┼────────┤
106 │XmNsashWidth │ XmCSashWidth │ Dimension │ 10 │ CSG │
107 ├───────────────────────┼────────────────────┼───────────────┼────────────┼────────┤
108 │XmNseparatorOn │ XmCSeparatorOn │ Boolean │ True │ CSG │
109 ├───────────────────────┼────────────────────┼───────────────┼────────────┼────────┤
110 │XmNspacing │ XmCSpacing │ Dimension │ 8 │ CSG │
111 ├───────────────────────┼────────────────────┼───────────────┼────────────┼────────┤
112 └───────────────────────┴────────────────────┴───────────────┴────────────┴────────┘
113 XmNmarginHeight
114 Specifies the distance between the top and bottom edges of
115 the PanedWindow and its children.
116
117 XmNmarginWidth
118 Specifies the distance between the left and right edges of
119 the PanedWindow and its children.
120
121 XmNorientation
122 Specifies the layout as either vertical (with the XmVERTICAL
123 value) or horizontal (with the XmHORIZONTAL value). In the
124 vertical layout, the children are laid out in a vertically
125 tiled format. In the horizontal layout, the children are laid
126 out in a horizontal layout, with the sash moveable along the
127 horizontal axis.
128
129 XmNrefigureMode
130 Determines whether the panes' positions are recomputed and
131 repositioned when programmatic changes are being made to the
132 PanedWindow. Setting this resource to True resets the chil‐
133 dren to their appropriate positions.
134
135 XmNsashHeight
136 Specifies the height of the sash.
137
138 XmNsashIndent
139 Specifies the horizontal placement of the sash along each
140 pane. A positive value causes the sash to be offset from the
141 near (left) side of the PanedWindow, and a negative value
142 causes the sash to be offset from the far (right) side of the
143 PanedWindow. If the offset is greater than the width of the
144 PanedWindow minus the width of the sash, the sash is placed
145 flush against the near side of the PanedWindow.
146
147 Whether the placement actually corresponds to the left or
148 right side of the PanedWindow depends on the XmNlayoutDirec‐
149 tion resource of the widget.
150
151 XmNsashShadowThickness
152 Specifies the thickness of the shadows of the sashes.
153
154 XmNsashWidth
155 Specifies the width of the sash.
156
157 XmNseparatorOn
158 Determines whether a separator is created between each of the
159 panes. Setting this resource to True creates a Separator at
160 the midpoint between each of the panes.
161
162 XmNspacing
163 Specifies the distance between each child pane.
164
165
166
167 ┌───────────────────────────────────────────────────────────────────────────┐
168 │ │XmPanedWindow Cons│traint Resou│rce Set │ │
169 │Name │ Class │ Type │ Default │ Access │
170 ├─────────────────┼──────────────────┼───────────┼─────────────────┼────────┤
171 │XmNallowResize │ XmCBoolean │ Boolean │ False │ CSG │
172 ├─────────────────┼──────────────────┼───────────┼─────────────────┼────────┤
173 │XmNpaneMaximum │ XmCPaneMaximum │ Dimension │ 1000 │ CSG │
174 ├─────────────────┼──────────────────┼───────────┼─────────────────┼────────┤
175 │XmNpaneMinimum │ XmCPaneMinimum │ Dimension │ 1 │ CSG │
176 ├─────────────────┼──────────────────┼───────────┼─────────────────┼────────┤
177 │XmNpositionIndex │ XmCPositionIndex │ short │ XmLAST_POSITION │ CSG │
178 ├─────────────────┼──────────────────┼───────────┼─────────────────┼────────┤
179 │XmNskipAdjust │ XmCBoolean │ Boolean │ False │ CSG │
180 ├─────────────────┼──────────────────┼───────────┼─────────────────┼────────┤
181 └─────────────────┴──────────────────┴───────────┴─────────────────┴────────┘
182 XmNallowResize
183 Allows an application to specify whether the PanedWindow
184 should allow a pane to request to be resized. This flag has
185 an effect only after the PanedWindow and its children have
186 been realized. If this flag is set to True, the PanedWindow
187 tries to honor requests to alter the height of the pane. If
188 False, it always denies pane requests to resize.
189
190 XmNpaneMaximum
191 Allows an application to specify the maximum size to which a
192 pane may be resized. This value must be greater than the
193 specified minimum.
194
195 XmNpaneMinimum
196 Allows an application to specify the minimum size to which a
197 pane may be resized. This value must be greater than 0
198 (zero).
199
200 XmNpositionIndex
201 Specifies the position of the widget in its parent's list of
202 children (the list of pane children, not including sashes).
203 The value is an integer that is no less than 0 (zero) and no
204 greater than the number of children in the list at the time
205 the value is specified. A value of 0 means that the child is
206 placed at the beginning of the list. The value can also be
207 specified as XmLAST_POSITION (the default), which means that
208 the child is placed at the end of the list. Any other value
209 is ignored. XtGetValues returns the position of the widget
210 in its parent's child list at the time of the call to XtGet‐
211 Values.
212
213 When a widget is inserted into its parent's child list, the
214 positions of any existing children that are greater than or
215 equal to the specified widget's XmNpositionIndex are
216 increased by 1. The effect of a call to XtSetValues for XmN‐
217 positionIndex is to remove the specified widget from its par‐
218 ent's child list, decrease by one the positions of any exist‐
219 ing children that are greater than the specified widget's
220 former position in the list, and then insert the specified
221 widget into its parent's child list as described in the pre‐
222 ceding sentence.
223
224 XmNskipAdjust
225 When set to True, this Boolean resource allows an application
226 to specify that the PanedWindow should not automatically
227 resize this pane.
228
229 Inherited Resources
230 PanedWindow inherits behavior and resources from the superclasses
231 described in the following tables. For a complete description of each
232 resource, refer to the reference page for that superclass.
233
234 ┌────────────────────────────────────────────────────────────────────────────────────────────────────┐
235 │ │ XmManager │Resource Set │ │ │
236 │Name │ Class │ Type │ Default │ Access │
237 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
238 │XmNbottomShadowColor │ XmCBottomShadowColor │ Pixel │ dynamic │ CSG │
239 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
240 │XmNbottomShadowPixmap │ XmCBottomShadowPixmap │ Pixmap │ XmUNSPECIFIED_PIXMAP │ CSG │
241 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
242 │XmNforeground │ XmCForeground │ Pixel │ dynamic │ CSG │
243 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
244 │XmNhelpCallback │ XmCCallback │ XtCallbackList │ NULL │ C │
245 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
246 │XmNhighlightColor │ XmCHighlightColor │ Pixel │ dynamic │ CSG │
247 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
248 │XmNhighlightPixmap │ XmCHighlightPixmap │ Pixmap │ dynamic │ CSG │
249 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
250 │XmNinitialFocus │ XmCInitialFocus │ Widget │ NULL │ CSG │
251 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
252 │XmNlayoutDirection │ XmCLayoutDirection │ XmDirection │ dynamic │ CG │
253 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
254 │XmNnavigationType │ XmCNavigationType │ XmNavigationType │ XmTAB_GROUP │ CSG │
255 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
256 │XmNpopupHandlerCallback │ XmCCallback │ XtCallbackList │ NULL │ C │
257 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
258 │XmNshadowThickness │ XmCShadowThickness │ Dimension │ 2 │ CSG │
259 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
260 │XmNstringDirection │ XmCStringDirection │ XmStringDirection │ dynamic │ CG │
261 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
262 │XmNtopShadowColor │ XmCTopShadowColor │ Pixel │ dynamic │ CSG │
263 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
264 │XmNtopShadowPixmap │ XmCTopShadowPixmap │ Pixmap │ dynamic │ CSG │
265 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
266 │XmNtraversalOn │ XmCTraversalOn │ Boolean │ True │ CSG │
267 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
268 │XmNunitType │ XmCUnitType │ unsigned char │ dynamic │ CSG │
269 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
270 │XmNuserData │ XmCUserData │ XtPointer │ NULL │ CSG │
271 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
272 └────────────────────────┴───────────────────────┴───────────────────┴──────────────────────┴────────┘
273 ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
274 │ │ Core Resource Se│t │ │ │
275 │Name │ Class │ Type │ Default │ Access │
276 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
277 │XmNaccelerators │ XmCAccelerators │ XtAccelerators │ dynamic │ CSG │
278 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
279 │XmNancestorSensitive │ XmCSensitive │ Boolean │ dynamic │ G │
280 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
281 │XmNbackground │ XmCBackground │ Pixel │ dynamic │ CSG │
282 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
283 │XmNbackgroundPixmap │ XmCPixmap │ Pixmap │ XmUNSPECIFIED_PIXMAP │ CSG │
284 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
285 │XmNborderColor │ XmCBorderColor │ Pixel │ XtDefaultForeground │ CSG │
286 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
287 │XmNborderPixmap │ XmCPixmap │ Pixmap │ XmUNSPECIFIED_PIXMAP │ CSG │
288 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
289 │XmNborderWidth │ XmCBorderWidth │ Dimension │ 0 │ CSG │
290 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
291 │XmNcolormap │ XmCColormap │ Colormap │ dynamic │ CG │
292 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
293 │XmNdepth │ XmCDepth │ int │ dynamic │ CG │
294 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
295 │XmNdestroyCallback │ XmCCallback │ XtCallbackList │ NULL │ C │
296 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
297 │XmNheight │ XmCHeight │ Dimension │ dynamic │ CSG │
298 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
299 │XmNinitialResourcesPersistent │ XmCInitialResourcesPersistent │ Boolean │ True │ C │
300 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
301 │XmNmappedWhenManaged │ XmCMappedWhenManaged │ Boolean │ True │ CSG │
302 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
303 │XmNscreen │ XmCScreen │ Screen * │ dynamic │ CG │
304 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
305 │XmNsensitive │ XmCSensitive │ Boolean │ True │ CSG │
306 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
307 │XmNtranslations │ XmCTranslations │ XtTranslations │ dynamic │ CSG │
308 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
309 │XmNwidth │ XmCWidth │ Dimension │ dynamic │ CSG │
310 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
311 │XmNx │ XmCPosition │ Position │ 0 │ CSG │
312 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
313 │XmNy │ XmCPosition │ Position │ 0 │ CSG │
314 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
315 └──────────────────────────────┴───────────────────────────────┴────────────────┴──────────────────────┴────────┘
316 ┌─────────────────────────────────────────────────────────────────────────────────┐
317 │ │ Composite│Resource Set │ │ │
318 │Name │ Class │ Type │ Default │ Access │
319 ├──────────────────┼───────────────────┼─────────────┼───────────────────┼────────┤
320 │XmNchildren │ XmCReadOnly │ WidgetList │ NULL │ G │
321 ├──────────────────┼───────────────────┼─────────────┼───────────────────┼────────┤
322 │XmNinsertPosition │ XmCInsertPosition │ XtOrderProc │ default procedure │ CSG │
323 ├──────────────────┼───────────────────┼─────────────┼───────────────────┼────────┤
324 │XmNnumChildren │ XmCReadOnly │ Cardinal │ 0 │ G │
325 ├──────────────────┼───────────────────┼─────────────┼───────────────────┼────────┤
326 └──────────────────┴───────────────────┴─────────────┴───────────────────┴────────┘
327 Translations
328 XmPanedWindow inherits translations from XmManager.
329
330 The translations for sashes within the PanedWindow are described in the
331 following table.
332
333 The following key names are listed in the X standard key event transla‐
334 tion table syntax. This format is the one used by Motif to specify the
335 widget actions corresponding to a given key. A brief overview of the
336 format is provided under VirtualBindings(3). For a complete descrip‐
337 tion of the format, please refer to the X Toolkit Instrinsics Documen‐
338 tation.
339
340 ∼c ∼s ∼m ∼a <Btn1Down>:
341 SashAction(Start)
342
343 ∼c ∼s ∼m ∼a <Btn1Motion>:
344 SashAction(Move)
345
346 ∼c ∼s ∼m ∼a <Btn1Up>:
347 SashAction(Commit)
348
349 ∼c ∼s ∼m ∼a <Btn2Down>:
350 SashAction(Start)
351
352 ∼c ∼s ∼m ∼a <Btn2Motion>:
353 SashAction(Move)
354
355 ∼c ∼s ∼m ∼a <Btn2Up>:
356 SashAction(Commit)
357
358 :<Key><osfActivate>:
359 PrimitiveParentActivate()
360
361 :<Key><osfCancel>:
362 PrimitiveParentCancel()
363
364 :<Key><osfHelp>:
365 Help()
366
367 :c <Key><osfUp>:
368 SashAction(Key,LargeIncr,Up)
369
370 :<Key><osfUp>:
371 SashAction(Key,DefaultIncr,Up)
372
373 :c <Key><osfRight>:
374 SashAction(Key,LargeIncr,Right)
375
376 :<Key><osfRight>:
377 SashAction(Key,DefaultIncr,Right)
378
379 :c <Key><osfDown>:
380 SashAction(Key,LargeIncr,Down)
381
382 :<Key><osfDown>:
383 SashAction(Key,DefaultIncr,Down)
384
385 :c <Key><osfLeft>:
386 SashAction(Key,LargeIncr,Left)
387
388 :<Key><osfLeft>:
389 SashAction(Key,DefaultIncr,Left)
390
391 ∼s ∼m ∼a <Key>Return:
392 PrimitiveParentActivate()
393
394 s ∼m ∼a <Key>Tab:
395 PrevTabGroup()
396
397 ∼m ∼a <Key>Tab:
398 NextTabGroup()
399
400 Action Routines
401 The XmPanedWindow action routines are
402
403 Help(): Calls the callbacks for XmNhelpCallback if any exist. If
404 there are no help callbacks for this widget, this action
405 calls the help callbacks for the nearest ancestor that has
406 them.
407
408 NextTabGroup():
409 Moves the keyboard focus to the next tab group. By default,
410 each pane and sash is a tab group.
411
412 PrevTabGroup():
413 Moves the keyboard focus to the previous tab group. By
414 default, each pane and sash is a tab group.
415
416 SashAction(action) or SashAction(Key,increment,direction):
417 The Start action activates the interactive placement of the
418 pane's borders. The Move action causes the sash to track the
419 position of the pointer. If one of the panes reaches its
420 minimum or maximum size, adjustment continues with the next
421 adjustable pane. The Commit action ends sash motion.
422
423 When sash action is caused by a keyboard event, the sash with
424 the keyboard focus is moved according to the increment and
425 direction specified. DefaultIncr adjusts the sash by one
426 line. LargeIncr adjusts the sash by one view region. The
427 direction is specified as either Up, Down, Left, or Right.
428
429 Note that the SashAction action routine is not a direct
430 action routine of the XmPanedWindow, but rather an action of
431 the Sash control created by the XmPanedWindow.
432
433 Additional Behavior
434 This widget has the following additional behavior:
435
436 <FocusIn>:
437 Moves the keyboard focus to the sash and highlights it
438
439 <FocusOut>:
440 Unsets the keyboard focus in the sash and unhighlights it
441
442 Virtual Bindings
443 The bindings for virtual keys are vendor specific. For information
444 about bindings for virtual buttons and keys, see VirtualBindings(3).
445
447 Composite(3), Constraint(3), Core(3), XmCreatePanedWindow(3), XmMan‐
448 ager(3), XmVaCreatePanedWindow(3), and XmVaCreateManagedPanedWindow(3).
449
450
451
452 XmPanedWindow(library call)