Updated FSF address in all files. Fixes ticket:51
[debian/gnuradio] / ezdop / src / host / hunter / src / tactical.h
1 /*
2  Copyright 2006 Johnathan Corgan.
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 version 2
6  as published by the Free Software Foundation.
7  
8  This software is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  GNU General Public License for more details.
12  
13  You should have received a copy of the GNU General Public License
14  along with GNU Radio; see the file COPYING.  If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street,
16  Boston, MA 02110-1301, USA.
17 */
18
19 #ifndef __TACTICAL_H__
20 #define __TACTICAL_H__
21
22 // wxWidgets includes
23 #include <wx/panel.h>
24
25 enum Orientation {
26     TrackUp,
27     NorthUp
28 };
29
30 class TacticalPanel : public wxPanel
31 {
32 public:
33     TacticalPanel(wxWindow *parent);
34
35     // Event handlers
36     void OnPaint(wxPaintEvent &event);
37     void OnSize(wxSizeEvent &event);
38
39     // Configuration
40     void SetOrientation(Orientation orientation) { m_orientation = orientation; Refresh(); }
41     void SetDisplayDoppler(bool display) { m_display_doppler = display; Refresh(); }
42     void SetDisplayKnown(bool display) { m_display_known = display; Refresh(); }
43     void SetDisplayEstimated(bool display) { m_display_estimated = display; Refresh(); }
44     
45     // State updates
46     void SetHeading(float heading) { m_heading = heading; Refresh(); }
47     void SetDopplerBearing(float bearing) { m_doppler_bearing = bearing; Refresh(); }
48     void SetEstimatedBearing(float bearing) { m_estimated_bearing = bearing; Refresh(); }
49     void SetActualBearing(float bearing) { m_actual_bearing = bearing; Refresh(); }
50     
51 private:
52     Orientation m_orientation;
53     bool  m_display_doppler;
54     bool  m_display_known;
55     bool  m_display_estimated;
56     
57     float m_heading;
58     float m_doppler_bearing;
59     float m_estimated_bearing;
60     float m_actual_bearing;
61     
62     void drawPanel(wxDC &dc);
63
64     // Window size derived parameters
65     wxPoint m_center;
66     int m_width;
67     int m_height;
68     int m_radius;
69     
70     DECLARE_EVENT_TABLE();
71 };
72
73 #endif // __TACTICAL_H__