OpenCPN Partial API docs
Loading...
Searching...
No Matches
from_ownship.h
1/***************************************************************************
2 * $Id: from_ownship.h
3 *
4 * Project: OpenCPN
5 * Purpose: Dashboard Plugin
6 * Author: Pavel Kalian
7 *
8 ***************************************************************************
9 * Copyright (C) 2010 by David S. Register *
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 * This program is distributed in the hope that it will be useful, *
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
19 * GNU General Public License for more details. *
20 * *
21 * You should have received a copy of the GNU General Public License *
22 * along with this program; if not, write to the *
23 * Free Software Foundation, Inc., *
24 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
25 ***************************************************************************
26 */
27
28#ifndef _FROM_OWNSHIP_H_
29#define _FROM_OWNSHIP_H_
30
31// For compilers that support precompilation, includes "wx/wx.h".
32#include <wx/wxprec.h>
33
34#ifdef __BORLANDC__
35#pragma hdrstop
36#endif
37
38// for all others, include the necessary headers (this file is usually all you
39// need because it includes almost all "standard" wxWidgets headers)
40#ifndef WX_PRECOMP
41#include <wx/wx.h>
42#endif
43
44#include "instrument.h"
45
47public:
48 DashboardInstrument_FromOwnship(wxWindow* pparent, wxWindowID id,
49 wxString title,
50 InstrumentProperties* Properties,
51 DASH_CAP cap_flag1 = OCPN_DBP_STC_PLA,
52 DASH_CAP cap_flag2 = OCPN_DBP_STC_PLO,
53 DASH_CAP cap_flag3 = OCPN_DBP_STC_LAT,
54 DASH_CAP cap_flag4 = OCPN_DBP_STC_LON);
56
57 void SetData(DASH_CAP st, double data, wxString unit);
58 wxSize GetSize(int orient, wxSize hint);
59
60protected:
61 wxString m_data1;
62 wxString m_data2;
63 double c_lat;
64 double c_lon;
65 double s_lat;
66 double s_lon;
67 DASH_CAP m_cap_flag1;
68 DASH_CAP m_cap_flag2;
69 DASH_CAP m_cap_flag3;
70 DASH_CAP m_cap_flag4;
71
72 void Draw(wxGCDC* dc);
73};
74
75#endif