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

611070 views
1
/****************************************************************************
2
**
3
*W gapgraph.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
#ifndef _gapgraph_h
10
#define _gapgraph_h
11
12
13
/****************************************************************************
14
**
15
16
*D T_XXX . . . . . . . . . . . . . . . . . . . . . . . . the graphic object
17
*/
18
#define T_LINE 1
19
#define T_CIRCLE 2
20
#define T_DISC 3
21
#define T_TEXT 4
22
#define T_RECT 5
23
#define T_BOX 6
24
25
26
/****************************************************************************
27
**
28
*D C_XXX . . . . . . . . . . . . . . . . . . . . . . . . . . the color XXXX
29
*/
30
#define C_BLACK 0
31
#define C_WHITE 1
32
#define C_LIGHT_GRAY 2
33
#define C_DARK_GRAY 3
34
#define C_LAST_GRAY 3
35
#define C_RED 4
36
#define C_BLUE 5
37
#define C_GREEN 6
38
#define C_LAST 6
39
40
41
/****************************************************************************
42
**
43
*D CM_BW . . . . . . . . . . . . . . . . . . . . . color model: black/white
44
*D CM_GRAY . . . . . . . . . . . . . . . . . . . . . . color model: 2 grays
45
*D CM_COLOR3 . . . . . . . . . . . . . . . . . . . . . color model: 3 colors
46
*D CM_COLOR5 . . . . . . . . . . . . . . . . color model: 3 colors, 2 grays
47
*/
48
#define CM_BW 1
49
#define CM_GRAY 2
50
#define CM_COLOR3 3
51
#define CM_COLOR5 4
52
53
54
/****************************************************************************
55
**
56
57
*T TypeGapGraphicObject . . . . . . . . . . . . . graphic object of widget
58
*/
59
typedef struct _gap_graphic_obj
60
{
61
Short type;
62
Short color;
63
Int x, y, w, h;
64
union
65
{
66
struct { Int x1, x2, y1, y2, w; } line;
67
struct { Int x, y, r, w; } circle;
68
struct { Int x, y, r; } disc;
69
struct { Int x, y, len; String str; Font font; } text;
70
struct { Int x1, x2, y1, y2, w; } rect;
71
struct { Int x1, x2, y1, y2; } box;
72
} desc;
73
}
74
TypeGapGraphicObject;
75
76
77
/****************************************************************************
78
**
79
*T GapGrahpicClassRec . . . . . . . . . . . . . . gap graphic class record
80
*/
81
typedef struct {
82
int empty;
83
}
84
GapGraphicClassPart;
85
86
typedef struct _GapGraphicClassRec
87
{
88
CoreClassPart core_class;
89
GapGraphicClassPart gap_graphic_class;
90
}
91
GapGraphicClassRec;
92
93
extern GapGraphicClassRec gapGraphicClassRec;
94
95
96
/****************************************************************************
97
**
98
*T GapGarphicRec . . . . . . . . . . . . . . . . . gap graphic widget record
99
*/
100
typedef struct {
101
102
/* dimension of window */
103
UInt width;
104
UInt height;
105
106
/* reference number */
107
Int number;
108
109
/* list of graphic objects */
110
TypeList objs;
111
112
/* display information */
113
Display * display;
114
Pixel black;
115
Pixel white;
116
GC gc;
117
118
/* bounding box to update */
119
Boolean update;
120
Boolean fast_update;
121
Int lx, hx;
122
Int ly, hy;
123
}
124
GapGraphicPart;
125
126
typedef struct _GapGraphicRec
127
{
128
CorePart core;
129
GapGraphicPart gap_graphic;
130
}
131
GapGraphicRec;
132
133
134
/****************************************************************************
135
**
136
*T GapGraphicWidgetClass . . . . . . . . . . . . . . . . . . class datatype
137
*/
138
typedef struct _GapGraphicClassRec * GapGraphicWidgetClass;
139
140
141
/****************************************************************************
142
**
143
*T GapGraphicWidget . . . . . . . . . . . . . . . . . . . instance datatype
144
*/
145
typedef struct _GapGraphicRec * GapGraphicWidget;
146
147
148
/****************************************************************************
149
**
150
*V gapGraphicWidgetClass . . . . . . . . . . . . . . . . . class definition
151
*/
152
extern WidgetClass gapGraphicWidgetClass;
153
154
155
/****************************************************************************
156
**
157
158
*P Prototypes . . . . . . . . . . . prototypes of public gap text functions
159
*/
160
extern Int GCColorModel( Display* );
161
extern void GCSetColorModel( Display*, Int, String );
162
extern Int GGAddObject( Widget, TypeGapGraphicObject* );
163
extern void GGFreeAllObjects( Widget );
164
extern void GGFreeGapGraphicObjects( Widget );
165
extern void GGFreeObject( TypeGapGraphicObject* );
166
extern Boolean GGRemoveObject( Widget, Int );
167
extern void GGResize( Widget, Int, Int );
168
extern void GGStartRemove( Widget );
169
extern void GGStopRemove( Widget );
170
extern void GGDrawObject( Widget, TypeGapGraphicObject*, Boolean );
171
extern void GGFastUpdate( Widget, Boolean );
172
173
#endif
174
175
176
/****************************************************************************
177
**
178
179
*E gapgraph.h . . . . . . . . . . . . . . . . . . . . . . . . . . ends here
180
*/
181
182