]> git.mxchange.org Git - flightgear.git/blob - src/Instrumentation/KLN89/kln89_page.hxx
Add missing include files needed by the new math code under windows
[flightgear.git] / src / Instrumentation / KLN89 / kln89_page.hxx
1 // kln89_page.hxx - base class for the "pages" that\r
2 //                  are used in the KLN89 GPS unit simulation. \r
3 //\r
4 // Written by David Luff, started 2005.\r
5 //\r
6 // Copyright (C) 2005 - David C Luff - david.luff@nottingham.ac.uk\r
7 //\r
8 // This program is free software; you can redistribute it and/or\r
9 // modify it under the terms of the GNU General Public License as\r
10 // published by the Free Software Foundation; either version 2 of the\r
11 // License, or (at your option) any later version.\r
12 //\r
13 // This program is distributed in the hope that it will be useful, but\r
14 // WITHOUT ANY WARRANTY; without even the implied warranty of\r
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
16 // General Public License for more details.\r
17 //\r
18 // You should have received a copy of the GNU General Public License\r
19 // along with this program; if not, write to the Free Software\r
20 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r
21 //\r
22 // $Id$\r
23 \r
24 #ifndef _KLN89_PAGE_HXX\r
25 #define _KLN89_PAGE_HXX\r
26 \r
27 #include <Instrumentation/dclgps.hxx>\r
28 #include "kln89.hxx"\r
29 \r
30 class KLN89;\r
31 \r
32 class KLN89Page : public GPSPage {\r
33 \r
34 public:\r
35         KLN89Page(KLN89* parent);\r
36         virtual ~KLN89Page();\r
37         virtual void Update(double dt);\r
38         virtual void Knob1Left1();\r
39         virtual void Knob1Right1();\r
40         virtual void Knob2Left1();\r
41         virtual void Knob2Right1();\r
42         virtual void CrsrPressed();\r
43         virtual void EntPressed();\r
44         virtual void ClrPressed();\r
45         // Even though some/all of the buttons below aren't processed directly by the current page,\r
46         // the current page often needs to save or change some state when they are pressed, and \r
47         // hence should provide a function to handle them.\r
48         virtual void DtoPressed();\r
49         virtual void NrstPressed();\r
50         virtual void AltPressed();\r
51         virtual void OBSPressed();\r
52         virtual void MsgPressed();\r
53         \r
54         // See base class comments for this.\r
55         virtual void CleanUp();\r
56         \r
57         // ditto\r
58         virtual void LooseFocus();\r
59         \r
60         inline void SetEntInvert(bool b) { _entInvert = b; }\r
61         \r
62         // Get / Set a waypoint id, NOT the page name!\r
63         virtual void SetId(const string& s);\r
64         virtual const string& GetId();\r
65         \r
66 protected:\r
67         KLN89* _kln89;\r
68         \r
69         // Underline position in cursor mode is not persistant when subpage is changed - hence we only need one variable per page for it.\r
70         // Note that pos 0 is special - this is the leg pos in field 1, so pos will normally be set to 1 when crsr is pressed.\r
71         // Also note that in general it doesn't seem to wrap.\r
72         unsigned int _uLinePos;\r
73         unsigned int _maxULinePos;\r
74         \r
75         // This is NOT the main gps to/from flag - derived page classes can use this flag\r
76         // for any purpose, typically whether a radial bearing should be displayed to or from.\r
77         bool _to_flag;  // true for TO, false for FROM\r
78         \r
79         // Invert ID and display ENT in field 1\r
80         bool _entInvert;\r
81         \r
82         string _id;             // The ID of the waypoint that the page is displaying.\r
83                                         // Doesn't make sense for all pages, but does for all the data pages.\r
84                                         \r
85         void ShowScratchpadMessage(const string& line1, const string& line2);\r
86                                         \r
87         bool _scratchpadMsg;            // Set true when there is a scratchpad message to display\r
88         double _scratchpadTimer;        // Used for displaying the scratchpad messages for the right amount of time.\r
89         string _scratchpadLine1;\r
90         string _scratchpadLine2;\r
91 };\r
92 \r
93 #endif  // _KLN89_PAGE_HXX\r