1 
2 ///////////////////////////////////////////////////////////
3 //                                                       //
4 //                         SAGA                          //
5 //                                                       //
6 //      System for Automated Geoscientific Analyses      //
7 //                                                       //
8 //                    User Interface                     //
9 //                                                       //
10 //                    Program: SAGA                      //
11 //                                                       //
12 //-------------------------------------------------------//
13 //                                                       //
14 //                 wksp_map_graticule.h                  //
15 //                                                       //
16 //          Copyright (C) 2014 by Olaf Conrad            //
17 //                                                       //
18 //-------------------------------------------------------//
19 //                                                       //
20 // This file is part of 'SAGA - System for Automated     //
21 // Geoscientific Analyses'. SAGA is free software; you   //
22 // can redistribute it and/or modify it under the terms  //
23 // of the GNU General Public License as published by the //
24 // Free Software Foundation, either version 2 of the     //
25 // License, or (at your option) any later version.       //
26 //                                                       //
27 // SAGA is distributed in the hope that it will be       //
28 // useful, but WITHOUT ANY WARRANTY; without even the    //
29 // implied warranty of MERCHANTABILITY or FITNESS FOR A  //
30 // PARTICULAR PURPOSE. See the GNU General Public        //
31 // License for more details.                             //
32 //                                                       //
33 // You should have received a copy of the GNU General    //
34 // Public License along with this program; if not, see   //
35 // <http://www.gnu.org/licenses/>.                       //
36 //                                                       //
37 //-------------------------------------------------------//
38 //                                                       //
39 //    contact:    Olaf Conrad                            //
40 //                Institute of Geography                 //
41 //                University of Hamburg                  //
42 //                Germany                                //
43 //                                                       //
44 //    e-mail:     oconrad@saga-gis.org                   //
45 //                                                       //
46 ///////////////////////////////////////////////////////////
47 
48 //---------------------------------------------------------
49 #ifndef _HEADER_INCLUDED__SAGA_GUI__wksp_map_graticule_H
50 #define _HEADER_INCLUDED__SAGA_GUI__wksp_map_graticule_H
51 
52 
53 ///////////////////////////////////////////////////////////
54 //														 //
55 //														 //
56 //														 //
57 ///////////////////////////////////////////////////////////
58 
59 //---------------------------------------------------------
60 #include "wksp_base_item.h"
61 
62 
63 ///////////////////////////////////////////////////////////
64 //														 //
65 //														 //
66 //														 //
67 ///////////////////////////////////////////////////////////
68 
69 //---------------------------------------------------------
70 class CWKSP_Map_Graticule : public CWKSP_Base_Item
71 {
72 public:
73 	CWKSP_Map_Graticule(CSG_MetaData *pEntry = NULL);
74 	virtual ~CWKSP_Map_Graticule(void);
75 
Get_Type(void)76 	virtual TWKSP_Item			Get_Type				(void)	{	return( WKSP_ITEM_Map_Graticule );	}
77 
78 	virtual wxString			Get_Name				(void);
79 	virtual wxString			Get_Description			(void);
80 
81 	virtual wxMenu *			Get_Menu				(void);
82 
83 	virtual bool				On_Command				(int Cmd_ID);
84 	virtual bool				On_Command_UI			(wxUpdateUIEvent &event);
85 
86 	virtual int					On_Parameter_Changed	(CSG_Parameters *pParameters, CSG_Parameter *pParameter, int Flags);
87 	virtual void				Parameters_Changed		(void);
88 
do_Show(void)89 	bool						do_Show					(void)	{	return( m_bShow );	}
90 
Get_Map(void)91 	class CWKSP_Map *			Get_Map					(void)	{	return( (class CWKSP_Map *)Get_Manager() );	}
92 
93 	bool						Draw					(class CWKSP_Map_DC &dc);
94 
95 	bool						Load					(CSG_MetaData &Entry);
96 	bool						Save					(CSG_MetaData &Entry);
97 
98 
99 private:
100 
101 	bool						m_bShow;
102 
103 	CSG_Shapes					m_Graticule, m_Coordinates;
104 
105 
106 	bool						Get_Graticule			(const CSG_Rect &Extent);
107 
108 	CSG_String					Get_Unit				(CSG_Shape *pPoint, int Units, int Decimals, bool bLatitude);
109 
110 };
111 
112 
113 ///////////////////////////////////////////////////////////
114 //														 //
115 //														 //
116 //														 //
117 ///////////////////////////////////////////////////////////
118 
119 //---------------------------------------------------------
120 #endif // #ifndef _HEADER_INCLUDED__SAGA_GUI__wksp_map_graticule_H
121