GL Studio C++ Runtime API
gls_map_chart.h
Go to the documentation of this file.
1 /*! \file
2  \brief The disti::GlsMapChart class.
3 
4  \par Copyright Information
5 
6  Copyright (c) 2008 The DiSTI Corporation.<br>
7  11486 Corporate Blvd; Suite 190<br>
8  Orlando, Florida 32817<br>
9  USA<br>
10  <br>
11  All rights reserved.<br>
12 
13  This Software contains proprietary trade secrets of DiSTI and may not be
14 reproduced, in whole or part, in any form, or by any means of electronic,
15 mechanical, or otherwise, without the written permission of DiSTI. Said
16 permission may be derived through the purchase of applicable DiSTI product
17 licenses which detail the distribution rights of this content and any
18 Derivative Works based on this or other copyrighted DiSTI Software.
19 
20  NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
21 AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
22 PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
23 AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24 IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
25 PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
26 
27  LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
28 IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
29 INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
30 DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
31 INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
32 INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
33 OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
34 EXCEED FIVE DOLLARS (US$5.00).
35 
36  The aforementioned terms and restrictions are governed by the laws of the
37 State of Florida and the United States of America.
38 
39 */
40 #ifndef INCLUDED_GLSMAPCHART_H
41 #define INCLUDED_GLSMAPCHART_H
42 
43 #include "display.h"
44 #include "gls_map_view.h"
45 
47 
48 //////////////////// Provides support for creating DLLs ////////////////////////
49 #if( defined( GLSGEN_EXPORT_GLSMAPCHART ) || defined( GLSGEN_IMPORT_GLSMAPCHART ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
50  && defined( _MSC_VER )
51 # if defined( GLSGEN_EXPORT_GLSMAPCHART ) || defined( GLS_EXPORT_GENERATED )
52 # define GLSGEN_GLSMAPCHART_EXPORT __declspec( dllexport )
53 # else
54 # define GLSGEN_GLSMAPCHART_EXPORT __declspec( dllimport )
55 # endif
56 #else
57 # define GLSGEN_GLSMAPCHART_EXPORT
58 #endif
59 ///////////////////////////////////////////////////////////////////////////////
60 
61 #define LIB_BASE_NAME "gls_map_toolkit"
62 #include "gls_auto_lib.h"
63 #undef LIB_BASE_NAME
64 
65 namespace disti
66 {
67 class MapChartCellMgr;
68 
69 /** Runtime implementation of a GlsMapChart */
70 class GlsMapChart : public DisplayObject
71 {
72 public:
73  DISTI_DEPRECATED( "This identifier is forbidden by the C++ standard. Use BaseClass instead." )
74  typedef DisplayObject _BaseClass;
75  typedef DisplayObject BaseClass;
76 
77  friend class GlsMapChartEditor;
78 
79  /** Create a new GlsMapChart.
80  * \param generateInstance Whether or not to generate an instance name
81  * for this inputdevice */
82  GLSGEN_GLSMAPCHART_EXPORT GlsMapChart( bool generateInstance = false );
83 
84  /** Destructs a GlsMapChart object */
85  virtual GLSGEN_GLSMAPCHART_EXPORT ~GlsMapChart();
86 
87  static GLSGEN_GLSMAPCHART_EXPORT DisplayObject* CreateInstance();
88 
89  //////////////////////////////////////////////////
90  // Overridden base class methods
91  //////////////////////////////////////////////////
92 
93  virtual GLSGEN_GLSMAPCHART_EXPORT void SetAvailableAttributes( unsigned int value );
94  virtual GLSGEN_GLSMAPCHART_EXPORT DisplayObject* CloneObject( bool generateNames = false );
95  virtual GLSGEN_GLSMAPCHART_EXPORT void CopyProperties( DisplayObject* src );
96 
97  virtual GLSGEN_GLSMAPCHART_EXPORT InterfaceListType* GetCppInterfaceDescription( InterfaceListType* addToThisList = NULL );
98  virtual GLSGEN_GLSMAPCHART_EXPORT void GetCppInterfaceDescriptionFree( InterfaceListType* array );
99 
100  virtual GLSGEN_GLSMAPCHART_EXPORT void PreDraw( const OpenGLMatrices& parentMatrices, Culler& culler );
101  virtual GLSGEN_GLSMAPCHART_EXPORT void Draw( void );
102 
103  virtual GLSGEN_GLSMAPCHART_EXPORT DisplayObject* handle( DisplayEvent* ev );
104 
105  virtual GLSGEN_GLSMAPCHART_EXPORT void SetValue( int spec, va_list& args );
106 
107  //////////////////////////////////////////////////
108  // GlsMapChart specific operations
109  //////////////////////////////////////////////////
110 
111  /** \returns pointer to the GlsMapView that the chart will use for rendering
112  * or NULL if not found. */
114  {
115  return GetParentMapView( this );
116  }
117 
118  /** Set the GlsMapChartDataSource to use for rendering.
119  * The creator of the GlsMapChartDataSource instance is responsible for deleting it.
120  * \param database Pointer to the GlsMapChartDataSource to use
121  */
122  virtual void SetDataSource( GlsMapChartDataSource* database );
123 
124  /** \returns pointer to the GlsMapChartDataSource this chart is using
125  * or NULL if the chart is not using a data source. */
126  inline GlsMapChartDataSource* GetDataSource() { return _dataSource; }
127 
128  /** If true, the GlsMapChart will display MapChartCells that have not yet loaded
129  * using it's own texture settings.
130  * Default: false */
131  GLSGEN_GLSMAPCHART_EXPORT void ShowLoadingCells( const bool& value );
132  /** \return Whether the GlsMapChart will display MapChartCells that have not yet loaded */
133  inline bool ShowLoadingCells() { return _showLoadingCells; }
134 
135  /** Utility method.
136  * Not normally called by user.
137  * May be removed in future releases. */
138  bool BindLoadingImage();
139 
140 protected:
141  GlsMapChartDataSource* _dataSource;
142 
143  bool _showLoadingCells;
144 
145  MapChartCellMgr* _cellMgr;
146 };
147 
148 } // namespace disti
149 
150 #endif
Definition: cull.h:49
virtual void CopyProperties(DisplayObject *src)
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:436
virtual ~GlsMapChart()
Definition: dynamic_array.h:66
Definition: gls_map_chart_data_source.h:210
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:471
virtual DisplayObject * handle(DisplayEvent *ev)
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler)
Definition: display.h:98
The GlsMapView is a special group that controls the map view parameters. It contains all of the objec...
Definition: gls_map_view.h:86
GlsMapChart(bool generateInstance=false)
The disti::DisplayObject class and global enumerations.
bool ShowLoadingCells()
Definition: gls_map_chart.h:133
GlsMapChartDataSource * GetDataSource()
Definition: gls_map_chart.h:126
The disti::GlsMapChartDataSource class.
virtual void SetAvailableAttributes(unsigned int value)
virtual void Draw(void)
GlsMapView * GetMapView()
Definition: gls_map_chart.h:113
Definition: events.h:112
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
GlsMapView * GetParentMapView(DisplayObject *obj)
Definition: gls_map_view.h:290
The gls_auto_lib.
virtual void SetDataSource(GlsMapChartDataSource *database)
virtual DisplayObject * CloneObject(bool generateNames=false)
virtual void SetValue(int spec, va_list &args)
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
The disti::GlsMapView class.
Definition: gls_map_chart.h:70
Definition: bmpimage.h:46