aboutsummaryrefslogtreecommitdiff
path: root/libXaw/specs/Panner.xml
blob: a04bb1a96e606487a49c8984528bc2d3ba1f39e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
<sect1 id="Panner_Widget">
<title>Panner Widget</title>
<para>
<!-- .LP -->
<!-- .XS -->
<!-- 	Panner Widget -->
<!-- .XE -->
<!-- .IN "Panner widget" "" "@DEF@" -->
<literallayout class="monospaced">
<!-- .TA 2.0i -->
<!-- .ta 2.0i -->
<!-- .sp -->
Application header file	&lt;X11/Xaw/Panner.h&gt;
<!-- .IN "Panner.h" "" -->
Class header file	&lt;X11/Xaw/PannerP.h&gt;
<!-- .IN "PannerP.h" "" -->
Class		pannerWidgetClass
<!-- .IN "pannerWidgetClass" "" -->
Class Name	Panner
<!-- .IN "Panner widget" "class name" -->
Superclass	Simple
<!-- .sp -->
</literallayout>
</para>
<para>
<!-- .LP -->
A Panner widget is a rectangle, called the
``canvas,'' on which another rectangle, the ``slider,'' moves in two
dimensions.  It is often used with a Porthole widget to move, or
``scroll,'' a third widget in two dimensions, in which case the
slider's size and position gives feedback as to what portion of
the third widget is visible.
</para>
<para>
<!-- .LP -->
The slider may be scrolled around the canvas by pressing,
dragging, and releasing Button1; the default translation also
enables scrolling via arrow keys and some other keys.  While
scrolling is in progress, the application receives notification
through callback procedures.  Notification may be done either
continuously whenever the slider moves or discretely whenever the
slider has been given a new location.
</para>
<sect2 id="panner_resources">
<title>Resources</title>
<para>
<!-- .LP -->
When creating a Panner widget instance, the following resources are
retrieved from the argument list or from the resource database:
</para>
<para>
<!-- .LP -->
<!-- .IN "Panner widget" "resources" -->
<informaltable>
  <tgroup cols='5' align='center'>
  <colspec colname='c1'/>
  <colspec colname='c2'/>
  <colspec colname='c3'/>
  <colspec colname='c4'/>
  <colspec colname='c5'/>
  <thead>
    <row>
      <entry>Name</entry>
      <entry>Class</entry>
      <entry>Type</entry>
      <entry>Notes</entry>
      <entry>Default Value</entry>
    </row>
  </thead>
  <tbody>
    <row>
      <entry>accelerators</entry>
      <entry>Accelerators</entry>
      <entry>AcceleratorTable</entry>
      <entry></entry>
      <entry>NULL</entry>
    </row>
    <row>
      <entry>allowOff</entry>
      <entry>AllowOff</entry>
      <entry>Boolean</entry>
      <entry></entry>
      <entry>False</entry>
    </row>
    <row>
      <entry>ancestorSensitive</entry>
      <entry>AncestorSensitive</entry>
      <entry>Boolean</entry>
      <entry>D</entry>
      <entry>True</entry>
    </row>
    <row>
      <entry>background</entry>
      <entry>Background</entry>
      <entry>Pixel</entry>
      <entry></entry>
      <entry>XtDefaultBackground</entry>
    </row>
    <row>
      <entry>backgroundPixmap</entry>
      <entry>Pixmap</entry>
      <entry>Pixmap</entry>
      <entry></entry>
      <entry>XtUnspecifiedPixmap</entry>
    </row>
    <row>
      <entry>backgroundStipple</entry>
      <entry>BackgroundStipple</entry>
      <entry>String</entry>
      <entry></entry>
      <entry>NULL</entry>
    </row>
    <row>
      <entry>borderColor</entry>
      <entry>BorderColor</entry>
      <entry>Pixel</entry>
      <entry></entry>
      <entry>XtDefaultForeground</entry>
    </row>
    <row>
      <entry>borderPixmap</entry>
      <entry>Pixmap</entry>
      <entry>Pixmap</entry>
      <entry></entry>
      <entry>XtUnspecifiedPixmap</entry>
    </row>
    <row>
      <entry>borderWidth</entry>
      <entry>BorderWidth</entry>
      <entry>Dimension</entry>
      <entry></entry>
      <entry>1</entry>
    </row>
    <row>
      <entry>canvasHeight</entry>
      <entry>CanvasHeight</entry>
      <entry>Dimension</entry>
      <entry></entry>
      <entry>0</entry>
    </row>
    <row>
      <entry>canvasWidth</entry>
      <entry>CanvasWidth</entry>
      <entry>Dimension</entry>
      <entry></entry>
      <entry>0</entry>
    </row>
    <row>
      <entry>colormap</entry>
      <entry>Colormap</entry>
      <entry>Colormap</entry>
      <entry></entry>
      <entry>Parent's Colormap</entry>
    </row>
    <row>
      <entry>cursor</entry>
      <entry>Cursor</entry>
      <entry>Cursor</entry>
      <entry></entry>
      <entry>None</entry>
    </row>
    <row>
      <entry>cursorName</entry>
      <entry>Cursor</entry>
      <entry>String</entry>
      <entry></entry>
      <entry>NULL</entry>
    </row>
    <row>
      <entry>defaultScale</entry>
      <entry>DefaultScale</entry>
      <entry>Dimension</entry>
      <entry></entry>
      <entry>8</entry>
    </row>
    <row>
      <entry>depth</entry>
      <entry>Depth</entry>
      <entry>int</entry>
      <entry>C</entry>
      <entry>Parent's Depth</entry>
    </row>
    <row>
      <entry>destroyCallback</entry>
      <entry>Callback</entry>
      <entry>XtCallbackList</entry>
      <entry></entry>
      <entry>NULL</entry>
    </row>
    <row>
      <entry>foreground</entry>
      <entry>Foreground</entry>
      <entry>Pixel</entry>
      <entry></entry>
      <entry>XtDefaultForeground</entry>
    </row>
    <row>
      <entry>height</entry>
      <entry>Height</entry>
      <entry>Dimension</entry>
      <entry>A</entry>
      <entry>depends on orientation</entry>
    </row>
    <row>
      <entry>internalSpace</entry>
      <entry>InternalSpace</entry>
      <entry>Dimension</entry>
      <entry></entry>
      <entry>4</entry>
    </row>
    <row>
      <entry>international</entry>
      <entry>International</entry>
      <entry>Boolean</entry>
      <entry>C</entry>
      <entry>False</entry>
    </row>
    <row>
      <entry>lineWidth</entry>
      <entry>LineWidth</entry>
      <entry>Dimension</entry>
      <entry></entry>
      <entry>0</entry>
    </row>
    <row>
      <entry>mappedWhenManaged</entry>
      <entry>MappedWhenManaged</entry>
      <entry>Boolean</entry>
      <entry></entry>
      <entry>True</entry>
    </row>
    <row>
      <entry>pointerColor</entry>
      <entry>Foreground</entry>
      <entry>Pixel</entry>
      <entry></entry>
      <entry>XtDefaultForeground</entry>
    </row>
    <row>
      <entry>pointerColorBackground</entry>
      <entry>Background</entry>
      <entry>Pixel</entry>
      <entry></entry>
      <entry>XtDefaultBackground</entry>
    </row>
    <row>
      <entry>reportCallback</entry>
      <entry>ReportCallback</entry>
      <entry>Callback</entry>
      <entry></entry>
      <entry>NULL</entry>
    </row>
    <row>
      <entry>resize</entry>
      <entry>Resize</entry>
      <entry>Boolean</entry>
      <entry></entry>
      <entry>True</entry>
    </row>
    <row>
      <entry>rubberBand</entry>
      <entry>RubberBand</entry>
      <entry>Boolean</entry>
      <entry></entry>
      <entry>False</entry>
    </row>
    <row>
      <entry>screen</entry>
      <entry>Screen</entry>
      <entry>Screen</entry>
      <entry>R</entry>
      <entry>Parent's Screen</entry>
    </row>
    <row>
      <entry>sensitive</entry>
      <entry>Sensitive</entry>
      <entry>Boolean</entry>
      <entry></entry>
      <entry>True</entry>
    </row>
    <row>
      <entry>shadowColor</entry>
      <entry>ShadowColor</entry>
      <entry>Pixel</entry>
      <entry></entry>
      <entry>XtDefaultForeground</entry>
    </row>
    <row>
      <entry>shadowThickness</entry>
      <entry>ShadowThickness</entry>
      <entry>Dimension</entry>
      <entry></entry>
      <entry>2</entry>
    </row>
    <row>
      <entry>sliderX</entry>
      <entry>SliderX</entry>
      <entry>Position</entry>
      <entry></entry>
      <entry>0</entry>
    </row>
    <row>
      <entry>sliderY</entry>
      <entry>SliderY</entry>
      <entry>Position</entry>
      <entry></entry>
      <entry>0</entry>
    </row>
    <row>
      <entry>sliderHeight</entry>
      <entry>SliderHeight</entry>
      <entry>Dimension</entry>
      <entry></entry>
      <entry>0</entry>
    </row>
    <row>
      <entry>sliderWidth</entry>
      <entry>SliderWidth</entry>
      <entry>Dimension</entry>
      <entry></entry>
      <entry>0</entry>
    </row>
    <row>
      <entry>translations</entry>
      <entry>Translations</entry>
      <entry>TranslationTable</entry>
      <entry></entry>
      <entry>See below</entry>
    </row>
    <row>
      <entry>width</entry>
      <entry>Width</entry>
      <entry>Dimension</entry>
      <entry>A</entry>
      <entry>depends on orientation</entry>
    </row>
    <row>
      <entry>x</entry>
      <entry>Position</entry>
      <entry>Position</entry>
      <entry></entry>
      <entry>0</entry>
    </row>
    <row>
      <entry>y</entry>
      <entry>Position</entry>
      <entry>Position</entry>
      <entry></entry>
      <entry>0</entry>
    </row>
  </tbody>
  </tgroup>
