| 1 | // kln89_page_*.[ch]xx - this file is one of the "pages" that |
| 2 | // are used in the KLN89 GPS unit simulation. |
| 3 | // |
| 4 | // Written by David Luff, started 2005. |
| 5 | // |
| 6 | // Copyright (C) 2005 - David C Luff - daveluff AT ntlworld.com |
| 7 | // |
| 8 | // This program is free software; you can redistribute it and/or |
| 9 | // modify it under the terms of the GNU General Public License as |
| 10 | // published by the Free Software Foundation; either version 2 of the |
| 11 | // License, or (at your option) any later version. |
| 12 | // |
| 13 | // This program is distributed in the hope that it will be useful, but |
| 14 | // WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 | // General Public License for more details. |
| 17 | // |
| 18 | // You should have received a copy of the GNU General Public License |
| 19 | // along with this program; if not, write to the Free Software |
| 20 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 21 | // |
| 22 | // $Id$ |
| 23 | |
| 24 | #ifndef _KLN89_PAGE_DIR |
| 25 | #define _KLN89_PAGE_DIR |
| 26 | |
| 27 | #include "kln89.hxx" |
| 28 | |
| 29 | class KLN89DirPage : public KLN89Page { |
| 30 | |
| 31 | public: |
| 32 | KLN89DirPage(KLN89* parent); |
| 33 | ~KLN89DirPage(); |
| 34 | |
| 35 | void Update(double dt); |
| 36 | |
| 37 | void SetId(const std::string& s); |
| 38 | |
| 39 | void CrsrPressed(); |
| 40 | void ClrPressed(); |
| 41 | void EntPressed(); |
| 42 | void Knob2Left1(); |
| 43 | void Knob2Right1(); |
| 44 | |
| 45 | private: |
| 46 | // Waypoint display mode. |
| 47 | // There are a number of ways that the waypoint can be displayed in the DIR page: |
| 48 | // 0 => Whole candidate waypoint displayed, entirely inverted. This is normally how the page is initially displayed, unless a candidate waypoint cannot be determined. |
| 49 | // 1 => Waypoint being entered, with a corresponding cursor position, and only the cursor position inverted. |
| 50 | // 2 => Blanks. These can be displayed flashing when the cursor is active (eg. when CLR is pressed) and are always displayed if the cursor is turned off. |
| 51 | int _DToWpDispMode; |
| 52 | |
| 53 | // Position of the list in the mode that scans through the active flight plan. |
| 54 | // This should be initialised to point at the final waypoint of the active flight plan when we enter mode zero above. |
| 55 | int _DToWpDispIndex; |
| 56 | |
| 57 | // We need to save the mode when DTO gets pressed, since potentially this class handles page exit via. the CLR event handler |
| 58 | KLN89Mode _saveMasterMode; |
| 59 | }; |
| 60 | |
| 61 | #endif // _KLN89_PAGE_DIR |