annotate lwlib/xlwscrollbar.h @ 0:376386a54a3c r19-14

Import from CVS: tag r19-14
author cvs
date Mon, 13 Aug 2007 08:45:50 +0200
parents
children 49a24b4fd526
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
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 along with GNU Emacs; see the file COPYING. If not, write to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 /* Created by Douglas Keller <dkeller@vnet.ibm.com> */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 /* Last changed 02/05/95 */
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 _XlwScrollbar_h
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 #define _XlwScrollbar_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 #include <X11/Core.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 /* Motif-compatible resource names */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 #ifndef _XmStrDefs_h_
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 #define XmNbackground "background"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 #define XmNbottomShadowColor "bottomShadowColor"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 #define XmNbottomShadowPixmap "bottomShadowPixmap"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 #define XmNforeground "foreground"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 #define XmNincrement "increment"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 #define XmNinitialDelay "initialDelay"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 #define XmNmaximum "maximum"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 #define XmNminimum "minimum"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 #define XmNpageIncrement "pageIncrement"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 #define XmNrepeatDelay "repeatDelay"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 #define XmNshadowThickness "shadowThickness"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 #define XmNborderWidth "borderWidth"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 #define XmNshowArrows "showArrows"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 #define XmNsliderSize "sliderSize"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 #define XmNtopShadowColor "topShadowColor"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 #define XmNtopShadowPixmap "topShadowPixmap"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 #define XmNtroughColor "troughColor"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 #define XmNvalue "value"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 #define XmNvalueChangedCallback "valueChangedCallback"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 #define XmNincrementCallback "incrementCallback"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 #define XmNdecrementCallback "decrementCallback"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 #define XmNpageIncrementCallback "pageIncrementCallback"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 #define XmNpageDecrementCallback "pageDecrementCallback"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 #define XmNtoTopCallback "toTopCallback"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 #define XmNtoBottomCallback "toBottomCallback"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 #define XmNdragCallback "dragCallback"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 #define XmNorientation "orientation"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 #define XmCBackground "Background"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 #define XmCBottomShadowColor "BottomShadowColor"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 #define XmCBottomShadowPixmap "BottomShadowPixmap"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 #define XmCTopShadowPixmap "TopShadowPixmap"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 #define XmCForeground "Foreground"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 #define XmCIncrement "Increment"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 #define XmCInitialDelay "InitialDelay"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 #define XmCMaximum "Maximum"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 #define XmCMinimum "Minimum"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 #define XmCPageIncrement "PageIncrement"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 #define XmCRepeatDelay "RepeatDelay"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 #define XmCShadowThickness "ShadowThickness"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 #define XmCBorderWidth "BorderWidth"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 #define XmCShowArrows "ShowArrows"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 #define XmCSliderSize "SliderSize"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 #define XmCTopShadowColor "TopShadowColor"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 #define XmCTroughColor "TroughColor"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 #define XmCValue "Value"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 #define XmCValueChangedCallback "ValueChangedCallback"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 #define XmCIncrementCallback "IncrementCallback"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 #define XmCDecrementCallback "DecrementCallback"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 #define XmCPageIncrementCallback "PageIncrementCallback"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 #define XmCPageDecrementCallback "PageDecrementCallback"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 #define XmCToTopCallback "ToTopCallback"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 #define XmCToBottomCallback "ToBottomCallback"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 #define XmCDragCallback "DragCallback"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 #define XmCOrientation "Orientation"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 #endif /* _XmStrDefs_h_ */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 /* New resouces that Motif does not have, maybe we should use a different prefix. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 #define XmNknobStyle "knobStyle"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 #define XmCKnobStyle "KnobStyle"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 #define XmNarrowPosition "arrowPosition"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 #define XmCArrowPosition "ArrowPosition"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 #ifndef _Xm_h
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 enum {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 XmCR_NONE,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 XmCR_VALUE_CHANGED = 2,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 XmCR_INCREMENT,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 XmCR_DECREMENT,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 XmCR_PAGE_INCREMENT,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 XmCR_PAGE_DECREMENT,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 XmCR_TO_TOP,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 XmCR_TO_BOTTOM,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 XmCR_DRAG
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 };
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 enum {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 XmNO_ORIENTATION,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 XmVERTICAL,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 XmHORIZONTAL
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 };
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 #endif /* _Xm_h */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 extern WidgetClass xlwScrollBarWidgetClass;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 typedef struct _XlwScrollBarClassRec *XlwScrollBarWidgetClass;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 typedef struct _XlwScrollBarRec *XlwScrollBarWidget;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 typedef struct
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 int reason;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 XEvent * event;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 int value;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 int pixel;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 } XlwScrollBarCallbackStruct;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 void XlwScrollBarGetValues(Widget widget, int *value, int *sliderSize,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 int *increment, int *pageIncrement);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 void XlwScrollBarSetValues(Widget widget, int value, int sliderSize,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 int increment, int pageIncrement, Boolean notify);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138 #endif