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