138  MyFrame(wxFrame* frame, 
const wxString& title, 
const wxPoint& pos,
 
  139          const wxSize& size, 
long style, 
DataMonitor* data_monitor);
 
  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);
 
  152  void OnFrameTimer1(wxTimerEvent& event);
 
  153  bool DoChartUpdate(
void);
 
  155  void OnMemFootTimer(wxTimerEvent& event);
 
  156  void OnRecaptureTimer(wxTimerEvent& event);
 
  158  void OnIconize(wxIconizeEvent& event);
 
  159  void OnBellsFinished(wxCommandEvent& event);
 
  160  void OnFrameTenHzTimer(wxTimerEvent& event);
 
  162#ifdef wxHAS_POWER_EVENTS 
  163  void OnSuspending(wxPowerEvent& event);
 
  164  void OnSuspended(wxPowerEvent& event);
 
  165  void OnSuspendCancel(wxPowerEvent& event);
 
  166  void OnResume(wxPowerEvent& event);
 
  170  void UpdateAllFonts(
void);
 
  171  void PositionConsole(
void);
 
  172  void OnToolLeftClick(wxCommandEvent& event);
 
  175  void selectChartDisplay(
int type, 
int family);
 
  176  void applySettingsString(wxString settings);
 
  177  void setStringVP(wxString VPS);
 
  178  void InvalidateAllGL();
 
  179  void RefreshAllCanvas(
bool bErase = 
true);
 
  180  void CancelAllMouseRoute();
 
  181  void InvalidateAllQuilts();
 
  189  void DoSettings(
void);
 
  190  void DoSettingsNew(
void);
 
  193  int GetCanvasIndexUnderMouse();
 
  195  bool DropMarker(
bool atOwnShip = 
true);
 
  197  void TriggerRecaptureTimer();
 
  198  bool SetGlobalToolbarViz(
bool viz);
 
  200  void MouseEvent(wxMouseEvent& event);
 
  201  void CenterView(
ChartCanvas* cc, 
const LLBBox& bbox);
 
  205  void ProcessCanvasResize(
void);
 
  207  void BuildMenuBar(
void);
 
  208  void ApplyGlobalSettings(
bool bnewtoolbar);
 
  209  void RegisterGlobalMenuItems();
 
  210  void UpdateGlobalMenuItems();
 
  212  void DoOptionsDialog();
 
  213  void ProcessOptionsDialog(
int resultFlags, ArrayOfCDI* pNewDirArray);
 
  214  void PrepareOptionsClose(
options* settings, 
int settings_return_value);
 
  219  void ToggleFullScreen();
 
  227  void ToggleRocks(
void);
 
  234  void ToggleTestPause(
void);
 
  236  void SetENCDisplayCategory(
ChartCanvas* cc, 
enum _DisCat nset);
 
  239  Track* TrackOff(
bool do_add_point = 
false);
 
  240  void TrackDailyRestart(
void);
 
  241  bool ShouldRestartTrack();
 
  242  void ToggleColorScheme();
 
  243  void SetMenubarItemState(
int item_id, 
bool state);
 
  244  void SetMasterToolbarItemState(
int tool_id, 
bool state);
 
  246  void SetToolbarItemBitmaps(
int tool_id, wxBitmap* bitmap,
 
  247                             wxBitmap* bmpDisabled);
 
  248  void SetToolbarItemSVG(
int tool_id, wxString normalSVGfile,
 
  249                         wxString rolloverSVGfile, wxString toggledSVGfile);
 
  253  void SubmergeAllCanvasToolbars(
void);
 
  254  void SurfaceAllCanvasToolbars(
void);
 
  255  void SetAllToolbarScale(
void);
 
  256  void SetGPSCompassScale(
void);
 
  257  void InvalidateAllCanvasUndo();
 
  259  void RefreshGroupIndices(
void);
 
  261  double GetBestVPScale(
ChartBase* pchart);
 
  263  DataMonitor* GetDataMonitor()
 const { 
return m_data_monitor; }
 
  265  ColorScheme GetColorScheme();
 
  266  void SetAndApplyColorScheme(ColorScheme cs);
 
  268  void OnFrameTCTimer(wxTimerEvent& event);
 
  269  void OnFrameCOGTimer(wxTimerEvent& event);
 
  271  void HandleBasicNavMsg(std::shared_ptr<const BasicNavDataMsg> msg);
 
  272  void HandleGPSWatchdogMsg(std::shared_ptr<const GPSWatchdogMsg> msg);
 
  274  void ChartsRefresh();
 
  276  bool CheckGroup(
int igroup);
 
  277  double GetMag(
double a, 
double lat, 
double lon);
 
  278  bool SendJSON_WMM_Var_Request(
double lat, 
double lon, wxDateTime date);
 
  280  void DestroyPersistentDialogs();
 
  281  void TouchAISActive(
void);
 
  282  void UpdateAISTool(
void);
 
  287  wxStatusBar* m_pStatusBar;
 
  288  wxMenuBar* m_pMenuBar;
 
  296  wxTimer FrameTCTimer;
 
  298  wxTimer FrameCOGTimer;
 
  299  wxTimer MemFootTimer;
 
  300  wxTimer m_resizeTimer;
 
  301  wxTimer FrameTenHzTimer;
 
  307  int GetNextToolbarToolId() { 
return m_next_available_plugin_tool_id; }
 
  308  void RequestNewToolbarArgEvent(wxCommandEvent& WXUNUSED(event)) {
 
  309    return RequestNewMasterToolbar();
 
  311  void RequestNewToolbars(
bool bforcenew = 
false);
 
  313  void ActivateMOB(
void);
 
  314  void UpdateGPSCompassStatusBoxes(
bool b_force_new = 
false);
 
  315  void UpdateRotationState(
double rotation);
 
  317  bool UpdateChartDatabaseInplace(ArrayOfCDI& DirArray, 
bool b_force,
 
  319                                  const wxString& ChartListFileName);
 
  321  bool m_bdefer_resize;
 
  323  double COGTable[MAX_COG_AVERAGE_SECONDS];
 
  326  void SetChartUpdatePeriod();
 
  327  void CreateCanvasLayout(
bool b_useStoredSize = 
false);
 
  328  void LoadHarmonics();
 
  330  void SetCanvasSizes(wxSize frameSize);
 
  333  void RequestNewMasterToolbar(
bool bforcenew = 
true);
 
  334  bool CheckAndAddPlugInTool();
 
  335  bool AddDefaultPositionPlugInTools();
 
  337  void NotifyChildrenResize(
void);
 
  338  void UpdateCanvasConfigDescriptors();
 
  339  void ScheduleSettingsDialog();
 
  340  void ScheduleSettingsDialogNew();
 
  341  void ScheduleDeleteSettingsDialog();
 
  342  void ScheduleReconfigAndSettingsReload(
bool reload, 
bool new_dialog);
 
  343  static void RebuildChartDatabase();
 
  344  void PositionIENCToolbar();
 
  346  void InitAppMsgBusListener();
 
  348  void ReleaseApiListeners();
 
  349  void UpdateStatusBar(
void);
 
  350  void ConfigureStatusBar();
 
  353  void ProcessUnitTest();
 
  354  void ProcessQuitFlag();
 
  355  void ProcessDeferredTrackOn();
 
  356  void SendFixToPlugins();
 
  357  void ProcessAnchorWatch();
 
  358  void ProcessLogAndBells();
 
  359  void CalculateCOGAverage();
 
  360  void CheckToolbarPosition();
 
  362  void ODoSetSize(
void);
 
  365  void UpdateAllToolbars(ColorScheme cs);
 
  367  void FilterCogSog(
void);
 
  369  void ApplyGlobalColorSchemetoStatusBar(
void);
 
  371  bool ScrubGroupArray();
 
  373  void OnToolbarAnimateTimer(wxTimerEvent& event);
 
  374  bool CollapseGlobalToolbar();
 
  376  int m_StatusBarFieldCount;
 
  378  wxDateTime m_MMEAeventTime;
 
  379  unsigned long m_ulLastNMEATicktime;
 
  382  wxString m_last_reported_chart_name;
 
  383  wxString m_last_reported_chart_pubdate;
 
  385  wxString m_lastAISiconName;
 
  388  int m_next_available_plugin_tool_id;
 
  390  double COGFilterTable[MAX_COGSOG_FILTER_SECONDS];
 
  391  double SOGFilterTable[MAX_COGSOG_FILTER_SECONDS];
 
  393  int m_ChartUpdatePeriod;
 
  394  bool m_last_bGPSValid;
 
  395  bool m_last_bVelocityValid;
 
  398  wxString prev_locale;
 
  410  time_t m_last_track_rotation_ts;
 
  411  wxTimer ToolbarAnimateTimer;
 
  412  int m_nMasterToolCountShown;
 
  413  wxTimer m_recaptureTimer;
 
  415  std::unique_ptr<LoadErrorsDlgCtrl> m_load_errors_dlg_ctrl;
 
  426  bool m_need_new_options;
 
  427  wxArrayString pathArray;
 
  428  double restoreScale[4];
 
  429  unsigned int last_canvasConfig;
 
  432  DECLARE_EVENT_TABLE()