36 #include <wx/listbook.h>
37 #include <wx/dirctrl.h>
38 #include <wx/spinctrl.h>
39 #include <wx/listctrl.h>
40 #include <wx/choice.h>
41 #include <wx/collpane.h>
42 #include <wx/clrpicker.h>
43 #include <wx/colourdata.h>
44 #include "connections_dialog.h"
46 #if wxUSE_TIMEPICKCTRL
47 #include <wx/timectrl.h>
53 #include "time_textbox.h"
58 #if wxCHECK_VERSION(2, 9, 0)
61 #include "scrollingdialog.h"
65 #include "pluginmanager.h"
67 #ifndef __OCPN__ANDROID__
68 #define __OCPN__OPTIONS_USE_LISTBOOK__
72 class wxGenericDirCtrl;
77 class ChartGroupArray;
88 #define ID_DIALOG 10001
90 #define SYMBOL_OPTIONS_STYLE \
91 wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU | wxCLOSE_BOX | wxSTAY_ON_TOP
93 #define SYMBOL_OPTIONS_STYLE \
94 wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU | wxCLOSE_BOX
96 #define SYMBOL_OPTIONS_TITLE _("Options")
97 #define SYMBOL_OPTIONS_IDNAME ID_DIALOG
98 #define SYMBOL_OPTIONS_SIZE wxSize(500, 500)
99 #define SYMBOL_OPTIONS_POSITION wxDefaultPosition
104 ID_AUTOANCHORMARKBOX1,
116 ID_CHECK_DISPLAYGRID,
120 ID_CHOICE_FONTELEMENT,
133 ID_FSTOOLBARCHECKBOX,
167 ID_SUPERSCAMINCHECKBOX,
170 ID_DISTANCEUNITSCHOICE,
172 ID_WINDSPEEDUNITCHOICE,
175 ID_SHOWDEPTHUNITSBOX1,
188 ID_TRANSTOOLBARCHECKBOX,
194 ID_NATIONALTEXTCHECKBOX,
200 ID_SIZEMANUALRADIOBUTTON,
201 ID_OPWAYPOINTRANGERINGS,
207 ID_TRACKROTATECOMPUTER,
212 ID_SOGCOGFROMLLCHECKBOX,
213 ID_SOGCOGDAMPINTTEXTCTRL,
216 ID_DEFAULT_BOAT_SPEED,
220 ID_CONFIGEDIT_CANCEL,
232 #define GENERIC_CHANGED 1
233 #define S52_CHANGED 1 << 1
234 #define FONT_CHANGED 1 << 2
235 #define FORCE_UPDATE 1 << 3
236 #define VISIT_CHARTS 1 << 4
237 #define LOCALE_CHANGED 1 << 5
238 #define TOOLBAR_CHANGED 1 << 6
239 #define CHANGE_CHARTS 1 << 7
240 #define SCAN_UPDATE 1 << 8
241 #define GROUPS_CHANGED 1 << 9
242 #define STYLE_CHANGED 1 << 10
243 #define TIDES_CHANGED 1 << 11
244 #define GL_CHANGED 1 << 12
245 #define REBUILD_RASTER_CACHE 1 << 13
246 #define NEED_NEW_OPTIONS 1 << 14
247 #define PARSE_ENC 1 << 15
248 #define CONFIG_CHANGED 1 << 16
251 #define wxCLOSE_BOX 0x1000
253 #ifndef wxFIXED_MINSIZE
254 #define wxFIXED_MINSIZE 0
257 #include <wx/arrimpl.cpp>
258 WX_DEFINE_ARRAY_PTR(wxGenericDirCtrl *, ArrayOfDirCtrls);
275 public wxScrollingDialog
279 explicit options(wxWindow *parent, wxWindowID
id = SYMBOL_OPTIONS_IDNAME,
280 const wxString &caption = SYMBOL_OPTIONS_TITLE,
281 const wxPoint &pos = SYMBOL_OPTIONS_POSITION,
282 const wxSize &size = SYMBOL_OPTIONS_SIZE,
283 long style = SYMBOL_OPTIONS_STYLE);
286 #if wxCHECK_VERSION(3, 0, 0)
287 bool SendIdleEvents(wxIdleEvent &event);
289 void SetInitialPage(
int page_sel,
int sub_page = -1);
292 void OnClose(wxCloseEvent &event);
294 void CreateListbookIcons();
295 void CreateControls(
void);
296 size_t CreatePanel(
const wxString &title);
297 wxScrolledWindow *AddPage(
size_t parent,
const wxString &title);
298 bool DeletePluginPage(wxScrolledWindow *page);
299 void SetColorScheme(ColorScheme cs);
300 void RecalculateSize(
int hint_x,
int hint_y);
302 void SetInitChartDir(
const wxString &dir) { m_init_chart_dir = dir; }
303 void SetInitialSettings(
void);
304 void SetInitialVectorSettings(
void);
306 void SetCurrentDirList(ArrayOfCDI p) { m_CurrentDirList = p; }
307 void SetWorkDirListPtr(ArrayOfCDI *p) { m_pWorkDirList = p; }
308 ArrayOfCDI *GetWorkDirListPtr(
void) {
return m_pWorkDirList; }
310 void AddChartDir(
const wxString &dir);
312 void UpdateDisplayedChartDirList(ArrayOfCDI p);
313 void UpdateOptionsUnits(
void);
315 void SetConfigPtr(
MyConfig *p) { m_pConfig = p; }
316 void OnDebugcheckbox1Click(wxCommandEvent &event);
317 void OnDirctrlSelChanged(wxTreeEvent &event);
318 void OnButtonaddClick(wxCommandEvent &event);
319 void OnButtondeleteClick(wxCommandEvent &event);
320 void OnButtonParseENC(wxCommandEvent &event);
321 void OnButtoncompressClick(wxCommandEvent &event);
322 void OnButtonmigrateClick(wxCommandEvent &event);
323 void OnButtonEcdisHelp(wxCommandEvent &event);
324 void OnRadioboxSelected(wxCommandEvent &event);
325 void OnApplyClick(wxCommandEvent &event);
326 void OnXidOkClick(wxCommandEvent &event);
327 void OnCancelClick(wxCommandEvent &event);
328 void OnChooseFont(wxCommandEvent &event);
329 void OnFontChoice(wxCommandEvent &event);
330 void OnCPAWarnClick(wxCommandEvent &event);
331 void OnSyncCogPredClick(wxCommandEvent &event);
332 void OnSizeAutoButton(wxCommandEvent &event);
333 void OnSizeManualButton(wxCommandEvent &event);
335 #if defined(__WXGTK__) || defined(__WXQT__)
336 void OnChooseFontColor(wxCommandEvent &event);
338 void OnGLClicked(wxCommandEvent &event);
339 void OnOpenGLOptions(wxCommandEvent &event);
340 void OnDisplayCategoryRadioButton(wxCommandEvent &event);
341 void OnButtonClearClick(wxCommandEvent &event);
342 void OnButtonSelectClick(wxCommandEvent &event);
343 void OnButtonSetStd(wxCommandEvent &event);
345 void OnPageChange(wxListbookEvent &event);
346 void OnTopNBPageChange(wxNotebookEvent &event);
347 void OnSubNBPageChange(wxNotebookEvent &event);
348 void DoOnPageChange(
size_t page);
350 wxString SelectSoundFile();
351 void OnButtonSelectSound(wxCommandEvent &event);
352 void OnButtonTestSound(wxCommandEvent &event);
354 void OnShowGpsWindowCheckboxClick(wxCommandEvent &event);
355 void OnZTCCheckboxClick(wxCommandEvent &event);
356 void OnRadarringSelect(wxCommandEvent &event);
357 void OnWaypointRangeRingSelect(wxCommandEvent &event);
358 void OnShipTypeSelect(wxCommandEvent &event);
359 void OnButtonGroups(wxCommandEvent &event);
360 void OnInsertTideDataLocation(wxCommandEvent &event);
361 void OnRemoveTideDataLocation(wxCommandEvent &event);
362 void OnCharHook(wxKeyEvent &event);
363 void OnChartsPageChange(wxListbookEvent &event);
364 void OnChartDirListSelect(wxCommandEvent &event);
365 void OnUnitsChoice(wxCommandEvent &event);
367 void UpdateWorkArrayFromDisplayPanel(
void);
368 ArrayOfCDI GetSelectedChartDirs();
369 ArrayOfCDI GetUnSelectedChartDirs();
370 void SetDirActionButtons();
372 void OnCreateConfig(wxCommandEvent &event);
373 void OnEditConfig(wxCommandEvent &event);
374 void OnDeleteConfig(wxCommandEvent &event);
375 void OnApplyConfig(wxCommandEvent &event);
376 void SetConfigButtonState();
377 void ClearConfigList();
378 void BuildConfigList();
379 void OnConfigMouseSelected(wxMouseEvent &event);
380 void OnDialogInit(wxInitDialogEvent& event);
383 bool GetNeedNew() {
return m_bneedNew; }
384 void SetNeedNew(
bool bnew) { m_bneedNew = bnew; }
385 int GetScrollRate() {
return m_scrollRate; }
386 void SetForceNewToolbarOnCancel(
bool val) { m_bForceNewToolbaronCancel = val; }
388 wxArrayString *GetSerialArray(){
return m_pSerialArray; }
391 static bool ShowToolTips(
void);
393 #ifdef __OCPN__OPTIONS_USE_LISTBOOK__
394 wxListbook *m_pListbook;
396 wxNotebook *m_pListbook;
399 size_t m_pageDisplay, m_pageConnections, m_pageCharts, m_pageShips;
400 size_t m_pageUI, m_pagePlugins;
401 int lastPage, lastSubPage;
402 wxPoint lastWindowPos;
403 wxSize lastWindowSize;
404 wxButton *m_ApplyButton, *m_OKButton, *m_CancelButton;
406 ChartGroupArray *m_pGroupArray;
407 int m_groups_changed;
410 wxSizerFlags inputFlags, verticleInputFlags, labelFlags, groupInputFlags;
411 wxSizerFlags groupLabelFlags, groupLabelFlagsHoriz;
414 wxScrolledWindow *pDisplayPanel;
415 wxCheckBox *pShowStatusBar, *pShowMenuBar, *pShowChartBar, *pShowCompassWin;
416 wxCheckBox *pPrintShowIcon, *pCDOOutlines, *pSDepthUnits, *pSDisplayGrid;
417 wxCheckBox *pAutoAnchorMark, *pCDOQuilting, *pCBRaster, *pCBVector;
418 wxCheckBox *pCBCM93, *pCBLookAhead, *pSkewComp, *pOpenGL, *pSmoothPanZoom;
419 wxCheckBox *pFullScreenQuilt, *pMobile, *pResponsive, *pOverzoomEmphasis;
420 wxCheckBox *pOZScaleVector, *pToolbarAutoHideCB, *pInlandEcdis, *pRollover;
421 wxCheckBox *pZoomButtons, *pChartBarEX;
422 wxTextCtrl *pCOGUPUpdateSecs, *m_pText_OSCOG_Predictor, *pScreenMM;
423 wxTextCtrl *pToolbarHideSecs, *m_pText_OSHDT_Predictor;
425 wxTextCtrl *pCmdSoundString;
427 wxChoice *m_pShipIconType, *m_pcTCDatasets;
428 wxSlider *m_pSlider_Zoom_Raster, *m_pSlider_GUI_Factor, *m_pSlider_Chart_Factor,
429 *m_pSlider_Ship_Factor, *m_pSlider_Text_Factor, *m_pSlider_ENCText_Factor;
430 wxSlider *m_pMouse_Zoom_Slider;
431 wxSlider *m_pSlider_Zoom_Vector;
432 wxSlider *m_pSlider_CM93_Zoom;
434 wxCheckBox *pSLiveETA;
435 wxTextCtrl *pSDefaultBoatSpeed;
437 wxRadioButton *pCBCourseUp, *pCBNorthUp, *pRBSizeAuto, *pRBSizeManual;
441 wxStaticText *itemStaticTextUserVar;
442 wxStaticText *itemStaticTextUserVar2;
443 wxButton *m_configDeleteButton, *m_configApplyButton;
445 void OnAISRolloverClick(wxCommandEvent &event);
446 void UpdateChartDirList();
448 void OnCanvasConfigSelectClick(
int ID,
bool selected);
456 wxBoxSizer *vectorPanel;
457 wxScrolledWindow *ps57Ctl;
461 wxChoice *pDispCat, *pPointStyle, *pBoundStyle, *p24Color;
462 wxButton *itemButtonClearList, *itemButtonSelectList, *itemButtonSetStd;
463 wxCheckBox *pCheck_SOUNDG, *pCheck_META, *pCheck_SHOWIMPTEXT;
464 wxCheckBox *pCheck_SCAMIN, *pCheck_SuperSCAMIN;
465 wxCheckBox *pCheck_ATONTEXT, *pCheck_LDISTEXT;
466 wxCheckBox *pCheck_XLSECTTEXT, *pCheck_DECLTEXT, *pCheck_NATIONALTEXT;
467 wxCheckBox *pSEnableCM93Offset;
468 wxTextCtrl *m_ShallowCtl, *m_SafetyCtl, *m_DeepCtl;
469 wxStaticText *m_depthUnitsShal, *m_depthUnitsSafe, *m_depthUnitsDeep;
473 wxChoice *pSDMMFormat, *pDistanceFormat, *pSpeedFormat, *pDepthUnitSelect,
474 *pTempFormat, *pWindSpeedFormat;
475 wxCheckBox *pCBTrueShow, *pCBMagShow;
479 wxStaticBoxSizer *activeSizer;
480 wxBoxSizer *chartPanel;
483 ArrayOfCDI ActiveChartArray;
485 wxStaticBox *itemActiveChartStaticBox;
486 wxCheckBox *pUpdateCheckBox, *pScanCheckBox;
487 wxButton *pParseENCButton;
488 wxButton *m_removeBtn, *m_compressBtn;
489 wxButton *m_migrateBtn;
492 wxBoxSizer *boxSizerCharts;
493 wxScrolledWindow *m_scrollWinChartList;
494 wxScrolledWindow* chartPanelWin;
495 wxBoxSizer* cmdButtonSizer;
496 wxStaticBox* loadedBox;
497 std::vector<OCPNChartDirPanel *> panelVector;
498 wxArrayString activeChartList;
501 wxScrolledWindow *m_ChartDisplayPage;
504 wxCheckBox *m_pCheck_CPA_Max, *m_pCheck_CPA_Warn, *m_pCheck_CPA_WarnT;
505 wxCheckBox *m_pCheck_Mark_Lost, *m_pCheck_Remove_Lost;
506 wxCheckBox *m_pCheck_Show_COG, *m_pCheck_Sync_OCOG_ACOG;
507 wxCheckBox *m_pCheck_Show_Tracks, *m_pCheck_Hide_Moored,
508 *m_pCheck_Scale_Priority;
509 wxCheckBox *m_pCheck_AlertDialog, *m_pCheck_AlertAudio;
510 wxCheckBox *m_pCheck_Alert_Moored, *m_pCheck_Rollover_Class;
511 wxCheckBox *m_pCheck_Rollover_COG, *m_pCheck_Rollover_CPA;
512 wxCheckBox *m_pCheck_Ack_Timout, *m_pCheck_Show_Area_Notices;
513 wxCheckBox *m_pCheck_Draw_Target_Size, *m_pCheck_Draw_Realtime_Prediction;
514 wxCheckBox *m_pCheck_Show_Target_Name;
515 wxChoice *m_pWplAction;
516 wxCheckBox *m_pCheck_use_Wpl, *m_pCheck_ShowAllCPA;
517 wxTextCtrl *m_pText_CPA_Max, *m_pText_CPA_Warn, *m_pText_CPA_WarnT;
518 wxTextCtrl *m_pText_Mark_Lost, *m_pText_Remove_Lost, *m_pText_COG_Predictor;
519 wxTextCtrl *m_pText_Track_Length, *m_pText_Moored_Speed,
520 *m_pText_Scale_Priority;
521 wxTextCtrl *m_pText_ACK_Timeout, *m_pText_Show_Target_Name_Scale;
522 wxTextCtrl *m_pText_RealtPred_Speed;
525 wxScrolledWindow *m_DisplayConfigsPage;
529 wxStaticText *m_Text_def_boat_speed;
532 wxScrolledWindow *m_scrollWinConfigList;
533 wxStaticText *m_templateTitleText;
534 wxStaticText *m_staticTextLastAppled;
535 wxStaticBoxSizer *m_templateStatusBoxSizer;
538 wxFlexGridSizer *realSizes;
539 wxTextCtrl *m_pOSLength, *m_pOSWidth, *m_pOSGPSOffsetX, *m_pOSGPSOffsetY;
540 wxTextCtrl *m_pOSMinSize, *m_pText_ACRadius;
541 wxStaticBoxSizer *dispOptions, *dispWaypointOptions;
542 wxScrolledWindow *itemPanelShip, *itemPanelRoutes;
543 wxBoxSizer *ownShip, *Routes;
544 wxCheckBox *pShowshipToActive;
545 wxChoice *m_shipToActiveStyle, *m_shipToActiveColor;
549 wxCheckBox *pScaMinChckB, *pScaMinOverruleChckB;
550 wxTextCtrl *m_pText_ScaMin;
553 wxBoxSizer *m_itemBoxSizerFontPanel;
554 wxChoice *m_itemFontElementListBox, *m_itemStyleListBox, *m_itemLangListBox;
555 wxStaticText *m_textSample;
559 wxComboBox *m_itemAISListBox;
565 wxScrolledWindow *itemPanelPlugins;
566 wxBoxSizer *itemBoxSizerPanelPlugins;
567 wxFlexGridSizer *radarGrid, *waypointradarGrid;
568 wxChoice *pNavAidRadarRingsNumberVisible, *pWaypointRangeRingsNumber;
570 wxChoice *m_itemRadarRingsUnits, *m_itemWaypointRangeRingsUnits;
573 wxChoice *pTrackPrecision;
574 wxTextCtrl *pNavAidRadarRingsStep, *pWaypointRangeRingsStep;
575 wxCheckBox *pSogCogFromLLCheckBox;
576 wxSpinCtrl *pSogCogFromLLDampInterval;
577 wxTextCtrl *m_pText_TP_Secs, *m_pText_TP_Dist;
578 wxCheckBox *pWayPointPreventDragging, *pConfirmObjectDeletion;
579 wxCheckBox *pEnableZoomToCursor, *pPreserveScale, *pPlayShipsBells;
580 wxCheckBox *pTransparentToolbar;
581 wxCheckBox *pAdvanceRouteWaypointOnArrivalOnly, *pTrackShowIcon;
582 wxCheckBox *pTrackDaily, *pTrackHighlite;
583 wxStaticText *pStatic_CallSign;
585 #if wxCHECK_VERSION(2, 9, 0)
586 #if wxUSE_TIMEPICKCTRL
590 wxTimePickerCtrl *pTrackRotateTime;
594 wxRadioButton *pTrackRotateComputerTime, *pTrackRotateUTC, *pTrackRotateLMT;
596 wxChoice *pSoundDeviceIndex;
597 wxStaticText *stSoundDeviceIndex;
599 wxArrayPtrVoid OBJLBoxArray;
600 wxString m_init_chart_dir;
601 wxArrayString *m_pSerialArray;
603 ArrayOfCDI m_CurrentDirList, *m_pWorkDirList;
608 bool m_bForceNewToolbaronCancel;
616 void OnUXAudioEnableButtonClickAIS(wxCommandEvent &event);
617 void OnUXAudioEnableButtonClickSART(wxCommandEvent &event);
618 void OnUXAudioEnableButtonClickDSC(wxCommandEvent &event);
626 void CreatePanel_MMSI(
size_t parent,
int border_size,
int group_item_spacing);
627 void CreatePanel_AIS(
size_t parent,
int border_size,
int group_item_spacing);
628 void CreatePanel_Ownship(
size_t parent,
int border_size,
629 int group_item_spacing);
630 void CreatePanel_NMEA(
size_t parent,
int border_size,
int group_item_spacing);
631 void CreatePanel_ChartsLoad(
size_t parent,
int border_size,
632 int group_item_spacing);
633 void CreatePanel_VectorCharts(
size_t parent,
int border_size,
634 int group_item_spacing);
635 void CreatePanel_TidesCurrents(
size_t parent,
int border_size,
636 int group_item_spacing);
637 void CreatePanel_ChartGroups(
size_t parent,
int border_size,
638 int group_item_spacing);
639 void CreatePanel_Display(
size_t parent,
int border_size,
640 int group_item_spacing);
641 void CreatePanel_UI(
size_t parent,
int border_size,
int group_item_spacing);
642 void CreatePanel_Units(
size_t parent,
int border_size,
643 int group_item_spacing);
644 void CreatePanel_Sounds(
size_t parent,
int border_size,
645 int group_item_spacing);
646 void CreatePanel_Advanced(
size_t parent,
int border_size,
647 int group_item_spacing);
648 void CreatePanel_Configs(
size_t parent,
int border_size,
649 int group_item_spacing);
650 void CreatePanel_Routes(
size_t parent,
int border_size,
651 int group_item_spacing);
653 void OnAlertEnableButtonClick(wxCommandEvent &event);
654 void OnAlertAudioEnableButtonClick(wxCommandEvent &event);
656 void UpdateTemplateTitleText();
657 void CheckDeviceAccess(wxString &path);
659 wxListCtrl *tcDataSelected;
660 std::vector<int> marinersStdXref;
662 wxImageList *m_topImgList;
664 wxCheckBox* m_persist_active_route_chkbox;
665 wxScrolledWindow *m_pNMEAForm;
666 void resetMarStdList(
bool bsetConfig,
bool bsetStd);
672 wxNotebookPage *m_groupsPage;
676 wxSize m_small_button_size;
679 int m_fontHeight, m_scrollRate;
683 wxBoxSizer *m_boxSizerConfigs;
684 wxColour m_panelBackgroundUnselected;
685 wxString m_selectedConfigPanelGUID;
686 wxSize m_colourPickerDefaultSize;
691 std::shared_ptr<ConnectionsDialog>comm_dialog;
693 DECLARE_EVENT_TABLE()
699 wxBitmap &bmp,
const wxPoint &pos = wxDefaultPosition,
700 const wxSize &size = wxDefaultSize);
703 void OnMouseSelected(wxMouseEvent &event);
704 void SetSelected(
bool selected);
705 void OnPaint(wxPaintEvent &event);
707 bool GetSelected() {
return m_bSelected; }
712 wxColour m_boxColour;
713 wxBitmap m_bmpNormal;
716 DECLARE_EVENT_TABLE()
724 void CreatePanel(
size_t parent,
int border_size,
int group_item_spacing);
725 void CompletePanel(
void);
726 void SetDBDirs(ArrayOfCDI &array) { m_db_dirs = array; }
727 void SetGroupArray(ChartGroupArray *pGroupArray) {
728 m_pGroupArray = pGroupArray;
730 void SetInitialSettings(
void);
731 void CompleteInitialSettings(
void);
732 void PopulateTrees(
void);
733 void PopulateTreeCtrl(wxTreeCtrl *ptc,
const wxArrayString &dir_array,
734 const wxColour &col, wxFont *pFont = NULL);
735 void BuildNotebookPages(ChartGroupArray *pGroupArray);
736 void EmptyChartGroupArray(ChartGroupArray *s);
737 void ClearGroupPages();
739 void OnNodeExpanded(wxTreeEvent &event);
740 void OnAvailableSelection(wxTreeEvent &event);
741 void OnInsertChartItem(wxCommandEvent &event);
742 void OnRemoveChartItem(wxCommandEvent &event);
743 void OnGroupPageChange(wxNotebookEvent &event);
744 void OnNewGroup(wxCommandEvent &event);
745 void OnDeleteGroup(wxCommandEvent &event);
747 ChartGroupArray *CloneChartGroupArray(ChartGroupArray *s);
748 wxTreeCtrl *AddEmptyGroupPage(
const wxString &label);
750 bool modified, m_UIcomplete, m_settingscomplete, m_treespopulated;
752 wxScrolledWindow *m_panel;
755 int FindGroupBranch(
ChartGroup *pGroup, wxTreeCtrl *ptree, wxTreeItemId item,
756 wxString *pbranch_adder);
759 wxFlexGridSizer *groupsSizer;
760 wxButton *m_pAddButton, *m_pRemoveButton, *m_pNewGroupButton;
761 wxButton *m_pDeleteGroupButton;
762 wxGenericDirCtrl *allAvailableCtl, *defaultAllCtl;
763 wxTreeCtrl *m_pActiveChartsTree, *lastSelectedCtl;
764 wxTreeItemId lastDeletedItem;
765 wxNotebook *m_GroupNB;
769 ArrayOfCDI m_db_dirs;
770 ArrayOfDirCtrls m_DirCtrlArray;
771 ChartGroupArray *m_pGroupArray;
773 int m_border_size, m_group_item_spacing, m_GroupSelectedPage;
775 wxBoxSizer *m_topSizer;
777 DECLARE_EVENT_TABLE()
781 class OpenGLOptionsDlg :
private Uncopyable,
public wxDialog {
783 explicit OpenGLOptionsDlg(wxWindow *parent);
784 bool GetAcceleratedPanning(
void)
const;
785 bool GetTextureCompression(
void)
const;
786 bool GetPolygonSmoothing(
void)
const;
787 bool GetLineSmoothing(
void)
const;
788 bool GetSoftwareGL(
void)
const;
789 bool GetTextureCompressionCaching(
void)
const;
790 bool GetRebuildCache(
void)
const;
791 int GetTextureMemorySize(
void)
const;
795 void OnButtonRebuild(wxCommandEvent &event);
796 void OnButtonClear(wxCommandEvent &event);
797 wxString GetTextureCacheSize(
void);
799 wxCheckBox *m_cbUseAcceleratedPanning, *m_cbTextureCompression;
800 wxCheckBox *m_cbTextureCompressionCaching, *m_cbSoftwareGL,
801 *m_cbPolygonSmoothing, *m_cbLineSmoothing;
802 wxSpinCtrl *m_sTextureDimension, *m_sTextureMemorySize;
803 wxStaticText *m_cacheSize, *m_memorySize;
805 bool m_brebuild_cache;
807 DECLARE_EVENT_TABLE()
811 #define ID_MMSI_PROPS_LIST 10073
825 explicit MMSIListCtrl(wxWindow *parent, wxWindowID
id,
const wxPoint &pos,
826 const wxSize &size,
long style);
829 wxString OnGetItemText(
long item,
long column)
const;
830 void OnListItemClick(wxListEvent &event);
831 void OnListItemActivated(wxListEvent &event);
832 void OnListItemRightClick(wxListEvent &event);
833 void PopupMenuHandler(wxCommandEvent &event);
838 DECLARE_EVENT_TABLE()
841 #define ID_MMSIEDIT_OK 8191
842 #define ID_MMSIEDIT_CANCEL 8192
843 #define ID_MMSI_CTL 8193
844 #define ID_DEF_MENU_MMSI_EDIT 8194
845 #define ID_DEF_MENU_MMSI_DELETE 8195
850 wxWindowID
id = wxID_ANY,
851 const wxString &caption = wxEmptyString,
852 const wxPoint &pos = wxDefaultPosition,
853 const wxSize &size = wxDefaultSize,
long style = 0);
856 void SetColorScheme(ColorScheme cs);
857 void CreateControls(
void);
858 void OnMMSIEditCancelClick(wxCommandEvent &event);
859 void OnMMSIEditOKClick(wxCommandEvent &event);
860 void OnCtlUpdated(wxCommandEvent &event);
863 wxTextCtrl *m_MMSICtl, m_ShipNameCtl;
864 wxRadioButton *m_rbTypeTrackDefault, *m_rbTypeTrackAlways;
865 wxRadioButton *m_rbTypeTrackNever;
866 wxCheckBox *m_cbTrackPersist, *m_IgnoreButton, *m_MOBButton, *m_VDMButton,
868 wxButton *m_CancelButton, *m_OKButton;
873 DECLARE_EVENT_TABLE()
881 void OnNewButton(wxCommandEvent &event);
882 void SetColorScheme(ColorScheme cs);
883 void UpdateMMSIList(
void);
886 wxButton *m_pButtonNew;
895 const wxString &caption = wxEmptyString,
896 const wxPoint &pos = wxDefaultPosition,
897 const wxSize &size = wxDefaultSize,
901 void SetColorScheme(ColorScheme cs);
902 void CreateControls(
void);
903 void OnConfigEditCancelClick(wxCommandEvent &event);
904 void OnConfigEditOKClick(wxCommandEvent &event);
905 wxString GetCreatedTemplateGUID() {
return m_createdTemplateGUID; }
907 wxTextCtrl *m_TitleCtl, *m_DescriptionCtl;
908 wxButton *m_CancelButton, *m_OKButton;
909 wxString m_createdTemplateGUID;
910 DECLARE_EVENT_TABLE()
ConfigCreateDialog(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=wxEmptyString, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0)
Class ConfigCreateDialog.
Generic event handling between MVC Model and Controller based on a shared EventVar variable.
MMSIEditDialog(MmsiProperties *props, wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=wxEmptyString, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0)
Class MMSIEditDialog.
Define an action to be performed when a KeyProvider is notified.
Keeps listening over it's lifespan, removes itself on destruction.
EventVar m_on_sound_done
Notified with a OCPN_Sound* pointer when sound has completed.