OpenCPN Partial API docs
Loading...
Searching...
No Matches
layer.h
Go to the documentation of this file.
1/**************************************************************************
2 * Copyright (C) 2010 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 LAYER_H_
25#define LAYER_H_
26
27#include <list>
28
29#include <wx/checkbox.h>
30#include <wx/datetime.h>
31#include <wx/string.h>
32
33class Layer; // Forward
34
35using LayerList = std::list<Layer *>;
36extern LayerList *pLayerList;
37
44class Layer {
45public:
46 Layer();
47 ~Layer();
48 wxString CreatePropString() { return m_LayerFileName; }
49 bool IsVisibleOnChart() { return m_bIsVisibleOnChart; }
50 void SetVisibleOnChart(bool viz = true) { m_bIsVisibleOnChart = viz; }
51 bool IsVisibleOnListing() { return m_bIsVisibleOnListing; }
52 void SetVisibleOnListing(bool viz = true) { m_bIsVisibleOnListing = viz; }
53 wxCheckBoxState HasVisibleNames() { return m_bHasVisibleNames; }
54 void SetVisibleNames(wxCheckBoxState viz = wxCHK_UNDETERMINED) {
55 m_bHasVisibleNames = viz;
56 }
57
58 bool m_bIsVisibleOnChart;
59 bool m_bIsVisibleOnListing;
60 wxCheckBoxState m_bHasVisibleNames;
61 long m_NoOfItems;
62 int m_LayerID;
63
64 wxString m_LayerName;
65 wxString m_LayerFileName;
66 wxString m_LayerDescription;
67 wxString m_LayerType;
68 wxDateTime m_CreateTime;
69};
70
71#endif
Represents a layer of chart objects in OpenCPN.
Definition layer.h:44
LayerList * pLayerList
Global instance.
Definition layer.cpp:23