First checkin, AXE release 0.2
[AXE.git] / doc / scrollbar.html
1 <html>
2 <head>
3 <title>scrollbar - ANDROMEDA X-windows Encapsulation</title>
4 </head>
5 <body bgcolor=white>
6
7 <h1>class scrollbar</h1>
8 <hr>
9
10 <h2> NAME</h2>
11 scrollbar - Scrollbar
12
13 <h2> SYNOPSIS</h2>
14 #include "scroll.h"
15 <p>
16 class scrollbar : public <a href="frame.html">frame</a>
17
18 <h2> DESCRIPTION</h2>
19
20 A <strong>scrollbar</strong> is a construction of two windows.
21 The scrollbar itself and the slider that moves within the scrollbar.
22 The slider can be moved within the scrollbar by dragging the slider
23 with the mouse, or by clicking in the scrollbar on either side of
24 the slider.
25 Whenever the slider is moved, the scrollbar sends a
26 <strong>SCROLL_POSITIONED</strong> message to its parent window.
27
28 <p>
29
30 Usually, a scrollbar is used together with a window which visualizes
31 data that is too large for that window.
32 The scrollbar enables the user to scroll the data through the window.
33 The slider within the scrollbar represents the portion of the data
34 which is visible in that window.
35 The figure below shows how the dimensions of the scrollbar are defined:
36 <p>
37 <img src="scroll.png">
38 <p>
39
40 Two sizes are involved in positioning the slider in the scrollbar:
41
42 <ol>
43 <li>
44 The <em>bar_size</em>, the total size of the scrollbar itself.
45 This represents the total size of the data that is visualized.
46
47 <li>
48 The <em>slider_size</em>, the size of the slider.
49 This represents the size of the portion of the data which is visible
50 inside the window.
51 </ol>
52
53 The position of the slider inside the scrollbar represents the top or the
54 left edge of the visible part of the data, relative to the total size
55 of the data.
56 The position of the slider is limited by the sizes of both the scrollbar
57 and the slider.
58 The position of the slider is limited to the range [0, bar_size - slider_size].
59
60 <p>
61
62 The sizes of the scrollbar and the slider, as well as the position of the
63 slider are defined in <em>logical</em> coordinates, rather than the actual
64 number of pixels of the scrollbar itself.
65 The logical coordinates correspond to the data that is actually being viewed.
66 This may be a number of pixels, but may also be the number of items
67 in a list or the number of lines in a text document.
68 The scrollbar object maps these logical coordinates to physical coordinates
69 on the workstation's screen.
70 Since the <em>bar_size</em> represents the total size of the data being viewed,
71 this size dictates the ratio for the other sizes.
72
73 <table>
74 <tr><th colspan=2>Member Functions
75
76 <tr>
77     <td>scrollbar
78     <td>Construct a scrollbar object
79 </table>
80
81 <h2> SEE ALSO</h2>
82 <h2> DIAGNOSTICS</h2>
83
84 </body>
85 </html>