138 MyFrame(wxFrame* frame,
const wxString& title,
const wxPoint& pos,
139 const wxSize& size,
long style);
143 int GetApplicationMemoryUse(
void);
145 void OnEraseBackground(wxEraseEvent& event);
146 void OnMaximize(wxMaximizeEvent& event);
147 void OnCloseWindow(wxCloseEvent& event);
148 void OnExit(wxCommandEvent& event);
149 void OnSize(wxSizeEvent& event);
150 void OnMove(wxMoveEvent& event);
151 void OnInitTimer(wxTimerEvent& event);
163 bool DoChartUpdate(
void);
165 void OnMemFootTimer(wxTimerEvent& event);
166 void OnRecaptureTimer(wxTimerEvent& event);
168 void OnIconize(wxIconizeEvent& event);
169 void OnBellsFinished(wxCommandEvent& event);
184#ifdef wxHAS_POWER_EVENTS
185 void OnSuspending(wxPowerEvent& event);
186 void OnSuspended(wxPowerEvent& event);
187 void OnSuspendCancel(wxPowerEvent& event);
188 void OnResume(wxPowerEvent& event);
192 void UpdateAllFonts(
void);
193 void PositionConsole(
void);
194 void OnToolLeftClick(wxCommandEvent& event);
197 void selectChartDisplay(
int type,
int family);
198 void applySettingsString(wxString settings);
199 void setStringVP(wxString VPS);
200 void InvalidateAllGL();
201 void RefreshAllCanvas(
bool bErase =
true);
202 void CancelAllMouseRoute();
203 void InvalidateAllQuilts();
211 void DoSettings(
void);
212 void DoSettingsNew(
void);
215 int GetCanvasIndexUnderMouse();
217 bool DropMarker(
bool atOwnShip =
true);
219 void TriggerRecaptureTimer();
220 bool SetGlobalToolbarViz(
bool viz);
222 void MouseEvent(wxMouseEvent& event);
223 void CenterView(
ChartCanvas* cc,
const LLBBox& bbox);
227 void ProcessCanvasResize(
void);
229 void BuildMenuBar(
void);
230 void ApplyGlobalSettings(
bool bnewtoolbar);
231 void RegisterGlobalMenuItems();
232 void UpdateGlobalMenuItems();
234 void DoOptionsDialog();
235 void ProcessOptionsDialog(
int resultFlags, ArrayOfCDI* pNewDirArray);
236 void PrepareOptionsClose(
options* settings,
int settings_return_value);
241 void ToggleFullScreen();
249 void ToggleRocks(
void);
256 void ToggleTestPause(
void);
258 void SetENCDisplayCategory(
ChartCanvas* cc,
enum _DisCat nset);
261 Track* TrackOff(
bool do_add_point =
false);
262 void TrackDailyRestart(
void);
263 bool ShouldRestartTrack();
264 void ToggleColorScheme();
265 void SetMenubarItemState(
int item_id,
bool state);
266 void SetMasterToolbarItemState(
int tool_id,
bool state);
268 void SetToolbarItemBitmaps(
int tool_id, wxBitmap* bitmap,
269 wxBitmap* bmpDisabled);
270 void SetToolbarItemSVG(
int tool_id, wxString normalSVGfile,
271 wxString rolloverSVGfile, wxString toggledSVGfile);
275 void SubmergeAllCanvasToolbars(
void);
276 void SurfaceAllCanvasToolbars(
void);
277 void SetAllToolbarScale(
void);
278 void SetGPSCompassScale(
void);
279 void InvalidateAllCanvasUndo();
281 void RefreshGroupIndices(
void);
283 double GetBestVPScale(
ChartBase* pchart);
285 DataMonitor* GetDataMonitor()
const {
return m_data_monitor; }
287 ColorScheme GetColorScheme();
288 void SetAndApplyColorScheme(ColorScheme cs);
290 void OnFrameTCTimer(wxTimerEvent& event);
291 void OnFrameCOGTimer(wxTimerEvent& event);
293 void HandleBasicNavMsg(std::shared_ptr<const BasicNavDataMsg> msg);
294 void HandleGPSWatchdogMsg(std::shared_ptr<const GPSWatchdogMsg> msg);
296 void ChartsRefresh();
298 bool CheckGroup(
int igroup);
299 double GetMag(
double a,
double lat,
double lon);
300 bool SendJSON_WMM_Var_Request(
double lat,
double lon, wxDateTime date);
302 void DestroyPersistentDialogs();
303 void TouchAISActive(
void);
304 void UpdateAISTool(
void);
309 wxStatusBar* m_pStatusBar;
310 wxMenuBar* m_pMenuBar;
318 wxTimer FrameTCTimer;
320 wxTimer FrameCOGTimer;
321 wxTimer MemFootTimer;
322 wxTimer m_resizeTimer;
323 wxTimer FrameTenHzTimer;
329 int GetNextToolbarToolId() {
return m_next_available_plugin_tool_id; }
330 void RequestNewToolbarArgEvent(wxCommandEvent& WXUNUSED(event)) {
331 return RequestNewMasterToolbar();
333 void RequestNewToolbars(
bool bforcenew =
false);
335 void ActivateMOB(
void);
336 void UpdateGPSCompassStatusBoxes(
bool b_force_new =
false);
337 void UpdateRotationState(
double rotation);
339 bool UpdateChartDatabaseInplace(ArrayOfCDI& DirArray,
bool b_force,
341 const wxString& ChartListFileName);
343 bool m_bdefer_resize;
345 double COGTable[MAX_COG_AVERAGE_SECONDS];
348 void SetChartUpdatePeriod();
349 void CreateCanvasLayout(
bool b_useStoredSize =
false);
350 void LoadHarmonics();
352 void SetCanvasSizes(wxSize frameSize);
355 void RequestNewMasterToolbar(
bool bforcenew =
true);
356 bool CheckAndAddPlugInTool();
357 bool AddDefaultPositionPlugInTools();
359 void NotifyChildrenResize(
void);
360 void UpdateCanvasConfigDescriptors();
361 void ScheduleSettingsDialog();
362 void ScheduleSettingsDialogNew();
363 void ScheduleDeleteSettingsDialog();
364 void ScheduleReconfigAndSettingsReload(
bool reload,
bool new_dialog);
365 static void RebuildChartDatabase();
366 void PositionIENCToolbar();
368 void InitAppMsgBusListener();
370 void ReleaseApiListeners();
371 void UpdateStatusBar(
void);
372 void ConfigureStatusBar();
375 void ProcessUnitTest();
376 void ProcessQuitFlag();
377 void ProcessDeferredTrackOn();
378 void SendFixToPlugins();
379 void ProcessAnchorWatch();
380 void ProcessLogAndBells();
381 void CalculateCOGAverage();
382 void CheckToolbarPosition();
384 void ODoSetSize(
void);
387 void UpdateAllToolbars(ColorScheme cs);
389 void FilterCogSog(
void);
391 void ApplyGlobalColorSchemetoStatusBar(
void);
393 bool ScrubGroupArray();
395 void OnToolbarAnimateTimer(wxTimerEvent& event);
396 bool CollapseGlobalToolbar();
398 int m_StatusBarFieldCount;
400 wxDateTime m_MMEAeventTime;
401 unsigned long m_ulLastNMEATicktime;
403 wxDateTime m_fix_start_time;
405 wxString m_last_reported_chart_name;
406 wxString m_last_reported_chart_pubdate;
408 wxString m_lastAISiconName;
411 int m_next_available_plugin_tool_id;
413 double COGFilterTable[MAX_COGSOG_FILTER_SECONDS];
414 double SOGFilterTable[MAX_COGSOG_FILTER_SECONDS];
416 int m_ChartUpdatePeriod;
417 bool m_last_bGPSValid;
418 bool m_last_bVelocityValid;
421 wxString prev_locale;
433 time_t m_last_track_rotation_ts;
434 wxTimer ToolbarAnimateTimer;
435 int m_nMasterToolCountShown;
436 wxTimer m_recaptureTimer;
438 std::unique_ptr<LoadErrorsDlgCtrl> m_load_errors_dlg_ctrl;
449 bool m_need_new_options;
450 wxArrayString pathArray;
451 double restoreScale[4];
452 unsigned int last_canvasConfig;
455 DECLARE_EVENT_TABLE()