1 /*
2 **
3 ** Clip.h
4 **
5 ** Copyright (C) 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 ** Authors:   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 _XawClip_h
34 #define _XawClip_h
35 
36 #include INC_XAW(Reports.h)
37 
38 /*****************************************************************************
39  *
40  * Clip Widget (subclass of Composite)
41  *
42  * This widget is similar to a viewport without scrollbars.  Child movement
43  * is done by external panners or scrollbars.
44  *
45  * Parameters:
46  *
47  *  Name		Class		Type		Default
48  *  ----		-----		----		-------
49  *
50  *  background		Background	Pixel		XtDefaultBackground
51  *  border	        BorderColor	Pixel		XtDefaultForeground
52  *  borderWidth		BorderWidth	Dimension	1
53  *  height		Height		Dimension	0
54  *  reportCallback	ReportCallback	Pointer		NULL
55  *  width		Width		Dimension	0
56  *  x 			Position	Position	0
57  *  y			Position	Position	0
58  *
59  *****************************************************************************/
60 
61 #define XtNchildX "childX"
62 #define XtCChildX "ChildX"
63 #define XtNchildY "childY"
64 #define XtCChildY "ChildY"
65 
66 extern WidgetClass clipWidgetClass;
67 
68 typedef struct _ClipClassRec *ClipWidgetClass;
69 typedef struct _ClipRec      *ClipWidget;
70 
71 extern void ClipWidgetCheckCoordinates (
72     Widget	/* w */,
73     int		/* x */,
74     int		/* y */,
75     int*	/* xP */,
76     int*	/* yP */
77 );
78 
79 extern void ClipWidgetSetCoordinates (
80     Widget	/* w */,
81     int		/* x */,
82     int		/* y */
83 );
84 
85 #endif /* _XawClip_h */
86