</informaltable>
</para>
<!-- .Ac -->
<variablelist>
  <varlistentry>
    <term>
      <function>allowOff</function>
    </term>
    <listitem>
      <para>
Whether to allow the edges of the slider to go off the edges of the canvas.
<!-- .As -->
<!-- .Bg -->
<!-- .Gp -->
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <function>backgroundStipple</function>
    </term>
    <listitem>
      <para>
The name of a bitmap pattern to be used as the background for
the area representing the canvas.
<!-- .Bc -->
<!-- .Bp -->
<!-- .Bw -->
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <function>canvasHeight</function>
    </term>
    <listitem>
      <para>
<!-- .br -->
<!-- .ns -->
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <function>canvasWidth</function>
    </term>
    <listitem>
      <para>
The size of the canvas.
<!-- .Cm -->
<!-- .Cu -->
<!-- .Cn -->
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <function>defaultScale</function>
    </term>
    <listitem>
      <para>
The percentage size that the Panner widget should have relative
to the size of the canvas.
<!-- .Dp -->
<!-- .Dc -->
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <function>foreground</function>
    </term>
    <listitem>
      <para>
A pixel value which indexes the widget's colormap to derive the color
used to draw the slider.
<!-- .Hw -->
    </para>
  </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <function>internalSpace</function>
    </term>
    <listitem>
      <para>
