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: LiteClueP.h,v $
29 Revision 1.3  1998/07/30 16:06:01  gary
30 NO_FONT_SET
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 NO_FONT_SET
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 || defined(NO_FONT_SET)
85 	XFontStruct *fontset;	/* 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  waitPeriod2;	/* the delay resource for popping down
94 				   - in millisecs
95 				*/
96         int  cancelWaitPeriod;	/* after help is popped-down - normal
97 				   wait period is cancelled for this
98 				   period - in millisecs
99 				*/
100 
101 	/* -------- private state --------- */
102 	ListThread widget_list; 	/* list of widgets we are liteClue-ing */
103 	Dimension font_width;	/* width of '1' character */
104 	Dimension font_height;	/* height of font, rows are spaced using this */
105 	Dimension font_baseline;	/* relative displacement to baseline from top */
106 	GC text_GC;		/* for drawing text */
107 	XtIntervalId interval_id;	/* New field, holds timer id */
108 	XtIntervalId interval_id2;	/* New field, holds timer id */
109 	Boolean	HelpIsUp;	/* the help is popup is up */
110 	Time	HelpPopDownTime;	/* the time at which help popup was popped down */
111 } LiteCluePart;
112 
113 
114 /*
115  * Full instance record declaration
116  */
117 typedef struct _LiteClueRec {
118 	CorePart		core;
119 	CompositePart  composite;
120 	ShellPart 	shell;
121 	OverrideShellPart override;
122 	LiteCluePart	liteClue;
123 } LiteClueRec;
124 
125 
126 #endif /* _DEF_LiteClueP_h */
127 
128