00001 /* MODIFIED ATHENA SCROLLBAR (USING ARROWHEADS AT ENDS OF TRAVEL) */ 00002 /* Modifications Copyright 1992 by Mitch Trachtenberg */ 00003 /* Rights, permissions, and disclaimer of warranty are as in the */ 00004 /* DEC and MIT notice below. See usage warning in .c file. */ 00005 00006 /* 00007 * $XConsortium: ScrollbarP.h,v 1.2 90/04/11 17:33:53 jim Exp $ 00008 */ 00009 00010 /*********************************************************** 00011 00012 Copyright (c) 1987, 1988 X Consortium 00013 00014 Permission is hereby granted, free of charge, to any person obtaining a copy 00015 of this software and associated documentation files (the "Software"), to deal 00016 in the Software without restriction, including without limitation the rights 00017 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 00018 copies of the Software, and to permit persons to whom the Software is 00019 furnished to do so, subject to the following conditions: 00020 00021 The above copyright notice and this permission notice shall be included in 00022 all copies or substantial portions of the Software. 00023 00024 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00025 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00026 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 00027 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 00028 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 00029 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00030 00031 Except as contained in this notice, the name of the X Consortium shall not be 00032 used in advertising or otherwise to promote the sale, use or other dealings 00033 in this Software without prior written authorization from the X Consortium. 00034 00035 00036 Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. 00037 00038 All Rights Reserved 00039 00040 Permission to use, copy, modify, and distribute this software and its 00041 documentation for any purpose and without fee is hereby granted, 00042 provided that the above copyright notice appear in all copies and that 00043 both that copyright notice and this permission notice appear in 00044 supporting documentation, and that the name of Digital not be 00045 used in advertising or publicity pertaining to distribution of the 00046 software without specific, written prior permission. 00047 00048 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 00049 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 00050 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 00051 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 00052 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 00053 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 00054 SOFTWARE. 00055 00056 ******************************************************************/ 00057 00058 #ifndef _ScrollbarP_h 00059 #define _ScrollbarP_h 00060 00061 #include <X11/Xaw3d/Scrollbar.h> 00062 #include <X11/Xaw3d/ThreeDP.h> 00063 00064 typedef struct { 00065 /* public */ 00066 Pixel foreground; /* thumb foreground color */ 00067 XtOrientation orientation; /* horizontal or vertical */ 00068 XtCallbackList scrollProc; /* proportional scroll */ 00069 XtCallbackList thumbProc; /* jump (to position) scroll */ 00070 XtCallbackList jumpProc; /* same as thumbProc but pass data by ref */ 00071 Pixmap thumb; /* thumb color */ 00072 #ifndef ARROW_SCROLLBAR 00073 Cursor upCursor; /* scroll up cursor */ 00074 Cursor downCursor; /* scroll down cursor */ 00075 Cursor leftCursor; /* scroll left cursor */ 00076 Cursor rightCursor; /* scroll right cursor */ 00077 Cursor verCursor; /* scroll vertical cursor */ 00078 Cursor horCursor; /* scroll horizontal cursor */ 00079 #endif 00080 float top; /* What percent is above the win's top */ 00081 float shown; /* What percent is shown in the win */ 00082 Dimension length; /* either height or width */ 00083 Dimension thickness; /* either width or height */ 00084 Dimension min_thumb; /* minium size for the thumb. */ 00085 float picked; /* How much of the thumb is picked * 00086 * when scrolling starts */ 00087 00088 /* private */ 00089 #ifdef ARROW_SCROLLBAR 00090 XtIntervalId timer_id; /* autorepeat timer; remove on destruction */ 00091 char scroll_mode; /* 0:none 1:up/back 2:track 3:down/forward */ 00092 #else 00093 Cursor inactiveCursor; /* the normal cursor for scrollbar */ 00094 char direction; /* a scroll has started; which direction */ 00095 #endif 00096 GC gc; /* a (shared) gc */ 00097 Position topLoc; /* Pixel that corresponds to top */ 00098 Dimension shownLength; /* Num pixels corresponding to shown */ 00099 Boolean pick_top; /* pick thumb at top or anywhere*/ 00100 00101 } ScrollbarPart; 00102 00103 typedef struct _ScrollbarRec { 00104 CorePart core; 00105 SimplePart simple; 00106 ThreeDPart threeD; 00107 ScrollbarPart scrollbar; 00108 } ScrollbarRec; 00109 00110 typedef struct {int empty;} ScrollbarClassPart; 00111 00112 typedef struct _ScrollbarClassRec { 00113 CoreClassPart core_class; 00114 SimpleClassPart simple_class; 00115 ThreeDClassPart threeD_class; 00116 ScrollbarClassPart scrollbar_class; 00117 } ScrollbarClassRec; 00118 00119 extern ScrollbarClassRec scrollbarClassRec; 00120 00121 #endif /* _ScrollbarP_h */
1.5.1