The width of internal border in pixels between a slider representing the
full size of the canvas
and the edge of the Panner widget.
<!-- .Ix -->
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <function>lineWidth</function>
    </term>
    <listitem>
      <para>
The width of the lines in the rubberbanding rectangle when rubberbanding
is in effect instead of continuous scrolling.  The default is 0.
<!-- .Mm -->
<!-- .Pf -->
<!-- .Pb -->
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <function>reportCallback</function>
    </term>
    <listitem>
      <para>
All functions on this callback list are called when the
<function>notify</function> action is invoked.  See the <function>Panner Actions</function> section
for details.
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <function>resize</function>
    </term>
    <listitem>
      <para>
Whether or not to resize the panner whenever the canvas size is changed so
that the <function>defaultScale</function> is maintained.
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <function>rubberBand</function>
    </term>
    <listitem>
      <para>
Whether or not scrolling should be discrete (only moving a rubberbanded
rectangle until the scrolling is done) or continuous (moving the slider
itself).  This controls whether or not the <function>move</function> action procedure also
invokes the <function>notify</function> action procedure.
<!-- .Sc -->
<!-- .Se -->
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <function>shadowColor</function>
    </term>
    <listitem>
      <para>
The color of the shadow underneath the slider.
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <function>shadowThickness</function>
    </term>
    <listitem>
      <para>
The width of the shadow underneath the slider.
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <function>sliderX</function>
    </term>
    <listitem>
      <para>
<!-- .br -->
<!-- .ns -->
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <function>sliderY</function>
    </term>
    <listitem>
      <para>
The location of the slider in the coordinates of the canvas.
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <function>sliderHeight</function>
    </term>
    <listitem>
      <para>
<!-- .br -->
<!-- .ns -->
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <function>sliderWidth</function>
    </term>
    <listitem>
      <para>
The size of the slider.
<!-- .Tr -->
<!-- .Xy -->
     </para>
    </listitem>
  </varlistentry>
</variablelist>
</sect2>
<sect2 id="Panner_Actions">
<title>Panner Actions</title>
<!-- .IN "Panner widget" "actions" -->
<para>
<!-- .LP -->
The actions supported by the Panner widget are:
</para>
<variablelist>
  <varlistentry>
    <term>
      <function>start</function>()
    </term>
    <listitem>
      <para>
