2 * Grace - GRaphing, Advanced Computation and Exploration of data
4 * Home page: http://plasma-gate.weizmann.ac.il/Grace/
6 * Copyright (c) 2001-2003 Grace Development Team
8 * Maintained by Evgeny Stambulchik
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
36 #include "grace/baseP.h"
37 #include "grace/canvas.h"
38 #include "grace/core.h"
41 typedef struct _Grace Grace
;
43 typedef struct _X11Stuff X11Stuff
;
44 typedef struct _ExplorerUI ExplorerUI
;
50 /* true if running X */
53 /* true if running in the free page mode */
59 /* use GXxor or GXinvert for xor'ing */
61 /* if true, redraw graph each time action is performed */
65 /* if TRUE, assume yes for everything */
67 /* instant update enabled for controls on appearance dialogs */
69 /* toolbars visible on/off */
74 /* if TRUE, color selectors need update */
75 int need_colorsel_update
;
77 /* if TRUE, font selectors need update */
78 int need_fontsel_update
;
89 typedef struct _RunTime
{
93 QuarkFactory
*qfactory
;
100 /* hardcopy device */
109 /* real-time input delay (prevents getting stuck reading) */
111 /* autoscale after reading in data sets */
112 int autoscale_onread
;
113 /* used in the parser */
116 /* file for results */
119 /* scroll fraction */
121 /* expand/shrink fraction */
124 /* flag raised on emergency save */
126 /* number of interrupts received during the emergency save */
129 /* location of the Grace home directory */
141 /* working directory */
151 char print_file
[GR_MAXPATHLEN
];
155 /* Misc dictionaries */
156 Dictionary
*graph_type_dict
;
157 Dictionary
*set_type_dict
;
158 Dictionary
*inout_placement_dict
;
159 Dictionary
*side_placement_dict
;
160 Dictionary
*spec_ticks_dict
;
161 Dictionary
*region_type_dict
;
163 /* color index for autocolorization of new sets */
164 unsigned int setcolor
;
181 Quark
*project_new(QuarkFactory
*qfactory
);
183 GUI
*gui_new(Grace
*grace
);
184 void gui_free(GUI
*gui
);
186 RunTime
*runtime_new(Grace
*grace
);
187 void runtime_free(RunTime
*rt
);
189 Grace
*grace_new(void);
190 void grace_free(Grace
*grace
);
192 Grace
*grace_from_quark(const Quark
*q
);
193 RunTime
*rt_from_quark(const Quark
*q
);
194 GUI
*gui_from_quark(const Quark
*q
);
196 int gui_is_page_free(const GUI
*gui
);
197 void gui_set_page_free(GUI
*gui
, int onoff
);
198 void gui_set_barebones(GUI
*gui
);
200 int grace_set_project(Grace
*grace
, Quark
*project
);
202 int set_page_dimensions(Grace
*grace
, int wpp
, int hpp
, int rescale
);
203 int set_printer(Grace
*grace
, int device
);
204 int set_printer_by_name(Grace
*grace
, const char *dname
);
205 void set_ptofile(Grace
*grace
, int flag
);
206 int get_ptofile(const Grace
*grace
);
208 void project_reset_version(Quark
*q
);
210 int project_get_graphs(Quark
*q
, Quark
***graphs
);
212 void project_set_wrap_year(Quark
*q
, int wrap_year
);
215 char *grace_path(Grace
*grace
, char *fn
);
216 char *grace_path2(Grace
*grace
, const char *prefix
, char *fn
);
217 char *grace_exe_path(Grace
*grace
, char *fn
);
219 FILE *grace_openw(Grace
*grace
, char *fn
);
220 FILE *grace_openr(Grace
*grace
, char *fn
, int src
);
221 void grace_close(FILE *fp
);
224 #endif /* __GRACE_H_ */