141 MyFrame(wxFrame* frame,
const wxString& title,
const wxPoint& pos,
142 const wxSize& size,
long style, wxAuiDefaultDockArt* pauidockart);
146 int GetApplicationMemoryUse(
void);
148 void OnEraseBackground(wxEraseEvent& event);
149 void OnMaximize(wxMaximizeEvent& event);
150 void OnCloseWindow(wxCloseEvent& event);
151 void OnExit(wxCommandEvent& event);
152 void OnSize(wxSizeEvent& event);
153 void OnMove(wxMoveEvent& event);
154 void OnInitTimer(wxTimerEvent& event);
166 bool DoChartUpdate(
void);
168 void OnMemFootTimer(wxTimerEvent& event);
169 void OnRecaptureTimer(wxTimerEvent& event);
171 void OnIconize(wxIconizeEvent& event);
172 void OnBellsFinished(wxCommandEvent& event);
187#ifdef wxHAS_POWER_EVENTS
188 void OnSuspending(wxPowerEvent& event);
189 void OnSuspended(wxPowerEvent& event);
190 void OnSuspendCancel(wxPowerEvent& event);
191 void OnResume(wxPowerEvent& event);
195 void UpdateAllFonts(
void);
196 void PositionConsole(
void);
197 void OnToolLeftClick(wxCommandEvent& event);
200 void selectChartDisplay(
int type,
int family);
201 void applySettingsString(wxString settings);
202 void setStringVP(wxString VPS);
203 void InvalidateAllGL();
204 void RefreshAllCanvas(
bool bErase =
true);
205 void CancelAllMouseRoute();
206 void InvalidateAllQuilts();
214 void DoSettings(
void);
215 void DoSettingsNew(
void);
218 int GetCanvasIndexUnderMouse();
220 bool DropMarker(
bool atOwnShip =
true);
222 void TriggerRecaptureTimer();
223 bool SetGlobalToolbarViz(
bool viz);
225 void MouseEvent(wxMouseEvent& event);
226 void CenterView(
ChartCanvas* cc,
const LLBBox& bbox);
230 void ProcessCanvasResize(
void);
232 void BuildMenuBar(
void);
233 void ApplyGlobalSettings(
bool bnewtoolbar);
234 void RegisterGlobalMenuItems();
235 void UpdateGlobalMenuItems();
237 void DoOptionsDialog();
238 void ProcessOptionsDialog(
int resultFlags, ArrayOfCDI* pNewDirArray);
239 void PrepareOptionsClose(
options* settings,
int settings_return_value);
244 void ToggleFullScreen();
252 void ToggleRocks(
void);
259 void ToggleTestPause(
void);
261 void SetENCDisplayCategory(
ChartCanvas* cc,
enum _DisCat nset);
264 Track* TrackOff(
bool do_add_point =
false);
265 void TrackDailyRestart(
void);
266 bool ShouldRestartTrack();
267 void ToggleColorScheme();
268 void SetMenubarItemState(
int item_id,
bool state);
269 void SetMasterToolbarItemState(
int tool_id,
bool state);
271 void SetToolbarItemBitmaps(
int tool_id, wxBitmap* bitmap,
272 wxBitmap* bmpDisabled);
273 void SetToolbarItemSVG(
int tool_id, wxString normalSVGfile,
274 wxString rolloverSVGfile, wxString toggledSVGfile);
278 void SubmergeAllCanvasToolbars(
void);
279 void SurfaceAllCanvasToolbars(
void);
280 void SetAllToolbarScale(
void);
281 void SetGPSCompassScale(
void);
282 void InvalidateAllCanvasUndo();
284 void RefreshGroupIndices(
void);
286 double GetBestVPScale(
ChartBase* pchart);
288 DataMonitor* GetDataMonitor()
const {
return m_data_monitor; }
290 ColorScheme GetColorScheme();
291 void SetAndApplyColorScheme(ColorScheme cs);
293 void OnFrameTCTimer(wxTimerEvent& event);
294 void OnFrameCOGTimer(wxTimerEvent& event);
296 void HandleBasicNavMsg(std::shared_ptr<const BasicNavDataMsg> msg);
297 void HandleGPSWatchdogMsg(std::shared_ptr<const GPSWatchdogMsg> msg);
299 void ChartsRefresh();
301 bool CheckGroup(
int igroup);
302 double GetMag(
double a,
double lat,
double lon);
303 bool SendJSON_WMM_Var_Request(
double lat,
double lon, wxDateTime date);
305 void DestroyPersistentDialogs();
306 void TouchAISActive(
void);
307 void UpdateAISTool(
void);
312 wxStatusBar* m_pStatusBar;
313 wxMenuBar* m_pMenuBar;
321 wxTimer FrameTCTimer;
323 wxTimer FrameCOGTimer;
324 wxTimer MemFootTimer;
325 wxTimer m_resizeTimer;
326 wxTimer FrameTenHzTimer;
332 int GetNextToolbarToolId() {
return m_next_available_plugin_tool_id; }
333 void RequestNewToolbarArgEvent(wxCommandEvent& WXUNUSED(event)) {
334 return RequestNewMasterToolbar();
336 void RequestNewToolbars(
bool bforcenew =
false);
338 void ActivateMOB(
void);
339 void UpdateGPSCompassStatusBoxes(
bool b_force_new =
false);
340 void UpdateRotationState(
double rotation);
342 bool UpdateChartDatabaseInplace(ArrayOfCDI& DirArray,
bool b_force,
344 const wxString& ChartListFileName);
346 bool m_bdefer_resize;
348 double COGTable[MAX_COG_AVERAGE_SECONDS];
351 void SetChartUpdatePeriod();
352 void CreateCanvasLayout(
bool b_useStoredSize =
false);
353 void LoadHarmonics();
355 void SetCanvasSizes(wxSize frameSize);
358 void RequestNewMasterToolbar(
bool bforcenew =
true);
359 bool CheckAndAddPlugInTool();
360 bool AddDefaultPositionPlugInTools();
362 void NotifyChildrenResize(
void);
363 void UpdateCanvasConfigDescriptors();
364 void ScheduleSettingsDialog();
365 void ScheduleSettingsDialogNew();
366 void ScheduleDeleteSettingsDialog();
367 void ScheduleReconfigAndSettingsReload(
bool reload,
bool new_dialog);
368 void ScheduleReloadCharts();
369 static void RebuildChartDatabase();
370 void PositionIENCToolbar();
372 void InitAppMsgBusListener();
374 void ReleaseApiListeners();
375 void UpdateStatusBar(
void);
376 void ConfigureStatusBar();
381 void ProcessUnitTest();
382 void ProcessQuitFlag();
383 void ProcessDeferredTrackOn();
384 void SendFixToPlugins();
385 void ProcessAnchorWatch();
386 void ProcessLogAndBells();
387 void CalculateCOGAverage();
388 void CheckToolbarPosition();
390 void ODoSetSize(
void);
393 void UpdateAllToolbars(ColorScheme cs);
395 void FilterCogSog(
void);
397 void ApplyGlobalColorSchemetoStatusBar(
void);
399 bool ScrubGroupArray();
401 void OnToolbarAnimateTimer(wxTimerEvent& event);
402 bool CollapseGlobalToolbar();
404 int m_StatusBarFieldCount;
406 wxDateTime m_MMEAeventTime;
407 unsigned long m_ulLastNMEATicktime;
409 wxDateTime m_fix_start_time;
411 wxString m_last_reported_chart_name;
412 wxString m_last_reported_chart_pubdate;
414 wxString m_lastAISiconName;
417 int m_next_available_plugin_tool_id;
419 double COGFilterTable[MAX_COGSOG_FILTER_SECONDS];
420 double SOGFilterTable[MAX_COGSOG_FILTER_SECONDS];
422 int m_ChartUpdatePeriod;
423 bool m_last_bGPSValid;
424 bool m_last_bVelocityValid;
427 wxString prev_locale;
439 time_t m_last_track_rotation_ts;
440 wxTimer ToolbarAnimateTimer;
441 int m_nMasterToolCountShown;
442 wxTimer m_recaptureTimer;
444 std::unique_ptr<LoadErrorsDlgCtrl> m_load_errors_dlg_ctrl;
455 bool m_need_new_options;
456 wxArrayString pathArray;
457 double restoreScale[4];
458 unsigned int last_canvasConfig;
460 wxAuiDefaultDockArt* m_pauidockart;
462 DECLARE_EVENT_TABLE()