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);
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 ColorScheme GetColorScheme();
264 void SetAndApplyColorScheme(ColorScheme cs);
266 void OnFrameTCTimer(wxTimerEvent& event);
267 void OnFrameCOGTimer(wxTimerEvent& event);
269 void HandleBasicNavMsg(std::shared_ptr<const BasicNavDataMsg> msg);
270 void HandleGPSWatchdogMsg(std::shared_ptr<const GPSWatchdogMsg> msg);
272 void ChartsRefresh();
274 bool CheckGroup(
int igroup);
275 double GetMag(
double a,
double lat,
double lon);
276 bool SendJSON_WMM_Var_Request(
double lat,
double lon, wxDateTime date);
278 void DestroyPersistentDialogs();
279 void TouchAISActive(
void);
280 void UpdateAISTool(
void);
285 wxStatusBar* m_pStatusBar;
286 wxMenuBar* m_pMenuBar;
294 wxTimer FrameTCTimer;
296 wxTimer FrameCOGTimer;
297 wxTimer MemFootTimer;
298 wxTimer m_resizeTimer;
299 wxTimer FrameTenHzTimer;
305 int GetNextToolbarToolId() {
return m_next_available_plugin_tool_id; }
306 void RequestNewToolbarArgEvent(wxCommandEvent& WXUNUSED(event)) {
307 return RequestNewMasterToolbar();
309 void RequestNewToolbars(
bool bforcenew =
false);
311 void ActivateMOB(
void);
312 void UpdateGPSCompassStatusBoxes(
bool b_force_new =
false);
313 void UpdateRotationState(
double rotation);
315 bool UpdateChartDatabaseInplace(ArrayOfCDI& DirArray,
bool b_force,
317 const wxString& ChartListFileName);
319 bool m_bdefer_resize;
321 double COGTable[MAX_COG_AVERAGE_SECONDS];
324 void SetChartUpdatePeriod();
325 void CreateCanvasLayout(
bool b_useStoredSize =
false);
326 void LoadHarmonics();
328 void SetCanvasSizes(wxSize frameSize);
331 void RequestNewMasterToolbar(
bool bforcenew =
true);
332 bool CheckAndAddPlugInTool();
333 bool AddDefaultPositionPlugInTools();
335 void NotifyChildrenResize(
void);
336 void UpdateCanvasConfigDescriptors();
337 void ScheduleSettingsDialog();
338 void ScheduleSettingsDialogNew();
339 void ScheduleDeleteSettingsDialog();
340 void ScheduleReconfigAndSettingsReload(
bool reload,
bool new_dialog);
341 static void RebuildChartDatabase();
342 void PositionIENCToolbar();
344 void InitAppMsgBusListener();
346 void ReleaseApiListeners();
347 void UpdateStatusBar(
void);
348 void ConfigureStatusBar();
351 void ProcessUnitTest();
352 void ProcessQuitFlag();
353 void ProcessDeferredTrackOn();
354 void SendFixToPlugins();
355 void ProcessAnchorWatch();
356 void ProcessLogAndBells();
357 void CalculateCOGAverage();
358 void CheckToolbarPosition();
360 void ODoSetSize(
void);
363 void UpdateAllToolbars(ColorScheme cs);
365 void FilterCogSog(
void);
367 void ApplyGlobalColorSchemetoStatusBar(
void);
369 bool ScrubGroupArray();
371 void OnToolbarAnimateTimer(wxTimerEvent& event);
372 bool CollapseGlobalToolbar();
374 int m_StatusBarFieldCount;
376 wxDateTime m_MMEAeventTime;
377 unsigned long m_ulLastNMEATicktime;
380 wxString m_last_reported_chart_name;
381 wxString m_last_reported_chart_pubdate;
383 wxString m_lastAISiconName;
386 int m_next_available_plugin_tool_id;
388 double COGFilterTable[MAX_COGSOG_FILTER_SECONDS];
389 double SOGFilterTable[MAX_COGSOG_FILTER_SECONDS];
391 int m_ChartUpdatePeriod;
392 bool m_last_bGPSValid;
393 bool m_last_bVelocityValid;
395 wxString prev_locale;
407 time_t m_last_track_rotation_ts;
408 wxTimer ToolbarAnimateTimer;
409 int m_nMasterToolCountShown;
410 wxTimer m_recaptureTimer;
412 std::unique_ptr<LoadErrorsDlgCtrl> m_load_errors_dlg_ctrl;
423 bool m_need_new_options;
424 wxArrayString pathArray;
425 double restoreScale[4];
426 unsigned int last_canvasConfig;
428 DECLARE_EVENT_TABLE()