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 InitializeTrackRestart();
269 void ToggleColorScheme();
270 void SetMenubarItemState(
int item_id,
bool state);
271 void SetMasterToolbarItemState(
int tool_id,
bool state);
273 void SetToolbarItemBitmaps(
int tool_id, wxBitmap* bitmap,
274 wxBitmap* bmpDisabled);
275 void SetToolbarItemSVG(
int tool_id, wxString normalSVGfile,
276 wxString rolloverSVGfile, wxString toggledSVGfile);
280 void SubmergeAllCanvasToolbars(
void);
281 void SurfaceAllCanvasToolbars(
void);
282 void SetAllToolbarScale(
void);
283 void SetGPSCompassScale(
void);
284 void InvalidateAllCanvasUndo();
286 void RefreshGroupIndices(
void);
288 double GetBestVPScale(
ChartBase* pchart);
290 DataMonitor* GetDataMonitor()
const {
return m_data_monitor; }
292 ColorScheme GetColorScheme();
293 void SetAndApplyColorScheme(ColorScheme cs);
295 void OnFrameTCTimer(wxTimerEvent& event);
296 void OnFrameCOGTimer(wxTimerEvent& event);
298 void HandleBasicNavMsg(std::shared_ptr<const BasicNavDataMsg> msg);
299 void HandleGPSWatchdogMsg(std::shared_ptr<const GPSWatchdogMsg> msg);
301 void ChartsRefresh();
303 bool CheckGroup(
int igroup);
304 double GetMag(
double a,
double lat,
double lon);
305 bool SendJSON_WMM_Var_Request(
double lat,
double lon, wxDateTime date);
307 void DestroyPersistentDialogs();
308 void TouchAISActive(
void);
309 void UpdateAISTool(
void);
314 wxStatusBar* m_pStatusBar;
315 wxMenuBar* m_pMenuBar;
323 wxTimer FrameTCTimer;
325 wxTimer FrameCOGTimer;
326 wxTimer MemFootTimer;
327 wxTimer m_resizeTimer;
328 wxTimer FrameTenHzTimer;
334 int GetNextToolbarToolId() {
return m_next_available_plugin_tool_id; }
335 void RequestNewToolbarArgEvent(wxCommandEvent& WXUNUSED(event)) {
336 return RequestNewMasterToolbar();
338 void RequestNewToolbars(
bool bforcenew =
false);
340 void ActivateMOB(
void);
341 void UpdateGPSCompassStatusBoxes(
bool b_force_new =
false);
342 void UpdateRotationState(
double rotation);
344 bool UpdateChartDatabaseInplace(ArrayOfCDI& DirArray,
bool b_force,
346 const wxString& ChartListFileName);
348 bool m_bdefer_resize;
350 double COGTable[MAX_COG_AVERAGE_SECONDS];
353 void SetChartUpdatePeriod();
354 void CreateCanvasLayout(
bool b_useStoredSize =
false);
355 void LoadHarmonics();
357 void SetCanvasSizes(wxSize frameSize);
360 void RequestNewMasterToolbar(
bool bforcenew =
true);
361 bool CheckAndAddPlugInTool();
362 bool AddDefaultPositionPlugInTools();
364 void NotifyChildrenResize(
void);
365 void UpdateCanvasConfigDescriptors();
366 void ScheduleSettingsDialog();
367 void ScheduleSettingsDialogNew();
368 void ScheduleDeleteSettingsDialog();
369 void ScheduleReconfigAndSettingsReload(
bool reload,
bool new_dialog);
370 void ScheduleReloadCharts();
371 static void RebuildChartDatabase();
372 void PositionIENCToolbar();
374 void InitAppMsgBusListener();
376 void ReleaseApiListeners();
377 void UpdateStatusBar(
void);
378 void ConfigureStatusBar();
383 void ProcessUnitTest();
384 bool ProcessQuitFlag();
385 void ProcessDeferredTrackOn();
386 void SendFixToPlugins();
387 void ProcessAnchorWatch();
388 void ProcessLogAndBells();
389 void CalculateCOGAverage();
390 void CheckToolbarPosition();
392 void ODoSetSize(
void);
395 void UpdateAllToolbars(ColorScheme cs);
397 void FilterCogSog(
void);
399 void ApplyGlobalColorSchemetoStatusBar(
void);
401 bool ScrubGroupArray();
403 void OnToolbarAnimateTimer(wxTimerEvent& event);
404 bool CollapseGlobalToolbar();
406 int m_StatusBarFieldCount;
408 wxDateTime m_MMEAeventTime;
409 unsigned long m_ulLastNMEATicktime;
411 wxDateTime m_fix_start_time;
413 wxString m_last_reported_chart_name;
414 wxString m_last_reported_chart_pubdate;
416 wxString m_lastAISiconName;
419 int m_next_available_plugin_tool_id;
421 double COGFilterTable[MAX_COGSOG_FILTER_SECONDS];
422 double SOGFilterTable[MAX_COGSOG_FILTER_SECONDS];
424 int m_ChartUpdatePeriod;
425 bool m_last_bGPSValid;
426 bool m_last_bVelocityValid;
429 wxString prev_locale;
441 wxDateTime m_target_rotate_time;
443 wxTimer ToolbarAnimateTimer;
444 int m_nMasterToolCountShown;
445 wxTimer m_recaptureTimer;
447 std::unique_ptr<LoadErrorsDlgCtrl> m_load_errors_dlg_ctrl;
460 bool m_need_new_options;
461 wxArrayString pathArray;
462 double restoreScale[4];
463 unsigned int last_canvasConfig;
465 wxAuiDefaultDockArt* m_pauidockart;
467 void CenterAisTarget(
const std::shared_ptr<const AisTargetData>& ais_target);
469 DECLARE_EVENT_TABLE()