00001 /** 00002 * \file gre/layer.h 00003 * \brief GRE::LAYER class definition 00004 * 00005 * \if NODOC 00006 * $Id: layer.h_v 1.114 2007/03/12 17:41:05 mju Exp $ 00007 * 00008 * $Log: layer.h_v $ 00009 * Revision 1.114 2007/03/12 17:41:05 mju 00010 * Add v_setObjectDescriptor. 00011 * 00012 * Revision 1.113 2006/09/19 17:29:19 mju 00013 * Add globaloptions.forceGeorefAffine. 00014 * 00015 * Revision 1.112 2006/08/01 17:51:26 mju 00016 * Add layerflag_noInvalidateViews. 00017 * 00018 * Revision 1.111 2006/04/19 20:36:28 mju 00019 * Add treeViewUpdateDetails. 00020 * 00021 * Revision 1.110 2006/02/22 17:16:54 mju 00022 * Add typedefn support for 'edit' icon. 00023 * 00024 * Revision 1.109 2006/02/16 21:02:03 mju 00025 * Add treeview tooltip delegates. 00026 * 00027 * Revision 1.108 2006/01/05 17:50:04 dwilliss 00028 * changed parm type on a method 00029 * 00030 * Revision 1.107 2006/01/04 16:53:15 mju 00031 * Deprecate loadDispParmSubObject. 00032 * 00033 * Revision 1.106 2005/12/22 14:19:31 mju 00034 * Add comment. 00035 * 00036 * Revision 1.105 2005/12/22 14:16:49 mju 00037 * Exclude type_next if no_deprecated. 00038 * 00039 * Revision 1.104 2005/12/19 17:12:14 mju 00040 * Allow getMenuItemCreate unless deprecate_all. 00041 * 00042 * Revision 1.103 2005/12/08 22:40:26 mju 00043 * Remove mem24 virtual. 00044 * 00045 * Revision 1.102 2005/11/28 16:37:58 mju 00046 * Support legend update in treeview. 00047 * 00048 * Revision 1.101 2005/11/21 16:05:47 scowan 00049 * Allow using layer type as counter. 00050 * 00051 * Revision 1.100 2005/11/16 22:46:42 mju 00052 * Add promptGeoDatabasesAndConstruct. 00053 * 00054 * Revision 1.99 2005/11/11 21:39:46 mju 00055 * Add treeViewOnCustomDraw for layer. 00056 * 00057 * Revision 1.98 2005/11/10 20:38:46 scowan 00058 * Do not define v_setupTreeViewShared if not mGUI. 00059 * 00060 * Revision 1.97 2005/11/10 18:46:11 mju 00061 * Add treeview delegate for getItemInfo. 00062 * 00063 * Revision 1.96 2005/11/07 21:10:37 mju 00064 * Deprecate getMenuItemCreate. 00065 * 00066 * Revision 1.95 2005/11/07 17:21:51 mju 00067 * Add compinfo method to handle treeview child visibility changing. 00068 * 00069 * Revision 1.94 2005/11/04 18:52:03 mju 00070 * enums in gre namespace. 00071 * Add showSystemTables to compinfo. 00072 * 00073 * Revision 1.93 2005/11/03 19:44:00 mju 00074 * Remove stuff to get setting for showing internal tables. 00075 * 00076 * Revision 1.92 2005/11/03 18:27:02 mju 00077 * Make v_MenuAddToolItems protected instead of private. 00078 * 00079 * Revision 1.91 2005/11/02 23:00:44 mju 00080 * Remove objmgr stuff. 00081 * 00082 * Revision 1.90 2005/10/27 14:04:53 mju 00083 * Fix doc comments. 00084 * 00085 * Revision 1.89 2005/10/26 16:55:13 mju 00086 * Remove stuff for tabular view toggle in tableinfo. 00087 * 00088 * Revision 1.88 2005/10/19 20:03:37 mju 00089 * Use gre namespace instead of legacy typedefs. 00090 * 00091 * Revision 1.87 2005/10/14 17:30:20 mju 00092 * GRE namespace and treeview. 00093 * 00094 * Revision 1.86 2005/09/02 17:05:09 mju 00095 * Add global option for dftMultiPassRendering. 00096 * 00097 * Revision 1.85 2005/08/29 20:44:20 scowan 00098 * Fixed g++ duplication warning. 00099 * 00100 * Revision 1.84 2005/08/16 20:29:05 dwilliss 00101 * Added a private static method 00102 * 00103 * Revision 1.83 2005/06/17 16:48:10 mju 00104 * Forward-declare mgui:;dlgshell. 00105 * 00106 * Revision 1.82 2005/05/24 16:12:13 mju 00107 * Add layerflag_DataTipIgnoreDrawnSet. 00108 * 00109 * Revision 1.81 2005/05/11 20:58:18 mju 00110 * Add dispflag_noMergeLegendDups. 00111 * 00112 * Revision 1.80 2005/05/02 17:43:45 mju 00113 * Remove highlightmode for layer. 00114 * 00115 * Revision 1.79 2005/04/29 17:49:30 mju 00116 * Support rendertarget. 00117 * 00118 * Revision 1.78 2005/04/14 19:39:50 mju 00119 * Add dispflag_enableMultiPassRender. 00120 * 00121 * Revision 1.77 2005/03/31 16:57:06 fileserver!dwilliss 00122 * Rename one of our types to MIUNICODE because it conflicted with a Microsoft #define 00123 * 00124 * Revision 1.76 2005/03/22 22:00:50 mju 00125 * Add invalidateAllViews. 00126 * 00127 * Revision 1.75 2005/03/07 17:23:15 scowan 00128 * Fixed some unix warnings. 00129 * 00130 * Revision 1.74 2005/03/01 16:50:27 scowan 00131 * Made v_copy pure virtual and created an interface to call it. 00132 * Support v_copy method. 00133 * 00134 * Revision 1.73 2005/03/01 14:20:38 mju 00135 * Add getElemHighlightSet, remove elemsearch stuff. 00136 * 00137 * Revision 1.72 2005/02/25 18:57:47 mju 00138 * Add v_hasHighighlighted. 00139 * 00140 * Revision 1.71 2005/02/25 18:54:20 mju 00141 * Remove layerview defns to own header. 00142 * Add v_Copy virtual method. 00143 * 00144 * Revision 1.70 2005/02/25 17:47:16 mju 00145 * More layerview methods. 00146 * 00147 * Revision 1.69 2005/02/24 18:52:23 mju 00148 * Remove layerview getBackgroundColor. 00149 * 00150 * Revision 1.68 2005/02/23 18:52:32 mju 00151 * Add layerview stuff for highlight device. 00152 * Move labelplacement methods to layerview. 00153 * Add layerview_labeled for common labelplacement handling. 00154 * 00155 * Revision 1.67 2005/02/18 19:06:32 mju 00156 * Changes to layerview for separated rendering. 00157 * 00158 * Revision 1.66 2005/02/17 21:18:55 mju 00159 * Add layerview stuff for separate rendering. 00160 * 00161 * Revision 1.65 2005/02/15 17:50:24 scowan 00162 * No real changes. 00163 * 00164 * Revision 1.64 2005/02/15 17:34:28 scowan 00165 * Do not include grtree unless in x only. 00166 * 00167 * Revision 1.63 2005/02/15 17:22:20 mju 00168 * Add full/used rectangles to layerview. 00169 * 00170 * Revision 1.62 2005/02/14 21:39:36 mju 00171 * Use device in usesTransparency. 00172 * 00173 * Revision 1.61 2005/02/14 18:52:47 mju 00174 * Move some stuff from layerview to groupview. 00175 * 00176 * Revision 1.60 2005/01/27 21:42:32 mju 00177 * Add layerview stuff for labels. 00178 * 00179 * Revision 1.59 2005/01/24 21:31:08 mju 00180 * Move members to layerview from layerdc. 00181 * 00182 * Revision 1.58 2005/01/20 16:54:34 mju 00183 * Enums for createflags, drawmode, highlightmode. 00184 * Add static methods to replace legacy mdisp fns. 00185 * Redesign typedefn class to use textid, iconid, virtual methods, etc. 00186 * 00187 * Revision 1.57 2005/01/12 17:12:42 mju 00188 * Include transformations in layerview. 00189 * 00190 * Revision 1.56 2005/01/04 15:22:53 mju 00191 * Deprecate assign method using fnameinode. 00192 * 00193 * Revision 1.55 2005/01/03 21:46:48 mju 00194 * Add trans and mgd dev to layerview. 00195 * 00196 * Revision 1.54 2004/10/15 21:25:33 ldyas 00197 * added method for needsmem24 00198 * 00199 * Revision 1.49 2004/10/06 13:53:48 mju 00200 * Not necessary to forward-declare inlines for get/set antialias/thinhint methods. 00201 * 00202 * Revision 1.47 2004/10/01 17:19:32 mju 00203 * Add methods for detail density checking. 00204 * Add dlgparent to assignObject. 00205 * 00206 * Revision 1.46 2004/09/29 18:25:42 ldyas 00207 * now when set antialias also set use transparency. 00208 * 00209 * Revision 1.45 2004/09/28 22:17:59 ldyas 00210 * added antialiasing to globals. 00211 * 00212 * Revision 1.43 2004/09/24 00:48:53 ldyas 00213 * added thin line width hinting 00214 * 00215 * Revision 1.41 2004/09/23 22:55:02 ldyas 00216 * added antialiasing to dispparm. 00217 * 00218 * Revision 1.40 2004/09/20 19:11:44 dglasser 00219 * added setOldPrj for sml grelayer. 00220 * 00221 * Revision 1.39 2004/09/03 22:49:50 dwilliss 00222 * Added some members to dispparm 00223 * DrawLabel no longer needs to be virtual 00224 * 00225 * Revision 1.38 2004/08/19 22:19:50 vdronov 00226 * changed transp from 100 to 255 00227 * 00228 * Revision 1.37 2004/08/18 16:25:33 mju 00229 * Make updateExtents non-inline. 00230 * 00231 * Revision 1.35 2004/07/21 21:55:54 mju 00232 * Add layerview support. 00233 * 00234 * Revision 1.31 2004/07/19 22:56:10 dwilliss 00235 * LABELPLACEMENT changes 00236 * 00237 * Revision 1.30 2004/07/14 20:02:22 dwilliss 00238 * Forgot to add the inline wrapper to call a private virtaul method 00239 * 00240 * Revision 1.29 2004/07/13 22:33:03 dwilliss 00241 * Added a virtual method for labels 00242 * 00243 * Revision 1.28 2004/07/12 23:14:34 mju 00244 * Nod georegion. 00245 * 00246 * Revision 1.27 2004/07/07 22:00:34 mju 00247 * Add updateMapRegion. 00248 * 00249 * Revision 1.26 2004/07/07 20:51:29 vdronov 00250 * added SetPedestal and IsPedestalSet 00251 * 00252 * Revision 1.25 2004/06/29 21:35:24 mju 00253 * Add highlightElementsByRegion using region2d. 00254 * 00255 * Revision 1.24 2004/06/28 17:53:20 mju 00256 * Convert to spatref system. 00257 * 00258 * Revision 1.22 2004/06/11 17:48:34 vdronov 00259 * removed flags related to RayCasting 00260 * 00261 * Revision 1.21 2004/06/04 19:20:44 dglasser 00262 * Don't use memset with TEXTSTYLEs in SML. Added SMLSET_TextStyleMember. 00263 * 00264 * Revision 1.20 2004/05/05 22:49:56 dwilliss 00265 * Started adding support for LABELPLACEMENT 00266 * 00267 * Revision 1.19 2004/04/02 18:54:43 mju 00268 * Add ModifyStamp methods. 00269 * 00270 * Revision 1.18 2004/03/31 21:32:04 mju 00271 * Add DrawElement using rvc::ELEMENT. 00272 * 00273 * Revision 1.17 2004/02/12 22:43:22 dwilliss 00274 * deprecate old mgd 00275 * 00276 * Revision 1.16 2004/02/06 16:23:28 mju 00277 * Reorder fns. 00278 * 00279 * Revision 1.15 2004/02/06 16:01:34 mju 00280 * Use GRE::FINDFLAGS. 00281 * 00282 * Revision 1.14 2004/02/05 22:08:25 mju 00283 * Integrate datatip support. 00284 * 00285 * Revision 1.13 2003/12/22 16:31:11 vdronov 00286 * made CanViewIn... methods not inline. 00287 * 00288 * Revision 1.12 2003/12/15 16:52:51 mju 00289 * Add dispflag_VectNoFillHighlighted. 00290 * 00291 * Revision 1.11 2003/11/20 13:26:33 mju 00292 * Add SetVisiblityGroupFromLayout. 00293 * 00294 * Revision 1.7 2003/09/23 13:08:08 mju 00295 * Explicitly init serializble in copy dispparm copy ctor. 00296 * 00297 * Revision 1.4 2003/07/31 13:38:40 mju 00298 * Add Filter method to LAYER::FILTER. 00299 * 00300 * Revision 1.3 2003/07/30 15:15:58 mju 00301 * Ignore private sections. 00302 * Move DISPPARM defn outside layer so will be doc'd. Add inlines where req'd. 00303 * 00304 * Revision 1.1 2003/06/16 19:39:43 mju 00305 * Initial revision 00306 * \endif 00307 **/ 00308 00309 #ifndef INC_GRE_LAYER_H 00310 #define INC_GRE_LAYER_H 00311 00312 #ifndef INC_GRE_OBJECTBASE_H 00313 #include <gre/objectbase.h> 00314 #endif 00315 00316 #ifndef INC_GRE_VIEWABLE_H 00317 #include <gre/viewable.h> 00318 #endif 00319 00320 #ifndef INC_GRE_3DWIREFRAME_H 00321 #include <gre/3dwireframe.h> 00322 #endif 00323 00324 #if !defined(INC_MGUI_TREE_H) && defined(USE_MGUI) 00325 #include <mgui/tree.h> 00326 #endif 00327 00328 #if !defined(INC_MI32_GRTREE_H) 00329 #include <mi32/grtree.h> 00330 #endif 00331 00332 #ifndef INC_MI32_RANGE_H 00333 #include <mi32/range.h> 00334 #endif 00335 00336 #ifndef INC_RVC_ELEMENT_H 00337 #include <rvc/element.h> 00338 #endif 00339 00340 #ifndef INC_MI32_RVCPARMS_H 00341 #include <mi32/rvcparms.h> 00342 #endif 00343 00344 #ifndef INC_MI32_DBEDIT_H 00345 #include <mi32/dbedit.h> 00346 #endif 00347 00348 #ifndef INC_MI32_REGION2D_H 00349 #include <mi32/region2d.h> 00350 #endif 00351 00352 #ifndef INC_MI32_TRANS2DC_H 00353 #include <mi32/trans2dc.h> 00354 #endif 00355 00356 #ifndef GENERATING_DOXYGEN_OUTPUT 00357 00358 class BITSET; 00359 class BITSET_UNOWNED; 00360 struct SMLCONTEXT; 00361 struct SMLCLASSMEMBER; 00362 union SMLARG; 00363 struct DATATIPPARMS; 00364 namespace RVC { 00365 class GETOBJFILTER; 00366 class DESCRIPTOR; 00367 } 00368 namespace MGD { 00369 class DEVICE; 00370 } 00371 #ifdef USE_MGUI 00372 namespace MGUI { 00373 class DLGSHELL; 00374 class MENU; 00375 } 00376 #endif 00377 00378 #endif // GENERATING_DOXYGEN_OUTPUT 00379 00380 //=================================================================================================================== 00381 00382 //! Flags stored in xxxxDISPPARM.dispflags 00383 enum DISPFLAGS { 00384 DISPFLAG_None = 0x00000000, 00385 DISPFLAG_SaveDrawnSetOBS = 0x00000001, //!< OBSOLETE, DO NOT USE, retain def so can read old dispparms 00386 DISPFLAG_KeepOpenOBS = 0x00000002, //!< OBSOLETE, DO NOT USE, retain so can read old dispparms 00387 DISPFLAG_UseTempFile = 0x00000004, //!< Object is in a temporary file 00388 DISPFLAG_EditObjectOBS = 0x00000008, //!< OBSOLETE, DO NOT USE, retain so can read old dispparms 00389 DISPFLAG_NoDrawLabels = 0x40000000, //!< Don't draw labels 00390 DISPFLAG_DrawLabelsOnly = 0x80000000, //!< Only draw labels 00391 00392 DISPFLAG_WarpToGeorefModel = 0x00000100, //!< Warp to model specified with georeference 00393 DISPFLAG_UsesTransparency = 0x00000200, //!< Uses transparency effects 00394 DISPFLAG_NoDrawWireframe = 0x00000400, //!< Don't draw layer in wireframe mode 00395 DISPFLAG_MayUseTransparency = 0x00000800, //!< Use of transparency unknown, assume it does until first time draw 00396 DISPFLAG_Antialias = 0x00001000, //!< Draw Antialiased 00397 DISPFLAG_HintThinLines = 0x00002000, //!< Imply thin lines via transparency 00398 DISPFLAG_EnableMultiPassRender = 0x00004000, //!< Enable multipass rendering for styles 00399 DISPFLAG_NoMergeLegendDups = 0x00008000, //!< Don't combine duplicate styles in legend 00400 00401 DISPFLAG_VectDrawNodes = 0x00010000, //!< Draw nodes for vector object 00402 DISPFLAG_VectLinesFirst = 0x00020000, //!< Draw vector lines before polygons 00403 DISPFLAG_VectNoFillPoly = 0x00040000, //!< Disable polygon filling 00404 DISPFLAG_VectNoFillHighlighted = 0x00080000, //!< Disable polygon filling when highlighted 00405 00406 DISPFLAG_TINEdgesFirst = 0x00020000, //!< Draw TIN edges before triangles 00407 DISPFLAG_TINNoFillTri = 0x00040000, //!< Don't fill TIN triangles 00408 00409 DISPFLAG_RastNullTransp = 0x00010000, //!< Make "null" cells transparent 00410 DISPFLAG_RastSkipOddLines = 0x00020000, //!< Skip odd screen lines (for 3Dmax glasses) 00411 DISPFLAG_RastSkipEvenLines = 0x00040000, //!< Skip even screen lines (for 3Dmax glasses) 00412 DISPFLAG_RastDoBlendMask = 0x00080000, //!< Do mask transparency blending if possible 00413 DISPFLAG_RastHyperspectLossy = 0x00400000, //!< Display hyperspectral in fast-lossy mode 00414 00415 DISPFLAG_SurfProjOffEdge = 0x00010000, //!< Project data off edge of surface 00416 00417 DISPFLAG_FormulaNullTransp = 0x00010000, //!< Make "null" cells transparent 00418 DISPFLAG_FormulaSkipOddLines = 0x00020000, //!< Skip odd screen lines (for 3Dmax glasses) 00419 DISPFLAG_FormulaSkipEvenLines = 0x00040000, //!< Skip even screen lines (for 3Dmax glasses) 00420 }; 00421 DEFINE_ENUM_OP_BITWISE(DISPFLAGS); 00422 00423 //=================================================================================================================== 00424 00425 enum LAYERDRAWFLAGS { 00426 LAYERDRAWFLAG_None = 0x0000, //!< No flags 00427 // LAYERDRAWFLAG_ClipTo = 0x0001, 00428 LAYERDRAWFLAG_Clip = 0x0002, //!< Clip layer 00429 LAYERDRAWFLAG_NoClipToGroup = 0x0004, //!< Don't clip layer to group 00430 LAYERDRAWFLAG_SaveToTemplate = 0x0008, //!< Save layer as-is to template 00431 LAYERDRAWFLAG_EditInTNTserver = 0x0010, //!< Allow layer to be edited in TNTserver 00432 LAYERDRAWFLAG_MaskAll = 0xFFFF, //!< Mask for setting all flags 00433 }; 00434 DEFINE_ENUM_OP_BITWISE(LAYERDRAWFLAGS); 00435 00436 //=================================================================================================================== 00437 00438 enum LAYERFLAGS { 00439 LAYERFLAG_None = 0x00000000, //!< No flags 00440 LAYERFLAG_NoSelNewObj = 0x00000010, //!< Don't allow user to select new object(s) via CtrlPanel 00441 LAYERFLAG_HiliteColorSet = 0x00000040, //!< Separate highlight color has been set for layer 00442 LAYERFLAG_DataTipIgnoreDrawnSet = 0x00000080, //!< Ignore DrawnSet when searching for DataTip element 00443 LAYERFLAG_NoInvalidateViews = 0x00000100, //!< Don't allow invalidation of render buffers 00444 LAYERFLAG_3D = 0x00000200, //!< Layer is fully 3-D, no "surface" required 00445 LAYERFLAG_KeepOpen = 0x00020000, //!< Set if object should remain open until layer is destroyed 00446 LAYERFLAG_Editable = 0x00040000, //!< Set if layer can be edited 00447 LAYERFLAG_CanShowInLocator = 0x00100000, //!< Set if can show this layer in the Locator window 00448 LAYERFLAG_IgnoreExtents = 0x00400000, //!< Ignore this layer when determining group extents 00449 LAYERFLAG_NoGeoreference = 0x00080000, //!< Set if no georeference info should be read for layer 00450 LAYERFLAG_NoDrawActiveElem = 0x01000000, //!< Don't draw "active" element 00451 LAYERFLAG_NoShowInLayerMgr = 0x02000000, //!< Don't show in layer manager, must also set LAYERFLAG_Temporary 00452 LAYERFLAG_NoAllowHide = 0x04000000, //!< Don't allow user to hide layer 00453 LAYERFLAG_NoAllowDelete = 0x08000000, //!< Don't allow user to delete layer 00454 LAYERFLAG_Temporary = 0x10000000, //!< Layer is temporary, cannot save in layout 00455 LAYERFLAG_MaskAll = 0xFFFFFFFF, //!< Mask for setting all flags 00456 }; 00457 DEFINE_ENUM_OP_BITWISE(LAYERFLAGS); 00458 00459 //=================================================================================================================== 00460 00461 namespace GRE { 00462 00463 #define GRE_MAXLAYERTYPES 32 00464 00465 //! Layer base class. 00466 class LAYER : public GRE::OBJECT { 00467 public: 00468 00469 //! Layer types. 00470 enum TYPE { 00471 TYPE_None = 0, 00472 TYPE_Raster = 1, 00473 TYPE_Vector = 2, 00474 TYPE_CAD = 3, 00475 TYPE_DBPinmap = 4, 00476 TYPE_MapGrid = 5, 00477 TYPE_ScaleBar = 6, 00478 TYPE_Text = 7, 00479 TYPE_Legend = 8, 00480 TYPE_TIN = 9, 00481 TYPE_Sketch = 10, 00482 TYPE_Region = 11, 00483 TYPE_Surface = 12, 00484 TYPE_Script = 13, 00485 TYPE_Formula = 14, 00486 TYPE_Legend2 = 15, 00487 TYPE_Shape = 16, 00488 TYPE_COUNT, 00489 #ifndef NO_DEPRECATED 00490 TYPE_NEXT = TYPE_COUNT //!< Deprecated, use TYPE_COUNT instead 00491 #endif 00492 //! Check GRE_MAXLAYERTYPES when add new types 00493 }; 00494 00495 enum CREATEFLAGS { 00496 CREATEFLAG_None = 0x0000, 00497 CREATEFLAG_NoCallCreateCB = 0x0001, 00498 CREATEFLAG_Temporary = 0x0002, 00499 CREATEFLAG_NoSelNewObj = 0x0004, //!< Don't allow user to select new object(s) via CtrlPanel 00500 CREATEFLAG_KeepOpen = 0x0008, //!< Set if object should remain open until layer is destroyed 00501 CREATEFLAG_Editable = 0x0010, //!< Set if creating layer to be edited 00502 CREATEFLAG_NoGeoreference = 0x0020, //!< Set if no georeference info should be read for layer 00503 CREATEFLAG_IgnoreExtents = 0x0040, //!< Ignore layer extents in group 00504 CREATEFLAG_NoAllowDelete = 0x0080, //!< Don't allow user to delete layer 00505 CREATEFLAG_NoControlPanel = 0x0100, //!< Don't allow control panel for layer 00506 CREATEFLAG_NoComputePos = 0x0200, //!< Don't call ComputeLayerPositions() when adding new layer 00507 CREATEFLAG_NoSetActive = 0x0400, //!< Don't make newly-created layer "active" 00508 CREATEFLAG_NoShowInMgr = 0x0800, //!< Don't show this layer in layer manager 00509 }; 00510 00511 enum SETACTIVEFLAGS { 00512 SETACTIVEFLAG_None = 0x0000, 00513 SETACTIVEFLAG_First = 0x0001, 00514 SETACTIVEFLAG_Previous = 0x0002, 00515 SETACTIVEFLAG_Next = 0x0004, 00516 SETACTIVEFLAG_Last = 0x0008, 00517 SETACTIVEFLAG_KeepCurrent = 0x0010, //!< Keep current active element if highlighted 00518 SETACTIVEFLAG_NoWrap = 0x0020, //!< Don't wrap around end/beginning if reached 00519 SETACTIVEFLAG_UpdateScreen = 0x0040, //!< Update display window 00520 SETACTIVEFLAG_UpdateBuffers = 0x0080, //!< Update rendering buffer 00521 }; 00522 00523 00524 //! Container for global layer options. 00525 class GLOBALOPTIONS { // LAYER::GLOBALOPTIONS 00526 public: 00527 00528 class FORM; //!< Global options form, defined in <gre/uilrglob.h> 00529 00530 enum DFTNAMEMODE { 00531 DFTNAMEMODE_ObjectDesc = 0, //!< Use object description (or name if no description) 00532 DFTNAMEMODE_ObjectName = 1, //!< Use object name 00533 DFTNAMEMODE_FileObjNames = 2 //!< Use combined file and object names 00534 }; 00535 00536 GLOBALOPTIONS ( 00537 ); 00538 00539 #ifdef X_NATIVE 00540 Widget CreateEditForm ( 00541 Widget parent, 00542 const Arg *arglist, 00543 int argcount 00544 ); 00545 #endif 00546 00547 bool GetAntialiasing ( 00548 ) const {return(m_Antialiasing); } 00549 00550 bool GetAutoOpenDftTableOnSel ( 00551 ) const { return (m_AutoOpenDftTableOnSel); } 00552 00553 DFTNAMEMODE GetDftNameMode ( 00554 ) const { return (m_DftNameMode); } 00555 00556 bool GetDftRenderMultiPass ( 00557 ) const { return (m_DftRenderMultiPass); } 00558 00559 bool GetDftShowSystemTables ( 00560 ) const { return (m_DftShowSystemTables); } 00561 00562 bool GetForceGeorefAffine ( 00563 ) const { return (m_ForceGeorefAffine); } 00564 00565 bool GetHintThinLines ( 00566 ) const {return(m_HintThinLines);} 00567 00568 //! Read settings from Ini file. 00569 //! By default, settings are shared among all processes. 00570 //! To retain settings separately, use GRE::SYSTEM::SetGlobalIniGroup() during application initialization. 00571 void IniRead (); 00572 00573 //! Write settings to Ini file. 00574 //! By default, settings are shared among all processes. 00575 //! To retain settings separately, use GRE::SYSTEM::SetGlobalIniGroup() during application initialization. 00576 void IniWrite () const; 00577 00578 void SetAntialiasing ( 00579 bool antialias 00580 ) { m_Antialiasing = antialias; } 00581 00582 void SetAutoOpenDftTableOnSel ( 00583 bool AutoOpenDftTableOnSel 00584 ) { m_AutoOpenDftTableOnSel = AutoOpenDftTableOnSel; } 00585 00586 void SetDftNameMode ( 00587 DFTNAMEMODE DftNameMode 00588 ) { m_DftNameMode = DftNameMode; } 00589 00590 void SetDftShowSystemTables ( 00591 bool DftShowSystemTables 00592 ) { m_DftShowSystemTables = DftShowSystemTables; } 00593 00594 void SetForceGeorefAffine ( 00595 bool ForceGeorefAffine 00596 ) { m_ForceGeorefAffine = ForceGeorefAffine; } 00597 00598 void SetHintThinLines ( 00599 bool hint 00600 ) { m_HintThinLines = hint;} 00601 00602 private: 00603 #ifndef GENERATING_DOXYGEN_OUTPUT 00604 DFTNAMEMODE m_DftNameMode; 00605 bool m_AutoOpenDftTableOnSel; //!< Automatically open default table on element selection (highlighting) 00606 friend class LAYER; 00607 bool m_Antialiasing; 00608 bool m_HintThinLines; 00609 bool m_DftRenderMultiPass; 00610 bool m_DftShowSystemTables; 00611 bool m_ForceGeorefAffine; 00612 00613 #endif // GENERATING_DOXYGEN_OUTPUT 00614 }; // End of LAYER::GLOBALOPTIONS 00615 00616 class DISPPARM; 00617 00618 class TYPEDEFN; 00619 class COMPINFO; 00620 class FILTER; 00621 class FILTER_EXCLUDE; 00622 00623 //! Determine if can construct layer from RVC object. 00624 static bool CanConstructFromObject ( 00625 const RVC::OBJITEM& objitem 00626 ); 00627 00628 //! Compute default maximum visible scale based on object element detail/density. 00629 //! Maximum scale returned, 0 if none. 00630 static double ComputeDftMaxVisibleScale ( 00631 const RVC::OBJITEM& objitem //!< Object to use 00632 ); 00633 00634 //! Construct layer of specified type and assign specified object. 00635 static ERRVALUE ConstructAndAssignObject ( 00636 GRE::GROUP *group, //!< Group to add layer to 00637 LAYER::TYPE layertype, //!< Type of layer to construct 00638 const RVC::OBJITEM& objitem, //!< Object to assign 00639 LAYER **retlayer = 0, //!< Layer returned, NULL if not needed 00640 CREATEFLAGS createflags = LAYER::CREATEFLAG_None, //!< Layer creation flags 00641 GRE::LISTPOS listpos = GRE::LISTPOS_Last, //!< Position for new layer in list 00642 LAYER *reflayer = 0 //!< Reference layer for insertion before or after 00643 ); 00644 00645 #ifdef USE_MGUI 00646 //! Construct layer of specified type, prompt for object, and optional open settings window. 00647 static ERRVALUE ConstructAndPromptObject ( 00648 MDLGPARENT dlgparent, //!< Parent for dialogs 00649 GRE::GROUP *group, //!< Group to add layer to 00650 LAYER::TYPE layertype, //!< Type of layer to construct 00651 LAYER **retlayer, //!< Layer returned, NULL if not needed 00652 CREATEFLAGS createflags, //!< Layer creation flags 00653 GRE::LISTPOS listpos, //!< Position for new layer in list 00654 LAYER *reflayer, //!< Reference layer for insertion before or after 00655 bool OpenSettings //!< true to open settings window 00656 ); 00657 #endif 00658 00659 #ifdef USE_MGUI 00660 //! Construct layers using geospatial catalog. 00661 static ERRVALUE ConstructFromGeoCat ( 00662 MDLGPARENT dlgparent, 00663 GRE::GROUP *group 00664 ); 00665 #endif 00666 00667 //! Construct layer from specified object. 00668 static ERRVALUE ConstructFromObject ( 00669 GRE::GROUP *group, //!< Group to contain new layer 00670 const RVC::OBJITEM& objitem, //!< Object to construct layer for 00671 LAYER **retlayer = 0, //!< New layer returned 00672 CREATEFLAGS createflags = CREATEFLAG_None,//!< Creation flags 00673 GRE::LISTPOS listpos = GRE::LISTPOS_Last, //!< Position of new layer in list 00674 LAYER *reflayer = 0, //!< Reference layer for insertion 00675 MDLGPARENT dlgparent = 0 //!< Parent for verification dialogs, NULL to not use 00676 ); 00677 00678 //! Construct multiple layers using object list (quick-add). 00679 static ERRVALUE ConstructFromObjList ( 00680 GRE::GROUP *group, //!< Group to construct layers in, layers will be added after active layer 00681 const RVC::OBJITEMLIST& objlist, //!< List of objects to construct layers for 00682 MDLGPARENT dlgparent = 0 //!< Parent for verification dialogs, NULL to not use 00683 ); 00684 00685 static void DataTipSystemInit (); 00686 00687 //! Edit global settings via dialog 00688 //! @return true if settings changed, false if not 00689 static bool EditGlobalSettings ( 00690 MDLGPARENT dlgparent 00691 ); 00692 00693 //! Get default layer naming mode. 00694 static GLOBALOPTIONS::DFTNAMEMODE GetDftNameMode ( 00695 ) { return (s_GlobalOptions.m_DftNameMode); } 00696 00697 //! Get global options applying to all layers. 00698 static const GLOBALOPTIONS& GetGlobalOptions ( 00699 ) { InitStatic(); return (s_GlobalOptions); } 00700 00701 //! Get number of registered layer types 00702 static UINT16 GetNumTypes ( 00703 ) { return (s_NumTypes); } 00704 00705 //! Get type definition for specific layer type index 00706 static const TYPEDEFN& GetTypeDefn ( 00707 UINT16 idx 00708 ) { return (*s_TypeDefns[idx]); } 00709 00710 //! Get type definition for specific layer type 00711 static const TYPEDEFN* GetTypeDefn ( 00712 TYPE layertype 00713 ); 00714 00715 //! Get TEXTID for specific layer type name. 00716 static TEXTID GetTypeName ( 00717 TYPE layertype 00718 ); 00719 00720 //! Determine if object has high density/detail. 00721 static bool HasDenseDetail ( 00722 const RVC::OBJITEM& objitem //!< Object to check 00723 ); 00724 00725 #ifdef USE_MGUI 00726 //! Prompt for geospatial databases/links construct layers in specified group. 00727 static ERRVALUE PromptGeoDatabasesAndConstruct ( 00728 MDLGPARENT dlgparent, //!< Parent for dialog 00729 GRE::GROUP *group //!< Group to add layers to 00730 ); 00731 #endif 00732 00733 #ifdef USE_MGUI 00734 //! Prompt for multiple objects for quick-add. 00735 static ERRVALUE PromptObjects ( 00736 MDLGPARENT dlgparent, //!< Parent for dialog 00737 RVC::OBJITEMLIST& objlist, //!< List of selected objects returned 00738 GETOBJFLAGS flags=GETOBJFLAG_None, //!< Additional flags for selection dialog 00739 const MIUNICODE *prompt = 0 //!< Prompt message for use in dialog ( Default is TEXTID_Prompt_Objects_Display ) 00740 ); 00741 #endif 00742 00743 #ifdef USE_MGUI 00744 //! Prompt for multiple objects and construct layers in specified group. 00745 static ERRVALUE PromptObjectsAndConstruct ( 00746 MDLGPARENT dlgparent, //!< Parent for dialog 00747 GRE::GROUP *group //!< Group to add layers to 00748 ); 00749 #endif 00750 00751 //! Register layer type 00752 static void RegisterLayerType ( 00753 TYPEDEFN& typedefn 00754 ); 00755 00756 //! Set whether the default attribute table should be opened on element selection. 00757 static void SetAutoOpenDftTableOnSel ( 00758 bool AutoOpenDftTableOnSel 00759 ) { s_GlobalOptions.m_AutoOpenDftTableOnSel = AutoOpenDftTableOnSel; } 00760 00761 //! Set default layer naming mode 00762 static void SetDftNameMode ( 00763 GLOBALOPTIONS::DFTNAMEMODE DftNameMode 00764 ) { s_GlobalOptions.m_DftNameMode = DftNameMode; } 00765 00766 //! Set global options applying to all layers. 00767 static void SetGlobalOptions ( 00768 const GLOBALOPTIONS& options 00769 ) { s_GlobalOptions = options; } 00770 00771 //! Method to install SML class, called by internal SML function. 00772 static void SMLClassInstall ( 00773 SMLCONTEXT *context //!< SML context 00774 ); 00775 00776 static SMLCLASSMEMBER* GetSMLClassMembers ( 00777 ); 00778 00779 //! Constructor. 00780 LAYER ( 00781 GRE::GROUP *group, //!< Group to contain layer 00782 TYPE layertype, //!< Layer type 00783 DISPPARM& dispparm, //!< Reference to layer's internal DISPPARM 00784 CREATEFLAGS createflags, //!< Creation flags 00785 GRE::LISTPOS listpos = GRE::LISTPOS_Last, //!< Position in list 00786 LAYER *reflayer = 0 //!< Reference layer for insertion 00787 ); 00788 00789 //! Destructor 00790 virtual ~LAYER (); 00791 00792 #ifdef X_NATIVE 00793 //! Append items to popup menu (X only). 00794 void AppendPopupMenuItems ( 00795 Widget widget, //!< Widget popup event occurred in 00796 const DPOINT2D *point, //!< Point in layer coordinates where popup event occurred, NULL if not in view 00797 MENUITEMARRAY& menuitems //!< Menu item array to append to 00798 ) { v_AppendPopupMenuItems(widget,point,menuitems); } 00799 #endif 00800 00801 //! Assign layer to use specified object. 00802 ERRVALUE AssignObject ( 00803 const RVC::OBJITEM& objitem, //!< Object to assign 00804 MDLGPARENT dlgparent = 0 //!< Parent for verification/setting dialogs, NULL to not use such dialogs 00805 ) { return (v_AssignObject(objitem,dlgparent)); } 00806 00807 #ifndef NO_DEPRECATED 00808 //! Assign layer to use specified object. 00809 //! \deprecated Use variant with RVC::OBJITEM. 00810 DEPRECATED ERRVALUE AssignObject ( 00811 const FNAMEINODEUC *fnip 00812 ); 00813 #endif 00814 00815 //! Determine if layer is set to be editable via TNTserver. 00816 bool CanEditInTNTserver ( 00817 ) const { return ((drawflags & LAYERDRAWFLAG_EditInTNTserver) != 0); } 00818 00819 //! Determine if capable of retrieving element extents 00820 bool CanGetElemExtents ( 00821 ) const { return (m_CanGetElemExtents); } 00822 00823 //! Determine if can open control dialog for layer 00824 bool CanOpenControlPanel ( 00825 ) const { return (!m_IsControlPanelDisabled); } 00826 00827 //! Determine if capable of reporting raw element information 00828 bool CanReportRawElemInfo ( 00829 ) const { return (m_CanReportRawElemInfo); } 00830 00831 //! Determine if can show "details" (components). 00832 bool CanShowDetails ( 00833 ) const { return (v_CanShowDetails()); } 00834 00835 //! Determine if element can be tested if inside/outside region 00836 bool CanTestElementByRegion ( 00837 ) const { return (m_CanTestElementByRegion); } 00838 00839 //! Determine if layer can be viewed in 2D. 00840 bool CanViewIn2D ( 00841 ); 00842 00843 //! Determine if layer can be viewed in 3D. 00844 bool CanViewIn3D ( 00845 ); 00846 00847 //! Change position in list 00848 bool ChangeListPos ( 00849 LAYER* reflayer, //!< Reference layer for LISTPOS_Before and LISTPOS_After 00850 GRE::LISTPOS listpos //!< New position in list 00851 ); 00852 00853 //! Check for high feature density/detail and let user set visibility options if exceeds threshold. 00854 ERRVALUE CheckDenseDetail ( 00855 MDLGPARENT dlgparent //!< Parent for dialog