OpenCPN Partial API docs
Loading...
Searching...
No Matches
wind.h
1/******************************************************************************
2 * $Id: wind.h, v1.0 2010/08/05 SethDart Exp $
3 *
4 * Project: OpenCPN
5 * Purpose: Dashboard Plugin
6 * Author: Jean-Eudes Onfray
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 __Wind_H__
29#define __Wind_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 "dial.h"
45
46//+------------------------------------------------------------------------------
47//|
48//| CLASS:
49//| DashboardInstrument_Wind
50//|
51//| DESCRIPTION:
52//| This class creates a wind style control
53//|
54//+------------------------------------------------------------------------------
56public:
57 DashboardInstrument_Wind(wxWindow* parent, wxWindowID id, wxString title,
58 InstrumentProperties* Properties, DASH_CAP cap_flag);
59
61
62private:
63protected:
64 void DrawBackground(wxGCDC* dc);
65};
66
68public:
69 DashboardInstrument_WindCompass(wxWindow* parent, wxWindowID id,
70 wxString title,
71 InstrumentProperties* Properties,
72 DASH_CAP cap_flag);
73
75
76private:
77protected:
78 void DrawBackground(wxGCDC* dc);
79};
80
82public:
83 DashboardInstrument_TrueWindAngle(wxWindow* parent, wxWindowID id,
84 wxString title,
85 InstrumentProperties* Properties,
86 DASH_CAP cap_flag);
87
89
90private:
91protected:
92 void DrawBackground(wxGCDC* dc);
93};
94/*****************************************************************************
95Apparent & True wind angle combined in one dial instrument
96Author: Thomas Rauch
97******************************************************************************/
99public:
100 DashboardInstrument_AppTrueWindAngle(wxWindow* parent, wxWindowID id,
101 wxString title,
102 InstrumentProperties* Properties,
103 DASH_CAP cap_flag);
104
106 void SetData(DASH_CAP, double, wxString);
107
108private:
109protected:
110 double m_MainValueApp, m_MainValueTrue;
111 double m_ExtraValueApp, m_ExtraValueTrue;
112
113 wxString m_ExtraValueAppUnit, m_ExtraValueTrueUnit, m_MainValueAppUnit,
114 m_MainValueTrueUnit;
115 DialPositionOption m_MainValueOption1, m_MainValueOption2,
116 m_ExtraValueOption1, m_ExtraValueOption2;
117 void DrawBackground(wxGCDC* dc);
118 virtual void Draw(wxGCDC* dc);
119 virtual void DrawForeground(wxGCDC* dc);
120 virtual void DrawData(wxGCDC* dc, double value, wxString unit,
121 wxString format, DialPositionOption position);
122};
123
124#endif // __Wind_H__