OpenCPN Partial API docs
Loading...
Searching...
No Matches
priority_gui.h
Go to the documentation of this file.
1/**************************************************************************
2 * Copyright (C) 2022 by David S. Register *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, see <https://www.gnu.org/licenses/>. *
16 **************************************************************************/
17
24#ifndef _PRIORITY_DIALOG_H
25#define _PRIORITY_DIALOG_H
26
27#include <string>
28#include <vector>
29
30#include <wx/button.h>
31#include <wx/checkbox.h>
32#include <wx/dialog.h>
33#include <wx/event.h>
34#include <wx/font.h>
35#include <wx/listctrl.h>
36#include <wx/radiobut.h>
37#include <wx/stattext.h>
38#include <wx/string.h>
39#include <wx/timer.h>
40#include <wx/treectrl.h>
41
42class PriorityDlg : public wxDialog {
43public:
44 PriorityDlg(wxWindow *parent);
45 virtual ~PriorityDlg();
46
47private:
48 void OnMoveUpClick(wxCommandEvent &event);
49 void OnMoveDownClick(wxCommandEvent &event);
50 void OnRefreshClick(wxCommandEvent &event);
51 void OnClearClick(wxCommandEvent &event);
52 void OnItemSelected(wxCommandEvent &event);
53
54 void ProcessMove(wxTreeItemId, int dir);
55
56 void Populate();
57 void AddLeaves(const std::vector<std::string> &map_list, size_t map_index,
58 std::string map_name, wxTreeItemId leaf_parent);
59 void AdjustSatPriority();
60 void AdjustCOGSOGPriority();
61
62 wxButton *btnMoveUp, *btnMoveDown;
63 wxButton *btnRefresh, *btnClear;
64 wxTreeCtrl *m_prioTree;
65 std::vector<std::string> m_map;
66
67 size_t m_selmap_index;
68 size_t m_selIndex;
69
70 int m_maxStringLength;
71 wxString m_max_string;
72 wxFont *m_pF;
73};
74
75#endif //_PRIORITY_DIALOG_H