gre/base.h

Go to the documentation of this file.
00001 /**
00002  * \file gre/base.h <gre/base.h>
00003  * \brief Base GRE definitions
00004  *
00005  * \if NODOC
00006  * $Id: base.h_v 1.45 2006/04/13 16:24:28 dwilliss Exp $
00007  *
00008  * $Log: base.h_v $
00009  * Revision 1.45  2006/04/13 16:24:28  dwilliss
00010  * doxygen problem
00011  *
00012  * Revision 1.44  2006/03/31 16:14:46  mju
00013  * Had red/blue swapped in uicolor values.
00014  *
00015  * Revision 1.43  2006/03/24 16:17:02  mju
00016  * Add datatip predefined enum and member.
00017  *
00018  * Revision 1.42  2006/02/21 18:35:21  mju
00019  * Mark datatipparms.unitSTored for deletion.
00020  *
00021  * Revision 1.41  2006/01/10 21:27:30  mju
00022  * Add uicolor defns.
00023  *
00024  * Revision 1.40  2005/11/14 21:49:30  mju
00025  * Exclude deprecated items if deprecate_all defined.
00026  *
00027  * Revision 1.39  2005/11/11 22:51:25  mju
00028  * Remove group namelen constant.
00029  *
00030  * Revision 1.38  2005/11/04 18:51:38  mju
00031  * Put rest of gre enums in namespace.
00032  *
00033  * Revision 1.37  2005/11/03 15:41:11  mju
00034  * Remove last mfc defn.
00035  *
00036  * Revision 1.36  2005/11/02 23:00:34  mju
00037  * Remove objmgr stuff.
00038  *
00039  * Revision 1.35  2005/11/02 21:32:02  mju
00040  * Remove most mfc stuff.
00041  *
00042  * Revision 1.34  2005/10/27 13:31:28  mju
00043  * Deprecate legacy typedefs.
00044  *
00045  * Revision 1.33  2005/10/14 17:29:53  mju
00046  * GRE namespace.
00047  *
00048  * Revision 1.31  2005/09/14 21:52:59  mju
00049  * Add rendertarget_GroupActiveElems.
00050  *
00051  * Revision 1.30  2005/07/19 17:05:54  mju
00052  * Add rendertarget_GroupMatte.
00053  *
00054  * Revision 1.29  2005/05/20 20:31:47  mju
00055  * Change datatip member to positive name.
00056  *
00057  * Revision 1.28  2005/05/17 17:35:58  mju
00058  * Add noHighlight to datatipparms.
00059  *
00060  * Revision 1.27  2005/05/03 15:02:17  mju
00061  * Add rendertarget_None.
00062  *
00063  * Revision 1.26  2005/05/02 17:43:28  mju
00064  * Add drawflag_useDataTipColor.
00065  *
00066  * Revision 1.25  2005/04/29 18:07:10  mju
00067  * Fix enum order.
00068  *
00069  * Revision 1.24  2005/04/29 17:49:06  mju
00070  * Add rendertarget enum.
00071  *
00072  * Revision 1.23  2005/03/31 16:57:05  fileserver!dwilliss
00073  * Rename one of our types to MIUNICODE because it conflicted with a Microsoft #define
00074  *
00075  * Revision 1.22  2005/03/01 22:59:45  scowan
00076  * Removed unused all background flag.
00077  *
00078  * Revision 1.21  2005/03/01 14:20:27  mju
00079  * Remove unused/unneeded drawflag values.
00080  *
00081  * Revision 1.20  2005/02/24 18:52:07  mju
00082  * Add drawflag_erase.
00083  *
00084  * Revision 1.19  2005/02/23 16:55:45  mju
00085  * Add drawflag_onlyHighlighted.
00086  *
00087  * Revision 1.18  2005/02/21 18:45:55  mju
00088  * Add drawflags for noHighlighting and includeUnhighlighted.
00089  *
00090  * Revision 1.17  2005/02/18 22:34:10  mju
00091  * Add drawflag_ViewInView.
00092  *
00093  * Revision 1.16  2005/02/18 17:05:51  mju
00094  * Add drawflag_NoUpdateScreen.
00095  *
00096  * Revision 1.15  2005/02/15 15:37:50  mju
00097  * Remove unused drawflags.
00098  *
00099  * Revision 1.14  2005/02/14 18:52:31  mju
00100  * Add groupview decl.
00101  *
00102  * Revision 1.13  2005/01/20 16:53:37  mju
00103  * Add enums for listpos, drawflags, highlightmode.
00104  * Move some defns here from mdisp.
00105  *
00106  * Revision 1.12  2004/07/21 21:55:39  mju
00107  * Add layerview decl, move labelplacement decls here.
00108  *
00109  * Revision 1.11  2004/04/30 14:04:23  mju
00110  * Fwd declare callback_msg.
00111  *
00112  * Revision 1.10  2004/03/12 20:51:01  mju
00113  * Add copy ctor/op= for datatipparms.
00114  *
00115  * Revision 1.9  2004/03/12 18:19:26  mju
00116  * Change datatipparms prefix/suffix to be mistring.
00117  *
00118  * Revision 1.8  2004/03/04 18:57:24  mju
00119  * Move more shared stuff here.
00120  *
00121  * Revision 1.7  2004/02/06 16:00:50  mju
00122  * Add GRE_FIND_FLAGS enum.
00123  *
00124  * Revision 1.4  2003/09/15 13:48:59  fileserver!dwilliss
00125  * Doxygen
00126  *
00127  * Revision 1.3  2003/07/30 14:43:49  mju
00128  * Ignore forward decls.
00129  *
00130  * Revision 1.1  2003/06/16 19:39:13  mju
00131  * Initial revision
00132  * \endif
00133 **/
00134 
00135 #ifndef  INC_GRE_BASE_H
00136 #define  INC_GRE_BASE_H
00137 
00138 #ifndef  INC_MI32_STDDEFNS_H
00139    #include <mi32/stddefns.h>
00140 #endif
00141 
00142 #ifndef  INC_RVC_STYLE_H
00143    #include <rvc/style.h>
00144 #endif
00145 
00146 #ifndef  INC_MI32_GREMODE_H
00147    #include <mi32/gremode.h>
00148 #endif
00149 
00150 #ifndef  INC_MI32_LABLSTYL_H
00151    #include <mi32/lablstyl.h>
00152 #endif
00153 
00154 
00155 #ifndef GENERATING_DOXYGEN_OUTPUT
00156 // Forward-declare classes.
00157 
00158 namespace GRE {
00159    class CTRL_TREEVIEW;
00160    class ELEMSAMPLE_DC;
00161    class GROUP;
00162    class GROUPVIEW;
00163    class LABELPLACE;
00164    class LABELPLACEMENT;
00165    class LAYER;
00166    class LAYER_CAD;
00167    class LAYER_FORMULA;
00168    class LAYER_LEGEND;
00169    class LAYER_LEGEND2;
00170    class LAYER_MAPGRID;
00171    class LAYER_PINMAP;
00172    class LAYER_RASTER;
00173    class LAYER_REGION;
00174    class LAYER_SCALEBAR;
00175    class LAYER_SCRIPT;
00176    class LAYER_SHAPE;
00177    class LAYER_SKETCH;
00178    class LAYER_SURFACE;
00179    class LAYER_TEXT;
00180    class LAYER_TIN;
00181    class LAYER_VECTOR;
00182    class LAYERDC;
00183    class LAYERVIEW;
00184    class LAYOUT;
00185    class LEGEND;
00186    class MSG;
00187    class OBJECT;
00188    class TOOL;
00189    class VIEW;
00190    class VIEWABLE;
00191    class VIEWPOINT3D;
00192    }
00193 
00194 namespace RVC {
00195    class DBASE;
00196    }
00197 #endif // GENERATING_DOXYGEN_OUTPUT
00198 
00199 
00200 #define  GRE_SERIAL_VERSION   3
00201 
00202 namespace GRE {
00203 
00204 //! Position in list for use in creation and reordering.
00205 enum LISTPOS {
00206    LISTPOS_First =   0,
00207    LISTPOS_After =   1,
00208    LISTPOS_Before =  2,
00209    LISTPOS_Last =    3
00210    };
00211 
00212 //! Condition for redrawing views.
00213 enum DRAWCONDITION {
00214    DRAWCONDITION_Always,         //!< Always draw
00215    DRAWCONDITION_IfNeeded,       //!< Only draw if has changed
00216    DRAWCONDITION_IfAutoUpdate    //!< Only draw if auto-update preference is on and has changed
00217    };
00218 
00219 //! Drawing flags.
00220 enum DRAWFLAGS {
00221    DRAWFLAG_None =                  0x00000000,
00222    DRAWFLAG_ViewInView =            0x00000001, //!< Draw to view-in-view buffer
00223    DRAWFLAG_OnlyHighlighted =       0x00000002, //!< Only draw 'highlighted' elements
00224    DRAWFLAG_Erase =                 0x00000010, //!< Erase elements (for GRE::VIEW::DrawLayerElement/s)
00225    DRAWFLAG_ForceDraw =             0x00000020, //!< Force all specified elements to draw even if not "selected"
00226    DRAWFLAG_UpdateSearchTree =      0x00000040, //!< Update search tree when drawing even if in tree already
00227    DRAWFLAG_UpdateScreen =          0x00000080, //!< Refresh screen after drawing
00228    DRAWFLAG_NoUpdateScreen =        0x00000100, //!< Disable screen refresh after drawing
00229    DRAWFLAG_NoHighlighting =        0x00000200, //!< Draw elements without highlighting
00230    DRAWFLAG_UpdateBuffers =         0x00000400, //!< Update render buffers
00231    DRAWFLAG_SelectChanged =         DRAWFLAG_UpdateBuffers,
00232    DRAWFLAG_AllNonLocViews =        0x00001000, //!< Draw all non-locator views
00233    DRAWFLAG_NoMessage =             0x00004000, //!< Don't display messages while drawing
00234    DRAWFLAG_Wireframe =             0x00008000, //!< Only draw wireframes
00235    DRAWFLAG_NoResumeTool =          0x00010000, //!< Don't "resume" tool after drawing view
00236    DRAWFLAG_NoBlankScreen =         0x00040000, //!< Don't "blank" screen when start drawing view
00237    DRAWFLAG_NoCallbacks =           0x00400000, //!< Don't invoke callback lists while drawing
00238    DRAWFLAG_CheckDrawnSet =         0x00800000, //!< Check "drawn" set for highlighting
00239    DRAWFLAG_ReduceSpeckle3D =       0x01000000, //!< Perform 3D background speckle reduction
00240    DRAWFLAG_UseDataTipColor =       0x02000000, //!< Draw in 'datatip element' color.
00241    DRAWFLAG_UseHighlightColor =     0x04000000, //!< Draw elements in "highlight" color
00242    DRAWFLAG_UseActiveColor =        0x08000000, //!< Draw element in "active" color
00243    DRAWFLAG_NoCheckVisible =        0x10000000, //!< Don't check visiblity of layer/group in view
00244    DRAWFLAG_LabelPlacementPass =    0x20000000, //!< Internal use: 2nd pass to render just labels
00245    };
00246 DEFINE_ENUM_OP_BITWISE(DRAWFLAGS)
00247 
00248 //! Flags for "find" methods.
00249 enum FINDFLAGS {
00250    FINDFLAG_ViewCoords =      0x0000,  //!< Point given in "view" coordinates
00251    FINDFLAG_DisplayCoords =   0x0001,  //!< Point given in "display" coordinates
00252    FINDFLAG_LayerCoords =     0x0002,  //!< Point given in "layer" (object) coordinates
00253    FINDFLAG_UseClosest =      0x0004,  //!< Return closest if no other found
00254    FINDFLAG_NoSingleLayer =   0x0008,  //!< Don't check single-layer groups
00255    FINDFLAG_No3D =            0x0010,  //!< Don't check 3-D groups
00256    FINDFLAG_SearchDrawnSet =  0x0020,  //!< Only search the "drawn" element set
00257    FINDFLAG_MapCoords =       0x0040   //!< Point given in "map" coordinates
00258    };
00259 DEFINE_ENUM_OP_BITWISE(FINDFLAGS)
00260 
00261 //! Targets for rendering individual elements.
00262 enum RENDERTARGET {
00263    RENDERTARGET_None =              0x0000,
00264    RENDERTARGET_LayerNormal =       0x0001,     //!< Layer buffer for unhighlighted elements
00265    RENDERTARGET_LayerHighlight =    0x0002,     //!< Layer buffer for highlighted elements
00266    RENDERTARGET_LayerLabel =        0x0004,     //!< Layer buffer for labels
00267    RENDERTARGET_LayerAll =          0x0007,     //!< All layer buffers
00268    RENDERTARGET_Group =             0x0010,     //!< Group combined buffer
00269    RENDERTARGET_GroupActiveElems =  0x0020,     //!< Group 'active elements' buffer
00270    RENDERTARGET_GroupMatte =        0x0040,     //!< Group matte buffer
00271    RENDERTARGET_GroupOverlay =      0x0080,     //!< Group overlay buffer
00272    RENDERTARGET_GroupAll =          0x00F0,     //!< All group buffers
00273    RENDERTARGET_ViewMemory =        0x1000,     //!< View memory buffer
00274    RENDERTARGET_ViewScreen =        0x8000      //!< View screen (unbuffered)
00275    };
00276 DEFINE_ENUM_OP_BITWISE(RENDERTARGET)
00277 
00278 //! Mode for highlighing elements.
00279 enum HIGHLIGHTMODE {
00280    HIGHLIGHTMODE_NotSet =     0,    //!< Not set, use parent's setting
00281    HIGHLIGHTMODE_Replace =    1,    //!< Replace selected set with elements provided
00282    HIGHLIGHTMODE_Add =        2,    //!< Add elements provided to selected set
00283    HIGHLIGHTMODE_Subtract =   3,    //!< Subtract elements from selected set
00284    HIGHLIGHTMODE_Toggle =     4,    //!< Toggle selection status of elements
00285    };
00286 
00287 // Colors for user interface elements.
00288 const UINT32 UICOLOR_TextNormal =            0x00000000;
00289 const UINT32 UICOLOR_TextDim =               0x00505050;    // Gray
00290 const UINT32 UICOLOR_TextNotVisibleAtScale = 0x00208020;    // Dark Green
00291 const UINT32 UICOLOR_TextNotInExtent =       0x00800000;    // Dark Blue
00292 const UINT32 UICOLOR_TextNotYetRendered =    0x000000A0;    // Red
00293 const UINT32 UICOLOR_TextEditable =          0x00800080;    // Purple
00294 
00295 
00296 #define  MDISPSELECT_ViewCoords           0x0000   //!< Point(s) in "view" coordinates
00297 #define  MDISPSELECT_DisplayCoords        0x0001   //!< Point(s) in "display" coordinates
00298 #define  MDISPSELECT_AutoOpenDefaultLayer 0x0002   //!< Automatically make "default" layer elements selectable
00299 #define  MDISPSELECT_AutoOpenActiveLayer  0x0004   //!< Automatically make "active" layer elements selectable
00300 #define  MDISPSELECT_AutoOpenTable        0x0008   //!< Automatically open table(s) for selectable element types
00301 
00302 #define  MDISPVISIBLE_AllViews         0xFFFFFFFF
00303 #define  MDISPVISIBLE_Locator          0x00000001
00304 #define  MDISPVISIBLE_Hardcopy         0x80000000
00305 
00306 //===================================================================================================================
00307 
00308 #define  LABELSELECT_None           0x0000
00309 #define  LABELSELECT_AllDrawnElem   0x0001   //!< Show labels for all "drawn" elements
00310 #define  LABELSELECT_IfFit          0x0002   //!< If label fits inside/alongside element
00311 
00312 #define  LABELTEXT_None             0x0000
00313 #define  LABELTEXT_ByAttribute      0x0001
00314 #define  LABELTEXT_ByField          LABELTEXT_ByAttribute
00315 #define  LABELTEXT_ByScript         0x0002
00316 #define  LABELTEXT_ByQuery          LABELTEXT_ByScript
00317 
00318 #define  LABELPOSN_Default             0
00319 
00320 #define  LABELPOSN_PointAboveLeft      1
00321 #define  LABELPOSN_PointAboveCenter    2
00322 #define  LABELPOSN_PointAboveRight     3
00323 #define  LABELPOSN_PointCenterLeft     4
00324 #define  LABELPOSN_PointCenter         5
00325 #define  LABELPOSN_PointCenterRight    6
00326 #define  LABELPOSN_PointBelowLeft      7
00327 #define  LABELPOSN_PointBelowCenter    8
00328 #define  LABELPOSN_PointBelowRight     9
00329 
00330 #define  AUTOLABELOPTM_None            0x00
00331 #define  AUTOLABELOPTM_Fast            0x01
00332 #define  AUTOLABELOPTM_Full            0x02
00333 #define  AUTOLABELOPTM_HideOverlap     0x04
00334 
00335 #define  AUTOLABELPRIORITY_AllSame     0
00336 #define  AUTOLABELPRIORITY_ByField     1
00337 #define  AUTOLABELPRIORITY_ByScript    2
00338 
00339 
00340 //===================================================================================================================
00341 //!      Parameters needed for various element types
00342 
00343 //! Selection parameters for determining which elements to draw
00344 struct SELECTPARMS {
00345    public:
00346       UINT16 Mode;                           //!< Selection mode - SELECTMODE_...
00347       INT16 Table;                           //!< 'Selection' table number
00348       MIUNICODE *QueryStr;                   //!< Query script for selection by query
00349       RVC::OBJECTNAME TableName;             //!< 'Selection' table name
00350 
00351       SELECTPARMS (                          //! Default constructor
00352          );
00353       SELECTPARMS (                          //! Copy constructor
00354          const SELECTPARMS& rhs
00355          );
00356       ~SELECTPARMS ();                       //! Destructor
00357 
00358       SELECTPARMS& operator= (               //! Assignment
00359          const SELECTPARMS& rhs
00360          );
00361 
00362       //! Check and validate for specified database and optionally fix mode if none valid.
00363       void CheckTable (
00364          const RVC::DBASE& db,               //!< Database object
00365          bool fixmode                        //!< Fix selection mode if necessary
00366          );
00367 
00368       //! Determine if need to have a valid database table.
00369       bool NeedTable (
00370          ) const { return ((Mode & SELECTMODE_NeedsTable) != 0); }
00371 
00372       //! Validate settings and fix if necessary.
00373       void Validate ();
00374    };
00375 
00376 //! Basic style parameters for element drawing
00377 struct STYLEPARMS {
00378    public:
00379       UINT16 Mode;                           //!< Selection mode - STYLEMODE_...
00380       INT16 Table;                           //!< 'Style assignment' table number
00381       MIUNICODE *QueryStr;                   //!< Query string for styling by scipt
00382       RVC::OBJECTNAME TableName;             //!< 'Style Assignment' table name
00383 
00384       STYLEPARMS (                           //! Default constructor
00385          );
00386       STYLEPARMS (                           //! Copy constructor
00387          const STYLEPARMS& rhs
00388          );
00389       ~STYLEPARMS ();                        //! Destructor
00390 
00391       STYLEPARMS& operator= (                //! Assignment
00392          const STYLEPARMS& rhs
00393          );
00394 
00395       //! Check and validate for specified database and optionally fix mode if none valid.
00396       void CheckTable (
00397          const RVC::DBASE& db,               //!< Database object
00398          bool fixmode,                       //!< Fix selection mode if necessary
00399          const RVC::STYLE::TYPE styletype = RVC::STYLE::TYPE_NumTypes
00400          );
00401 
00402       //! Determine if need to have a valid database table.
00403       bool NeedTable (
00404          ) const { return ((Mode & STYLEMODE_NeedsTable) != 0); }
00405 
00406       //! Validate settings and fix if necessary.
00407       void Validate ();
00408    };
00409 
00410 //! DataTip parameters.
00411 struct DATATIPPARMS {
00412    public:
00413       #ifndef GENERATING_DOXYGEN_OUTPUT
00414       class FORM;
00415       #endif // GENERATING_DOXYGEN_OUTPUT
00416 
00417       //! Built-in datatip values.
00418       // At present only one value is allowed, however defined as bits so could allow multiple in future
00419       enum PREDEFINED {
00420          PREDEFINED_None =             0x00,
00421          PREDEFINED_ImageCellValue =   0x01,
00422          PREDEFINED_LinkTileName =     0x02,
00423          };
00424 
00425       RVC::OBJECTNAME TableName;             //!< Table name
00426       RVC::OBJECTNAME FieldName;             //!< Field name
00427       INT32 TableNum;                        //!< Table number
00428       INT32 FieldNum;                        //!< Field number
00429       UINT8 Visible;                         //!< Show this DataTip
00430       UINT8 IsNumeric;                       //!< Set if field is numeric
00431       UINT8 UnitType;                        //!< Field unit type, here for validation against DBFIELDINFO
00432       UINT8 m_Predefined;                    //!< Predefined value to show
00433       UINT8 UnitShown;                       //!< Unit to show field in
00434       UINT8 DecPlaces;                       //!< Decimal places for floating-point fields
00435       UINT8 NoChgField;                      //!< Set if user cannot change field (eg. for RGB raster)
00436       UINT8 HighlightElem;                   //!< Set to highlight element in view when datatip shown
00437       MISTRING Prefix;                       //!< Label to place before value in string, defaults to table.field name
00438       MISTRING Suffix;                       //!< Label to place after value in string, defaults to unit name
00439 
00440       //! Get serialization item definition array.
00441       static const SERIALIZER::ITEMDEF *GetSerialItemDef();
00442 
00443       //! Default constructor.
00444       DATATIPPARMS (
00445          );
00446 
00447       DATATIPPARMS (
00448          const DATATIPPARMS& rhs
00449          );
00450 
00451       DATATIPPARMS& operator= (
00452          const DATATIPPARMS& rhs
00453          );
00454 
00455       //! Set suffix to default based on unit type/shown.
00456       void SetDefaultSuffix (
00457          );
00458 
00459    };
00460 
00461 //! Automatic labeling parameters
00462 struct AUTOLABELPARMS {
00463    public:
00464       static const SERIALIZER::ITEMDEF *GetSerialItemDef();
00465       UINT8 SelectMode;                      //!< LABELSELECT_...
00466       UINT8 TextMode;                        //!< LABELTEXT_...
00467       UINT8 Posn;                            //!< LABELPOSN_... Label position relative to element
00468       UINT8 Optm;                            //!< AUTOLABELOPTM_... Optimization
00469       UINT8 Priority;                        //!< AUTOLABELPRIORITY_... priority mode
00470       RVC::OBJECTNAME TableName;             //!< Table name for LABELMODE_ByField
00471       RVC::OBJECTNAME FieldName;             //!< Field name for LABELMODE_ByField
00472       MIUNICODE *QueryStr;                   //!< Query string for LABELMODE_ByScript
00473       TEXTSTYLE Style;                       //!< Label style
00474       LABELFRAMEPARMS FrameParms;            //!< Label Frame Parameters
00475       RVC::OBJECTNAME PriorityTableName;     //!< Table name for AUTOLABELPRIORITY_ByField
00476       RVC::OBJECTNAME PriorityFieldName;     //!< Field name for AUTOLABELPRIORITY_ByField
00477       double m_MinScaleVisible;              //!< Minimum scale at which labels are visible
00478       double m_MaxScaleVisible;              //!< Maximum scale at which labels are visible
00479 
00480       //! Default constructor
00481       AUTOLABELPARMS (
00482          );
00483 
00484       //! Copy constructor
00485       AUTOLABELPARMS (
00486          const AUTOLABELPARMS& rhs
00487          );
00488 
00489       //! Destructor
00490       ~AUTOLABELPARMS (
00491          );
00492 
00493       //! Assignment
00494       AUTOLABELPARMS& operator= (
00495          const AUTOLABELPARMS& rhs
00496          );
00497 
00498       //! Check and validate for specified database and optionally fix mode if none valid.
00499       void CheckTable (
00500          const RVC::DBASE& db,               //!< Database object
00501          bool fixmode                        //!< Fix mode if necessary
00502          );
00503 
00504       //! Determine if labels are selected and visible at specified scale.
00505       bool IsSelected (
00506          double scale                  //!< Map scale
00507          ) const { return (SelectMode != LABELSELECT_None && scale >= m_MinScaleVisible && (m_MaxScaleVisible <= 0.0 || scale <= m_MaxScaleVisible)); }
00508 
00509       void Validate ();
00510 
00511    private:
00512       #ifndef GENERATING_DOXYGEN_OUTPUT
00513       void Copy (const AUTOLABELPARMS& rhs);
00514       #endif // GENERATING_DOXYGEN_OUTPUT
00515    };
00516 
00517 //! Parameters for LegendView associated with element
00518 struct LEGENDPARMS {
00519    public:
00520 
00521       RVC::OBJECTNAME TableName;             //!< Table for legend labels
00522       RVC::OBJECTNAME FieldName;             //!< Field for legend labels
00523       MGD::STYLESAMPLEFLAGS SampleFlags;           //!< Flags for legend element drawing
00524 
00525       LEGENDPARMS (                          //! Default constructor
00526          ): SampleFlags(MGD::STYLESAMPLE_Default) { }
00527       // No allocated members so can use compiler generated dtor, copy ctor, assignment
00528    };
00529 
00530 //! Point/Node element parameters.
00531 struct POINTPARMS {
00532    public:
00533 
00534       struct POINTSTYLEPARMS : public STYLEPARMS {
00535          POINTSTYLE Normal;                  //!< Style to use in normal drawing
00536          };
00537 
00538       SELECTPARMS Select;
00539       POINTSTYLEPARMS Style;
00540       DATATIPPARMS DataTip;                  //!< DataTip parameters
00541       AUTOLABELPARMS AutoLabel;
00542       LEGENDPARMS Legend;
00543       RVC::OBJECTNAME LegendElemTableName;
00544 
00545       POINTPARMS ();
00546       POINTPARMS (const POINTPARMS& rhs);
00547       ~POINTPARMS ();
00548 
00549       POINTPARMS& operator= (const POINTPARMS& rhs);
00550       void Validate ();
00551    };
00552 
00553 //! Line element parameters
00554 struct LINEPARMS {
00555    public:
00556 
00557       struct LINESTYLEPARMS : public STYLEPARMS {
00558          LINESTYLE Normal;             //!< Style to use in normal drawing
00559          };
00560 
00561       SELECTPARMS Select;
00562       LINESTYLEPARMS Style;
00563       DATATIPPARMS DataTip;            //!< DataTip parameters
00564       AUTOLABELPARMS AutoLabel;
00565       LEGENDPARMS Legend;
00566       RVC::OBJECTNAME LegendElemTableName;
00567 
00568       LINEPARMS ();
00569       LINEPARMS (const LINEPARMS& rhs);
00570       ~LINEPARMS ();
00571 
00572       LINEPARMS& operator= (const LINEPARMS& rhs);
00573       void Validate ();
00574    };
00575 
00576 //! Polygon/Area element parameters
00577 struct POLYPARMS {
00578    public:
00579 
00580       struct POLYSTYLEPARMS : public STYLEPARMS {
00581          POLYSTYLE Normal;             //!< Style to use in normal drawing
00582          };
00583 
00584       SELECTPARMS Select;
00585       POLYSTYLEPARMS Style;
00586       DATATIPPARMS DataTip;            //!< DataTip parameters
00587       AUTOLABELPARMS AutoLabel;
00588       LEGENDPARMS Legend;
00589       LEGENDPARMS LegendInt;           //!< Label inside the polygon sample
00590       RVC::OBJECTNAME LegendElemTableName;
00591       bool ShowInteriorLabel;          //!< Show the label inside the polygon sample
00592       bool ShowLabel;                  //!< Show the label outside the polygon sample
00593 
00594       POLYPARMS ();
00595       POLYPARMS (const POLYPARMS& rhs);
00596       ~POLYPARMS ();
00597 
00598       POLYPARMS& operator= (const POLYPARMS& rhs);
00599       void Validate ();
00600    };
00601 
00602 //! Label/Text element parameters
00603 struct LABELPARMS {
00604    public:
00605 
00606       struct LABELSTYLEPARMS : public STYLEPARMS {
00607          TEXTSTYLE Normal;             //!< Style to use in normal drawing
00608          LABELFRAMEPARMS FrameParms;
00609          
00610          LABELSTYLEPARMS ();
00611          };
00612 
00613       SELECTPARMS Select;
00614       LABELSTYLEPARMS Style;
00615       DATATIPPARMS DataTip;            //!< DataTip parameters
00616       double MinScaleVisible;          //!< Minimum scale at which labels are visible
00617       double MaxScaleVisible;          //!< Maximum scale at which labels are visible
00618 
00619       LABELPARMS ();
00620       LABELPARMS (const LABELPARMS& rhs);
00621       ~LABELPARMS ();
00622 
00623       LABELPARMS& operator= (const LABELPARMS& rhs);
00624 
00625       //! Determine if labels are visible at specified scale.
00626       bool IsVisibleAtScale (
00627          double scale                  //!< Map scale
00628          ) const { return (scale >= MinScaleVisible && (MaxScaleVisible <= 0.0 || scale <= MaxScaleVisible)); }
00629       void Validate ();
00630    };
00631 
00632 //! 3D parameters for 3d points
00633 struct D3POINTPARMS {
00634    public:
00635 
00636       enum MODE {
00637          MODE_None      = 0,
00638          MODE_Height    = 1,
00639          MODE_Elevation = 2
00640          };
00641 
00642       MODE Mode;
00643       RVC::OBJECTNAME TableName; //!<  table for z value
00644       RVC::OBJECTNAME FieldName; //!< field for z value
00645       UINT8 Unit;             //!<  unit for distance
00646       LINEPARMS Line;
00647       POINTPARMS Point;
00648       bool UseColorStack;
00649       COLOR BelowColor;       //!<  Color to display wireframe below surface
00650       COLOR AboveColor;       //!<  Color to display wireframe above surface
00651 
00652       D3POINTPARMS ();
00653       D3POINTPARMS (const D3POINTPARMS& rhs);
00654       ~D3POINTPARMS ();
00655 
00656       D3POINTPARMS& operator= (const D3POINTPARMS& rhs);
00657    };
00658 
00659 //! 3D parameters for 3d polygons
00660 struct D3POLYPARMS {
00661    public:
00662 
00663       enum MODE {
00664          MODE_None      = 0,
00665          MODE_Height    = 1,
00666          MODE_Elevation = 2
00667          };
00668       enum BASE {
00669          BASE_Minimum   = 0,
00670          BASE_Maximum   = 1
00671          };
00672 
00673       MODE Mode;
00674       BASE Base;
00675       RVC::OBJECTNAME TableName;       //!<  table for z value
00676       RVC::OBJECTNAME FieldName;       //!< field for z value
00677       UINT8 Unit;             //!<  unit for distance
00678       POLYPARMS Poly;
00679       bool UseColorStack;
00680       COLOR