OpenCPN Partial API docs
Loading...
Searching...
No Matches
AISTargetListDialog.h
1/***************************************************************************
2 *
3 * Project: OpenCPN
4 *
5 ***************************************************************************
6 * Copyright (C) 2010 by David S. Register *
7 * *
8 * This program is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU General Public License as published by *
10 * the Free Software Foundation; either version 2 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This program is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU General Public License *
19 * along with this program; if not, write to the *
20 * Free Software Foundation, Inc., *
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
22 ***************************************************************************
23 */
24
25#ifndef __AISTARGETLISTDIALOG_H__
26#define __AISTARGETLISTDIALOG_H__
27
28#include <memory>
29
30#include <wx/panel.h>
31#include <wx/checkbox.h>
32
33#define ID_AIS_TARGET_LIST 10003
34#define ID_RCLK_UNDOCK 7035
35
36class OCPNListCtrl;
37class AisDecoder;
38class AisTargetData;
39class wxWindow;
40class wxAuiManager;
41class wxButton;
42class wxStaticText;
43class wxSpinCtrl;
44class wxTextCtrl;
45class wxListEvent;
46class wxAuiManager;
47class wxAuiManagerEvent;
48
49WX_DEFINE_SORTED_ARRAY_INT(int, ArrayOfMMSI);
50
55class AISTargetListDialog : public wxPanel {
56 DECLARE_CLASS(AISTargetListDialog)
57
58public:
59 AISTargetListDialog(wxWindow *parent, wxAuiManager *auimgr,
60 AisDecoder *pdecoder);
62
63 void Shutdown(void);
64 void OnClose(wxCloseEvent &event);
65 void Disconnect_decoder();
66
67 void RecalculateSize(void);
68 void SetColorScheme();
69 void UpdateAISTargetList(); // Rebuild AIS target list
70 void UpdateNVAISTargetList();
71 void CopyMMSItoClipBoard(int);
72 void CenterToTarget(bool);
73 std::shared_ptr<AisTargetData> GetpTarget(unsigned int list_item);
74
75 OCPNListCtrl *m_pListCtrlAISTargets;
76 AisDecoder *m_pdecoder;
77
78 ArrayOfMMSI *m_pMMSI_array;
79
80private:
81 void CreateControls(void);
82
83 void OnPaneClose(wxAuiManagerEvent &event);
84 void UpdateButtons();
85 void OnTargetSelected(wxListEvent &event);
86 void DoTargetQuery(int mmsi);
87 void OnTargetDefaultAction(wxListEvent &event);
88 void OnTargetQuery(wxCommandEvent &event);
89 void OnTargetListColumnClicked(wxListEvent &event);
90 void OnTargetScrollTo(wxCommandEvent &event);
91 void OnTargetScrollToClose(wxCommandEvent &event);
92 void OnTargetCreateWpt(wxCommandEvent &event);
93 void OnShowAllTracks(wxCommandEvent &event);
94 void OnHideAllTracks(wxCommandEvent &event);
95 void OnToggleTrack(wxCommandEvent &event);
96 void OnCopyMMSI(wxCommandEvent &event);
97 void OnLimitRange(wxCommandEvent &event);
98 void OnCloseButton(wxCommandEvent &event);
99 void OnAutosortCB(wxCommandEvent &event);
100 void OnRightClickContext(wxCommandEvent &event);
101 void OnContextUndock(wxCommandEvent &event);
102
103 wxWindow *m_pparent;
104 wxAuiManager *m_pAuiManager;
105 wxButton *m_pButtonInfo;
106 wxButton *m_pButtonJumpTo;
107 wxButton *m_pButtonJumpTo_Close;
108 wxButton *m_pButtonCreateWpt;
109 wxButton *m_pButtonHideAllTracks;
110 wxButton *m_pButtonShowAllTracks;
111 wxButton *m_pButtonToggleTrack;
112 wxButton *m_pButtonCopyMMSI;
113 wxStaticText *m_pStaticTextRange;
114 wxSpinCtrl *m_pSpinCtrlRange;
115 wxStaticText *m_pStaticTextCount;
116 wxTextCtrl *m_pTextTargetCount;
117 wxButton *m_pButtonOK;
118 wxCheckBox *m_pCBAutosort;
119
120 bool m_bautosort_force;
121
122 DECLARE_EVENT_TABLE()
123};
124
125#endif
Dialog for displaying a list of AIS targets.
A custom list control for displaying AIS target information.