annotate lwlib/xlwscrollbar.h @ 410:de805c49cfc1 r21-2-35

Import from CVS: tag r21-2-35
author cvs
date Mon, 13 Aug 2007 11:19:21 +0200
parents 74fd4e045ea6
children 697ef44129c6
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
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
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 102
diff changeset
23 #ifndef INCLUDED_xlwscrollbar_h_
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 102
diff changeset
24 #define INCLUDED_xlwscrollbar_h_
0
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
76
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
31 #define XmNbackground "background"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
32 #define XmNbottomShadowColor "bottomShadowColor"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
33 #define XmNbottomShadowPixmap "bottomShadowPixmap"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
34 #define XmNforeground "foreground"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
35 #define XmNincrement "increment"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
36 #define XmNinitialDelay "initialDelay"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
37 #define XmNmaximum "maximum"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
38 #define XmNminimum "minimum"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
39 #define XmNpageIncrement "pageIncrement"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
40 #define XmNrepeatDelay "repeatDelay"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
41 #define XmNshadowThickness "shadowThickness"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
42 #define XmNborderWidth "borderWidth"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
43 #define XmNshowArrows "showArrows"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
44 #define XmNsliderSize "sliderSize"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
45 #define XmNtopShadowColor "topShadowColor"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
46 #define XmNtopShadowPixmap "topShadowPixmap"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
47 #define XmNtroughColor "troughColor"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
48 #define XmNvalue "value"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
49 #define XmNvalueChangedCallback "valueChangedCallback"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
50 #define XmNincrementCallback "incrementCallback"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
51 #define XmNdecrementCallback "decrementCallback"
0
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"
76
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
54 #define XmNtoTopCallback "toTopCallback"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
55 #define XmNtoBottomCallback "toBottomCallback"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
56 #define XmNdragCallback "dragCallback"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
57 #define XmNorientation "orientation"
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58
76
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
59 #define XmCBackground "Background"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
60 #define XmCBottomShadowColor "BottomShadowColor"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
61 #define XmCBottomShadowPixmap "BottomShadowPixmap"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
62 #define XmCTopShadowPixmap "TopShadowPixmap"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
63 #define XmCForeground "Foreground"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
64 #define XmCIncrement "Increment"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
65 #define XmCInitialDelay "InitialDelay"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
66 #define XmCMaximum "Maximum"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
67 #define XmCMinimum "Minimum"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
68 #define XmCPageIncrement "PageIncrement"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
69 #define XmCRepeatDelay "RepeatDelay"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
70 #define XmCShadowThickness "ShadowThickness"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
71 #define XmCBorderWidth "BorderWidth"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
72 #define XmCShowArrows "ShowArrows"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
73 #define XmCSliderSize "SliderSize"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
74 #define XmCTopShadowColor "TopShadowColor"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
75 #define XmCTroughColor "TroughColor"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
76 #define XmCValue "Value"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
77 #define XmCValueChangedCallback "ValueChangedCallback"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
78 #define XmCIncrementCallback "IncrementCallback"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
79 #define XmCDecrementCallback "DecrementCallback"
0
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"
76
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
82 #define XmCToTopCallback "ToTopCallback"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
83 #define XmCToBottomCallback "ToBottomCallback"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
84 #define XmCDragCallback "DragCallback"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
85 #define XmCOrientation "Orientation"
0
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
76
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
89 /* New resources that Motif does not have.
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
90 Maybe we should use a different prefix. */
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
91
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
92 /* "knob" is obsolete; use "slider" instead. */
76
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
93 #define XmNknobStyle "knobStyle"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
94 #define XmCKnobStyle "KnobStyle"
26
441bb1e64a06 Import from CVS: tag r19-15b96
cvs
parents: 10
diff changeset
95
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
96 #define XmNsliderStyle "sliderStyle"
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
97 #define XmCSliderStyle "SliderStyle"
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
98
76
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
99 #define XmNarrowPosition "arrowPosition"
c0c698873ce1 Import from CVS: tag r20-0b33
cvs
parents: 70
diff changeset
100 #define XmCArrowPosition "ArrowPosition"
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 #ifndef _Xm_h
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 enum {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 XmCR_NONE,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 XmCR_VALUE_CHANGED = 2,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 XmCR_INCREMENT,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 XmCR_DECREMENT,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 XmCR_PAGE_INCREMENT,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 XmCR_PAGE_DECREMENT,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 XmCR_TO_TOP,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 XmCR_TO_BOTTOM,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 XmCR_DRAG
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 enum {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 XmNO_ORIENTATION,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 XmVERTICAL,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 XmHORIZONTAL
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 };
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 76
diff changeset
122 #endif /* ! _Xm_h */
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 extern WidgetClass xlwScrollBarWidgetClass;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 typedef struct _XlwScrollBarClassRec *XlwScrollBarWidgetClass;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 typedef struct _XlwScrollBarRec *XlwScrollBarWidget;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 typedef struct
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 int reason;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 XEvent * event;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 int value;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 int pixel;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 } XlwScrollBarCallbackStruct;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137 void XlwScrollBarGetValues(Widget widget, int *value, int *sliderSize,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138 int *increment, int *pageIncrement);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 void XlwScrollBarSetValues(Widget widget, int value, int sliderSize,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 int increment, int pageIncrement, Boolean notify);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 102
diff changeset
143 #endif /* INCLUDED_xlwscrollbar_h_ */