OpenCPN Partial API docs
idents.h
1 /***************************************************************************
2  *
3  * Project: OpenCPN
4  * Purpose:
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 #ifndef _IDENTS_H__
27 #define _IDENTS_H__
28 
29 #include <wx/event.h>
30 #include <wx/toolbar.h>
31 
32 #define TIMER_GFRAME_1 999
33 
34 #define ID_QUIT 101
35 #define ID_CM93ZOOMG 102
36 
37 // ToolBar Constants
38 const int ID_TOOLBAR = 500;
39 
40 enum {
41  // The following constants represent the toolbar items (some are also used in
42  // menus). They MUST be in the SAME ORDER as on the toolbar and new items MUST
43  // NOT be added amongst them, due to the way the toolbar button visibility is
44  // saved and calculated.
45  ID_ZOOMIN = 1550,
46  ID_ZOOMOUT,
47  ID_STKUP,
48  ID_STKDN,
49  ID_ROUTE,
50  ID_FOLLOW,
51  ID_SETTINGS,
52  ID_AIS,
53  ID_ENC_TEXT,
54  ID_CURRENT,
55  ID_TIDE,
56  ID_PRINT,
57  ID_ROUTEMANAGER,
58  ID_TRACK,
59  ID_COLSCHEME,
60  ID_ABOUT,
61  ID_MOB,
62  ID_TBEXIT,
63  ID_TBSTAT,
64  ID_TBSTATBOX,
65  ID_MASTERTOGGLE,
66 
67  ID_PLUGIN_BASE // This MUST be the last item in the enum
68 };
69 
70 static const long TOOLBAR_STYLE = wxTB_FLAT | wxTB_DOCKABLE | wxTB_TEXT;
71 
72 enum {
73  IDM_TOOLBAR_TOGGLETOOLBARSIZE = 200,
74  IDM_TOOLBAR_TOGGLETOOLBARORIENT,
75  IDM_TOOLBAR_TOGGLETOOLBARROWS,
76  IDM_TOOLBAR_ENABLEPRINT,
77  IDM_TOOLBAR_DELETEPRINT,
78  IDM_TOOLBAR_INSERTPRINT,
79  IDM_TOOLBAR_TOGGLEHELP,
80  IDM_TOOLBAR_TOGGLE_TOOLBAR,
81  IDM_TOOLBAR_TOGGLE_ANOTHER_TOOLBAR,
82  IDM_TOOLBAR_CHANGE_TOOLTIP,
83  IDM_TOOLBAR_SHOW_TEXT,
84  IDM_TOOLBAR_SHOW_ICONS,
85  IDM_TOOLBAR_SHOW_BOTH,
86 
87  ID_COMBO = 1000
88 };
89 
90 // Menu item IDs for the main menu bar
91 enum {
92  ID_MENU_ZOOM_IN = 2000,
93  ID_MENU_ZOOM_OUT,
94  ID_MENU_SCALE_IN,
95  ID_MENU_SCALE_OUT,
96 
97  ID_MENU_NAV_FOLLOW,
98  ID_MENU_NAV_TRACK,
99 
100  ID_MENU_CHART_NORTHUP,
101  ID_MENU_CHART_COGUP,
102  ID_MENU_CHART_HEADUP,
103  ID_MENU_CHART_QUILTING,
104  ID_MENU_CHART_OUTLINES,
105 
106  ID_MENU_UI_CHARTBAR,
107  ID_MENU_UI_COLSCHEME,
108  ID_MENU_UI_FULLSCREEN,
109 
110  ID_MENU_ENC_TEXT,
111  ID_MENU_ENC_LIGHTS,
112  ID_MENU_ENC_SOUNDINGS,
113  ID_MENU_ENC_ANCHOR,
114  ID_MENU_ENC_DATA_QUALITY,
115 
116  ID_MENU_SHOW_TIDES,
117  ID_MENU_SHOW_CURRENTS,
118 
119  ID_MENU_TOOL_MEASURE,
120  ID_MENU_ROUTE_MANAGER,
121  ID_MENU_ROUTE_NEW,
122  ID_MENU_MARK_BOAT,
123  ID_MENU_MARK_CURSOR,
124  ID_MENU_MARK_MOB,
125 
126  ID_MENU_AIS_TARGETS,
127  ID_MENU_AIS_MOORED_TARGETS,
128  ID_MENU_AIS_SCALED_TARGETS,
129  ID_MENU_AIS_TRACKS,
130  ID_MENU_AIS_CPADIALOG,
131  ID_MENU_AIS_CPASOUND,
132  ID_MENU_AIS_TARGETLIST,
133  ID_MENU_AIS_CPAWARNING,
134 
135  ID_MENU_SETTINGS_BASIC,
136 
137  ID_MENU_OQUIT,
138 
139  ID_CMD_SELECT_CHART_TYPE,
140  ID_CMD_SELECT_CHART_FAMILY,
141  ID_CMD_INVALIDATE,
142  ID_CMD_CLOSE_ALL_DIALOGS,
143 
144  ID_MENU_SHOW_NAVOBJECTS,
145 };
146 
147 // A global definition for window, timer and other ID's as needed.
148 enum {
149  ID_NMEA_WINDOW = wxID_HIGHEST,
150  ID_AIS_WINDOW,
151  INIT_TIMER,
152  FRAME_TIMER_1,
153  FRAME_TIMER_2,
154  TIMER_AIS1,
155  TIMER_DSC,
156  TIMER_AISAUDIO,
157  AIS_SOCKET_Isa,
158  FRAME_TIMER_DOG,
159  FRAME_TC_TIMER,
160  FRAME_COG_TIMER,
161  MEMORY_FOOTPRINT_TIMER,
162  BELLS_TIMER,
163  ID_NMEA_THREADMSG,
164  RESIZE_TIMER,
165  TOOLBAR_ANIMATE_TIMER,
166  RECAPTURE_TIMER,
167  WATCHDOG_TIMER
168 
169 };
170 
171 
172 enum { TIME_TYPE_UTC = 1, TIME_TYPE_LMT, TIME_TYPE_COMPUTER };
173 
174 #define DS_SOCKET_ID 5001
175 #define DS_SERVERSOCKET_ID 5002
176 #define DS_ACTIVESERVERSOCKET_ID 5003
177 
178 
179 #endif // _IDENTS_H__