1 // $Id: draw_ext.h 1107 2011-01-19 23:53:52Z martin $
2 //
3 /* draw_ext.h - external data definitions for DRAWxtl */
4 
5 #include "DRAWxtlViewUI.h"
6 #include "EditView.h"
7 #include "Ellipsoids.h"
8 
9 extern DRAWxtlViewUI *drvui;
10 
11 extern int cur_show;
12 
13 extern CrystalView *crystal;
14 
15 extern ArrowParam *arrows;
16 
17 extern SlabParam *Slabs;
18 
19 extern Fl_Window *textwindow;
20 
21 extern Fl_Window *listwindow1;
22 
23 extern Fl_Window *listwindow2;
24 
25 extern Fl_Window *listwindow3;
26 
27 extern Fl_Window *listwindow4;
28 
29 extern Fl_Window *listwindow5;
30 
31 extern Fl_Window *helpwindow;
32 
33 extern Fl_Window *helpwindow1;
34 
35 extern Fl_Window *helpwindow2;
36 
37 extern Fl_Window *helpwindow3;
38 
39 extern Fl_Window *helpwindow4;
40 
41 extern Fl_Window *helpwindow5;
42 
43 extern Fl_Window *helpwindow6;
44 
45 extern Fl_Text_Buffer *helpbuf;
46 
47 extern Fl_Text_Buffer *helpbuf1;
48 
49 extern AutomationParam *Automate;
50 
51 extern BondParam *Bonds;
52 
53 extern PolyParam *Polyhedra;
54 
55 extern SphereParam *Spheres;
56 
57 extern ConfigParm *Configure;
58 
59 extern ConfigMiscParm *MiscConfigure;
60 
61 extern ConfigMSMSParm *MSMSConfigure;
62 
63 extern OmitParam *Omit;
64 
65 extern EditScreen *edtprm;
66 
67 extern Ellipsoids *ellipsoids;
68 
69 extern LonePairParam *LonePairs;
70 
71 extern MapsParam *Maps;
72 
73 extern SliceParam *Slice;
74 
75 extern SurfParam *Surf;
76 
77 extern ModParam *Modparms;
78 
79 extern GLuint selectBuf[BUFSIZE];
80 
81 extern void *Edit_Str_Type;
82 
83 extern char Edit_title[128];
84 
85 extern int Edit_changed;
86 
87 extern int Edit_loading;
88 
89 extern Fl_Text_Buffer *textbuf;
90 
91 extern Fl_Text_Buffer *textbuf1;
92 
93 extern Fl_Text_Buffer *textbuf2;
94 
95 extern Fl_Text_Buffer *textbuf3;
96 
97 extern Fl_Text_Buffer *textbuf4;
98 
99 //extern float gl_pos_x;
100 //extern float gl_pos_y;
101 //extern float gl_pos_z;
102 extern float gl_size;
103 
104 extern void *Edit_Str_Type;
105 
106 extern QUAT Rotq;
107 
108 extern double Xrot, Yrot, Zrot;	// Rotation angles
109 
110 extern double xmin, ymin, zmin;	// Minimums
111 
112 extern double xmax, ymax, zmax;	// Maximums
113 
114 extern Fl_Window *errorbox;
115 
116 extern int Edit_changed;
117 
118 extern int Edit_loading;
119 
120 /* global variables for atom lists */
121 
122 extern int natom;		/* number of different types of atoms */
123 
124 extern int ncell;		/* number of atoms in asymmetric unit */
125 
126 extern float *xypos;		/* master list fractional coordinates (modulated) */
127 
128 extern float *xypos_nm;		/* master list fractional coordinates (not modulated) */
129 
130 extern float *o_vert;		/* crystal coordinates of saved vertices (modulated) */
131 
132 extern float *o_vert_nm;	/* crystal coordinates of saved vertices (not modulated) */
133 
134 extern float *s_vert;		/* saved coordinates of vertices (modulated) */
135 
136 extern int *vert_sym_no;	/* saved symmetry operator number */
137 
138 extern int *vert_sym_nos;	/* saved symmetry operator number including sign */
139 
140 extern int *poly_list;		/* storage for polygon corner pointers */
141 
142 extern int nvert;		/* number of vertices in list */
143 
144 extern int NvertM;		/* number of vertices in master atom list */
145 
146 /* global variables for polyhedra, planes and bonds */
147 
148 extern int draw_list;		/* number of items in polygon draw list */
149 
150 extern int *vertex_list;	/* storage for vertices about a cation */
151 
152 extern int numb_list;		/* number in polygon list */
153 
154 extern int domolcomp;		/* non-zero if molecule completion requested */
155 
156 /* global variables that control size and orientation of output object */
157 
158 extern GLdouble modelMatrix[16];
159 
160 extern GLdouble projMatrix[16];
161 
162 extern GLint viewport[4];
163 
164 extern float DepthCue;		/* scale for Z-dependent thickness of edges */
165 
166 extern float boxlim[3];		/* half limits of plotting box */
167 
168 extern float origin[3];		/* position of plotting origin */
169 
170 extern double G_Rot[3][3];	/* Grand rotation matrix - transforms from Cartesian to picture */
171 
172 extern float POV_Max[3];	/* Maximum limits of POV after rotation */
173 
174 extern float POV_Min[3];	/* Minimum limits of POV after rotation */
175 
176 extern int boxflag;		/* Non-zero if 'bounds' command given */
177 
178 extern int packflag;		/* Non-zero if 'pack' command given */
179 
180 extern int clipflag;		/* Non-zero if 'clip' command given */
181 
182 extern int docell;		/* non-zero if unit-cell edges to be drawn */
183 
184 extern int Display_axes;	/* non-zero if axial triple to be drawn */
185 
186 extern int Color_Warning;	/* Warning flag for non-standard color */
187 
188 extern float Magnification;	/* Magnification factor for image */
189 
190 extern float Scale;		/* Scale of diagram */
191 
192 extern float offset[3];		/* offset for vector triple */
193 
194 extern float Text_Size;		/* Size to make axis label text */
195 
196 extern int Options;		/* Place to save command-line options flags */
197 
198 extern float rad_cell;		/* radius of unit cell framebars */
199 
200 extern int edges;		/* draw thin black lines around the edges of polyhedra */
201 
202 extern float xrot, yrot, zrot;	/* view rotation angles */
203 
204 extern int Unit_Cell;		/* non-zero if unit cell to be drawn */
205 
206 extern int no_comment;		/* non-zero to inhibit comment lines in VRML */
207 
208 extern int M_cameras;		/* non-zero to inhibit multiple cameras */
209 
210 extern int Vrml2;		/* non-zero to generate VRML97 (VRML2) output */
211 
212 extern int X3D;			/* non-zero to write VRML2 in X3D-compatible syntax*/
213 
214 extern int doVrml;		/* non-zero to allow VRML output */
215 
216 extern int doPOV;		/* non-zero to allow povray output */
217 
218 extern int doAsy;		/* non-zero to allow asymptote output */
219 
220 extern int clipflag;
221 
222 extern float printdist;		/* Distance limit for tabulated output */
223 
224 extern int Labels;		/* True if labels should be output */
225 
226 extern int slabmode;		/* cutout: slab vertices */
227 
228 extern float slabx1, slaby1, slabz1, slabx2, slaby2, slabz2;
229 
230 extern float slabx3, slaby3, slabz3, slabx4, slaby4, slabz4;
231 
232 extern float slabv[24];
233 
234 /* openGL cursor stuff */
235 
236 extern float cur_cen[3];	/* location of cursor (fractional coordinates) */
237 
238 extern int cur_atom[4];
239 
240 extern char cur_name[4][10];
241 
242 extern float dist12;
243 
244 extern float dist23;
245 
246 extern float dist34;
247 
248 extern float ang123;
249 
250 extern float ang234;
251 
252 extern float torsion_ang;
253 
254 /* Fourier map stuff */
255 
256 #include "drawmap.h"
257 extern int ReadFourMap;		/* true if a Fourier map has been read */
258 
259 extern float *FourierPt;	/* pointer to Fourier map contents */
260 
261 extern float map_a, map_b, map_c, map_alpha, map_beta, map_gamma;	/* cell dimensions for map */
262 
263 extern int mapstep_a, mapstep_b, mapstep_c;	/* map steps across unit cell */
264 
265 extern float xMin, xMax, yMin, yMax, zMin, zMax;	/* bounding box for map */
266 
267 extern float x4Val, x5Val, x6Val;	/* coordinates of map intersections with superspace */
268 
269 extern float x4step, x5step, x6step;
270 
271 extern char FourierFileName[256];
272 
273 extern int FourierMapType;
274 
275 extern int ShowMapLegend;
276 
277 extern struct MAP_INFO Map_Info;
278 
279