1 
2 /*
3  *  Ump - Unnamed Math Program
4  *  Copyright (c) 2004-2006 by Mattias Hultgren <mattias_hultgren@tele2.se>
5  *
6  *  See main.cpp
7  */
8 
9 #ifndef UMP_PICTUREWINDOW_H_
10 #define UMP_PICTUREWINDOW_H_
11 
12 #include "math2.h"
13 
14 extern bool picturewin_action_dont_show_dialog;
15 extern int32 SNAP_SIZE;
16 
17 struct graph_settings
18 {
19 	bool show_code, use_antialiasing;
20 
21 	int32 width, height;
22 	utf8_string xmin,xmax,ymin,ymax;
23 	picture_h::colorrgb bgcolor;
24 
25 	bool grid_on;
26 	picture_h::colorrgb grid_color;
27 	utf8_string grid_scale1,grid_scale2,grid_type;
28 
29 	bool axes_on;
30 	picture_h::colorrgb axes_color;
31 	utf8_string scalex,scaley;
32 	int32 scale_length;
33 
34 	utf8_string plot_mode;
35 	bool show_active_page_only;
36 
37 	int active_page; // 0=func 1=polar 2=par
38 
39 
40 	utf8_string polar_start, polar_stop, polar_steps, par_start, par_stop, par_steps;
41 	struct
42 	{
43 		picture_h::colorrgb color;
44 		bool show_this;
45 		utf8_string entry, entry2;
46 	}func[10], polar[10], par[5];
47 
48 // the constructor sets all the default values
49 	graph_settings() throw(error_obj);
50 };
51 
52 
53 
54 // this will create and present the picturewin
55 void picturewin_show( const char *title, const math::Picture &src );
56 
57 void picturewin_show( const graph_settings *settings);
58 
59 
60 // this will apply the present translation to the picturewin
61 void picturewin_translate(void);
62 
63 // this closes the picturewin (if the picturewin isn't open nothing happens)
64 void picturewin_close(void);
65 
66 
67 
68 #endif
69