1 /*
2 **
3 ** ScrollbarP.h
4 **
5 ** Copyright (C) 1994, 1995, 1996, 1997 Johannes Plass
6 ** Copyright (C) 2004 Jose E. Marchesi
7 **
8 ** This program is free software; you can redistribute it and/or modify
9 ** it under the terms of the GNU General Public License as published by
10 ** the Free Software Foundation; either version 3 of the License, or
11 ** (at your option) any later version.
12 **
13 ** This program is distributed in the hope that it will be useful,
14 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 ** GNU General Public License for more details.
17 **
18 ** You should have received a copy of the GNU General Public License
19 ** along with GNU gv; see the file COPYING.  If not, write to
20 ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 ** Boston, MA 02111-1307, USA.
22 **
23 ** Author:   Johannes Plass (plass@thep.physik.uni-mainz.de)
24 **           Department of Physics
25 **           Johannes Gutenberg-University
26 **           Mainz, Germany
27 **
28 **           Jose E. Marchesi (jemarch@gnu.org)
29 **           GNU Project
30 **
31 */
32 
33 #ifndef _ScrollbarP_h
34 #define _ScrollbarP_h
35 
36 #include "paths.h"
37 #include INC_XAW(ThreeDP.h)
38 #include "Scrollbar.h"
39 
40 typedef struct {
41      /* public */
42     Pixel		foreground;		/* thumb foreground color */
43     XtOrientation	orientation;		/* horizontal or vertical */
44     XtCallbackList	scrollProc;		/* proportional scroll */
45     XtCallbackList	thumbProc;		/* jump (to position) scroll */
46     XtCallbackList	jumpProc;		/* same as thumbProc but pass data by ref */
47     Pixmap		thumb;			/* thumb color */
48     float		top;			/* relative position of top of thumb  */
49     float		shown;			/* What percent is shown in the win */
50     Dimension		length;			/* either height or width */
51     Dimension		thickness;		/* either width or height */
52     Dimension		min_thumb;		/* minium size for the thumb. */
53     Dimension		thumb_top_indent;
54     Dimension		thumb_side_indent;
55     Boolean		show_arrows;		/* if the arrows are shown */
56     Dimension		arrow_top_indent; 	/* arrow indentation top <-> border */
57     Dimension		arrow_side_indent;    	/* arrow indentation side <-> border */
58     int			interval;		/* time base for autoscroll (milliseconds) */
59     int			delay;			/* time base for autoscroll (milliseconds) */
60     Boolean		use_dynamic;		/* if the dynamic arrow scrolling is used */
61     /* private */
62     Dimension		dynamic;		/* dynamic autoscroll time interval */
63     XtIntervalId	timer_id;		/* autorepeat timer; remove on destruction */
64     char		scroll_mode;		/* 0:none 1:up/back 2:track 3:down/forward */
65     GC			gc;			/* a (shared) gc */
66     Dimension		topLoc;			/* position of top of thumb */
67     Dimension		shownLength;		/* shown length of thumb    */
68     Dimension		shadow_base;            /* the shadow width used to derive arrow_shadow, etc.    */
69     int			arrow_width;
70     int			arrow_height;
71     int			arrow_top_to_border;
72     int			arrow_to_border;
73     int			arrow_shadow;
74     int			thumb_shadow;
75     int			thumb_to_arrow;
76     int			thumb_to_border;
77 } ScrollbarPart;
78 
79 typedef struct _ScrollbarRec {
80     CorePart		core;
81     SimplePart		simple;
82     ThreeDPart		threeD;
83     ScrollbarPart	scrollbar;
84 } ScrollbarRec;
85 
86 typedef struct {int empty;} ScrollbarClassPart;
87 
88 typedef struct _ScrollbarClassRec {
89     CoreClassPart	core_class;
90     SimpleClassPart	simple_class;
91     ThreeDClassPart	threeD_class;
92     ScrollbarClassPart	scrollbar_class;
93 } ScrollbarClassRec;
94 
95 
96 #define _EXTERN_ extern
97 
98 _EXTERN_ ScrollbarClassRec scrollbarClassRec;
99 
100 #undef _EXTERN_
101 
102 #endif /* _ScrollbarP_h */
103