1 /**********************************************************
2  * Version $Id: svg_interactive_map.h 1922 2014-01-09 10:28:46Z oconrad $
3  *********************************************************/
4 
5 ///////////////////////////////////////////////////////////
6 //                                                       //
7 //                         SAGA                          //
8 //                                                       //
9 //      System for Automated Geoscientific Analyses      //
10 //                                                       //
11 //                     Tool Library                      //
12 //                       docs_html                       //
13 //                                                       //
14 //-------------------------------------------------------//
15 //                                                       //
16 //              SVG_Interactive_map.cpp                  //
17 //                                                       //
18 //          Copyright (C) 2005 by Victor Olaya           //
19 //                                                       //
20 //-------------------------------------------------------//
21 //                                                       //
22 // This file is part of 'SAGA - System for Automated     //
23 // Geoscientific Analyses'. SAGA is free software; you   //
24 // can redistribute it and/or modify it under the terms  //
25 // of the GNU General Public License as published by the //
26 // Free Software Foundation, either version 2 of the     //
27 // License, or (at your option) any later version.       //
28 //                                                       //
29 // SAGA is distributed in the hope that it will be       //
30 // useful, but WITHOUT ANY WARRANTY; without even the    //
31 // implied warranty of MERCHANTABILITY or FITNESS FOR A  //
32 // PARTICULAR PURPOSE. See the GNU General Public        //
33 // License for more details.                             //
34 //                                                       //
35 // You should have received a copy of the GNU General    //
36 // Public License along with this program; if not, see   //
37 // <http://www.gnu.org/licenses/>.                       //
38 //                                                       //
39 //-------------------------------------------------------//
40 //                                                       //
41 //    contact:    Victor Olaya                           //
42 //                                                       //
43 //    e-mail:     volaya@saga-gis.org                    //
44 //                                                       //
45 ///////////////////////////////////////////////////////////
46 
47 //---------------------------------------------------------
48 
49 
50 ///////////////////////////////////////////////////////////
51 //														 //
52 //														 //
53 //														 //
54 ///////////////////////////////////////////////////////////
55 
56 //---------------------------------------------------------
57 #ifndef _HEADER_INCLUDED__SAGA_GUI__svg_interactive_map_H
58 #define _HEADER_INCLUDED__SAGA_GUI__svg_interactive_map_H
59 
60 
61 ///////////////////////////////////////////////////////////
62 //														 //
63 //														 //
64 //														 //
65 ///////////////////////////////////////////////////////////
66 
67 //---------------------------------------------------------
68 #include "doc_svg.h"
69 
70 
71 ///////////////////////////////////////////////////////////
72 //														 //
73 //														 //
74 //														 //
75 ///////////////////////////////////////////////////////////
76 
77 //---------------------------------------------------------
78 class CSVG_Interactive_Map : public CSG_Doc_SVG, public CSG_Tool
79 {
80 public:
81 	CSVG_Interactive_Map(void);
82 
83 
84 protected:
85 
86 	virtual bool		On_Execute(void);
87 
88 
89 private:
90 
91 	CSG_String			m_Directory;
92 
93 	double				m_dWidth;
94 
95 
96 	bool				Create_From_Map				(CSG_Parameter_Shapes_List *pList, CSG_Shapes *pIndexLayer, const SG_Char *Filename);
97 
98 	void				_Write_Code					(const CSG_String &FileName, const CSG_String &Code);
99 
100 	void				_Add_Opening				(CSG_Rect r);
101 
102 	void				_Add_CheckBoxes				(CSG_Parameter_Shapes_List *pList);
103 	void				_Add_Shapes					(CSG_Shapes *pLayer);
104 	bool				_Add_Shape					(CSG_Shape *pShape, int Fill_Color, int Line_Color, double Line_Width, double Point_Width);
105 	void				_Add_Grid					(CSG_Grid *pLayer);
106 	void				_Add_ReferenceMap			(CSG_Shapes *pIndexLayer, CSG_Rect r);
107 	void				_Add_Label					(const SG_Char* Label, CSG_Shape *pShape, double dSize, const SG_Char* Unit);
108 
109 	const char *		_Get_Opening_Code_1			(void);
110 	const char *		_Get_Opening_Code_2			(void);
111 
112 	const char *		_Get_Code_1					(void);
113 	const char *		_Get_Code_2					(void);
114 	const char *		_Get_Code_3					(void);
115 	const char *		_Get_Code_4					(void);
116 	const char *		_Get_Code_5					(void);
117 	const char *		_Get_Code_Closing_1			(void);
118 
119 	const char *		_Get_Code_CheckBox			(void);
120 	const char *		_Get_Code_MapApp			(void);
121 	const char *		_Get_Code_Timer				(void);
122 	const char *		_Get_Code_Slider			(void);
123 	const char *		_Get_Code_Helper			(void);
124 	const char *		_Get_Code_Buttons			(void);
125 	const char *		_Get_Code_Navigation_1		(void);
126 	const char *		_Get_Code_Navigation_2		(void);
127 
128 };
129 
130 
131 ///////////////////////////////////////////////////////////
132 //														 //
133 //														 //
134 //														 //
135 ///////////////////////////////////////////////////////////
136 
137 //---------------------------------------------------------
138 #endif // #ifndef _HEADER_INCLUDED__SAGA_GUI__svg_interactive_map_H
139