1 /* 2 * $XConsortium: ScrollbarP.h,v 1.2 90/04/11 17:33:53 jim Exp $ 3 */ 4 5 6 /*********************************************************** 7 Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, 8 and the Massachusetts Institute of Technology, Cambridge, Massachusetts. 9 10 All Rights Reserved 11 12 Permission to use, copy, modify, and distribute this software and its 13 documentation for any purpose and without fee is hereby granted, 14 provided that the above copyright notice appear in all copies and that 15 both that copyright notice and this permission notice appear in 16 supporting documentation, and that the names of Digital or MIT not be 17 used in advertising or publicity pertaining to distribution of the 18 software without specific, written prior permission. 19 20 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 21 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 22 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 23 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 24 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 25 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 26 SOFTWARE. 27 28 ******************************************************************/ 29 30 #ifndef _ScrollbarP_h 31 #define _ScrollbarP_h 32 33 #include <X11/Xaw/Scrollbar.h> 34 #include <X11/Xaw/SimpleP.h> 35 36 typedef struct { 37 /* public */ 38 Pixel foreground; /* thumb foreground color */ 39 XtOrientation orientation; /* horizontal or vertical */ 40 XtCallbackList scrollProc; /* proportional scroll */ 41 XtCallbackList thumbProc; /* jump (to position) scroll */ 42 XtCallbackList jumpProc; /* same as thumbProc but pass data by ref */ 43 Pixmap thumb; /* thumb color */ 44 Cursor upCursor; /* scroll up cursor */ 45 Cursor downCursor; /* scroll down cursor */ 46 Cursor leftCursor; /* scroll left cursor */ 47 Cursor rightCursor; /* scroll right cursor */ 48 Cursor verCursor; /* scroll vertical cursor */ 49 Cursor horCursor; /* scroll horizontal cursor */ 50 float top; /* What percent is above the win's top */ 51 float shown; /* What percent is shown in the win */ 52 Dimension length; /* either height or width */ 53 Dimension thickness; /* either width or height */ 54 Dimension min_thumb; /* minium size for the thumb. */ 55 56 /* private */ 57 Cursor inactiveCursor; /* The normal cursor for scrollbar */ 58 char direction; /* a scroll has started; which direction */ 59 GC gc; /* a (shared) gc */ 60 Position topLoc; /* Pixel that corresponds to top */ 61 Dimension shownLength; /* Num pixels corresponding to shown */ 62 63 } ScrollbarPart; 64 65 typedef struct _ScrollbarRec { 66 CorePart core; 67 SimplePart simple; 68 ScrollbarPart scrollbar; 69 } ScrollbarRec; 70 71 typedef struct {int empty;} ScrollbarClassPart; 72 73 typedef struct _ScrollbarClassRec { 74 CoreClassPart core_class; 75 SimpleClassPart simple_class; 76 ScrollbarClassPart scrollbar_class; 77 } ScrollbarClassRec; 78 79 extern ScrollbarClassRec scrollbarClassRec; 80 81 #endif /* _ScrollbarP_h */ 82