annotate lwlib/xlwscrollbarP.h @ 26:441bb1e64a06 r19-15b96

Import from CVS: tag r19-15b96
author cvs
date Mon, 13 Aug 2007 08:51:32 +0200
parents 49a24b4fd526
children 131b0175ea99
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 /* Implements a lightweight scrollbar widget.
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
10
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 0
diff changeset
17 along with XEmacs; see the file COPYING. If not, write to
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 0
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 0
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 */
26
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
30 typedef struct
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
31 {
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
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
26
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
35 typedef struct _XlwScrollbarClassRec
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
36 {
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
37 CoreClassPart core_class;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
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
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 /*
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 ** Widget instance
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 */
26
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
45 typedef struct
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
46 {
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
47 /* resources */
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
48 XtCallbackList valueChangedCBL;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
49 XtCallbackList incrementCBL;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
50 XtCallbackList decrementCBL;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
51 XtCallbackList pageIncrementCBL;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
52 XtCallbackList pageDecrementCBL;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
53 XtCallbackList toTopCBL;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
54 XtCallbackList toBottomCBL;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
55 XtCallbackList dragCBL;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56
26
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
57 Pixel foreground;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58
26
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
59 Pixel topShadowColor;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
60 Pixel bottomShadowColor;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61
26
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
62 Pixel troughColor;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63
26
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
64 Pixel armColor;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
65 Pixel armTopShadowColor;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
66 Pixel armBottomShadowColor;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
67
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
68 Pixmap topShadowPixmap;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
69 Pixmap bottomShadowPixmap;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70
26
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
71 int shadowThickness;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
72
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
73 Boolean showArrows;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74
26
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
75 int minimum;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
76 int maximum;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
77 int sliderSize;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
78 int value;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
79 int pageIncrement;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
80 int increment;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81
26
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
82 int initialDelay;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
83 int repeatDelay;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
84
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
85 unsigned char orientation;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
86
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
87 char *sliderStyle;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
88 char *arrowPosition;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89
26
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
90 /* private */
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
91 Pixmap grayPixmap;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92
26
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
93 GC backgroundGC;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
94 GC topShadowGC;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
95 GC bottomShadowGC;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96
26
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
97 int above, ss, below;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
98 int lastY;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99
26
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
100 enum {
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
101 ARM_NONE,
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
102 ARM_SLIDER,
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
103 ARM_UP,
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
104 ARM_DOWN,
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
105 ARM_PAGEUP,
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
106 ARM_PAGEDOWN
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
107 } armed;
10
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 0
diff changeset
108
26
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
109 enum {
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
110 FORCED_SCROLL_NONE,
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
111 FORCED_SCROLL_DOWNRIGHT,
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
112 FORCED_SCROLL_UPLEFT
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
113 } forced_scroll;
10
49a24b4fd526 Import from CVS: tag r19-15b6
cvs
parents: 0
diff changeset
114
26
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
115 int savedValue;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116
26
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
117 Boolean fullRedrawNext;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118
26
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
119 Boolean timerActive;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
120 XtIntervalId timerId;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 } XlwScrollBarPart;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123
26
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
124 typedef struct _XlwScrollBarRec
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
125 {
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
126 CorePart core;
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
127 XlwScrollBarPart sb;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 } XlwScrollBarRec;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129
26
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
130 #endif /* _XlwScrollBarP_h */