137 MyFrame(wxFrame* frame,
const wxString& title,
const wxPoint& pos,
138 const wxSize& size,
long style);
142 int GetApplicationMemoryUse(
void);
144 void OnEraseBackground(wxEraseEvent& event);
145 void OnMaximize(wxMaximizeEvent& event);
146 void OnCloseWindow(wxCloseEvent& event);
147 void OnExit(wxCommandEvent& event);
148 void OnSize(wxSizeEvent& event);
149 void OnMove(wxMoveEvent& event);
150 void OnInitTimer(wxTimerEvent& event);
151 void OnFrameTimer1(wxTimerEvent& event);
152 bool DoChartUpdate(
void);
154 void OnMemFootTimer(wxTimerEvent& event);
155 void OnRecaptureTimer(wxTimerEvent& event);
157 void OnIconize(wxIconizeEvent& event);
158 void OnBellsFinished(wxCommandEvent& event);
159 void OnFrameTenHzTimer(wxTimerEvent& event);
161#ifdef wxHAS_POWER_EVENTS
162 void OnSuspending(wxPowerEvent& event);
163 void OnSuspended(wxPowerEvent& event);
164 void OnSuspendCancel(wxPowerEvent& event);
165 void OnResume(wxPowerEvent& event);
169 void UpdateAllFonts(
void);
170 void PositionConsole(
void);
171 void OnToolLeftClick(wxCommandEvent& event);
174 void selectChartDisplay(
int type,
int family);
175 void applySettingsString(wxString settings);
176 void setStringVP(wxString VPS);
177 void InvalidateAllGL();
178 void RefreshAllCanvas(
bool bErase =
true);
179 void CancelAllMouseRoute();
180 void InvalidateAllQuilts();
188 void DoSettings(
void);
189 void DoSettingsNew(
void);
192 int GetCanvasIndexUnderMouse();
194 bool DropMarker(
bool atOwnShip =
true);
196 void TriggerRecaptureTimer();
197 bool SetGlobalToolbarViz(
bool viz);
199 void MouseEvent(wxMouseEvent& event);
200 void CenterView(
ChartCanvas* cc,
const LLBBox& bbox);
204 void ProcessCanvasResize(
void);
206 void BuildMenuBar(
void);
207 void ApplyGlobalSettings(
bool bnewtoolbar);
208 void RegisterGlobalMenuItems();
209 void UpdateGlobalMenuItems();
211 void DoOptionsDialog();
212 void ProcessOptionsDialog(
int resultFlags, ArrayOfCDI* pNewDirArray);
213 void PrepareOptionsClose(
options* settings,
int settings_return_value);
218 void ToggleFullScreen();
226 void ToggleRocks(
void);
233 void ToggleTestPause(
void);
235 void SetENCDisplayCategory(
ChartCanvas* cc,
enum _DisCat nset);
238 Track* TrackOff(
bool do_add_point =
false);
239 void TrackDailyRestart(
void);
240 bool ShouldRestartTrack();
241 void ToggleColorScheme();
242 void SetMenubarItemState(
int item_id,
bool state);
243 void SetMasterToolbarItemState(
int tool_id,
bool state);
245 void SetToolbarItemBitmaps(
int tool_id, wxBitmap* bitmap,
246 wxBitmap* bmpDisabled);
247 void SetToolbarItemSVG(
int tool_id, wxString normalSVGfile,
248 wxString rolloverSVGfile, wxString toggledSVGfile);
252 void SubmergeAllCanvasToolbars(
void);
253 void SurfaceAllCanvasToolbars(
void);
254 void SetAllToolbarScale(
void);
255 void SetGPSCompassScale(
void);
256 void InvalidateAllCanvasUndo();
258 void RefreshGroupIndices(
void);
260 double GetBestVPScale(
ChartBase* pchart);
262 ColorScheme GetColorScheme();
263 void SetAndApplyColorScheme(ColorScheme cs);
265 void OnFrameTCTimer(wxTimerEvent& event);
266 void OnFrameCOGTimer(wxTimerEvent& event);
268 void HandleBasicNavMsg(std::shared_ptr<const BasicNavDataMsg> msg);
269 void HandleGPSWatchdogMsg(std::shared_ptr<const GPSWatchdogMsg> msg);
271 void ChartsRefresh();
273 bool CheckGroup(
int igroup);
274 double GetMag(
double a,
double lat,
double lon);
275 bool SendJSON_WMM_Var_Request(
double lat,
double lon, wxDateTime date);
277 void DestroyPersistentDialogs();
278 void TouchAISActive(
void);
279 void UpdateAISTool(
void);
284 wxStatusBar* m_pStatusBar;
285 wxMenuBar* m_pMenuBar;
293 wxTimer FrameTCTimer;
295 wxTimer FrameCOGTimer;
296 wxTimer MemFootTimer;
297 wxTimer m_resizeTimer;
298 wxTimer FrameTenHzTimer;
304 int GetNextToolbarToolId() {
return m_next_available_plugin_tool_id; }
305 void RequestNewToolbarArgEvent(wxCommandEvent& WXUNUSED(event)) {
306 return RequestNewMasterToolbar();
308 void RequestNewToolbars(
bool bforcenew =
false);
310 void ActivateMOB(
void);
311 void UpdateGPSCompassStatusBoxes(
bool b_force_new =
false);
312 void UpdateRotationState(
double rotation);
314 bool UpdateChartDatabaseInplace(ArrayOfCDI& DirArray,
bool b_force,
316 const wxString& ChartListFileName);
318 bool m_bdefer_resize;
320 double COGTable[MAX_COG_AVERAGE_SECONDS];
323 void SetChartUpdatePeriod();
324 void CreateCanvasLayout(
bool b_useStoredSize =
false);
325 void LoadHarmonics();
327 void SetCanvasSizes(wxSize frameSize);
330 void RequestNewMasterToolbar(
bool bforcenew =
true);
331 bool CheckAndAddPlugInTool();
332 bool AddDefaultPositionPlugInTools();
334 void NotifyChildrenResize(
void);
335 void UpdateCanvasConfigDescriptors();
336 void ScheduleSettingsDialog();
337 void ScheduleSettingsDialogNew();
338 void ScheduleDeleteSettingsDialog();
339 void ScheduleReconfigAndSettingsReload(
bool reload,
bool new_dialog);
340 static void RebuildChartDatabase();
341 void PositionIENCToolbar();
343 void InitAppMsgBusListener();
345 void ReleaseApiListeners();
346 void UpdateStatusBar(
void);
347 void ConfigureStatusBar();
350 void ProcessUnitTest();
351 void ProcessQuitFlag();
352 void ProcessDeferredTrackOn();
353 void SendFixToPlugins();
354 void ProcessAnchorWatch();
355 void ProcessLogAndBells();
356 void CalculateCOGAverage();
357 void CheckToolbarPosition();
359 void ODoSetSize(
void);
362 void UpdateAllToolbars(ColorScheme cs);
364 void FilterCogSog(
void);
366 void ApplyGlobalColorSchemetoStatusBar(
void);
368 bool ScrubGroupArray();
370 void OnToolbarAnimateTimer(wxTimerEvent& event);
371 bool CollapseGlobalToolbar();
373 int m_StatusBarFieldCount;
375 wxDateTime m_MMEAeventTime;
376 unsigned long m_ulLastNMEATicktime;
379 wxString m_last_reported_chart_name;
380 wxString m_last_reported_chart_pubdate;
382 wxString m_lastAISiconName;
385 int m_next_available_plugin_tool_id;
387 double COGFilterTable[MAX_COGSOG_FILTER_SECONDS];
388 double SOGFilterTable[MAX_COGSOG_FILTER_SECONDS];
390 int m_ChartUpdatePeriod;
391 bool m_last_bGPSValid;
392 bool m_last_bVelocityValid;
395 wxString prev_locale;
407 time_t m_last_track_rotation_ts;
408 wxTimer ToolbarAnimateTimer;
409 int m_nMasterToolCountShown;
410 wxTimer m_recaptureTimer;
412 std::unique_ptr<LoadErrorsDlgCtrl> m_load_errors_dlg_ctrl;
423 bool m_need_new_options;
424 wxArrayString pathArray;
425 double restoreScale[4];
426 unsigned int last_canvasConfig;
428 DECLARE_EVENT_TABLE()