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