This action begins movement of the slider.
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <function>stop</function>()
    </term>
    <listitem>
      <para>
This action ends movement of the slider.
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <function>abort</function>()
    </term>
    <listitem>
      <para>
This action ends movement of the slider and restores it to the position it
held when the <function>start</function> action was invoked.
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <function>move</function>()
    </term>
    <listitem>
      <para>
This action moves the outline of the slider (if the <function>rubberBand</function> resource
is True) or the slider itself (by invoking the <function>notify</function>
action procedure).
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <function>page</function>(<function>xamount</function>,<function>yamount</function>)
    </term>
    <listitem>
      <para>
This action moves the slider by the specified amounts.  The format
for the amounts is a signed or unsigned floating-point number (e.g., +1.0
or \-.5) followed
by either <function>p</function> indicating pages (slider sizes), or <function>c</function> indicating
canvas sizes.  Thus, <emphasis remap='I'>page(+0,+.5p)</emphasis> represents vertical movement down
one-half the height of the slider and <emphasis remap='I'>page(0,0)</emphasis> represents moving to
the upper left corner of the canvas.
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <function>notify</function>()
    </term>
    <listitem>
      <para>
This action informs the application of the slider's current position by
invoking the <function>reportCallback</function> functions registered by the application.
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <function>set</function>(<function>what</function>,<function>value</function>)
    </term>
    <listitem>
      <para>
This action changes the behavior of the Panner.  The <emphasis remap='I'>what</emphasis> argument
must currently be the string <function>rubberband</function> and controls the value of
the <function>rubberBand</function> resource.  The <function>value</function> argument
may have one of the values <function>on</function>, <function>off</function>, or <function>toggle</function>.
      </para>
    </listitem>
  </varlistentry>
</variablelist>

<para>
<!-- .LP -->
<!-- .sp -->
The default bindings for Panner are:
<!-- .IN "Panner widget" "default translation table" -->
</para>
<!-- .LP -->
<literallayout class="monospaced">
<!-- .TA .5i 1.75i -->
<!-- .ta .5i 1.75i -->
	&lt;Btn1Down&gt;:	start(\|)
	&lt;Btn1Motion&gt;:	move(\|)
	&lt;Btn1Up&gt;:	notify(\|) stop(\|)
	&lt;Btn2Down&gt;:	abort(\|)
	&lt;Key&gt;KP_Enter:	set(rubberband,toggle)
	&lt;Key&gt;space:	page(+1p,+1p)
	&lt;Key&gt;Delete:	page(\-1p,\-1p)
	&lt;Key&gt;BackSpace:	page(\-1p,\-1p)
	&lt;Key&gt;Left:	page(\-.5p,+0)
	&lt;Key&gt;Right:	page(+.5p,+0)
	&lt;Key&gt;Up:	page(+0,\-.5p)
	&lt;Key&gt;Down:	page(+0,+.5p)
	&lt;Key&gt;Home:	page(0,0)
</literallayout>
</sect2>

<sect2 id="Panner_Callbacks">
<title>Panner Callbacks</title>
<!-- .IN "Panner widget" "callbacks" -->
<para>
<!-- .LP -->
The functions registered on the <function>reportCallback</function> list are invoked by
the <function>notify</function> action as follows:
<!-- .IN "ReportProc" "" "@DEF@" -->
<funcsynopsis>
<funcprototype>
  <funcdef>void<function> ReportProc</function></funcdef>
  <paramdef>Widget<parameter> panner</parameter></paramdef>
  <paramdef>XtPointer<parameter> client_data</parameter></paramdef>
  <paramdef>XtPointer<parameter> report</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<!-- .FN -->
    </para>
<para>
<variablelist>
  <varlistentry>
    <term>panner</term>
    <listitem>
      <para>
<!-- .IP <emphasis remap='I'>panner</emphasis> 1i -->
Specifies the Panner widget.
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>panner</term>
    <listitem>
      <para>
<!-- .IP <emphasis remap='I'>client_data</emphasis> 1i -->
Specifies the client data.
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>panner</term>
    <listitem>
      <para>
<!-- .IP <emphasis remap='I'>report</emphasis> 1i -->
Specifies a pointer to an <function>XawPannerReport</function> structure containing
the location and size of the slider and the size of the canvas.
      </para>
    </listitem>
  </varlistentry>
</variablelist>
</para>
</sect2>
</sect1>