OpenCPN Partial API docs
Loading...
Searching...
No Matches
waypointman_gui.h
1/***************************************************************************
2 *
3 * Project: OpenCPN
4 * Purpose: WaypoinrMan drawing stuff
5 * Author: David Register, Alec Leamas
6 *
7 ***************************************************************************
8 * Copyright (C) 2022 by David Register, Alec Leamas *
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#ifndef _WAYPOINT_GUI_H__
27#define _WAYPOINT_GUI_H__
28
29#include "model/routeman.h"
30#include "styles.h"
31
33public:
34 WayPointmanGui(WayPointman &waypoint_man) : m_waypoint_man(waypoint_man) {}
35
36 void SetColorScheme(ColorScheme cs, double displayDPmm);
37 void ReloadAllIcons(double displayDPmm);
38 void ProcessDefaultIcons(double displayDPmm);
39 void ProcessIcons(ocpnStyle::Style *style, double displayDPmm);
40 void ProcessUserIcons(ocpnStyle::Style *style, double displayDPmm);
41 MarkIcon *ProcessIcon(wxImage image, const wxString &key,
42 const wxString &description, bool add_in_front = false);
43 unsigned int GetIconTexture(const wxBitmap *pmb, int &glw, int &glh);
44
45 void ReloadRoutepointIcons();
46
47private:
48 MarkIcon *ProcessLegacyIcon(wxString fileName, const wxString &key,
49 const wxString &description, double displayDPmm);
50 MarkIcon *ProcessExtendedIcon(wxImage &image, const wxString &key,
51 const wxString &description);
52 wxRect CropImageOnAlpha(wxImage &image);
53 WayPointman &m_waypoint_man;
54};
55
56#endif // _WAYPOINT_GUI_H__