Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

610987 views
1
/****************************************************************************
2
**
3
*W gaptext.h XGAP source Frank Celler
4
**
5
**
6
*Y Copyright 1995-1997, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany
7
*Y Copyright 1997, Frank Celler, Huerth, Germany
8
**
9
** The GapTextWidget is intended to be used as a simple front end to the
10
** text widget with a gap text source and an ascii sink attached to it. It
11
** is a subclass of the standard text widget supplied with X11R4 and should
12
** work with X11R5 and X11R6.
13
*/
14
#ifndef _gaptext_h
15
#define _gaptext_h
16
17
18
/*****************************************************************************
19
**
20
21
*D XtNinputCallback . . . . . . . function to call in case of keyboard input
22
*D XtNcheckCaretPos . . . . . . . . function to validate new caret position
23
*D XtNtinyFont . . . . . . . . . . . . . . tiny font for all graphic windows
24
*D XtNsmallFont . . . . . . . . . . . . . small font for all graphic windows
25
*D XtNnormalFont . . . . . . . . . . . . normal font for all graphic windows
26
*D XtNlargeFont . . . . . . . . . . . . . large font for all graphic windows
27
*D XtNhugeFont . . . . . . . . . . . . . . huge font for all graphic windows
28
*D XtNtitlePosition . . . . . . . . position of title in all graphic windows
29
*D XtNquitGapCtrD . . . . . . . . . . . . . . . . . . . . quit gap on ctr-D
30
*D XtNpasteGapPrompt . . . . . . . . paste 'gap>' prompt into gap talk window
31
*D XtNcolorModel . . . . . . . . color model to use in a gap graphics window
32
*D XtNcolors . . . . . . . . . . . . . colors to use in a gap graphic window
33
**
34
** All other resources are defined in <X11/Xaw/Text.h>
35
*/
36
#define XtNinputCallback "inputCallback"
37
#define XtCInputCallback "InputCallback"
38
39
#define XtNcheckCaretPos "checkCaretPos"
40
#define XtCCheckCaretPos "CheckCaretPos"
41
42
#define XtNtinyFont "tinyFont"
43
#define XtCTinyFont "TinyFont"
44
45
#define XtNsmallFont "smallFont"
46
#define XtCSmallFont "SmallFont"
47
48
#define XtNnormalFont "normalFont"
49
#define XtCNormalFont "NormalFont"
50
51
#define XtNlargeFont "largeFont"
52
#define XtCLargeFont "LargeFont"
53
54
#define XtNhugeFont "hugeFont"
55
#define XtCHugeFont "HugeFont"
56
57
#define XtNtitlePosition "titlePosition"
58
#define XtCTitlePosition "TitlePosition"
59
60
#define XtNquitGapCtrD "quitGapCtrD"
61
#define XtCQuitGapCtrD "QuitGapCtrD"
62
63
#define XtNpasteGapPrompt "pasteGapPrompt"
64
#define XtCPasteGapPrompt "PasteGapPrompt"
65
66
#define XtNcolorModel "colorModel"
67
#define XtCColorModel "ColorModel"
68
69
#define XtNcolors "colors"
70
#define XtCColors "Colors"
71
72
73
/****************************************************************************
74
**
75
76
*T GapTextClassRec . . . . . . . . . . . . . . . . . . gap text class record
77
*/
78
typedef struct {int empty;} GapClassPart;
79
80
typedef struct _GapTextClassRec
81
{
82
CoreClassPart core_class;
83
SimpleClassPart simple_class;
84
TextClassPart text_class;
85
GapClassPart gap_class;
86
}
87
GapTextClassRec;
88
89
extern GapTextClassRec gapTextClassRec;
90
91
92
/****************************************************************************
93
**
94
*T GapRec . . . . . . . . . . . . . . . . . . . . . . . . gap widget record
95
*/
96
typedef struct
97
{
98
/* function to call when receiving input */
99
void (*input_callback)();
100
101
/* function to position caret */
102
Int (*check_caret_pos)();
103
104
/* input buffer for unprocessed input */
105
String buffer;
106
UInt size;
107
UInt length;
108
109
/* flags for paste options */
110
Boolean drop_gap_prompt; /* current state */
111
Boolean paste_gap_prompt; /* user setting */
112
113
/* fonts */
114
XFontStruct * tiny_font;
115
XFontStruct * small_font;
116
XFontStruct * normal_font;
117
XFontStruct * large_font;
118
XFontStruct * huge_font;
119
120
/* other resources */
121
String title_position;
122
Boolean quit_gap_ctrd;
123
String color_model;
124
String colors;
125
}
126
GapPart;
127
128
typedef struct _GapRec
129
{
130
CorePart core;
131
SimplePart simple;
132
TextPart text;
133
GapPart gap;
134
}
135
GapRec;
136
137
138
/****************************************************************************
139
**
140
*T GapTextWidgetClass . . . . . . . . . . . . . . . . . . . class datatype
141
*/
142
typedef struct _GapTextClassRec *GapTextWidgetClass;
143
144
145
/****************************************************************************
146
**
147
*T GapTextWidget . . . . . . . . . . . . . . . . . . . . . instance datatype
148
*/
149
typedef struct _GapRec *GapTextWidget;
150
151
152
/****************************************************************************
153
**
154
*V gapTextWidgetClass . . . . . . . . . . . . . . . . . . class definition
155
*/
156
extern WidgetClass gapTextWidgetClass;
157
158
159
/****************************************************************************
160
**
161
162
*T GapSrcClassRec . . . . . . . . . . . . . . . . . gap source class record
163
*/
164
165
typedef struct _GapSrcClassPart {char * empty;} GapSrcClassPart;
166
167
typedef struct _GapSrcClassRec
168
{
169
ObjectClassPart object_class;
170
TextSrcClassPart text_src_class;
171
GapSrcClassPart gap_src_class;
172
}
173
GapSrcClassRec;
174
175
extern GapSrcClassRec gapSrcClassRec;
176
177
178
/****************************************************************************
179
**
180
*T GapSrcRec . . . . . . . . . . . . . . . . . . . gap source object record
181
*/
182
typedef struct _GapSrcPart
183
{
184
String buffer; /* buffer holding the text */
185
UInt size; /* size of buffer */
186
UInt * lines; /* start of lines in <buffer> */
187
UInt length; /* size of text in <buffer> */
188
}
189
GapSrcPart;
190
191
typedef struct _GapSrcRec
192
{
193
ObjectPart object;
194
TextSrcPart text_src;
195
GapSrcPart gap_src;
196
}
197
GapSrcRec;
198
199
200
/****************************************************************************
201
**
202
*T GapSrcObjectClass . . . . . . . . . . . . . . . . . . . . class datatype
203
*/
204
typedef struct _GapSrcClassRec *GapSrcObjectClass;
205
206
207
/****************************************************************************
208
**
209
*T GapSrcObject . . . . . . . . . . . . . . . . . . . . . instance datatype
210
*/
211
typedef struct _GapSrcRec *GapSrcObject;
212
213
214
/****************************************************************************
215
**
216
*V gapSrcObjectClass . . . . . . . . . . . . . . . . . . . class definition
217
*/
218
extern WidgetClass gapSrcObjectClass;
219
220
221
/****************************************************************************
222
**
223
224
*P Prototypes . . . . . . . . . . . prototypes of public gap text functions
225
*/
226
extern void GTBell( Widget );
227
extern void GTDeleteLeft( Widget );
228
extern void GTDeleteRight( Widget );
229
extern void GTInsertText( Widget, String, Int );
230
extern void GTMoveCaret( Widget, Int );
231
extern Int GTPosition( Widget );
232
extern void GTReplaceText( Widget, String, Int );
233
extern void GTSetPosition( Widget, Int );
234
extern void GTDropGapPrompt( Widget, Boolean );
235
236
#endif
237
238
239
/****************************************************************************
240
**
241
242
*E gaptext.h . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here
243
*/
244
245