-// kln89_page.hxx - base class for the "pages" that\r
-// are used in the KLN89 GPS unit simulation. \r
-//\r
-// Written by David Luff, started 2005.\r
-//\r
-// Copyright (C) 2005 - David C Luff - david.luff@nottingham.ac.uk\r
-//\r
-// This program is free software; you can redistribute it and/or\r
-// modify it under the terms of the GNU General Public License as\r
-// published by the Free Software Foundation; either version 2 of the\r
-// License, or (at your option) any later version.\r
-//\r
-// This program is distributed in the hope that it will be useful, but\r
-// WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
-// General Public License for more details.\r
-//\r
-// You should have received a copy of the GNU General Public License\r
-// along with this program; if not, write to the Free Software\r
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r
-//\r
-// $Id$\r
-\r
-#ifndef _KLN89_PAGE_HXX\r
-#define _KLN89_PAGE_HXX\r
-\r
-#include <Instrumentation/dclgps.hxx>\r
-#include "kln89.hxx"\r
-\r
-class KLN89;\r
-\r
-class KLN89Page : public GPSPage {\r
-\r
-public:\r
- KLN89Page(KLN89* parent);\r
- virtual ~KLN89Page();\r
- virtual void Update(double dt);\r
- virtual void Knob1Left1();\r
- virtual void Knob1Right1();\r
- virtual void Knob2Left1();\r
- virtual void Knob2Right1();\r
- virtual void CrsrPressed();\r
- virtual void EntPressed();\r
- virtual void ClrPressed();\r
- // Even though some/all of the buttons below aren't processed directly by the current page,\r
- // the current page often needs to save or change some state when they are pressed, and \r
- // hence should provide a function to handle them.\r
- virtual void DtoPressed();\r
- virtual void NrstPressed();\r
- virtual void AltPressed();\r
- virtual void OBSPressed();\r
- virtual void MsgPressed();\r
- \r
- // See base class comments for this.\r
- virtual void CleanUp();\r
- \r
- // ditto\r
- virtual void LooseFocus();\r
- \r
- inline void SetEntInvert(bool b) { _entInvert = b; }\r
- \r
- // Get / Set a waypoint id, NOT the page name!\r
- virtual void SetId(const string& s);\r
- virtual const string& GetId();\r
- \r
-protected:\r
- KLN89* _kln89;\r
- \r
- // Underline position in cursor mode is not persistant when subpage is changed - hence we only need one variable per page for it.\r
- // 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
- // Also note that in general it doesn't seem to wrap.\r
- unsigned int _uLinePos;\r
- unsigned int _maxULinePos;\r
- \r
- // This is NOT the main gps to/from flag - derived page classes can use this flag\r
- // for any purpose, typically whether a radial bearing should be displayed to or from.\r
- bool _to_flag; // true for TO, false for FROM\r
- \r
- // Invert ID and display ENT in field 1\r
- bool _entInvert;\r
- \r
- string _id; // The ID of the waypoint that the page is displaying.\r
- // Doesn't make sense for all pages, but does for all the data pages.\r
- \r
- void ShowScratchpadMessage(const string& line1, const string& line2);\r
- \r
- bool _scratchpadMsg; // Set true when there is a scratchpad message to display\r
- double _scratchpadTimer; // Used for displaying the scratchpad messages for the right amount of time.\r
- string _scratchpadLine1;\r
- string _scratchpadLine2;\r
-};\r
-\r
-#endif // _KLN89_PAGE_HXX\r
+// kln89_page.hxx - base class for the "pages" that
+// are used in the KLN89 GPS unit simulation.
+//
+// Written by David Luff, started 2005.
+//
+// Copyright (C) 2005 - David C Luff - david.luff@nottingham.ac.uk
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation; either version 2 of the
+// License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// $Id$
+
+#ifndef _KLN89_PAGE_HXX
+#define _KLN89_PAGE_HXX
+
+#include <Instrumentation/dclgps.hxx>
+#include "kln89.hxx"
+
+class KLN89;
+
+class KLN89Page : public GPSPage {
+
+public:
+ KLN89Page(KLN89* parent);
+ virtual ~KLN89Page();
+ virtual void Update(double dt);
+ virtual void Knob1Left1();
+ virtual void Knob1Right1();
+ virtual void Knob2Left1();
+ virtual void Knob2Right1();
+ virtual void CrsrPressed();
+ virtual void EntPressed();
+ virtual void ClrPressed();
+ // Even though some/all of the buttons below aren't processed directly by the current page,
+ // the current page often needs to save or change some state when they are pressed, and
+ // hence should provide a function to handle them.
+ virtual void DtoPressed();
+ virtual void NrstPressed();
+ virtual void AltPressed();
+ virtual void OBSPressed();
+ virtual void MsgPressed();
+
+ // See base class comments for this.
+ virtual void CleanUp();
+
+ // ditto
+ virtual void LooseFocus();
+
+ inline void SetEntInvert(bool b) { _entInvert = b; }
+
+ // Get / Set a waypoint id, NOT the page name!
+ virtual void SetId(const string& s);
+ virtual const string& GetId();
+
+protected:
+ KLN89* _kln89;
+
+ // Underline position in cursor mode is not persistant when subpage is changed - hence we only need one variable per page for it.
+ // 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.
+ // Also note that in general it doesn't seem to wrap.
+ unsigned int _uLinePos;
+ unsigned int _maxULinePos;
+
+ // This is NOT the main gps to/from flag - derived page classes can use this flag
+ // for any purpose, typically whether a radial bearing should be displayed to or from.
+ bool _to_flag; // true for TO, false for FROM
+
+ // Invert ID and display ENT in field 1
+ bool _entInvert;
+
+ string _id; // The ID of the waypoint that the page is displaying.
+ // Doesn't make sense for all pages, but does for all the data pages.
+
+ void ShowScratchpadMessage(const string& line1, const string& line2);
+
+ bool _scratchpadMsg; // Set true when there is a scratchpad message to display
+ double _scratchpadTimer; // Used for displaying the scratchpad messages for the right amount of time.
+ string _scratchpadLine1;
+ string _scratchpadLine2;
+};
+
+#endif // _KLN89_PAGE_HXX