OpenCPN Partial API docs
Loading...
Searching...
No Matches
Layer.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 __LAYER_H__
26#define __LAYER_H__
27
28#include <list>
29
30#include <wx/checkbox.h>
31#include <wx/datetime.h>
32#include <wx/string.h>
33
40class Layer {
41public:
42 Layer(void);
43 ~Layer(void);
44 wxString CreatePropString(void) { return m_LayerFileName; }
45 bool IsVisibleOnChart() { return m_bIsVisibleOnChart; }
46 void SetVisibleOnChart(bool viz = true) { m_bIsVisibleOnChart = viz; }
47 bool IsVisibleOnListing() { return m_bIsVisibleOnListing; }
48 void SetVisibleOnListing(bool viz = true) { m_bIsVisibleOnListing = viz; }
49 wxCheckBoxState HasVisibleNames() { return m_bHasVisibleNames; }
50 void SetVisibleNames(wxCheckBoxState viz = wxCHK_UNDETERMINED) {
51 m_bHasVisibleNames = viz;
52 }
53
54 bool m_bIsVisibleOnChart;
55 bool m_bIsVisibleOnListing;
56 wxCheckBoxState m_bHasVisibleNames;
57 long m_NoOfItems;
58 int m_LayerID;
59
60 wxString m_LayerName;
61 wxString m_LayerFileName;
62 wxString m_LayerDescription;
63 wxString m_LayerType;
64 wxDateTime m_CreateTime;
65};
66
67using LayerList = std::list<Layer*>;
68
69#endif
Represents a layer of chart objects in OpenCPN.
Definition Layer.h:40