4 XCSoar Glide Computer - http://www.xcsoar.org/
5 Copyright (C) 2000-2013 The XCSoar Project
6 A detailed list of copyright holders can be found in the file "AUTHORS".
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 #ifndef XCSOAR_INPUT_EVENTS_HPP
25 #define XCSOAR_INPUT_EVENTS_HPP
27 #include "Math/fixed.hpp"
29 #include "Menu/MenuData.hpp"
35 typedef void (*pt2Event
)(const TCHAR
*);
49 Menu
*GetMenu(const TCHAR
*mode
);
52 * Load the default input file (Data/Input/default.xci).
54 void LoadDefaults(InputConfig
&input_config
);
57 void setMode(Mode mode
);
58 void setMode(const TCHAR
*mode
);
61 * Update the menu after pan mode has been enabled or disabled.
66 * Set the "flavour" of the current mode. It is an optional string
67 * that gets appended to the current mode name, separated with a
68 * dot, to build a new "overlay" mode. This may be used to replace
69 * certain items in the menu.
71 * @param flavour the new flavour name; may be NULL
73 void SetFlavour(const TCHAR
*flavour
);
76 * Is the specified flavour currently active?
78 * @return the current flavour mode; may be NULL
81 bool IsFlavour(const TCHAR
*flavour
);
84 * @return: true if current mode is MODE_DEFAULT
90 * Process an event chain.
92 void ProcessEvent(unsigned event_id
);
95 * Process a hot key for the specified mode.
97 bool ProcessKey(Mode mode
, unsigned key_code
);
99 bool processKey(unsigned key
);
100 bool processGesture(const TCHAR
*data
);
101 bool IsGesture(const TCHAR
*data
);
103 bool processNmea_real(unsigned key
);
104 bool processGlideComputer_real(unsigned gce_id
);
106 // helpers (temporary)
108 void sub_TerrainTopography(int vswitch
);
110 void sub_PanCursor(int dx
, int dy
);
111 void sub_AutoZoom(int vswitch
);
112 void sub_ScaleZoom(int vswitch
);
113 void sub_SetZoom(fixed value
);
117 void eventAbortTask(const TCHAR
*misc
);
118 void eventAdjustForecastTemperature(const TCHAR
*misc
);
119 void eventAdjustVarioFilter(const TCHAR
*misc
);
120 void eventAdjustWaypoint(const TCHAR
*misc
);
121 void eventAnalysis(const TCHAR
*misc
);
122 void eventArmAdvance(const TCHAR
*misc
);
123 void eventAudioDeadband(const TCHAR
*misc
);
124 void eventBallast(const TCHAR
*misc
);
125 void eventBugs(const TCHAR
*misc
);
126 void eventCalculator(const TCHAR
*misc
);
127 void eventChangeInfoBoxType(const TCHAR
*misc
);
128 void eventChecklist(const TCHAR
*misc
);
129 void eventClearAirspaceWarnings(const TCHAR
*misc
);
130 void eventClearStatusMessages(const TCHAR
*misc
);
131 void eventLogger(const TCHAR
*misc
);
132 void eventMacCready(const TCHAR
*misc
);
133 void eventMainMenu(const TCHAR
*misc
);
134 void eventMarkLocation(const TCHAR
*misc
);
135 void eventMode(const TCHAR
*misc
);
136 void eventNearestAirspaceDetails(const TCHAR
*misc
);
137 void eventNearestWaypointDetails(const TCHAR
*misc
);
138 void eventNearestMapItems(const TCHAR
*misc
);
139 void eventNull(const TCHAR
*misc
);
140 void eventPage(const TCHAR
*misc
);
141 void eventPan(const TCHAR
*misc
);
142 void eventPlaySound(const TCHAR
*misc
);
143 void eventProfileLoad(const TCHAR
*misc
);
144 void eventProfileSave(const TCHAR
*misc
);
145 void eventRepeatStatusMessage(const TCHAR
*misc
);
146 void eventRun(const TCHAR
*misc
);
147 void eventScreenModes(const TCHAR
*misc
);
148 void eventSelectInfoBox(const TCHAR
*misc
);
149 void eventDevice(const TCHAR
*misc
);
150 void eventSendNMEA(const TCHAR
*misc
);
151 void eventSendNMEAPort1(const TCHAR
*misc
);
152 void eventSendNMEAPort2(const TCHAR
*misc
);
153 void eventSetup(const TCHAR
*misc
);
154 void eventSnailTrail(const TCHAR
*misc
);
155 void eventAirSpace(const TCHAR
*misc
); // VENTA3
156 void eventSounds(const TCHAR
*misc
);
157 void eventStatus(const TCHAR
*misc
);
158 void eventStatusMessage(const TCHAR
*misc
);
159 void eventTaskLoad(const TCHAR
*misc
);
160 void eventTaskSave(const TCHAR
*misc
);
161 void eventTaskTransition(const TCHAR
*misc
);
162 void eventTerrainTopography(const TCHAR
*misc
);
163 void eventTerrainTopology(const TCHAR
*misc
);
164 void eventWaypointDetails(const TCHAR
*misc
);
165 void eventZoom(const TCHAR
*misc
);
166 void eventBrightness(const TCHAR
*misc
);
167 void eventDeclutterLabels(const TCHAR
*misc
);
168 void eventExit(const TCHAR
*misc
);
169 void eventFLARMRadar(const TCHAR
*misc
);
170 void eventThermalAssistant(const TCHAR
*misc
);
171 void eventBeep(const TCHAR
*misc
);
172 void eventUserDisplayModeForce(const TCHAR
*misc
);
173 void eventAirspaceDisplayMode(const TCHAR
*misc
);
174 void eventAutoLogger(const TCHAR
*misc
);
175 void eventGotoLookup(const TCHAR
*misc
);
176 void eventAddWaypoint(const TCHAR
*misc
);
177 void eventOrientation(const TCHAR
*misc
);
178 void eventTraffic(const TCHAR
*misc
);
179 void eventFlarmTraffic(const TCHAR
*misc
);
180 void eventFlarmDetails(const TCHAR
*misc
);
181 void eventCredits(const TCHAR
*misc
);
182 void eventWeather(const TCHAR
*misc
);
183 void eventQuickMenu(const TCHAR
*misc
);
184 void eventFileManager(const TCHAR
*misc
);