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_MAP_SETTINGS_HPP
25 #define XCSOAR_MAP_SETTINGS_HPP
27 // changed only in config or by user interface
28 // not expected to be used by other threads
30 #include "Airspace/AirspaceClass.hpp"
31 #include "Renderer/AirspaceRendererSettings.hpp"
32 #include "Renderer/WaypointRendererSettings.hpp"
33 #include "Terrain/TerrainSettings.hpp"
34 #include "Math/fixed.hpp"
36 #include <type_traits>
40 enum class AircraftSymbol
: uint8_t {
48 enum class DisplayOrientation
: uint8_t {
56 enum class MapShiftBias
: uint8_t {
62 enum class DisplayGroundTrack
: uint8_t {
68 enum class FinalGlideBarDisplayMode
: uint8_t {
74 struct MapItemListSettings
{
76 /** Add an LocationMapItem to the MapItemList? */
79 /** Add an ArrivalAltitudeMapItem to the MapItemList? */
80 bool add_arrival_altitude
;
85 static_assert(std::is_trivial
<MapItemListSettings
>::value
, "type is not trivial");
87 struct TrailSettings
{
88 /** Snailtrail wind drifting in circling mode */
89 bool wind_drift_enabled
;
92 /** 0: standard, 1: seeyou colors */
93 enum class Type
: uint8_t {
102 enum class Length
: uint8_t {
112 static_assert(std::is_trivial
<TrailSettings
>::value
, "type is not trivial");
114 // user interface options
116 // where using these from Calculations or MapWindow thread, should
119 enum class WindArrowStyle
: uint8_t {
126 /** Map zooms in on circling */
127 bool circle_zoom_enabled
;
128 /** Maximum distance limit for AutoZoom */
129 fixed max_auto_zoom_distance
;
130 /** Map will show topography */
131 bool topography_enabled
;
133 TerrainRendererSettings terrain
;
135 AircraftSymbol aircraft_symbol
;
137 /** Indicate extra distance reqd. if deviating from target heading */
138 bool detour_cost_markers_enabled
;
139 /** Render track bearing on map */
140 DisplayGroundTrack display_ground_track
;
142 /** Automatic zoom when closing in on waypoint */
143 bool auto_zoom_enabled
;
144 WindArrowStyle wind_arrow_style
;
146 WaypointRendererSettings waypoint
;
147 AirspaceRendererSettings airspace
;
149 int glider_screen_position
;
150 /** Orientation of the map (North up, Track up, etc.) */
151 DisplayOrientation cruise_orientation
;
152 DisplayOrientation circling_orientation
;
154 /** Map scale in cruise mode [px/m] */
156 /** Map scale in circling mode [px/m] */
157 fixed circling_scale
;
159 /** The bias for map shifting (Heading, Target, etc.) */
160 MapShiftBias map_shift_bias
;
162 bool show_flarm_on_map
;
165 * This is an inverted copy of TrafficSettings::enable_gauge. The
166 * map should not render the FLARM alarm level if the gauge already
167 * shows it, to declutter the map. The copy is needed because
168 * MapWindowBlackboard only knows MapSettings, but not
169 * TrafficSettings, and DrawThread is not allowed to access
170 * InterfaceBlackboard.
172 bool show_flarm_alarm_level
;
174 /** Display climb band on map */
175 bool show_thermal_profile
;
177 /** Show FinalGlideBar mc0 arrow */
178 bool final_glide_bar_mc0_enabled
;
180 /** FinalGlideBar display mode configuration */
181 FinalGlideBarDisplayMode final_glide_bar_display_mode
;
183 /** Show Vario Bar arrow */
184 bool vario_bar_enabled
;
187 * Overlay FAI triangle areas on the map while flying?
189 bool show_fai_triangle_areas
;
192 MapItemListSettings item_list
;
197 static_assert(std::is_trivial
<MapSettings
>::value
, "type is not trivial");