ScrollbarP.h revision 7a84e134
1/*
2 * $Xorg: ScrollbarP.h,v 1.4 2001/02/09 02:03:45 xorgcvs Exp $
3 */
4
5
6/***********************************************************
7
8Copyright 1987, 1988, 1998  The Open Group
9
10Permission to use, copy, modify, distribute, and sell this software and its
11documentation for any purpose is hereby granted without fee, provided that
12the above copyright notice appear in all copies and that both that
13copyright notice and this permission notice appear in supporting
14documentation.
15
16The above copyright notice and this permission notice shall be included in
17all copies or substantial portions of the Software.
18
19THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
22OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
26Except as contained in this notice, the name of The Open Group shall not be
27used in advertising or otherwise to promote the sale, use or other dealings
28in this Software without prior written authorization from The Open Group.
29
30
31Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
32
33                        All Rights Reserved
34
35Permission to use, copy, modify, and distribute this software and its
36documentation for any purpose and without fee is hereby granted,
37provided that the above copyright notice appear in all copies and that
38both that copyright notice and this permission notice appear in
39supporting documentation, and that the name of Digital not be
40used in advertising or publicity pertaining to distribution of the
41software without specific, written prior permission.
42
43DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
44ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
45DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
46ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
47WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
48ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
49SOFTWARE.
50
51******************************************************************/
52/* $XFree86: xc/lib/Xaw/ScrollbarP.h,v 1.7 2001/01/17 19:42:29 dawes Exp $ */
53
54#ifndef _ScrollbarP_h
55#define _ScrollbarP_h
56
57#include <X11/Xaw/Scrollbar.h>
58#include <X11/Xaw/SimpleP.h>
59
60typedef struct {
61    /* resources */
62    Pixel	   foreground;	/* thumb foreground color */
63    XtOrientation  orientation;	/* horizontal or vertical */
64    XtCallbackList scrollProc;	/* proportional scroll */
65    XtCallbackList thumbProc;	/* jump (to position) scroll */
66    XtCallbackList jumpProc;	/* same as thumbProc but pass data by ref */
67    Pixmap	   thumb;			/* thumb pixmap */
68    Cursor	   upCursor;	/* scroll up cursor */
69    Cursor	   downCursor;	/* scroll down cursor */
70    Cursor	   leftCursor;	/* scroll left cursor */
71    Cursor	   rightCursor;	/* scroll right cursor */
72    Cursor	   verCursor;	/* scroll vertical cursor */
73    Cursor	   horCursor;	/* scroll horizontal cursor */
74    float	   top;
75    float	   shown;
76    Dimension	   length;	/* either height or width */
77    Dimension	   thickness;	/* either width or height */
78    Dimension	   min_thumb;	/* minium size for the thumb */
79
80     /* private */
81    Cursor	   inactiveCursor; /* The normal cursor for scrollbar */
82    char	   direction;	/* a scroll has started; which direction */
83    GC		   gc;		/* a (shared) gc */
84    Position	   topLoc;	/* Pixel that corresponds to top */
85    Dimension	   shownLength;	/* Num pixels corresponding to shown */
86#ifndef OLDXAW
87    XtPointer pad[4];	/* for future use and keep binary compatability */
88#endif
89} ScrollbarPart;
90
91typedef struct _ScrollbarRec {
92    CorePart		core;
93    SimplePart		simple;
94    ScrollbarPart	scrollbar;
95} ScrollbarRec;
96
97typedef struct {
98  XtPointer extension;
99} ScrollbarClassPart;
100
101typedef struct _ScrollbarClassRec {
102    CoreClassPart		core_class;
103    SimpleClassPart		simple_class;
104    ScrollbarClassPart		scrollbar_class;
105} ScrollbarClassRec;
106
107extern ScrollbarClassRec scrollbarClassRec;
108
109#endif /* _ScrollbarP_h */
110