GL Studio C++ Runtime API
gls_dnc_std_appearance.h
Go to the documentation of this file.
1 #ifndef GLS_DNC_STD_APPEARANCE_H
2 #define GLS_DNC_STD_APPEARANCE_H
3 
4 /*! \file
5  \brief GlsDNCStdAppearance class declaration
6 
7  \par Copyright Information
8 
9  Copyright (C) 2006 by Distributed Simulation Technology, Inc.<br>
10  Orlando, FL USA<br>
11  All rights reserved.<br>
12 
13  This file is copyrighted software and contains proprietary trade secrets of
14  Distributed Simulation Technology, Inc., and embodies substantial creative
15  efforts as well as confidential information, ideas, and expressions. No part
16  or all of this software may be reproduced in any form, or by any means of
17  electronic, mechanical, or otherwise, without the written permission of
18  Distributed Simulation Technology, Inc.
19 
20  This library is distributed in the hope that it will be useful, but
21  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
22  or FITNESS FOR A PARTICULAR PURPOSE.
23 
24  Use of this software implies acceptance of the GL Studio licensing terms.
25 
26 */
27 
28 #include "gls_map_dnc.h"
29 
30 #define LIB_BASE_NAME "gls_dnc_std_appearance"
31 #include "gls_auto_lib.h"
32 #undef LIB_BASE_NAME
33 
34 namespace disti
35 {
36 class GlsDNCStdAppearanceData;
37 
38 /** The GlsDNCStdAppearance class contains the data and methods
39  * to configure a DNCMapChartDataSource with a standard set of
40  * icons and features.
41  */
43 {
44 public:
45  /// Constructor
47 
48  /// Destructor
50 
51  /** The GlsDNCStdAppearance::ConfigLibrary routine is called by the DNCMapChartDataSource
52  * whenever a new library is loaded in order to allow the appearance library to setup
53  * the library render settings.
54  *
55  * \sa DNCMapChartDataSource::SetConfigLibCB
56  */
57  static void ConfigLibrary( void* const userData, DNCMapChartDataSource& dncSource, const int libNum );
58 
59  /// Color palette IDs
60  enum Palette
61  {
62  PALETTE_DAY,
63  PALETTE_NIGHT
64  };
65 
66  /** Select which color palette to use for rendering.
67  * \param pal The id of the palette to use
68  */
69  void SetPalette( const Palette pal );
70 
71  /** \returns The id of the currently selected color palette
72  */
73  Palette GetPalette( void );
74 
75  /// Color palette enumeration
77  {
78  PALETTE_ECR_ECRAREA_GROUND_SURFACE = 0, // The main land surface
79  PALETTE_ECR_ECRAREA_ISLAND, // Any land that is an island
80  PALETTE_ECR_ECRAREA_WATER, // All water areas (not really seen because other areas usually overide it)
81  PALETTE_ECR_ECRAREA_FORESHORE_WATER, // Areas exposed by the low tide and covered by high tide
82  PALETTE_ECR_COASTL_COASTLINE, // Lines seperating land / water
83  PALETTE_ECR_ECRTEXT_NAMED_LOCATION, // Area names
84  PALETTE_ECR_FORESHOL_FORESHORE_WATER, // Lines seperating foreshore land / water
85 
86  PALETTE_LCR_LANDAREA_EMBANK, // Embankment (marsh/swamp)
87 
88  PALETTE_LIM_LIMBNDYA_LIMIT_BOUNDARY, // Water lane area
89  PALETTE_LIM_LIMBNDYL_LIMIT_BOUNDARY, // Water lane seperating line
90  PALETTE_LIM_LIMBNDYA_ANCHORAGE, // Anchorage area
91  PALETTE_LIM_LIMBNDYL_ANCHORAGE, // Anchorage line
92  PALETTE_LIM_LIMBNDYA_RESTRICTED_AREA, // Restricted area
93  PALETTE_LIM_LIMBNDYL_RESTRICTED_AREA, // Restricted area line
94 
95  PALETTE_HYD_SOUNDP_SOUNDING_PT_SHALLOW, // Shallow water sounding text
96  PALETTE_HYD_SOUNDP_SOUNDING_PT_DEEP, // Deep water sounding text
97  PALETTE_HYD_HYDAREA_DEPTH_CURVE_SHALLOW, // Shallow water areas (overides PALETTE_ECR_ECRAREA_WATER)
98  PALETTE_HYD_HYDAREA_DEPTH_CURVE_DEEP, // Deep water areas (overides PALETTE_ECR_ECRAREA_WATER)
99 
100  PALETTE_IWY_LAKEA_LAKE, // Lake area
101  PALETTE_IWY_LAKEA_RESERVOIR, // Reservoir area
102  PALETTE_IWY_RIVERL_INLAND_SHORELINE, // Lines separating lake / land
103  PALETTE_IWY_RIVERA_RIVER_STREAM, // River area
104  PALETTE_IWY_RIVERL_RIVER_STREAM, // Lines seperating river / land
105  PALETTE_IWY_CANALA_CANAL, // Canal area
106  PALETTE_IWY_CANALL_CANAL, // Canal line
107 
108  PALETTE_CUL_LANDMRKA_BUILT_UP_AREA, // Built up areas
109  PALETTE_CUL_LANDMRKA_BUILT_UP_AREA_BOUNDARY, // Lines seperating built up areas / land
110  PALETTE_CUL_TRANSL_ROAD, // Road lines
111  PALETTE_CUL_RAILRDL_RAILROAD, // Railroad lines
112 
113  PALETTE_OBS_BRIDGEL_BRIDGE, // Bridge line
114 
115  PALETTE_POR_STRUCTRL_BREAKWATER,
116  PALETTE_POR_PIERL_PIER, // Pier lines extending from shore
117 
118  PALETTE_NUM_ENTRIES
119  };
120 
121  /** Change the color in a palette
122  * \param pal The id of the palette
123  * \param colorEnum The id of the color
124  * \param colorVal The new color value
125  */
126  void SetPaletteColor( const Palette pal, PaletteColor colorEnum, const glsColor& colorVal );
127 
128  /** Get a palette color value
129  * \param pal The id of the palette
130  * \param colorEnum The id of the color
131  */
132  const glsColor& GetPaletteColor( const Palette pal, PaletteColor colorEnum );
133 
134  /** Reset the given color palette to use the default colors
135  * \param pal The id of the palette to reset
136  */
137  void ResetPaletteColors( const Palette pal );
138 
139 private:
140  // Internal appearance library data
141  GlsDNCStdAppearanceData* _data;
142 
143  // Disable copy and assignment
145  const GlsDNCStdAppearance& operator=( const GlsDNCStdAppearance& );
146 };
147 
148 } // namespace disti
149 
150 #endif
void SetPaletteColor(const Palette pal, PaletteColor colorEnum, const glsColor &colorVal)
Definition: gls_dnc_std_appearance.h:42
PaletteColor
Color palette enumeration.
Definition: gls_dnc_std_appearance.h:76
The DNCMapChartDataSource class.
Definition: gls_map_dnc.h:75
Definition: gls_color.h:53
The gls_auto_lib.
GlsDNCStdAppearance()
Constructor.
Palette
Color palette IDs.
Definition: gls_dnc_std_appearance.h:60
void ResetPaletteColors(const Palette pal)
static void ConfigLibrary(void *const userData, DNCMapChartDataSource &dncSource, const int libNum)
void SetPalette(const Palette pal)
~GlsDNCStdAppearance()
Destructor.
Definition: bmpimage.h:46
const glsColor & GetPaletteColor(const Palette pal, PaletteColor colorEnum)