annotate lwlib/xlwscrollbarP.h @ 185:3d6bfa290dbd r20-3b19

Import from CVS: tag r20-3b19
author cvs
date Mon, 13 Aug 2007 09:55:28 +0200
parents e121b013d1f0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
183
e121b013d1f0 Import from CVS: tag r20-3b18
cvs
parents: 102
diff changeset
1 /* Implements a lightweight scrollbar widget.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 Copyright (C) 1992, 1993, 1994 Lucid, Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 This file is part of the Lucid Widget Library.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 The Lucid Widget Library is free software; you can redistribute it and/or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 modify it under the terms of the GNU General Public License as published by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 the Free Software Foundation; either version 2, or (at your option)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 any later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 The Lucid Widget Library is distributed in the hope that it will be useful,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 GNU General Public License for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
76
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
17 along with XEmacs; see the file COPYING. If not, write to
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
19 Boston, MA 02111-1307, USA. */
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 /* Created by Douglas Keller <dkeller@vnet.ibm.com> */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 #ifndef _XlwScrollBarP_h
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 #define _XlwScrollBarP_h
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 /*
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 ** Widget class
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 */
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
30 typedef struct
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
31 {
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
32 int dummy_field; /* keep compiler happy */
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 } XlwScrollBarClassPart;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
35 typedef struct _XlwScrollbarClassRec
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
36 {
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
37 CoreClassPart core_class;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
38 XlwScrollBarClassPart scrollbar_class;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 } XlwScrollBarClassRec;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 183
diff changeset
41 enum XlwScrollbarArm
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 183
diff changeset
42 {
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 183
diff changeset
43 ARM_NONE,
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 183
diff changeset
44 ARM_SLIDER,
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 183
diff changeset
45 ARM_UP,
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 183
diff changeset
46 ARM_DOWN,
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 183
diff changeset
47 ARM_PAGEUP,
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 183
diff changeset
48 ARM_PAGEDOWN
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 183
diff changeset
49 };
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 183
diff changeset
50
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 183
diff changeset
51 enum XlwScrollbarForcedScroll
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 183
diff changeset
52 {
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 183
diff changeset
53 FORCED_SCROLL_NONE,
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 183
diff changeset
54 FORCED_SCROLL_DOWNRIGHT,
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 183
diff changeset
55 FORCED_SCROLL_UPLEFT
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 183
diff changeset
56 };
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 /*
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 ** Widget instance
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 */
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
61 typedef struct
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
62 {
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
63 /* resources */
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
64 XtCallbackList valueChangedCBL;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
65 XtCallbackList incrementCBL;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
66 XtCallbackList decrementCBL;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
67 XtCallbackList pageIncrementCBL;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
68 XtCallbackList pageDecrementCBL;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
69 XtCallbackList toTopCBL;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
70 XtCallbackList toBottomCBL;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
71 XtCallbackList dragCBL;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
73 Pixel foreground;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
75 Pixel topShadowColor;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
76 Pixel bottomShadowColor;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
78 Pixel troughColor;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
80 Pixel armColor;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
81 Pixel armTopShadowColor;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
82 Pixel armBottomShadowColor;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
83
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
84 Pixmap topShadowPixmap;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
85 Pixmap bottomShadowPixmap;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
87 int shadowThickness;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
88
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
89 Boolean showArrows;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
91 int minimum;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
92 int maximum;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
93 int sliderSize;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
94 int value;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
95 int pageIncrement;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
96 int increment;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
98 int initialDelay;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
99 int repeatDelay;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
100
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
101 unsigned char orientation;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
103 char *sliderStyle;
183
e121b013d1f0 Import from CVS: tag r20-3b18
cvs
parents: 102
diff changeset
104 char *knobStyle;
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
105 char *arrowPosition;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
107 /* private */
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
108 Pixmap grayPixmap;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
110 GC backgroundGC;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
111 GC topShadowGC;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
112 GC bottomShadowGC;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
114 int above, ss, below;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
115 int lastY;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 183
diff changeset
117 enum XlwScrollbarArm armed;
76
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
118
185
3d6bfa290dbd Import from CVS: tag r20-3b19
cvs
parents: 183
diff changeset
119 enum XlwScrollbarForcedScroll forced_scroll;
76
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
120
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
121 int savedValue;
10
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 0
diff changeset
122
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
123 Boolean fullRedrawNext;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
125 Boolean timerActive;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
126 XtIntervalId timerId;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 } XlwScrollBarPart;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
130 typedef struct _XlwScrollBarRec
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
131 {
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
132 CorePart core;
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
133 XlwScrollBarPart sb;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 } XlwScrollBarRec;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
136 #endif /* _XlwScrollBarP_h */