00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #ifndef INC_GRE_BASE_H
00042 #define INC_GRE_BASE_H
00043
00044 #ifndef INC_MI32_STDDEFNS_H
00045 #include <mi32/stddefns.h>
00046 #endif
00047
00048 #ifndef INC_RVC_STYLE_H
00049 #include <rvc/style.h>
00050 #endif
00051
00052 #ifndef INC_MI32_GREMODE_H
00053 #include <mi32/gremode.h>
00054 #endif
00055
00056 #ifndef INC_MI32_LABLSTYL_H
00057 #include <mi32/lablstyl.h>
00058 #endif
00059
00060
00061 #ifndef GENERATING_DOXYGEN_OUTPUT
00062
00063 class GRE_CALLBACK_MSG;
00064 class GRE_ELEMSAMPLE_DC;
00065 class GRE_LAYER;
00066 class GRE_LAYER_RASTER;
00067 class GRE_LAYER_SURFACE;
00068 class GRE_LAYERDC;
00069 class GRE_LAYOUT;
00070 class GRE_LEGEND;
00071 class GRE_GROUP;
00072 class GRE_OBJECT;
00073 class GRE_TOOL;
00074 class GRE_VIEW;
00075 class GRE_VIEWABLE;
00076 class GRE_VIEWPOINT3D;
00077
00078 #ifdef WIN32_MFC
00079 class GRE_MFC_VIEW;
00080 class GRE_MFC_DLGCOMPSELQUERY;
00081 class GRE_MFC_TREEVIEW;
00082 class GRE_MFC_STATUSBAR;
00083 #endif
00084
00085 namespace GRE {
00086 class LABELPLACE;
00087 class LABELPLACEMENT;
00088 class LAYERVIEW;
00089 }
00090
00091 namespace RVC {
00092 class DBASE;
00093 }
00094 #endif // GENERATING_DOXYGEN_OUTPUT
00095
00096
00097
00098 enum GRE_OBJTYPE {
00099 GRE_OBJTYPE_None = 0,
00100 GRE_OBJTYPE_System = 0x01,
00101 GRE_OBJTYPE_Layout = 0x02,
00102 GRE_OBJTYPE_Group = 0x04,
00103 GRE_OBJTYPE_Layer = 0x08,
00104 GRE_OBJTYPE_View = 0x10,
00105 GRE_OBJTYPE_All = 0xFF,
00106 };
00107 DEFINE_ENUM_OP_BITWISE(GRE_OBJTYPE);
00108
00109 #define GRE_MAXVIEWS 32
00110 #define GRE_GROUP_NAMELEN 64
00111
00112 #ifdef X_NATIVE
00113
00114 enum GRE_OBJMGRITEM {
00115 GRE_OBJMGRITEM_Layer = 0,
00116 GRE_OBJMGRITEM_Component = 1,
00117 GRE_OBJMGRITEM_Table = 2,
00118 GRE_OBJMGRITEM_RawForm = 3,
00119 };
00120 #endif
00121
00122 enum GRE_FIND_FLAGS {
00123 GRE_FIND_ViewCoords = 0x0000,
00124 GRE_FIND_DisplayCoords = 0x0001,
00125 GRE_FIND_LayerCoords = 0x0002,
00126 GRE_FIND_UseClosest = 0x0004,
00127 GRE_FIND_NoSingleLayer = 0x0008,
00128 GRE_FIND_No3D = 0x0010,
00129 GRE_FIND_SearchDrawnSet = 0x0020,
00130 GRE_FIND_MapCoords = 0x0040
00131 };
00132 DEFINE_ENUM_OP_BITWISE(GRE_FIND_FLAGS);
00133
00134
00135
00136
00137
00138 #define GRE_SERIAL_VERSION 3
00139
00140 #define MDISPLISTPOS_End 0x00000000
00141 #define MDISPLISTPOS_After 0x00000001
00142 #define MDISPLISTPOS_Before 0x00000002
00143 #define MDISPLISTPOS_Beginning 0x00000003
00144 #define MDISPLISTPOS_Mask 0x00000003
00145
00146
00147 #define MDISPCREATE_InsertEnd MDISPLISTPOS_End
00148 #define MDISPCREATE_InsertAfter MDISPLISTPOS_After
00149 #define MDISPCREATE_InsertBefore MDISPLISTPOS_Before
00150 #define MDISPCREATE_InsertBeginning MDISPLISTPOS_Beginning
00151
00152 #define MDISPCREATE_NoCallCreateCB 0x00000004
00153 #define MDISPCREATE_Temporary 0x00000008
00154
00155
00156 #define MDISPCREATE_LayerNoSelNewObj 0x00001000
00157 #define MDISPCREATE_LayerKeepOpen 0x00002000
00158 #define MDISPCREATE_LayerEditable 0x00004000
00159 #define MDISPCREATE_LayerNoGeoreference 0x00008000
00160 #define MDISPCREATE_LayerIgnoreExtents 0x00010000
00161 #define MDISPCREATE_LayerOnePerGroup 0x00020000
00162 #define MDISPCREATE_LayerDispParmSet 0x00040000
00163 #define MDISPCREATE_LayerNoAllowDelete 0x00080000
00164 #define MDISPCREATE_LayerNoControlPanel 0x00100000
00165 #define MDISPCREATE_LayerNoPromptObject 0x00200000
00166 #define MDISPCREATE_LayerNoComputePos 0x00400000
00167 #define MDISPCREATE_LayerNoSetActive 0x00800000
00168 #define MDISPCREATE_LayerNoShowInMgr 0x01000000
00169 #define MDISPCREATE_LayerOpenCtrlPanel 0x02000000
00170
00171
00172 #define MDISPCREATE_Group3D 0x00001000
00173 #define MDISPCREATE_GroupNoAutoMatch 0x00002000
00174 #define MDISPCREATE_GroupNoSetActive 0x00004000
00175
00176
00177 #define MDISPCREATE_ViewNoCloseOption 0x00000100
00178 #define MDISPCREATE_ViewDestroyOnClose 0x00000200
00179 #define MDISPCREATE_ViewNoSelectTool 0x00000400
00180 #define MDISPCREATE_ViewNoLegendView 0x00000800
00181 #define MDISPCREATE_ViewNoStdTools 0x00001000
00182 #define MDISPCREATE_ViewNoDftAddIcons 0x00002000
00183 #define MDISPCREATE_ViewNoCancelButton 0x00004000
00184 #define MDISPCREATE_ViewNoSkipButton 0x00008000
00185 #define MDISPCREATE_ViewNoRedrawButton 0x00010000
00186 #define MDISPCREATE_ViewNoToolBoxTool 0x00020000
00187 #define MDISPCREATE_ViewNoStatusLine 0x00040000
00188 #define MDISPCREATE_ViewNoIconBar 0x00080000
00189 #define MDISPCREATE_ViewNoDftDrawIcons 0x00100000
00190 #define MDISPCREATE_ViewNoDftViewIcons 0x00200000
00191 #define MDISPCREATE_ViewNoScalePosLine 0x00400000
00192 #define MDISPCREATE_ViewNoScrollbars 0x00800000
00193 #define MDISPCREATE_ViewLocator 0x01000000
00194 #define MDISPCREATE_View3D 0x02000000
00195 #define MDISPCREATE_ViewHardcopy 0x04000000
00196 #define MDISPCREATE_ViewStereoLeft 0x08000000
00197 #define MDISPCREATE_ViewStereoRight 0x10000000
00198 #define MDISPCREATE_ViewDialogModal 0x20000000
00199 #define MDISPCREATE_ViewAllowGeoLock 0x40000000
00200
00201
00202
00203 #define LABELSELECT_None 0x0000
00204 #define LABELSELECT_AllDrawnElem 0x0001
00205 #define LABELSELECT_IfFit 0x0002
00206
00207 #define LABELTEXT_None 0x0000
00208 #define LABELTEXT_ByAttribute 0x0001
00209 #define LABELTEXT_ByField LABELTEXT_ByAttribute
00210 #define LABELTEXT_ByScript 0x0002
00211 #define LABELTEXT_ByQuery LABELTEXT_ByScript
00212
00213
00214
00215
00216
00217 struct SELECTPARMS {
00218 public:
00219 UINT16 Mode;
00220 INT16 Table;
00221 UNICODE *QueryStr;
00222 RVC::OBJECTNAME TableName;
00223
00224 SELECTPARMS (
00225 );
00226 SELECTPARMS (
00227 const SELECTPARMS& rhs
00228 );
00229 ~SELECTPARMS ();
00230
00231 SELECTPARMS& operator= (
00232 const SELECTPARMS& rhs
00233 );
00234
00235
00236 void CheckTable (
00237 const RVC::DBASE& db,
00238 bool fixmode
00239 );
00240
00241
00242 bool NeedTable (
00243 ) const { return ((Mode & SELECTMODE_NeedsTable) != 0); }
00244
00245
00246 void Validate ();
00247 };
00248
00249
00250 struct STYLEPARMS {
00251 public:
00252 UINT16 Mode;
00253 INT16 Table;
00254 UNICODE *QueryStr;
00255 RVC::OBJECTNAME TableName;
00256
00257 STYLEPARMS (
00258 );
00259 STYLEPARMS (
00260 const STYLEPARMS& rhs
00261 );
00262 ~STYLEPARMS ();
00263
00264 STYLEPARMS& operator= (
00265 const STYLEPARMS& rhs
00266 );
00267
00268
00269 void CheckTable (
00270 const RVC::DBASE& db,
00271 bool fixmode,
00272 const RVC::STYLE::TYPE styletype = RVC::STYLE::TYPE_NumTypes
00273 );
00274
00275
00276 bool NeedTable (
00277 ) const { return ((Mode & STYLEMODE_NeedsTable) != 0); }
00278
00279
00280 void Validate ();
00281 };
00282
00283
00284 struct DATATIPPARMS {
00285 public:
00286 #ifndef GENERATING_DOXYGEN_OUTPUT
00287 class FORM;
00288 #endif // GENERATING_DOXYGEN_OUTPUT
00289
00290 RVC::OBJECTNAME TableName;
00291 RVC::OBJECTNAME FieldName;
00292 INT32 TableNum;
00293 INT32 FieldNum;
00294 UINT8 Visible;
00295 UINT8 IsNumeric;
00296 UINT8 UnitType;
00297 UINT8 UnitStored;
00298 UINT8 UnitShown;
00299 UINT8 DecPlaces;
00300 UINT8 NoChgField;
00301 UINT8 spare;
00302 MISTRING Prefix;
00303 MISTRING Suffix;
00304
00305
00306 static const SERIALIZER::ITEMDEF *GetSerialItemDef();
00307
00308
00309 DATATIPPARMS (
00310 );
00311
00312 DATATIPPARMS (
00313 const DATATIPPARMS& rhs
00314 );
00315
00316 DATATIPPARMS& operator= (
00317 const DATATIPPARMS& rhs
00318 );
00319
00320
00321 void SetDefaultSuffix (
00322 );
00323
00324 };
00325
00326
00327 struct AUTOLABELPARMS {
00328 public:
00329 static const SERIALIZER::ITEMDEF *GetSerialItemDef();
00330 UINT8 SelectMode;
00331 UINT8 TextMode;
00332 UINT8 Posn;
00333 UINT8 Optm;
00334 UINT8 Priority;
00335 RVC::OBJECTNAME TableName;
00336 RVC::OBJECTNAME FieldName;
00337 UNICODE *QueryStr;
00338 TEXTSTYLE Style;
00339 LABELFRAMEPARMS FrameParms;
00340 RVC::OBJECTNAME PriorityTableName;
00341 RVC::OBJECTNAME PriorityFieldName;
00342 double m_MinScaleVisible;
00343 double m_MaxScaleVisible;
00344
00345
00346 AUTOLABELPARMS (
00347 );
00348
00349
00350 AUTOLABELPARMS (
00351 const AUTOLABELPARMS& rhs
00352 );
00353
00354
00355 ~AUTOLABELPARMS (
00356 );
00357
00358
00359 AUTOLABELPARMS& operator= (
00360 const AUTOLABELPARMS& rhs
00361 );
00362
00363
00364 void CheckTable (
00365 const RVC::DBASE& db,
00366 bool fixmode
00367 );
00368
00369
00370 bool IsSelected (
00371 double scale
00372 ) const { return (SelectMode != LABELSELECT_None && scale >= m_MinScaleVisible && (m_MaxScaleVisible <= 0.0 || scale <= m_MaxScaleVisible)); }
00373
00374 void Validate ();
00375
00376 private:
00377 #ifndef GENERATING_DOXYGEN_OUTPUT
00378 void Copy (const AUTOLABELPARMS& rhs);
00379 #endif // GENERATING_DOXYGEN_OUTPUT
00380 };
00381
00382
00383 struct LEGENDPARMS {
00384 public:
00385
00386 RVC::OBJECTNAME TableName;
00387 RVC::OBJECTNAME FieldName;
00388 MGD::STYLESAMPLEFLAGS SampleFlags;
00389
00390 LEGENDPARMS (
00391 ): SampleFlags(MGD::STYLESAMPLE_Default) { }
00392
00393 };
00394
00395
00396 struct POINTPARMS {
00397 public:
00398
00399 struct POINTSTYLEPARMS : public STYLEPARMS {
00400 POINTSTYLE Normal;
00401 };
00402
00403 SELECTPARMS Select;
00404 POINTSTYLEPARMS Style;
00405 DATATIPPARMS DataTip;
00406 AUTOLABELPARMS AutoLabel;
00407 LEGENDPARMS Legend;
00408 RVC::OBJECTNAME LegendElemTableName;
00409
00410 POINTPARMS ();
00411 POINTPARMS (const POINTPARMS& rhs);
00412 ~POINTPARMS ();
00413
00414 POINTPARMS& operator= (const POINTPARMS& rhs);
00415 void Validate ();
00416 };
00417
00418
00419 struct LINEPARMS {
00420 public:
00421
00422 struct LINESTYLEPARMS : public STYLEPARMS {
00423 LINESTYLE Normal;
00424 };
00425
00426 SELECTPARMS Select;
00427 LINESTYLEPARMS Style;
00428 DATATIPPARMS DataTip;
00429 AUTOLABELPARMS AutoLabel;
00430 LEGENDPARMS Legend;
00431 RVC::OBJECTNAME LegendElemTableName;
00432
00433 LINEPARMS ();
00434 LINEPARMS (const LINEPARMS& rhs);
00435 ~LINEPARMS ();
00436
00437 LINEPARMS& operator= (const LINEPARMS& rhs);
00438 void Validate ();
00439 };
00440
00441
00442 struct POLYPARMS {
00443 public:
00444
00445 struct POLYSTYLEPARMS : public STYLEPARMS {
00446 POLYSTYLE Normal;
00447 };
00448
00449 SELECTPARMS Select;
00450 POLYSTYLEPARMS Style;
00451 DATATIPPARMS DataTip;
00452 AUTOLABELPARMS AutoLabel;
00453 LEGENDPARMS Legend;
00454 LEGENDPARMS LegendInt;
00455 RVC::OBJECTNAME LegendElemTableName;
00456 bool ShowInteriorLabel;
00457 bool ShowLabel;
00458
00459 POLYPARMS ();
00460 POLYPARMS (const POLYPARMS& rhs);
00461 ~POLYPARMS ();
00462
00463 POLYPARMS& operator= (const POLYPARMS& rhs);
00464 void Validate ();
00465 };
00466
00467
00468 struct LABELPARMS {
00469 public:
00470
00471 struct LABELSTYLEPARMS : public STYLEPARMS {
00472 TEXTSTYLE Normal;
00473 LABELFRAMEPARMS FrameParms;
00474
00475 LABELSTYLEPARMS ();
00476 };
00477
00478 SELECTPARMS Select;
00479 LABELSTYLEPARMS Style;
00480 DATATIPPARMS DataTip;
00481 double MinScaleVisible;
00482 double MaxScaleVisible;
00483
00484 LABELPARMS ();
00485 LABELPARMS (const LABELPARMS& rhs);
00486 ~LABELPARMS ();
00487
00488 LABELPARMS& operator= (const LABELPARMS& rhs);
00489
00490
00491 bool IsVisibleAtScale (
00492 double scale
00493 ) const { return (scale >= MinScaleVisible && (MaxScaleVisible <= 0.0 || scale <= MaxScaleVisible)); }
00494 void Validate ();
00495 };
00496
00497
00498 struct D3POINTPARMS {
00499 public:
00500
00501 enum MODE {
00502 MODE_None = 0,
00503 MODE_Height = 1,
00504 MODE_Elevation = 2
00505 };
00506
00507 MODE Mode;
00508 RVC::OBJECTNAME TableName;
00509 RVC::OBJECTNAME FieldName;
00510 UINT8 Unit;
00511 LINEPARMS Line;
00512 POINTPARMS Point;
00513 bool UseColorStack;
00514 COLOR BelowColor;
00515 COLOR AboveColor;
00516
00517 D3POINTPARMS ();
00518 D3POINTPARMS (const D3POINTPARMS& rhs);
00519 ~D3POINTPARMS ();
00520
00521 D3POINTPARMS& operator= (const D3POINTPARMS& rhs);
00522 };
00523
00524
00525 struct D3POLYPARMS {
00526 public:
00527
00528 enum MODE {
00529 MODE_None = 0,
00530 MODE_Height = 1,
00531 MODE_Elevation = 2
00532 };
00533 enum BASE {
00534 BASE_Minimum = 0,
00535 BASE_Maximum = 1
00536 };
00537
00538 MODE Mode;
00539 BASE Base;
00540 RVC::OBJECTNAME TableName;
00541 RVC::OBJECTNAME FieldName;
00542 UINT8 Unit;
00543 POLYPARMS Poly;
00544 bool UseColorStack;
00545 COLOR BelowColor;
00546 COLOR AboveColor;
00547
00548 D3POLYPARMS ();
00549 D3POLYPARMS (const D3POLYPARMS& rhs);
00550 ~D3POLYPARMS ();
00551
00552 D3POLYPARMS& operator= (const D3POLYPARMS& rhs);
00553 };
00554
00555
00556
00557 #endif // INC_GRE_BASE_H