1 /*
2 LiteClueP.h - Private definitions for LiteClue widget
3 	See LiteClue documentation
4 
5 Copyright 1996 COMPUTER GENERATION, INC.,
6 
7 The software is provided "as is", without warranty of any kind, express
8 or implied, including but not limited to the warranties of
9 merchantability, fitness for a particular purpose and noninfringement.
10 In no event shall Computer Generation, inc. nor the author be liable for
11 any claim, damages or other liability, whether in an action of contract,
12 tort or otherwise, arising from, out of or in connection with the
13 software or the use or other dealings in the software.
14 
15 Permission to use, copy, modify, and distribute this software and its
16 documentation for any purpose and without fee is hereby granted,
17 provided that the above copyright notice appear in all copies and that
18 both that copyright notice and this permission notice appear in
19 supporting documentation.
20 
21 Author:
22 Gary Aviv
23 Computer Generation, Inc.,
24 gary@compgen.com
25 
26 */
27 /* Revision History:
28 $Log$
29 Revision 1.1  1997/11/05 01:14:31  cox
30 Initial revision
31 
32 Revision 1.2  1997/06/15 14:08:14  gary
33 Support for cancel wait period
34 
35 Revision 1.1  1996/10/19 16:08:51  gary
36 Initial
37 
38 
39 $log
40 Support for cancel wait period
41 $log
42 */
43 
44 #ifndef _DEF_LiteClueP_h
45 #define _DEF_LiteClueP_h
46 
47 #include <X11/ShellP.h>
48 /* Include public header file for this widget. */
49 #ifndef __VMS
50 # include <LiteClue.h>
51 #else
52 # include "LiteClue.h"
53 #endif
54 
55 /* Doubly Linked List Processing */
56 struct list_thread_str
57 {
58 	struct list_thread_str * forw;	/* next pointer */
59 	struct list_thread_str * back;	/* prev pointer */
60 };
61 typedef struct list_thread_str  ListThread;
62 
63 
64 typedef struct {
65 	int	nothing;	/* place holder */
66 } LiteClueClassPart;
67 
68 /* Full class record declaration */
69 typedef struct _LiteClueClassRec {
70 	CoreClassPart	core_class;
71 	CompositeClassPart  composite_class;
72 	ShellClassPart  shell_class;
73 	OverrideShellClassPart  override_shell_class;
74 	LiteClueClassPart	LiteClue_class;
75 } LiteClueClassRec;
76 
77 extern LiteClueClassRec xcgLiteClueClassRec;
78 
79 /* New fields for the LiteClue widget record */
80 typedef struct {
81 	/* resources */
82 	Pixel foreground;
83 
84 #if XtSpecificationRelease < 5
85 	XFontStruct *font;	/* the font for text in box */
86 #else
87 	XFontSet fontset;	/* the font for text in box */
88 #endif
89         int  waitPeriod;	/* the delay resource - pointer must be
90 				   in watched widget this long before
91 				   help is poped - in millisecs
92 				*/
93         int  cancelWaitPeriod;	/* after help is popped-down - normal
94 				   wait period is cancelled for this
95 				   period - in millisecs
96 				*/
97 
98 	/* -------- private state --------- */
99 	ListThread widget_list; 	/* list of widgets we are liteClue-ing */
100 	Dimension font_width;	/* width of '1' character */
101 	Dimension font_height;	/* height of font, rows are spaced using this */
102 	Dimension font_baseline;	/* relative displacement to baseline from top */
103 	GC text_GC;		/* for drawing text */
104 	XtIntervalId interval_id;	/* New field, holds timer id */
105 	Boolean	HelpIsUp;	/* the help is popup is up */
106 	Time	HelpPopDownTime;	/* the time at which help popup was popped down */
107 } LiteCluePart;
108 
109 
110 /*
111  * Full instance record declaration
112  */
113 typedef struct _LiteClueRec {
114 	CorePart		core;
115 	CompositePart  composite;
116 	ShellPart 	shell;
117 	OverrideShellPart override;
118 	LiteCluePart	liteClue;
119 } LiteClueRec;
120 
121 
122 #endif /* _DEF_LiteClueP_h */
123 
124