140 MyFrame(wxFrame* frame,
const wxString& title,
const wxPoint& pos,
141 const wxSize& size,
long style);
145 int GetApplicationMemoryUse(
void);
147 void OnEraseBackground(wxEraseEvent& event);
148 void OnMaximize(wxMaximizeEvent& event);
149 void OnCloseWindow(wxCloseEvent& event);
150 void OnExit(wxCommandEvent& event);
151 void OnSize(wxSizeEvent& event);
152 void OnMove(wxMoveEvent& event);
153 void OnInitTimer(wxTimerEvent& event);
165 bool DoChartUpdate(
void);
167 void OnMemFootTimer(wxTimerEvent& event);
168 void OnRecaptureTimer(wxTimerEvent& event);
170 void OnIconize(wxIconizeEvent& event);
171 void OnBellsFinished(wxCommandEvent& event);
186#ifdef wxHAS_POWER_EVENTS
187 void OnSuspending(wxPowerEvent& event);
188 void OnSuspended(wxPowerEvent& event);
189 void OnSuspendCancel(wxPowerEvent& event);
190 void OnResume(wxPowerEvent& event);
194 void UpdateAllFonts(
void);
195 void PositionConsole(
void);
196 void OnToolLeftClick(wxCommandEvent& event);
199 void selectChartDisplay(
int type,
int family);
200 void applySettingsString(wxString settings);
201 void setStringVP(wxString VPS);
202 void InvalidateAllGL();
203 void RefreshAllCanvas(
bool bErase =
true);
204 void CancelAllMouseRoute();
205 void InvalidateAllQuilts();
213 void DoSettings(
void);
214 void DoSettingsNew(
void);
217 int GetCanvasIndexUnderMouse();
219 bool DropMarker(
bool atOwnShip =
true);
221 void TriggerRecaptureTimer();
222 bool SetGlobalToolbarViz(
bool viz);
224 void MouseEvent(wxMouseEvent& event);
225 void CenterView(
ChartCanvas* cc,
const LLBBox& bbox);
229 void ProcessCanvasResize(
void);
231 void BuildMenuBar(
void);
232 void ApplyGlobalSettings(
bool bnewtoolbar);
233 void RegisterGlobalMenuItems();
234 void UpdateGlobalMenuItems();
236 void DoOptionsDialog();
237 void ProcessOptionsDialog(
int resultFlags, ArrayOfCDI* pNewDirArray);
238 void PrepareOptionsClose(
options* settings,
int settings_return_value);
243 void ToggleFullScreen();
251 void ToggleRocks(
void);
258 void ToggleTestPause(
void);
260 void SetENCDisplayCategory(
ChartCanvas* cc,
enum _DisCat nset);
263 Track* TrackOff(
bool do_add_point =
false);
264 void TrackDailyRestart(
void);
265 bool ShouldRestartTrack();
266 void ToggleColorScheme();
267 void SetMenubarItemState(
int item_id,
bool state);
268 void SetMasterToolbarItemState(
int tool_id,
bool state);
270 void SetToolbarItemBitmaps(
int tool_id, wxBitmap* bitmap,
271 wxBitmap* bmpDisabled);
272 void SetToolbarItemSVG(
int tool_id, wxString normalSVGfile,
273 wxString rolloverSVGfile, wxString toggledSVGfile);
277 void SubmergeAllCanvasToolbars(
void);
278 void SurfaceAllCanvasToolbars(
void);
279 void SetAllToolbarScale(
void);
280 void SetGPSCompassScale(
void);
281 void InvalidateAllCanvasUndo();
283 void RefreshGroupIndices(
void);
285 double GetBestVPScale(
ChartBase* pchart);
287 DataMonitor* GetDataMonitor()
const {
return m_data_monitor; }
289 ColorScheme GetColorScheme();
290 void SetAndApplyColorScheme(ColorScheme cs);
292 void OnFrameTCTimer(wxTimerEvent& event);
293 void OnFrameCOGTimer(wxTimerEvent& event);
295 void HandleBasicNavMsg(std::shared_ptr<const BasicNavDataMsg> msg);
296 void HandleGPSWatchdogMsg(std::shared_ptr<const GPSWatchdogMsg> msg);
298 void ChartsRefresh();
300 bool CheckGroup(
int igroup);
301 double GetMag(
double a,
double lat,
double lon);
302 bool SendJSON_WMM_Var_Request(
double lat,
double lon, wxDateTime date);
304 void DestroyPersistentDialogs();
305 void TouchAISActive(
void);
306 void UpdateAISTool(
void);
311 wxStatusBar* m_pStatusBar;
312 wxMenuBar* m_pMenuBar;
320 wxTimer FrameTCTimer;
322 wxTimer FrameCOGTimer;
323 wxTimer MemFootTimer;
324 wxTimer m_resizeTimer;
325 wxTimer FrameTenHzTimer;
331 int GetNextToolbarToolId() {
return m_next_available_plugin_tool_id; }
332 void RequestNewToolbarArgEvent(wxCommandEvent& WXUNUSED(event)) {
333 return RequestNewMasterToolbar();
335 void RequestNewToolbars(
bool bforcenew =
false);
337 void ActivateMOB(
void);
338 void UpdateGPSCompassStatusBoxes(
bool b_force_new =
false);
339 void UpdateRotationState(
double rotation);
341 bool UpdateChartDatabaseInplace(ArrayOfCDI& DirArray,
bool b_force,
343 const wxString& ChartListFileName);
345 bool m_bdefer_resize;
347 double COGTable[MAX_COG_AVERAGE_SECONDS];
350 void SetChartUpdatePeriod();
351 void CreateCanvasLayout(
bool b_useStoredSize =
false);
352 void LoadHarmonics();
354 void SetCanvasSizes(wxSize frameSize);
357 void RequestNewMasterToolbar(
bool bforcenew =
true);
358 bool CheckAndAddPlugInTool();
359 bool AddDefaultPositionPlugInTools();
361 void NotifyChildrenResize(
void);
362 void UpdateCanvasConfigDescriptors();
363 void ScheduleSettingsDialog();
364 void ScheduleSettingsDialogNew();
365 void ScheduleDeleteSettingsDialog();
366 void ScheduleReconfigAndSettingsReload(
bool reload,
bool new_dialog);
367 void ScheduleReloadCharts();
368 static void RebuildChartDatabase();
369 void PositionIENCToolbar();
371 void InitAppMsgBusListener();
373 void ReleaseApiListeners();
374 void UpdateStatusBar(
void);
375 void ConfigureStatusBar();
380 void ProcessUnitTest();
381 void ProcessQuitFlag();
382 void ProcessDeferredTrackOn();
383 void SendFixToPlugins();
384 void ProcessAnchorWatch();
385 void ProcessLogAndBells();
386 void CalculateCOGAverage();
387 void CheckToolbarPosition();
389 void ODoSetSize(
void);
392 void UpdateAllToolbars(ColorScheme cs);
394 void FilterCogSog(
void);
396 void ApplyGlobalColorSchemetoStatusBar(
void);
398 bool ScrubGroupArray();
400 void OnToolbarAnimateTimer(wxTimerEvent& event);
401 bool CollapseGlobalToolbar();
403 int m_StatusBarFieldCount;
405 wxDateTime m_MMEAeventTime;
406 unsigned long m_ulLastNMEATicktime;
408 wxDateTime m_fix_start_time;
410 wxString m_last_reported_chart_name;
411 wxString m_last_reported_chart_pubdate;
413 wxString m_lastAISiconName;
416 int m_next_available_plugin_tool_id;
418 double COGFilterTable[MAX_COGSOG_FILTER_SECONDS];
419 double SOGFilterTable[MAX_COGSOG_FILTER_SECONDS];
421 int m_ChartUpdatePeriod;
422 bool m_last_bGPSValid;
423 bool m_last_bVelocityValid;
426 wxString prev_locale;
438 time_t m_last_track_rotation_ts;
439 wxTimer ToolbarAnimateTimer;
440 int m_nMasterToolCountShown;
441 wxTimer m_recaptureTimer;
443 std::unique_ptr<LoadErrorsDlgCtrl> m_load_errors_dlg_ctrl;
453 bool m_need_new_options;
454 wxArrayString pathArray;
455 double restoreScale[4];
456 unsigned int last_canvasConfig;
459 DECLARE_EVENT_TABLE()