1 /*****
2 * BalloonP.h : XmBalloon private header file
3 *
4 * This file Version	$Revision$
5 *
6 * Creation date:		Sun Nov  2 19:18:42 GMT+0100 1997
7 * Last modification: 	$Date$
8 * By:					$Author$
9 * Current State:		$State$
10 *
11 * Author:				newt
12 *
13 * Copyright (C) 1994-1997 by Ripley Software Development
14 * All Rights Reserved
15 *
16 * This file is part of the XmHTML Widget Library.
17 *
18 * This library is free software; you can redistribute it and/or
19 * modify it under the terms of the GNU Library General Public
20 * License as published by the Free Software Foundation; either
21 * version 2 of the License, or (at your option) any later version.
22 *
23 * This library is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
26 * Library General Public License for more details.
27 *
28 * You should have received a copy of the GNU Library General Public
29 * License along with this library; if not, write to the Free
30 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
31 *
32 *****/
33 /*****
34 * $Source$
35 *****/
36 /*****
37 * ChangeLog
38 * $Log$
39 * Revision 1.1  2011/06/30 16:08:40  rwcox
40 * Cadd
41 *
42 * Revision 1.1  1998/04/04 06:27:17  newt
43 * Initial Revision
44 *
45 *****/
46 
47 #ifndef _BalloonP_h_
48 #define _BalloonP_h_
49 
50 #include <X11/ShellP.h>		/* we're subclassing from overrideShell */
51 
52 /* Required includes */
53 #include <XmHTML/Balloon.h>
54 
55 _XFUNCPROTOBEGIN
56 
57 /*****
58 * Class Pointer
59 *****/
60 typedef struct
61 {
62 	XtPointer		extensions;		/* Pointer to extension record */
63 }XmBalloonClassPart;
64 
65 typedef struct _XmBalloonClassRec
66 {
67 	CoreClassPart			core_class;
68 	CompositeClassPart		composite_class;
69 	ShellClassPart			shell_class;
70 	OverrideShellClassPart	override_shell_class;
71 	XmBalloonClassPart		balloon_class;
72 }XmBalloonClassRec;
73 
74 /*****
75 * Supporting structures
76 *****/
77 typedef struct _transform
78 {
79 	double  mx, bx;
80 	double  my, by;
81 }Transform;
82 
83 typedef struct _TPoint
84 {
85 	double  x, y;
86 }TPoint;
87 
88 /*****
89 * XmBalloon instance definition
90 *****/
91 typedef struct _XmBalloonPart
92 {
93 	/* public widget data */
94 	String		label;				/* original label as set by user	*/
95 	String		source;				/* privatly owner copy				*/
96 	int			source_len;			/* size of label					*/
97 	int			popup_delay;		/* delay before popping up			*/
98 	int			popdown_delay;		/* delay before popping down		*/
99 	Dimension	margin_width;		/* horizontal margin spacing		*/
100 	Dimension	margin_height;		/* vertical margin spacing			*/
101 	int			left_offset;		/* left cursor offset				*/
102 	int			top_offset;			/* top cursor offset				*/
103 	float		border_size;		/* thickness of the border			*/
104 	Pixel		foreground;			/* foreground pixel to be used		*/
105 #if XtSpecificationRelease < 5
106 	XFontStruct *font;				/* X11R4 font to be used			*/
107 #else
108 	XFontSet fontset;				/* X11R5 or above uses fontSets		*/
109 #endif
110 	unsigned char corner_style;		/* how corners should be drawn		*/
111 	unsigned char balloon_style;	/* balloon style					*/
112 	Boolean		transparent;		/* make balloon fully transparent	*/
113 	int			backing_store;		/*
114 									 * select appropriate amount of
115 									 * backing store
116 									 */
117 
118 	/* private widget data */
119 	Position	pop_x;				/* relative x-popup position		*/
120 	Position	pop_y;				/* relative y-popup position		*/
121 	Dimension	font_width;			/* width of common (1 TeX em)		*/
122 	Dimension	font_height;		/* font height (row spacing)		*/
123 	Dimension	baseline;			/* baseline offset					*/
124 	GC			gc;					/* text rendering gc 				*/
125 	GC			top_gc;				/* top shadow gc					*/
126 	GC			bottom_gc;			/* bottom shadow gc					*/
127 	GC			shape_gc;			/* shaped window gc					*/
128 	XtIntervalId popup_id;			/* popup timeout id					*/
129 	XtIntervalId popdown_id;		/* popdown timout id				*/
130 	XtAppContext context;			/* application context for timeouts	*/
131 	Boolean	popped;					/* True when we are being displayed	*/
132 
133 	/* Shaped Window data */
134 	Boolean		shape_window;		/* use shaped window extension?		*/
135 	Pixmap		shape_mask;			/* window shape						*/
136 	int			shape_width;		/* last shaped window width 		*/
137 	int			shape_height;		/* last shaped window height 		*/
138 
139 	Transform	t;
140 	Transform	maskt;
141 }XmBalloonPart;
142 
143 typedef struct _XmBalloonRec
144 {
145 	CorePart			core;
146 	CompositePart 		composite;
147 	ShellPart			shell;
148 	OverrideShellPart	override;
149 	XmBalloonPart		balloon;
150 }XmBalloonRec;
151 
152 externalref XmBalloonClassRec xmBalloonClassRec;
153 
154 /* Never define _LIBRARY yourself */
155 #ifdef VERSION
156 # ifndef _LIBRARY
157 #  define _LIBRARY
158 # endif
159 #endif
160 
161 _XFUNCPROTOEND
162 
163 /* Don't add anything after this endif! */
164 #endif /* _BalloonP_h_ */
165