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
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102 #ifndef INC_GRE_BASE_H
00103 #define INC_GRE_BASE_H
00104
00105 #ifndef INC_MI32_STDDEFNS_H
00106 #include <mi32/stddefns.h>
00107 #endif
00108
00109 #ifndef INC_RVC_STYLE_H
00110 #include <rvc/style.h>
00111 #endif
00112
00113 #ifndef INC_MI32_GREMODE_H
00114 #include <mi32/gremode.h>
00115 #endif
00116
00117 #ifndef INC_MI32_LABLSTYL_H
00118 #include <mi32/lablstyl.h>
00119 #endif
00120
00121
00122 #ifndef GENERATING_DOXYGEN_OUTPUT
00123
00124 class GRE_CALLBACK_MSG;
00125 class GRE_ELEMSAMPLE_DC;
00126 class GRE_LAYER;
00127 class GRE_LAYER_FORMULA;
00128 class GRE_LAYER_RASTER;
00129 class GRE_LAYER_SURFACE;
00130 class GRE_LAYERDC;
00131 class GRE_LAYOUT;
00132 class GRE_LEGEND;
00133 class GRE_GROUP;
00134 class GRE_OBJECT;
00135 class GRE_TOOL;
00136 class GRE_VIEW;
00137 class GRE_VIEWABLE;
00138 class GRE_VIEWPOINT3D;
00139
00140 #ifdef WIN32_MFC
00141 class GRE_MFC_VIEW;
00142 class GRE_MFC_DLGCOMPSELQUERY;
00143 class GRE_MFC_TREEVIEW;
00144 class GRE_MFC_STATUSBAR;
00145 #endif
00146
00147 namespace GRE {
00148 class LABELPLACE;
00149 class LABELPLACEMENT;
00150 class LAYERVIEW;
00151 class GROUPVIEW;
00152 }
00153
00154 namespace RVC {
00155 class DBASE;
00156 }
00157 #endif // GENERATING_DOXYGEN_OUTPUT
00158
00159
00160
00161 enum GRE_OBJTYPE {
00162 GRE_OBJTYPE_None = 0,
00163 GRE_OBJTYPE_System = 0x01,
00164 GRE_OBJTYPE_Layout = 0x02,
00165 GRE_OBJTYPE_Group = 0x04,
00166 GRE_OBJTYPE_Layer = 0x08,
00167 GRE_OBJTYPE_View = 0x10,
00168 GRE_OBJTYPE_All = 0xFF,
00169 };
00170 DEFINE_ENUM_OP_BITWISE(GRE_OBJTYPE);
00171
00172 #define GRE_MAXVIEWS 32
00173 #define GRE_GROUP_NAMELEN 64
00174
00175 #ifdef X_NATIVE
00176
00177 enum GRE_OBJMGRITEM {
00178 GRE_OBJMGRITEM_Layer = 0,
00179 GRE_OBJMGRITEM_Component = 1,
00180 GRE_OBJMGRITEM_Table = 2,
00181 GRE_OBJMGRITEM_RawForm = 3,
00182 };
00183 #endif
00184
00185 enum GRE_FIND_FLAGS {
00186 GRE_FIND_ViewCoords = 0x0000,
00187 GRE_FIND_DisplayCoords = 0x0001,
00188 GRE_FIND_LayerCoords = 0x0002,
00189 GRE_FIND_UseClosest = 0x0004,
00190 GRE_FIND_NoSingleLayer = 0x0008,
00191 GRE_FIND_No3D = 0x0010,
00192 GRE_FIND_SearchDrawnSet = 0x0020,
00193 GRE_FIND_MapCoords = 0x0040
00194 };
00195 DEFINE_ENUM_OP_BITWISE(GRE_FIND_FLAGS);
00196
00197
00198
00199
00200
00201 #define GRE_SERIAL_VERSION 3
00202
00203 namespace GRE {
00204
00205
00206 enum LISTPOS {
00207 LISTPOS_First = 0,
00208 LISTPOS_After = 1,
00209 LISTPOS_Before = 2,
00210 LISTPOS_Last = 3
00211 };
00212
00213
00214 enum DRAWCONDITION {
00215 DRAWCONDITION_Always,
00216 DRAWCONDITION_IfNeeded,
00217 DRAWCONDITION_IfAutoUpdate
00218 };
00219
00220
00221 enum DRAWFLAGS {
00222 DRAWFLAG_None = 0x00000000,
00223 DRAWFLAG_ViewInView = 0x00000001,
00224 DRAWFLAG_OnlyHighlighted = 0x00000002,
00225 DRAWFLAG_Erase = 0x00000010,
00226 DRAWFLAG_ForceDraw = 0x00000020,
00227 DRAWFLAG_UpdateSearchTree = 0x00000040,
00228 DRAWFLAG_UpdateScreen = 0x00000080,
00229 DRAWFLAG_NoUpdateScreen = 0x00000100,
00230 DRAWFLAG_NoHighlighting = 0x00000200,
00231 DRAWFLAG_UpdateBuffers = 0x00000400,
00232 DRAWFLAG_SelectChanged = DRAWFLAG_UpdateBuffers,
00233 DRAWFLAG_AllNonLocViews = 0x00001000,
00234 DRAWFLAG_NoMessage = 0x00004000,
00235 DRAWFLAG_Wireframe = 0x00008000,
00236 DRAWFLAG_NoResumeTool = 0x00010000,
00237 DRAWFLAG_NoBlankScreen = 0x00040000,
00238 DRAWFLAG_NoCallbacks = 0x00400000,
00239 DRAWFLAG_CheckDrawnSet = 0x00800000,
00240 DRAWFLAG_ReduceSpeckle3D = 0x01000000,
00241 DRAWFLAG_UseDataTipColor = 0x02000000,
00242 DRAWFLAG_UseHighlightColor = 0x04000000,
00243 DRAWFLAG_UseActiveColor = 0x08000000,
00244 DRAWFLAG_NoCheckVisible = 0x10000000,
00245 DRAWFLAG_LabelPlacementPass = 0x20000000,
00246 };
00247 DEFINE_ENUM_OP_BITWISE(DRAWFLAGS)
00248
00249
00250 enum RENDERTARGET {
00251 RENDERTARGET_None = 0x0000,
00252 RENDERTARGET_LayerNormal = 0x0001,
00253 RENDERTARGET_LayerHighlight = 0x0002,
00254 RENDERTARGET_LayerLabel = 0x0004,
00255 RENDERTARGET_LayerAll = 0x0007,
00256 RENDERTARGET_Group = 0x0010,
00257 RENDERTARGET_GroupActiveElems = 0x0020,
00258 RENDERTARGET_GroupMatte = 0x0040,
00259 RENDERTARGET_GroupOverlay = 0x0080,
00260 RENDERTARGET_GroupAll = 0x00F0,
00261 RENDERTARGET_ViewMemory = 0x1000,
00262 RENDERTARGET_ViewScreen = 0x8000
00263 };
00264 DEFINE_ENUM_OP_BITWISE(RENDERTARGET)
00265
00266
00267 enum HIGHLIGHTMODE {
00268 HIGHLIGHTMODE_NotSet = 0,
00269 HIGHLIGHTMODE_Replace = 1,
00270 HIGHLIGHTMODE_Add = 2,
00271 HIGHLIGHTMODE_Subtract = 3,
00272 HIGHLIGHTMODE_Toggle = 4,
00273 };
00274 }
00275
00276
00277
00278 #define MDISPSELECT_ViewCoords 0x0000
00279 #define MDISPSELECT_DisplayCoords 0x0001
00280 #define MDISPSELECT_AutoOpenDefaultLayer 0x0002
00281 #define MDISPSELECT_AutoOpenActiveLayer 0x0004
00282 #define MDISPSELECT_AutoOpenTable 0x0008
00283
00284 #define MDISPVISIBLE_AllViews 0xFFFFFFFF
00285 #define MDISPVISIBLE_Locator 0x00000001
00286 #define MDISPVISIBLE_Hardcopy 0x80000000
00287
00288
00289
00290 #define LABELSELECT_None 0x0000
00291 #define LABELSELECT_AllDrawnElem 0x0001
00292 #define LABELSELECT_IfFit 0x0002
00293
00294 #define LABELTEXT_None 0x0000
00295 #define LABELTEXT_ByAttribute 0x0001
00296 #define LABELTEXT_ByField LABELTEXT_ByAttribute
00297 #define LABELTEXT_ByScript 0x0002
00298 #define LABELTEXT_ByQuery LABELTEXT_ByScript
00299
00300 #define LABELPOSN_Default 0
00301
00302 #define LABELPOSN_PointAboveLeft 1
00303 #define LABELPOSN_PointAboveCenter 2
00304 #define LABELPOSN_PointAboveRight 3
00305 #define LABELPOSN_PointCenterLeft 4
00306 #define LABELPOSN_PointCenter 5
00307 #define LABELPOSN_PointCenterRight 6
00308 #define LABELPOSN_PointBelowLeft 7
00309 #define LABELPOSN_PointBelowCenter 8
00310 #define LABELPOSN_PointBelowRight 9
00311
00312 #define AUTOLABELOPTM_None 0x00
00313 #define AUTOLABELOPTM_Fast 0x01
00314 #define AUTOLABELOPTM_Full 0x02
00315 #define AUTOLABELOPTM_HideOverlap 0x04
00316
00317 #define AUTOLABELPRIORITY_AllSame 0
00318 #define AUTOLABELPRIORITY_ByField 1
00319 #define AUTOLABELPRIORITY_ByScript 2
00320
00321
00322
00323
00324
00325
00326 struct SELECTPARMS {
00327 public:
00328 UINT16 Mode;
00329 INT16 Table;
00330 MIUNICODE *QueryStr;
00331 RVC::OBJECTNAME TableName;
00332
00333 SELECTPARMS (
00334 );
00335 SELECTPARMS (
00336 const SELECTPARMS& rhs
00337 );
00338 ~SELECTPARMS ();
00339
00340 SELECTPARMS& operator= (
00341 const SELECTPARMS& rhs
00342 );
00343
00344
00345 void CheckTable (
00346 const RVC::DBASE& db,
00347 bool fixmode
00348 );
00349
00350
00351 bool NeedTable (
00352 ) const { return ((Mode & SELECTMODE_NeedsTable) != 0); }
00353
00354
00355 void Validate ();
00356 };
00357
00358
00359 struct STYLEPARMS {
00360 public:
00361 UINT16 Mode;
00362 INT16 Table;
00363 MIUNICODE *QueryStr;
00364 RVC::OBJECTNAME TableName;
00365
00366 STYLEPARMS (
00367 );
00368 STYLEPARMS (
00369 const STYLEPARMS& rhs
00370 );
00371 ~STYLEPARMS ();
00372
00373 STYLEPARMS& operator= (
00374 const STYLEPARMS& rhs
00375 );
00376
00377
00378 void CheckTable (
00379 const RVC::DBASE& db,
00380 bool fixmode,
00381 const RVC::STYLE::TYPE styletype = RVC::STYLE::TYPE_NumTypes
00382 );
00383
00384
00385 bool NeedTable (
00386 ) const { return ((Mode & STYLEMODE_NeedsTable) != 0); }
00387
00388
00389 void Validate ();
00390 };
00391
00392
00393 struct DATATIPPARMS {
00394 public:
00395 #ifndef GENERATING_DOXYGEN_OUTPUT
00396 class FORM;
00397 #endif // GENERATING_DOXYGEN_OUTPUT
00398
00399 RVC::OBJECTNAME TableName;
00400 RVC::OBJECTNAME FieldName;
00401 INT32 TableNum;
00402 INT32 FieldNum;
00403 UINT8 Visible;
00404 UINT8 IsNumeric;
00405 UINT8 UnitType;
00406 UINT8 UnitStored;
00407 UINT8 UnitShown;
00408 UINT8 DecPlaces;
00409 UINT8 NoChgField;
00410 UINT8 HighlightElem;
00411 MISTRING Prefix;
00412 MISTRING Suffix;
00413
00414
00415 static const SERIALIZER::ITEMDEF *GetSerialItemDef();
00416
00417
00418 DATATIPPARMS (
00419 );
00420
00421 DATATIPPARMS (
00422 const DATATIPPARMS& rhs
00423 );
00424
00425 DATATIPPARMS& operator= (
00426 const DATATIPPARMS& rhs
00427 );
00428
00429
00430 void SetDefaultSuffix (
00431 );
00432
00433 };
00434
00435
00436 struct AUTOLABELPARMS {
00437 public:
00438 static const SERIALIZER::ITEMDEF *GetSerialItemDef();
00439 UINT8 SelectMode;
00440 UINT8 TextMode;
00441 UINT8 Posn;
00442 UINT8 Optm;
00443 UINT8 Priority;
00444 RVC::OBJECTNAME TableName;
00445 RVC::OBJECTNAME FieldName;
00446 MIUNICODE *QueryStr;
00447 TEXTSTYLE Style;
00448 LABELFRAMEPARMS FrameParms;
00449 RVC::OBJECTNAME PriorityTableName;
00450 RVC::OBJECTNAME PriorityFieldName;
00451 double m_MinScaleVisible;
00452 double m_MaxScaleVisible;
00453
00454
00455 AUTOLABELPARMS (
00456 );
00457
00458
00459 AUTOLABELPARMS (
00460 const AUTOLABELPARMS& rhs
00461 );
00462
00463
00464 ~AUTOLABELPARMS (
00465 );
00466
00467
00468 AUTOLABELPARMS& operator= (
00469 const AUTOLABELPARMS& rhs
00470 );
00471
00472
00473 void CheckTable (
00474 const RVC::DBASE& db,
00475 bool fixmode
00476 );
00477
00478
00479 bool IsSelected (
00480 double scale
00481 ) const { return (SelectMode != LABELSELECT_None && scale >= m_MinScaleVisible && (m_MaxScaleVisible <= 0.0 || scale <= m_MaxScaleVisible)); }
00482
00483 void Validate ();
00484
00485 private:
00486 #ifndef GENERATING_DOXYGEN_OUTPUT
00487 void Copy (const AUTOLABELPARMS& rhs);
00488 #endif // GENERATING_DOXYGEN_OUTPUT
00489 };
00490
00491
00492 struct LEGENDPARMS {
00493 public:
00494
00495 RVC::OBJECTNAME TableName;
00496 RVC::OBJECTNAME FieldName;
00497 MGD::STYLESAMPLEFLAGS SampleFlags;
00498
00499 LEGENDPARMS (
00500 ): SampleFlags(MGD::STYLESAMPLE_Default) { }
00501
00502 };
00503
00504
00505 struct POINTPARMS {
00506 public:
00507
00508 struct POINTSTYLEPARMS : public STYLEPARMS {
00509 POINTSTYLE Normal;
00510 };
00511
00512 SELECTPARMS Select;
00513 POINTSTYLEPARMS Style;
00514 DATATIPPARMS DataTip;
00515 AUTOLABELPARMS AutoLabel;
00516 LEGENDPARMS Legend;
00517 RVC::OBJECTNAME LegendElemTableName;
00518
00519 POINTPARMS ();
00520 POINTPARMS (const POINTPARMS& rhs);
00521 ~POINTPARMS ();
00522
00523 POINTPARMS& operator= (const POINTPARMS& rhs);
00524 void Validate ();
00525 };
00526
00527
00528 struct LINEPARMS {
00529 public:
00530
00531 struct LINESTYLEPARMS : public STYLEPARMS {
00532 LINESTYLE Normal;
00533 };
00534
00535 SELECTPARMS Select;
00536 LINESTYLEPARMS Style;
00537 DATATIPPARMS DataTip;
00538 AUTOLABELPARMS AutoLabel;
00539 LEGENDPARMS Legend;
00540 RVC::OBJECTNAME LegendElemTableName;
00541
00542 LINEPARMS ();
00543 LINEPARMS (const LINEPARMS& rhs);
00544 ~LINEPARMS ();
00545
00546 LINEPARMS& operator= (const LINEPARMS& rhs);
00547 void Validate ();
00548 };
00549
00550
00551 struct POLYPARMS {
00552 public:
00553
00554 struct POLYSTYLEPARMS : public STYLEPARMS {
00555 POLYSTYLE Normal;
00556 };
00557
00558 SELECTPARMS Select;
00559 POLYSTYLEPARMS Style;
00560 DATATIPPARMS DataTip;
00561 AUTOLABELPARMS AutoLabel;
00562 LEGENDPARMS Legend;
00563 LEGENDPARMS LegendInt;
00564 RVC::OBJECTNAME LegendElemTableName;
00565 bool ShowInteriorLabel;
00566 bool ShowLabel;
00567
00568 POLYPARMS ();
00569 POLYPARMS (const POLYPARMS& rhs);
00570 ~POLYPARMS ();
00571
00572 POLYPARMS& operator= (const POLYPARMS& rhs);
00573 void Validate ();
00574 };
00575
00576
00577 struct LABELPARMS {
00578 public:
00579
00580 struct LABELSTYLEPARMS : public STYLEPARMS {
00581 TEXTSTYLE Normal;
00582 LABELFRAMEPARMS FrameParms;
00583
00584 LABELSTYLEPARMS ();
00585 };
00586
00587 SELECTPARMS Select;
00588 LABELSTYLEPARMS Style;
00589 DATATIPPARMS DataTip;
00590 double MinScaleVisible;
00591 double MaxScaleVisible;
00592
00593 LABELPARMS ();
00594 LABELPARMS (const LABELPARMS& rhs);
00595 ~LABELPARMS ();
00596
00597 LABELPARMS& operator= (const LABELPARMS& rhs);
00598
00599
00600 bool IsVisibleAtScale (
00601 double scale
00602 ) const { return (scale >= MinScaleVisible && (MaxScaleVisible <= 0.0 || scale <= MaxScaleVisible)); }
00603 void Validate ();
00604 };
00605
00606
00607 struct D3POINTPARMS {
00608 public:
00609
00610 enum MODE {
00611 MODE_None = 0,
00612 MODE_Height = 1,
00613 MODE_Elevation = 2
00614 };
00615
00616 MODE Mode;
00617 RVC::OBJECTNAME TableName;
00618 RVC::OBJECTNAME FieldName;
00619 UINT8 Unit;
00620 LINEPARMS Line;
00621 POINTPARMS Point;
00622 bool UseColorStack;
00623 COLOR BelowColor;
00624 COLOR AboveColor;
00625
00626 D3POINTPARMS ();
00627 D3POINTPARMS (const D3POINTPARMS& rhs);
00628 ~D3POINTPARMS ();
00629
00630 D3POINTPARMS& operator= (const D3POINTPARMS& rhs);
00631 };
00632
00633
00634 struct D3POLYPARMS {
00635 public:
00636
00637 enum MODE {
00638 MODE_None = 0,
00639 MODE_Height = 1,
00640 MODE_Elevation = 2
00641 };
00642 enum BASE {
00643 BASE_Minimum = 0,
00644 BASE_Maximum = 1
00645 };
00646
00647 MODE Mode;
00648 BASE Base;
00649 RVC::OBJECTNAME TableName;
00650 RVC::OBJECTNAME FieldName;
00651 UINT8 Unit;
00652 POLYPARMS Poly;
00653 bool UseColorStack;
00654 COLOR BelowColor;
00655 COLOR AboveColor;
00656
00657 D3POLYPARMS ();
00658 D3POLYPARMS (const D3POLYPARMS& rhs);
00659 ~D3POLYPARMS ();
00660
00661 D3POLYPARMS& operator= (const D3POLYPARMS& rhs);
00662 };
00663
00664
00665
00666 #endif // INC_GRE_BASE_H