1 /******************************************************************************
2  *
3  * Project:  OpenCPN
4  * Purpose:  OpenCPN private types and ENUMs
5  * Author:   David Register
6  *
7  ***************************************************************************
8  *   Copyright (C) 2010 by David S. Register   *
9  *                                                                         *
10  *   This program is free software; you can redistribute it and/or modify  *
11  *   it under the terms of the GNU General Public License as published by  *
12  *   the Free Software Foundation; either version 2 of the License, or     *
13  *   (at your option) any later version.                                   *
14  *                                                                         *
15  *   This program is distributed in the hope that it will be useful,       *
16  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
17  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
18  *   GNU General Public License for more details.                          *
19  *                                                                         *
20  *   You should have received a copy of the GNU General Public License     *
21  *   along with this program; if not, write to the                         *
22  *   Free Software Foundation, Inc.,                                       *
23  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,  USA.             *
24  ***************************************************************************
25  *
26  *
27  *
28  */
29 
30 
31 
32 
33 #ifndef __OCPNTYPES_H__
34 #define __OCPNTYPES_H__
35 
36 
37 typedef struct _S52color{
38     char colName[20];
39     unsigned char  R;
40     unsigned char  G;
41     unsigned char  B;
42 }S52color;
43 
44 WX_DECLARE_STRING_HASH_MAP( wxColour, wxColorHashMap );
45 WX_DECLARE_STRING_HASH_MAP( S52color, colorHashMap );
46 
47 typedef struct _colTable {
48     wxString *tableName;
49     wxString rasterFileName;
50     wxArrayPtrVoid *color;
51     colorHashMap colors;
52     wxColorHashMap wxColors;
53 } colTable;
54 
55 
56 
57 //    ChartType constants
58 typedef enum ChartTypeEnum
59 {
60       CHART_TYPE_UNKNOWN = 0,
61       CHART_TYPE_DUMMY,
62       CHART_TYPE_DONTCARE,
63       CHART_TYPE_KAP,
64       CHART_TYPE_GEO,
65       CHART_TYPE_S57,
66       CHART_TYPE_CM93,
67       CHART_TYPE_CM93COMP,
68       CHART_TYPE_PLUGIN,
69       CHART_TYPE_MBTILES
70 }_ChartTypeEnum;
71 
72 //    ChartFamily constants
73 typedef enum ChartFamilyEnum
74 {
75       CHART_FAMILY_UNKNOWN = 0,
76       CHART_FAMILY_RASTER,
77       CHART_FAMILY_VECTOR,
78       CHART_FAMILY_DONTCARE
79 }_ChartFamilyEnum;
80 
81 typedef enum ColorScheme
82 {
83       GLOBAL_COLOR_SCHEME_RGB,
84       GLOBAL_COLOR_SCHEME_DAY,
85       GLOBAL_COLOR_SCHEME_DUSK,
86       GLOBAL_COLOR_SCHEME_NIGHT,
87       N_COLOR_SCHEMES
88 }_ColorScheme;
89 
90 
91 
92 //----------------------------------------------------------------------------
93 // ocpn Toolbar stuff
94 //----------------------------------------------------------------------------
95 class ChartBase;
96 class wxSocketEvent;
97 class ocpnToolBarSimple;
98 
99 
100 //    A generic Position Data structure
101 typedef struct {
102     double kLat;
103     double kLon;
104     double kCog;
105     double kSog;
106     double kVar;            // Variation, typically from RMC message
107     double kHdm;            // Magnetic heading
108     double kHdt;            // true heading
109     time_t FixTime;
110     int    nSats;
111 } GenericPosDatEx;
112 
113 //    A collection of active leg Data structure
114 typedef struct {
115   double Xte;               // Left side of the track -> negative XTE
116   double Btw;
117   double Dtw;
118   wxString wp_name;         // Name of destination waypoint for active leg;
119   bool arrival;
120 } ActiveLegDat;
121 
122 #endif
123