105 wxStaticText *m_staticText1;
106 wxStaticText *m_staticText5;
107 wxStaticText *m_staticText2;
108 wxStaticText *m_staticText6;
109 wxStaticText *m_staticText3;
110 wxStaticText *m_staticText4;
111 wxStaticLine *m_staticline1;
112 wxStaticLine *m_staticline2;
113 wxStaticText *m_staticText7;
114 wxStaticText *m_staticText9;
115 wxStaticText *m_staticText10;
116 wxStdDialogButtonSizer *m_sdbSizer3;
117 wxButton *m_sdbSizer3OK;
118 wxButton *m_sdbSizer3Cancel;
121 virtual void OnSetdefault(wxCommandEvent &event);
124 wxFontPickerCtrl *m_fontPicker2;
125 wxColourPickerCtrl *m_colourPicker1;
126 wxFontPickerCtrl *m_fontPicker4;
127 wxColourPickerCtrl *m_colourPicker2;
128 wxFontPickerCtrl *m_fontPicker5;
129 wxFontPickerCtrl *m_fontPicker6;
130 wxColourPickerCtrl *m_colourPicker3;
131 wxColourPickerCtrl *m_colourPicker4;
135 wxWindowID
id = wxID_ANY,
136 const wxString &title = wxT(
"Edit Instrument"),
137 const wxPoint &pos = wxDefaultPosition,
138 const wxSize &size = wxSize(-1, -1),
139 long style = wxDEFAULT_DIALOG_STYLE);
147 wxString caption, wxString orientation,
149 wxArrayOfInstrumentProperties inProberty) {
150 m_pDashboardWindow = dashboard_window;
152 m_sCaption = caption;
153 m_sOrientation = orientation;
154 m_aInstrumentList = inst;
155 m_aInstrumentPropertyList = inProberty;
156 m_bIsVisible =
false;
157 m_bIsDeleted =
false;
161 for (
unsigned int i = 0; i < m_aInstrumentPropertyList.GetCount(); i++) {
173 wxString m_sOrientation;
174 wxArrayInt m_aInstrumentList;
175 wxArrayOfInstrumentProperties m_aInstrumentPropertyList;
177 wxSize m_conf_best_size;
178 wxSize m_persist_size;
220 int GetAPIVersionMajor();
221 int GetAPIVersionMinor();
222 int GetPlugInVersionMajor();
223 int GetPlugInVersionMinor();
225 wxString GetCommonName();
226 wxString GetShortDescription();
227 wxString GetLongDescription();
232 void SetCursorLatLon(
double lat,
double lon);
233 int GetToolbarToolCount(
void);
234 void OnToolbarToolCallback(
int id);
235 void ShowPreferencesDialog(wxWindow *parent);
236 void SetColorScheme(PI_ColorScheme cs);
237 void OnPaneClose(wxAuiManagerEvent &event);
238 void UpdateAuiStatus(
void);
239 bool SaveConfig(
void);
240 void PopulateContextMenu(wxMenu *menu);
241 void ShowDashboard(
size_t id,
bool visible);
242 int GetToolbarItemId() {
return m_toolbar_item_id; }
243 int GetDashboardWindowShownCount();
244 void SetPluginMessage(wxString &message_id, wxString &message_body);
247 bool LoadConfig(
void);
248 void LoadFont(wxFont **target, wxString native_info);
250 void ApplyConfig(
void);
251 void SendSentenceToAllInstruments(DASH_CAP st,
double value, wxString
unit);
252 void SendSatInfoToAllInstruments(
int cnt,
int seq, wxString talk,
254 void SendUtcTimeToAllInstruments(wxDateTime value);
256 void CalculateAndUpdateTWDS(
double awsKnots,
double awaDegrees);
258 void ParseSignalK(wxString &msg);
260 void updateSKItem(
wxJSONValue &item, wxString &talker, wxString &sfixtime);
273 std::shared_ptr<ObservableListener> listener_127245;
274 std::shared_ptr<ObservableListener> listener_127257;
275 std::shared_ptr<ObservableListener> listener_128259;
276 std::shared_ptr<ObservableListener> listener_128267;
277 std::shared_ptr<ObservableListener> listener_128275;
278 std::shared_ptr<ObservableListener> listener_128777;
279 std::shared_ptr<ObservableListener> listener_129029;
280 std::shared_ptr<ObservableListener> listener_129540;
281 std::shared_ptr<ObservableListener> listener_130306;
282 std::shared_ptr<ObservableListener> listener_130310;
283 std::shared_ptr<ObservableListener> listener_130313;
285 std::string prio127245;
286 std::string prio127257;
287 std::string prio128259;
288 std::string prio128267;
289 std::string prio129029;
290 std::string prioN2kPGNsat;
291 std::string prio130306;
295 wxFileConfig *m_pconfig;
296 wxAuiManager *m_pauimgr;
297 int m_toolbar_item_id;
299 wxArrayOfDashboard m_ArrayOfDashboardWindow;
304 short mPriPosition, mPriCOGSOG, mPriHeadingM, mPriHeadingT;
305 short mPriVar, mPriDateTime, mPriAWA, mPriTWA, mPriDepth;
306 short mPriSTW, mPriWTP, mPriATMP, mPriWDN, mPriSatStatus;
307 short mPriMDA, mPriHUM;
310 short mPriSatUsed, mPriAlt, mPriRSA, mPriPitchRoll;
330 wxDateTime mUTCDateTime;
331 int m_config_version;
332 wxString m_VDO_accumulator;
341 int mDPT_DBT_Watchdog;
368 wxArrayOfDashboard config);
371 void OnCloseDialog(wxCloseEvent &event);
372 void OnDashboardSelected(wxListEvent &event);
373 void OnDashboardAdd(wxCommandEvent &event);
374 void OnDashboardDelete(wxCommandEvent &event);
375 void OnInstrumentSelected(wxListEvent &event);
376 void OnInstrumentAdd(wxCommandEvent &event);
377 void OnInstrumentEdit(wxCommandEvent &event);
378 void OnInstrumentDelete(wxCommandEvent &event);
379 void OnInstrumentUp(wxCommandEvent &event);
380 void OnInstrumentDown(wxCommandEvent &event);
381 void OnDashboarddefaultFont(wxCommandEvent &event);
382 void SaveDashboardConfig();
383 void RecalculateSize(
void);
385 wxArrayOfDashboard m_Config;
386 wxFontPickerCtrl *m_pFontPickerTitle;
387 wxFontPickerCtrl *m_pFontPickerData;
388 wxFontPickerCtrl *m_pFontPickerLabel;
389 wxFontPickerCtrl *m_pFontPickerSmall;
390 wxSpinCtrl *m_pSpinSpeedMax;
391 wxSpinCtrl *m_pSpinCOGDamp;
392 wxSpinCtrl *m_pSpinSOGDamp;
393 wxChoice *m_pChoiceUTCOffset;
394 wxChoice *m_pChoiceSpeedUnit;
395 wxChoice *m_pChoiceDepthUnit;
396 wxSpinCtrlDouble *m_pSpinDBTOffset;
397 wxChoice *m_pChoiceDistanceUnit;
398 wxChoice *m_pChoiceWindSpeedUnit;
399 wxCheckBox *m_pUseTrueWinddata;
400 wxChoice *m_pChoiceTempUnit;
403 void UpdateDashboardButtonsState(
void);
404 void UpdateButtonsState(
void);
406 wxListCtrl *m_pListCtrlDashboards;
407 wxBitmapButton *m_pButtonAddDashboard;
408 wxBitmapButton *m_pButtonDeleteDashboard;
409 wxPanel *m_pPanelDashboard;
410 wxTextCtrl *m_pTextCtrlCaption;
411 wxCheckBox *m_pCheckBoxIsVisible;
412 wxChoice *m_pChoiceOrientation;
413 wxListCtrl *m_pListCtrlInstruments;
414 wxButton *m_pButtonAdd;
415 wxButton *m_pButtonEdit;
416 wxButton *m_pButtonDelete;
417 wxButton *m_pButtonUp;
418 wxButton *m_pButtonDown;
419 wxButton *m_pButtondefaultFont;
445 DashboardWindow(wxWindow *pparent, wxWindowID
id, wxAuiManager *auimgr,
450 void SetColorScheme(PI_ColorScheme cs);
451 void SetSizerOrientation(
int orient);
452 int GetSizerOrientation();
453 void OnSize(wxSizeEvent &evt);
454 void OnContextMenu(wxContextMenuEvent &evt);
455 void OnContextMenuSelect(wxCommandEvent &evt);
457 void OnMouseEvent(wxMouseEvent &event);
459#ifdef __OCPN__ANDROID__
460 void OnEvtPinchGesture(wxQT_PinchGestureEvent &event);
461 void OnEvtPanGesture(wxQT_PanGestureEvent &event);
464 bool isInstrumentListEqual(
const wxArrayInt &list);
465 void SetInstrumentList(wxArrayInt list,
466 wxArrayOfInstrumentProperties *InstrumentPropertyList);
467 void SendSentenceToAllInstruments(DASH_CAP st,
double value, wxString
unit);
468 void SendSatInfoToAllInstruments(
int cnt,
int seq, wxString talk,
470 void SendUtcTimeToAllInstruments(wxDateTime value);
473 void ChangePaneOrientation(
int orient,
bool updateAUImgr,
int fpx = 100,
482 wxPoint m_resizeStartPoint;
483 wxSize m_resizeStartSize;
488 wxAuiManager *m_pauimgr;
492 wxBoxSizer *itemBoxSizer;
493 wxArrayOfInstrument m_ArrayOfInstrument;
508 OCPNFontButton(wxWindow *parent, wxWindowID
id,
const wxFontData &initial,
509 const wxPoint &pos = wxDefaultPosition,
510 const wxSize &size = wxDefaultSize,
511 long style = wxFONTBTN_DEFAULT_STYLE,
512 const wxValidator &validator = wxDefaultValidator,
513 const wxString &name = wxFontPickerWidgetNameStr) {
514 Create(parent,
id, initial, pos, size, style, validator, name);
517 virtual wxColour GetSelectedColour()
const {
return m_data.GetColour(); }
518 virtual void SetSelectedFont(
const wxFont &font) {
519 m_data.SetChosenFont(font);
520 m_selectedFont = m_data.GetChosenFont();
523 virtual void SetSelectedColour(
const wxColour &colour) {
524 m_data.SetColour(colour);
535 wxFontData *GetFontData() {
return &m_data; }
538 wxFont GetSelectedFont()
const {
return m_selectedFont; }
541 bool Create(wxWindow *parent, wxWindowID
id,
const wxFontData &initial,
542 const wxPoint &pos = wxDefaultPosition,
543 const wxSize &size = wxDefaultSize,
544 long style = wxFONTBTN_DEFAULT_STYLE,
545 const wxValidator &validator = wxDefaultValidator,
546 const wxString &name = wxFontPickerWidgetNameStr);
548 void OnButtonClick(wxCommandEvent &);
555 wxFont m_selectedFont;