layer.h

Go to the documentation of this file.
00001 /**
00002  * \file gre/layer.h
00003  * \brief GRE::LAYER class definition
00004  *
00005  * \if NODOC
00006  * $Id: layer.h_v 1.54 2004/10/15 21:25:33 ldyas Exp $
00007  *
00008  * $Log: layer.h_v $
00009  * Revision 1.54  2004/10/15 21:25:33  ldyas
00010  * added method for needsmem24
00011  *
00012  * Revision 1.53  2004/10/15 14:34:54  ldyas
00013  * *** empty log message ***
00014  *
00015  * Revision 1.52  2004/10/14 23:08:40  ldyas
00016  * *** empty log message ***
00017  *
00018  * Revision 1.51  2004/10/14 23:03:58  ldyas
00019  * nc.
00020  *
00021  * Revision 1.50  2004/10/14 21:59:11  ldyas
00022  * make isantialiased non - const
00023  *
00024  * Revision 1.49  2004/10/06 13:53:48  mju
00025  * Not necessary to forward-declare inlines for get/set antialias/thinhint methods.
00026  *
00027  * Revision 1.48  2004/10/05 22:58:57  ldyas
00028  * made aa methods virtual.
00029  *
00030  * Revision 1.47  2004/10/01 17:19:32  mju
00031  * Add methods for detail density checking.
00032  * Add dlgparent to assignObject.
00033  *
00034  * Revision 1.46  2004/09/29 18:25:42  ldyas
00035  * now when set antialias also set use transparency.
00036  *
00037  * Revision 1.45  2004/09/28 22:17:59  ldyas
00038  * added antialiasing to globals.
00039  *
00040  * Revision 1.44  2004/09/24 14:22:46  ldyas
00041  * *** empty log message ***
00042  *
00043  * Revision 1.43  2004/09/24 00:48:53  ldyas
00044  * added thin line width hinting
00045  *
00046  * Revision 1.42  2004/09/23 23:21:44  ldyas
00047  * *** empty log message ***
00048  *
00049  * Revision 1.41  2004/09/23 22:55:02  ldyas
00050  * added antialiasing to dispparm.
00051  *
00052  * Revision 1.40  2004/09/20 19:11:44  dglasser
00053  * added setOldPrj for sml grelayer.
00054  *
00055  * Revision 1.39  2004/09/03 22:49:50  dwilliss
00056  * Added some members to dispparm
00057  * DrawLabel no longer needs to be virtual
00058  *
00059  * Revision 1.38  2004/08/19 22:19:50  vdronov
00060  * changed transp from 100 to 255
00061  *
00062  * Revision 1.37  2004/08/18 16:25:33  mju
00063  * Make updateExtents non-inline.
00064  *
00065  * Revision 1.36  2004/08/16 19:58:39  vdronov
00066  * *** empty log message ***
00067  *
00068  * Revision 1.35  2004/07/21 21:55:54  mju
00069  * Add layerview support.
00070  *
00071  * Revision 1.34  2004/07/21 20:33:35  dwilliss
00072  * *** empty log message ***
00073  *
00074  * Revision 1.33  2004/07/20 17:52:03  mju
00075  * Include trans2dc hdr.
00076  *
00077  * Revision 1.32  2004/07/20 13:14:53  mju
00078  * Use region2d hdr.
00079  *
00080  * Revision 1.31  2004/07/19 22:56:10  dwilliss
00081  * LABELPLACEMENT changes
00082  *
00083  * Revision 1.30  2004/07/14 20:02:22  dwilliss
00084  * Forgot to add the inline wrapper to call a private virtaul method
00085  *
00086  * Revision 1.29  2004/07/13 22:33:03  dwilliss
00087  * Added a virtual method for labels
00088  *
00089  * Revision 1.28  2004/07/12 23:14:34  mju
00090  * Nod georegion.
00091  *
00092  * Revision 1.27  2004/07/07 22:00:34  mju
00093  * Add updateMapRegion.
00094  *
00095  * Revision 1.26  2004/07/07 20:51:29  vdronov
00096  * added SetPedestal and IsPedestalSet
00097  *
00098  * Revision 1.25  2004/06/29 21:35:24  mju
00099  * Add highlightElementsByRegion using region2d.
00100  *
00101  * Revision 1.24  2004/06/28 17:53:20  mju
00102  * Convert to spatref system.
00103  *
00104  * Revision 1.23  2004/06/15 15:43:17  vdronov
00105  * *** empty log message ***
00106  *
00107  * Revision 1.22  2004/06/11 17:48:34  vdronov
00108  * removed flags related to RayCasting
00109  *
00110  * Revision 1.21  2004/06/04 19:20:44  dglasser
00111  * Don't use memset with TEXTSTYLEs in SML.  Added SMLSET_TextStyleMember.
00112  *
00113  * Revision 1.20  2004/05/05 22:49:56  dwilliss
00114  * Started adding support for LABELPLACEMENT
00115  *
00116  * Revision 1.19  2004/04/02 18:54:43  mju
00117  * Add ModifyStamp methods.
00118  *
00119  * Revision 1.18  2004/03/31 21:32:04  mju
00120  * Add DrawElement using rvc::ELEMENT.
00121  *
00122  * Revision 1.17  2004/02/12 22:43:22  dwilliss
00123  * deprecate old mgd
00124  *
00125  * Revision 1.16  2004/02/06 16:23:28  mju
00126  * Reorder fns.
00127  *
00128  * Revision 1.15  2004/02/06 16:01:34  mju
00129  * Use GRE_FIND_FLAGS.
00130  *
00131  * Revision 1.14  2004/02/05 22:08:25  mju
00132  * Integrate datatip support.
00133  *
00134  * Revision 1.13  2003/12/22 16:31:11  vdronov
00135  * made CanViewIn... methods not inline.
00136  *
00137  * Revision 1.12  2003/12/15 16:52:51  mju
00138  * Add dispflag_VectNoFillHighlighted.
00139  *
00140  * Revision 1.11  2003/11/20 13:26:33  mju
00141  * Add SetVisiblityGroupFromLayout.
00142  *
00143  * Revision 1.10  2003/10/06 19:38:38  mju
00144  * nc.
00145  *
00146  * Revision 1.9  2003/10/02 16:11:16  linux32build!build
00147  * doxygen
00148  *
00149  * Revision 1.8  2003/09/25 21:22:24  dwilliss
00150  * Don't capitalize enum any more. Genitor needed it, doxygen doesn't like it
00151  *
00152  * Revision 1.7  2003/09/23 13:08:08  mju
00153  * Explicitly init serializble in copy dispparm copy ctor.
00154  *
00155  * Revision 1.6  2003/09/18 22:00:53  mju
00156  * nc.
00157  *
00158  * Revision 1.5  2003/09/15 13:48:59  fileserver!dwilliss
00159  * Doxygen
00160  *
00161  * Revision 1.4  2003/07/31 13:38:40  mju
00162  * Add Filter method to LAYER::FILTER.
00163  *
00164  * Revision 1.3  2003/07/30 15:15:58  mju
00165  * Ignore private sections.
00166  * Move DISPPARM defn outside layer so will be doc'd.  Add inlines where req'd.
00167  *
00168  * Revision 1.2  2003/06/17 13:39:52  mju
00169  * Include mfctreeview.h for MFC.
00170  *
00171  * Revision 1.1  2003/06/16 19:39:43  mju
00172  * Initial revision
00173  * \endif
00174 **/
00175 
00176 #ifndef  INC_GRE_LAYER_H
00177 #define  INC_GRE_LAYER_H
00178 
00179 #ifndef  INC_GRE_OBJECTBASE_H
00180    #include <gre/objectbase.h>
00181 #endif
00182 
00183 #ifndef  INC_GRE_VIEWABLE_H
00184    #include <gre/viewable.h>
00185 #endif
00186 
00187 #ifndef  INC_GRE_ELEMSEARCH_H
00188    #include <gre/elemsearch.h>
00189 #endif
00190 
00191 #ifndef  INC_GRE_3DWIREFRAME_H
00192    #include <gre/3dwireframe.h>
00193 #endif
00194 
00195 #if !defined(INC_GRE_MFCTREEVIEW) && defined(WIN32_MFC)
00196    #include <gre/mfctreeview.h>
00197 #endif
00198 
00199 #ifndef  INC_MI32_GRTREE_H
00200    #include <mi32/grtree.h>
00201 #endif
00202 
00203 #ifndef  INC_MI32_RANGE_H
00204    #include <mi32/range.h>
00205 #endif
00206 
00207 #ifndef  INC_RVC_ELEMENT_H
00208    #include <rvc/element.h>
00209 #endif
00210 
00211 #ifndef  INC_MI32_RVCPARMS_H
00212    #include <mi32/rvcparms.h>
00213 #endif
00214 
00215 #ifndef  INC_MI32_DBEDIT_H
00216    #include <mi32/dbedit.h>
00217 #endif
00218 
00219 #ifndef  INC_MI32_REGION2D_H
00220    #include <mi32/region2d.h>
00221 #endif
00222 
00223 #ifndef  INC_MI32_TRANS2DC_H
00224    #include <mi32/trans2dc.h>
00225 #endif
00226 
00227 class BITSET;
00228 class BITSET_UNOWNED;
00229 struct SMLCONTEXT;
00230 struct SMLCLASSMEMBER;
00231 union SMLARG;
00232 struct DATATIPPARMS;
00233 namespace RVC {
00234    class GETOBJFILTER;
00235    }
00236 
00237 //===================================================================================================================
00238 
00239 //! Flags stored in xxxxDISPPARM.dispflags
00240 enum DISPFLAGS {
00241    DISPFLAG_None =                  0x00000000,
00242    DISPFLAG_SaveDrawnSetOBS =       0x00000001, //!< OBSOLETE, DO NOT USE, retain def so can read old dispparms
00243    DISPFLAG_KeepOpenOBS =           0x00000002, //!< OBSOLETE, DO NOT USE, retain so can read old dispparms
00244    DISPFLAG_UseTempFile =           0x00000004, //!< Object is in a temporary file
00245    DISPFLAG_EditObjectOBS =         0x00000008, //!< OBSOLETE, DO NOT USE, retain so can read old dispparms
00246    DISPFLAG_NoDrawLabels =          0x40000000, //!< Don't draw labels
00247    DISPFLAG_DrawLabelsOnly =        0x80000000, //!< Only draw labels
00248 
00249    DISPFLAG_WarpToGeorefModel =     0x00000100, //!< Warp to model specified with georeference
00250    DISPFLAG_UsesTransparency =         0x00000200, //!< Uses transparency effects
00251    DISPFLAG_NoDrawWireframe =       0x00000400, //!< Don't draw layer in wireframe mode
00252    DISPFLAG_MayUseTransparency =    0x00000800, //!< Use of transparency unknown, assume it does until first time draw
00253    DISPFLAG_Antialias =          0x00001000, //!< Draw Antialiased
00254    DISPFLAG_HintThinLines =         0x00002000, //!< Imply thin lines via transparency
00255 
00256    DISPFLAG_VectDrawNodes =         0x00010000, //!< Draw nodes for vector object
00257    DISPFLAG_VectLinesFirst =        0x00020000, //!< Draw vector lines before polygons
00258    DISPFLAG_VectNoFillPoly =        0x00040000, //!< Disable polygon filling
00259    DISPFLAG_VectNoFillHighlighted = 0x00080000, //!< Disable polygon filling when highlighted
00260 
00261    DISPFLAG_TINEdgesFirst =         0x00020000, //!< Draw TIN edges before triangles
00262    DISPFLAG_TINNoFillTri =          0x00040000, //!< Don't fill TIN triangles
00263 
00264    DISPFLAG_RastNullTransp =        0x00010000, //!< Make "null" cells transparent
00265    DISPFLAG_RastSkipOddLines =         0x00020000, //!< Skip odd screen lines (for 3Dmax glasses)
00266    DISPFLAG_RastSkipEvenLines =     0x00040000, //!< Skip even screen lines (for 3Dmax glasses)
00267    DISPFLAG_RastDoBlendMask =       0x00080000, //!< Do mask transparency blending if possible
00268    DISPFLAG_RastHyperspectLossy =      0x00400000, //!< Display hyperspectral in fast-lossy mode
00269 
00270    DISPFLAG_SurfProjOffEdge =       0x00010000, //!< Project data off edge of surface
00271 
00272    DISPFLAG_FormulaNullTransp =     0x00010000, //!< Make "null" cells transparent
00273    DISPFLAG_FormulaSkipOddLines =      0x00020000, //!< Skip odd screen lines (for 3Dmax glasses)
00274    DISPFLAG_FormulaSkipEvenLines =     0x00040000, //!< Skip even screen lines (for 3Dmax glasses)
00275    };
00276 DEFINE_ENUM_OP_BITWISE(DISPFLAGS);
00277 
00278 //===================================================================================================================
00279 
00280 enum LAYERDRAWFLAGS {
00281    LAYERDRAWFLAG_None =             0x0000,  //!< No flags
00282 // LAYERDRAWFLAG_ClipTo =           0x0001,
00283    LAYERDRAWFLAG_Clip =             0x0002,  //!< Clip layer
00284    LAYERDRAWFLAG_NoClipToGroup =    0x0004,  //!< Don't clip layer to group
00285    LAYERDRAWFLAG_SaveToTemplate =   0x0008,  //!< Save layer as-is to template
00286    LAYERDRAWFLAG_EditInTNTserver =  0x0010,  //!< Allow layer to be edited in TNTserver
00287    LAYERDRAWFLAG_MaskAll =          0xFFFF,  //!< Mask for setting all flags
00288    };
00289 DEFINE_ENUM_OP_BITWISE(LAYERDRAWFLAGS);
00290 
00291 //===================================================================================================================
00292 
00293 enum LAYERFLAGS {
00294    LAYERFLAG_None =                 0x00000000, //!< No flags
00295    LAYERFLAG_NoSelNewObj =          0x00000010, //!< Don't allow user to select new object(s) via CtrlPanel
00296    LAYERFLAG_HiliteColorSet =       0x00000040, //!< Separate highlight color has been set for layer
00297    LAYERFLAG_3D =                   0x00000200, //!< Layer is fully 3-D, no "surface" required
00298    LAYERFLAG_KeepOpen =             0x00020000, //!< Set if object should remain open until layer is destroyed
00299    LAYERFLAG_Editable =             0x00040000, //!< Set if layer can be edited
00300    LAYERFLAG_CanShowInLocator =     0x00100000, //!< Set if can show this layer in the Locator window
00301    LAYERFLAG_IgnoreExtents =        0x00400000, //!< Ignore this layer when determining group extents
00302    LAYERFLAG_NoGeoreference =       0x00080000, //!< Set if no georeference info should be read for layer
00303    LAYERFLAG_NoDrawActiveElem =     0x01000000, //!< Don't draw "active" element
00304    LAYERFLAG_NoShowInLayerMgr =     0x02000000, //!< Don't show in layer manager, must also set LAYERFLAG_Temporary
00305    LAYERFLAG_NoAllowHide =          0x04000000, //!< Don't allow user to hide layer
00306    LAYERFLAG_NoAllowDelete =        0x08000000, //!< Don't allow user to delete layer
00307    LAYERFLAG_Temporary =            0x10000000, //!< Layer is temporary, cannot save in layout
00308    LAYERFLAG_MaskAll =              0xFFFFFFFF, //!< Mask for setting all flags
00309    };
00310 DEFINE_ENUM_OP_BITWISE(LAYERFLAGS);
00311 
00312 //===================================================================================================================
00313 
00314 #define  GRE_MAXLAYERTYPES    32
00315 
00316 //! Layer base class.
00317 class GRE_LAYER : public GRE_OBJECT {
00318    public:
00319 
00320       //! Layer types.
00321       enum TYPE {
00322          TYPE_None =       0,
00323          TYPE_Raster =     1,
00324          TYPE_Vector =     2,
00325          TYPE_CAD =        3,
00326          TYPE_DBPinmap =   4,
00327          TYPE_MapGrid =    5,
00328          TYPE_ScaleBar =   6,
00329          TYPE_Text =       7,
00330          TYPE_Legend =     8,
00331          TYPE_TIN =        9,
00332          TYPE_Sketch =     10,
00333          TYPE_Region =     11,
00334          TYPE_Surface =    12,
00335          TYPE_Script =     13,
00336          TYPE_Formula =    14,
00337          TYPE_Legend2 =    15,
00338          TYPE_Shape =      16,
00339          TYPE_NEXT
00340          //! Check GRE_MAXLAYERTYPES when add new types
00341          };
00342 
00343       //! Container for global layer options.
00344       class GLOBALOPTIONS {      // GRE_LAYER::GLOBALOPTIONS
00345          public:
00346 
00347             class FORM;                         //!< Global options form, defined in <gre/uilrglob.h>
00348 
00349             enum DFTNAMEMODE {
00350                DFTNAMEMODE_ObjectDesc =      0,    //!< Use object description (or name if no description)
00351                DFTNAMEMODE_ObjectName =      1,    //!< Use object name
00352                DFTNAMEMODE_FileObjNames =    2     //!< Use combined file and object names
00353                };
00354 
00355             GLOBALOPTIONS (
00356                ): m_DftNameMode(DFTNAMEMODE_ObjectDesc), m_AutoOpenDftTableOnSel(true) { }
00357 
00358          #ifdef X_NATIVE
00359             Widget CreateEditForm (
00360                Widget parent,
00361                const Arg *arglist,
00362                int argcount
00363                );
00364          #endif
00365 
00366             bool GetAutoOpenDftTableOnSel (
00367                ) const { return (m_AutoOpenDftTableOnSel); }
00368 
00369             DFTNAMEMODE GetDftNameMode (
00370                ) const { return (m_DftNameMode); }
00371 
00372             void IniRead (
00373                const char *inigroup = 0
00374                );
00375 
00376             void IniWrite (
00377                const char *inigroup = 0
00378                ) const;
00379 
00380             void SetAutoOpenDftTableOnSel (
00381                bool AutoOpenDftTableOnSel
00382                ) { m_AutoOpenDftTableOnSel = AutoOpenDftTableOnSel; }
00383 
00384             void SetDftNameMode (
00385                DFTNAMEMODE DftNameMode
00386                ) { m_DftNameMode = DftNameMode; }
00387                
00388             void SetAntialiasing (
00389                bool antialias
00390                ){ m_Antialiasing = antialias;}
00391 
00392             void SetHintThinLines (
00393                bool hint
00394                ){ m_HintThinLines = hint;}
00395 
00396             bool GetAntialiasing (
00397                ) const {return(m_Antialiasing);}
00398 
00399             bool GetHintThinLines (
00400                )const {return(m_HintThinLines);}
00401 
00402          private:
00403             #ifndef GENERATING_DOXYGEN_OUTPUT
00404             DFTNAMEMODE m_DftNameMode;
00405             bool m_AutoOpenDftTableOnSel;       //!< Automatically open default table on element selection (highlighting)
00406             friend class GRE_LAYER;
00407             bool m_Antialiasing;
00408             bool m_HintThinLines;
00409 
00410             #endif // GENERATING_DOXYGEN_OUTPUT
00411          }; // End of GRE_LAYER::GLOBALOPTIONS
00412 
00413       class DISPPARM;
00414 
00415       class TYPEDEFN;
00416       class COMPINFO;
00417       class FILTER;
00418       class FILTER_EXCLUDE;
00419 
00420    #ifdef X_NATIVE
00421       //! Form for layer in "object manager".
00422       class OBJMGRFORM {
00423          public:
00424 
00425             //! Constructor.
00426             OBJMGRFORM (
00427                GRE_LAYER *layer
00428                );
00429 
00430             //! Destructor.
00431             ~OBJMGRFORM (
00432                );
00433 
00434             //! Create the form widget.
00435             Widget Create (
00436                );
00437 
00438             void DestroyForm (
00439                );
00440 
00441             Widget GetForm (
00442                ) const { return (m_form); }
00443 
00444             Widget GetToolMenuButton (
00445                ) const { return (m_ToolIconMB); }
00446 
00447             //! Hide the layer form in the object manager.
00448             void Hide (
00449                );
00450 
00451             void HideDetails (
00452                );
00453 
00454             //! Set the position of the object manager
00455             //! @return Next position after item.
00456             short SetObjMgrPos (
00457                short pindex = -2
00458                );
00459 
00460             //! Show layer form in object manager.
00461             short Show (
00462                short pindex = -2
00463                );
00464 
00465             void ShowDetails (
00466                );
00467 
00468          private:
00469             #ifndef GENERATING_DOXYGEN_OUTPUT
00470 
00471             GRE_LAYER *m_layer;
00472             Widget m_form;
00473             Widget m_ActiveTB;
00474             Widget m_ShowDetailsTB;
00475             Widget m_ToolIconMB;
00476             Widget m_VisibleIcon[GRE_MAXVIEWS];
00477             Widget m_MinScaleVisibleP;
00478             Widget m_MaxScaleVisibleP;
00479             Widget m_NameLabel;
00480             Widget m_DeleteMB;
00481 
00482             
00483             static void CB_CmdLayerDelete (Widget, void *vlayer, void*);
00484             static void CB_CmdLayerControls (Widget, void *vlayer, void*);
00485             static void CB_CmdTool (Widget, void *voption, void*);
00486             static void CB_EditScaleRange (Widget, void *vlayer);
00487             static void CB_NotifyGreObject (const GRE_CALLBACK_MSG *msg, void *vpObjMgrForm);
00488             static void CB_NotifyGreView (const GRE_CALLBACK_MSG *msg, void*);
00489             static void CB_ToggleActive (Widget, void *vlayer, XmToggleButtonCallbackStruct*);
00490             static void CB_ToggleShowDetails (Widget, void *vpObjMgrForm, XmToggleButtonCallbackStruct*);
00491             static void CB_ToggleVisibleInViewNum (Widget, void *vViewNum, XmToggleButtonCallbackStruct*);
00492 
00493             void OnNotifyGreObject (const GRE_CALLBACK_MSG& msg);
00494             void UpdateShowInternalTables ();
00495             void UpdateShowScaleRanges ();
00496 
00497             OBJMGRFORM (const OBJMGRFORM&);
00498             OBJMGRFORM& operator= (const OBJMGRFORM&);
00499 
00500             #endif // GENERATING_DOXYGEN_OUTPUT
00501          }; //! End of GRE_LAYER::OBJMGRFORM
00502    #endif
00503 
00504    #ifdef X_NATIVE
00505       class RAWELEMFORM {
00506          public:
00507 
00508             //! Constructor.
00509             explicit RAWELEMFORM (
00510                GRE_LAYER *layer
00511                );
00512 
00513             //! Destructor.
00514             ~RAWELEMFORM (
00515                );
00516 
00517             void CreateToggleForm (
00518                );
00519 
00520             void DestroyForms (
00521                );
00522 
00523             Widget GetToggleForm (
00524                ) const { return (m_ToggleForm); }
00525 
00526             void HideForms (
00527                );
00528 
00529             bool IsInfoShown (
00530                ) const { return (m_InfoForm != 0 && XtIsManaged(m_InfoForm)); }
00531 
00532             void SetElement (
00533                ELEMTYPE ElemType,
00534                INT32 ElemNum
00535                );
00536 
00537             short ShowToggleForm (
00538                short pindex
00539                );
00540 
00541             void SetInfoText (
00542                const UNICODE *string
00543                );
00544 
00545             //! Set the position of the Object Manager
00546             //! @return Next position after item.
00547             short SetObjMgrPos (
00548                short pindex
00549                );
00550 
00551          private:
00552             #ifndef GENERATING_DOXYGEN_OUTPUT
00553 
00554             GRE_LAYER *m_layer;
00555             ELEMTYPE m_ElemType;
00556             INT32 m_ElemNum;
00557             Widget m_ToggleForm;             //!< Form containing toggle for showing raw info
00558             Widget m_ShowInfoTB;             //!< Toggle for showing raw info
00559             Widget m_InfoForm;               //!< Form containing raw info
00560             Widget m_ElemNumP;               //!< 'Prompt' for entering element number
00561             Widget m_ElemTypeTB[6];          //!< ToggleButtons for selecting element type, indexed by component
00562             Widget m_InfoXeT;
00563 
00564             static void CB_BtnNextSelected (Widget, void*, void*);
00565             static void CB_BtnPrevSelected (Widget, void*, void*);
00566             static void CB_BtnSelectPrev (Widget, void*, void*);
00567             static void CB_BtnSelectNext (Widget, void*, void*);
00568             static void CB_EditElemNum (Widget, void*);
00569             static void CB_ToggleSetElemType (Widget, void*, void*);
00570             static void CB_ToggleShowInfo (Widget, void*, XmToggleButtonCallbackStruct*);
00571             static void EH_ResizeSW (Widget, void*, XEvent*, Boolean*);
00572 
00573             void CreateInfoForm ();
00574             void OnEditElemNum ();
00575             void SelectPrevNext (int add);
00576             void SetElemType (ELEMTYPE ElemType);
00577             void ShowInfoForm (bool show);
00578 
00579             RAWELEMFORM (const RAWELEMFORM&);
00580             RAWELEMFORM& operator= (const RAWELEMFORM&);
00581 
00582             #endif // GENERATING_DOXYGEN_OUTPUT
00583          }; //! End of GRE_LAYER::RAWELEMFORM
00584    #endif
00585 
00586       //! Determine if can construct layer from RVC object.
00587       static bool CanConstructFromObject (
00588          const RVC::OBJITEM& objitem
00589          );
00590 
00591       //! Compute default maximum visible scale based on object element detail/density.
00592       //! Maximum scale returned, 0 if none.
00593       static double ComputeDftMaxVisibleScale (
00594          const RVC::OBJITEM& objitem            //!< Object to use
00595          );
00596 
00597       //! Construct layers using geospatial catalog.
00598       static ERRVALUE ConstructFromGeoCat (
00599          MDLGPARENT dlgparent,
00600          GRE_GROUP *group
00601          );
00602 
00603       //! Construct layer from specified object.
00604       static ERRVALUE ConstructFromObject (
00605          GRE_GROUP *group,                      //!< Group to contain new layer
00606          const RVC::OBJITEM& objitem,           //!< Object to construct layer for
00607          GRE_LAYER **retlayer = 0,              //!< New layer returned
00608          GRE_LAYER *reflayer = 0,               //!< Reference layer for insertion
00609          UINT32 createflags = 0,                //!< Creation flags
00610          MDLGPARENT dlgparent = 0               //!< Parent for verification dialogs, NULL to not use
00611          );
00612 
00613       //! Construct multiple layers using object list (quick-add).
00614       static ERRVALUE ConstructFromObjList (
00615          GRE_GROUP *group,                      //!< Group to construct layers in, layers will be added after active layer
00616          const RVC::OBJITEMLIST& objlist,       //!< List of objects to construct layers for
00617          MDLGPARENT dlgparent = 0               //!< Parent for verification dialogs, NULL to not use
00618          );
00619 
00620       //! Edit global settings via dialog
00621       //! @return true if settings changed, false if not
00622       static bool EditGlobalSettings (
00623          MDLGPARENT dlgparent
00624          );
00625 
00626       //! Get default layer naming mode.
00627       static GLOBALOPTIONS::DFTNAMEMODE GetDftNameMode (
00628          ) { return (s_GlobalOptions.m_DftNameMode); }
00629 
00630       //! Get global options applying to all layers.
00631       static const GLOBALOPTIONS& GetGlobalOptions (
00632          ) { InitStatic(); return (s_GlobalOptions); }
00633 
00634       //! Get number of registered layer types
00635       static UINT16 GetNumTypes (
00636          ) { return (s_NumTypes); }
00637 
00638       //! Get type definition for specific layer type index
00639       static const TYPEDEFN& GetTypeDefn (
00640          UINT16 idx
00641          ) { return (*s_TypeDefns[idx]); }
00642 
00643       //! Get type definition for specific layer type
00644       static const TYPEDEFN* GetTypeDefn (
00645          TYPE layertype
00646          );
00647 
00648       //! Get localized name for specific layer type
00649       static const UNICODE* GetTypeName (
00650          TYPE layertype
00651          );
00652 
00653       //! Determine if object has high density/detail
00654       static bool HasDenseDetail (
00655          const RVC::OBJITEM& objitem            //!< Object to check
00656          );
00657 
00658    #if defined(X_NATIVE) || defined(WIN32_MFC)
00659       //! Prompt for multiple objects for quick-add.
00660       static ERRVALUE PromptObjects (
00661          MDLGPARENT dlgparent,                  //!< Parent for dialog
00662          RVC::OBJITEMLIST& objlist,             //!< List of selected objects returned
00663          GETOBJFLAGS flags=GETOBJFLAG_None,     //!< Additional flags for selection dialog
00664          const UNICODE *prompt = 0              //!< Prompt message for use in dialog ( Default is TEXTID_Prompt_Objects_Display )
00665          );
00666    #endif
00667 
00668       //! Register layer type
00669       static void RegisterLayerType (
00670          TYPEDEFN& typedefn
00671          );
00672 
00673       //! Set whether the default attribute table should be opened on element selection.
00674       static void SetAutoOpenDftTableOnSel (
00675          bool AutoOpenDftTableOnSel
00676          ) { s_GlobalOptions.m_AutoOpenDftTableOnSel = AutoOpenDftTableOnSel; }
00677 
00678       //! Set default layer naming mode
00679       static void SetDftNameMode (
00680          GLOBALOPTIONS::DFTNAMEMODE DftNameMode
00681          ) { s_GlobalOptions.m_DftNameMode = DftNameMode; }
00682 
00683       //! Set global options applying to all layers.
00684       static void SetGlobalOptions (
00685          const GLOBALOPTIONS& options
00686          ) { s_GlobalOptions = options; }
00687 
00688       //! Method to install SML class, called by internal SML function.
00689       static void SMLClassInstall (
00690          SMLCONTEXT *context                    //!< SML context
00691          );
00692 
00693       static SMLCLASSMEMBER* GetSMLClassMembers (
00694          );
00695 
00696       //! Constructor
00697       GRE_LAYER (
00698          GRE_GROUP *group,                      //!< Group to contain layer
00699          GRE_LAYER *reflayer,                   //!< Reference layer for insertion
00700          TYPE layertype,                        //!< Layer type
00701          DISPPARM& dispparm,                    //!< Reference to layer's internal DISPPARM
00702          UINT32 flags                           //!< MDISPCREATE flags
00703          );
00704 
00705       //! Destructor
00706       virtual ~GRE_LAYER ();
00707 
00708    #ifdef WIN32_MFC
00709       //! Add "details" items to treeview (WIN32_MFC).
00710       void AddTreeViewDetails (
00711          GRE_MFC_TREEVIEW& TreeView,
00712          HTREEITEM hParent,
00713          HTREEITEM hInsertAfter
00714          ) { v_AddTreeViewDetails(TreeView,hParent,hInsertAfter); }
00715    #endif
00716 
00717    #ifdef WIN32_MFC
00718       //! Add "legend" items to treeview (WIN32_MFC).
00719       void AddTreeViewLegend (
00720          GRE_MFC_TREEVIEW& TreeView,
00721          HTREEITEM hParent,
00722          HTREEITEM hInsertAfter
00723          ) { v_AddTreeViewLegend(TreeView,hParent,hInsertAfter); }
00724    #endif
00725 
00726    #ifdef X_NATIVE
00727       //! Append items to popup menu (X only).
00728       void AppendPopupMenuItems (
00729          Widget widget,                      //!< Widget popup event occurred in
00730          const DPOINT2D *point,              //!< Point in layer coordinates where popup event occurred, NULL if not in view
00731          MENUITEMARRAY& menuitems            //!< Menu item array to append to
00732          ) { v_AppendPopupMenuItems(widget,point,menuitems); }
00733    #endif
00734 
00735       //! Assign layer to use specified object.
00736       ERRVALUE AssignObject (
00737          const RVC::OBJITEM& objitem,           //!< Object to assign
00738          MDLGPARENT dlgparent = 0               //!< Parent for verification/setting dialogs, NULL to not use such dialogs
00739          ) { return (v_AssignObject(objitem,dlgparent)); }
00740 
00741       //! Assign layer to use specified object.
00742       ERRVALUE AssignObject (
00743          const FNAMEINODEUC *fnip
00744          );
00745 
00746       //! Determine if layer is set to be editable via TNTserver.
00747       bool CanEditInTNTserver (
00748          ) const { return ((drawflags & LAYERDRAWFLAG_EditInTNTserver) != 0); }
00749 
00750       //! Determine if capable of retrieving element extents
00751       bool CanGetElemExtents (
00752          ) const { return (m_CanGetElemExtents); }
00753 
00754       //! Determine if can open control dialog for layer
00755       bool CanOpenControlPanel (
00756          ) const { return (!m_IsControlPanelDisabled); }
00757 
00758       //! Determine if capable of reporting raw element information
00759       bool CanReportRawElemInfo (
00760          ) const { return (m_CanReportRawElemInfo); }
00761 
00762       //! Determine if can show "details" (components).
00763       bool CanShowDetails (
00764          ) const { return (v_CanShowDetails()); }
00765 
00766       //! Determine if element can be tested if inside/outside region
00767       bool CanTestElementByRegion (
00768          ) const { return (m_CanTestElementByRegion); }
00769 
00770       //! Determine if layer can be viewed in 2D.
00771       bool CanViewIn2D (
00772          );
00773 
00774       //! Determine if layer can be viewed in 3D.
00775       bool CanViewIn3D (
00776          );
00777 
00778       //! Change position in list
00779       bool ChangeListPos (
00780          GRE_LAYER* reflayer,
00781          UINT32 insertpos
00782          );
00783 
00784       //! Check for high feature density/detail and let user set visibility options if exceeds threshold.
00785       ERRVALUE CheckDenseDetail (
00786          MDLGPARENT dlgparent                   //!< Parent for dialog
00787          );
00788 
00789       //! Request close of object(s) associated with layer.
00790       void CloseObject (
00791          ) { v_CloseObject(); };
00792 
00793       //! Compute "margins" for layer
00794       void ComputeMargins (
00795          double& tmargin,                       //!< Top margin in "layer" coordinates returned
00796          double& bmargin,                       //!< Bottom margin in "layer" coordinates returned
00797          double& lmargin,                       //!< Left margin in "layer" coordinates returned
00798          double& rmargin                        //!< Right margin in "layer" coordinates returned
00799          ) { v_ComputeMargins(tmargin,bmargin,lmargin,rmargin); }
00800 
00801    #ifndef GENERATING_DOXYGEN_OUTPUT
00802       // Construct LAYERVIEW instance for this layer and specified view.
00803       GRE::LAYERVIEW* ConstructLayerView (
00804          GRE_VIEW *view
00805          ) { return (v_ConstructLayerView(view)); }
00806    #endif
00807 
00808       //! Get default DataTip prefix for specified component.
00809       void DataTipGetDefaultPrefix (
00810          int component,                         //!< Component index
00811          DATATIPPARMS& DataTipParms             //!< DataTip parameters passed/returned
00812          ) const { v_DataTipGetDefaultPrefix(component,DataTipParms); }
00813 
00814       //! Get DataTip settings for specified component
00815       const DATATIPPARMS& DataTipGetParms (
00816          int component                          //!< Component index
00817          ) const { return (v_DataTipGetParms(component)); }
00818 
00819       //! Get DataTip search distance in pixels.
00820       inline int DataTipGetSearchDist (
00821          ) const;
00822 
00823       //! Get DataTip text for specified element.
00824       //! @return TRUE if have DataTip, FALSE if not, < 0 if error.
00825       int DataTipGetString (
00826          ELEMTYPE ElemType,                     //!< Element type
00827          INT32 ElemNum,                         //!< Element number
00828          MISTRING& string                       //!< String to contain result
00829          ) { return (v_DataTipGetString(ElemType,ElemNum,string)); }
00830 
00831       //! Get DataTip text for specified point.
00832       //! If a view is specified and the layer is visible in that view then only
00833       //! visible elements will be searched.
00834       //! @return TRUE if have string, FALSE if not, < 0 if error
00835       int DataTipGetString (
00836          const DPOINT2D& point,                 //!< Point in layer coordinates
00837          MISTRING& string,                      //!< String to contain result
00838          GRE_VIEW *view = 0                     //!< Optional view to determine whether to limit to 'visible' elements
00839          ) { return (v_DataTipGetString(point,string,view)); }
00840 
00841       //! Determine if has DataTip available for any component.
00842       bool DataTipHasAvailable (
00843          ) const;
00844 
00845       //! Determine if has DataTip enabled for any component.
00846       bool DataTipHasEnabled (
00847          ) const;
00848 
00849       //! Determine if DataTip is enabled for this layer.
00850       //! May also need to use DataTipHasAvailable to determine if a DataTip is actually available.
00851       bool DataTipIsEnabled (
00852          ) const { return (m_DataTipEnabled); }
00853 
00854       //! Set default DataTip prefix for specified layer component.
00855       void DataTipSetDefaultPrefix (
00856          int component                          //!< Component index
00857          );
00858 
00859       //! Set DataTip parameters for specified layer component
00860       ERRVALUE DataTipSetParms (
00861          int component,                         //!< Component index
00862          const DATATIPPARMS& DataTipParms       //!< Parameter values to set
00863          ) { return (v_DataTipSetParms(component,DataTipParms)); }
00864 
00865       //! Translate DbList index to element number.
00866       INT32 DbListIndexToElemNum (
00867          int component,
00868          INT32 index
00869          ) { return (v_DbListIndexToElemNum(component,index)); }
00870 
00871       //! Translate element number to DbList index.
00872       INT32 DbListElemNumToIndex (
00873          int component,
00874          INT32 ElemNum
00875          ) { return (v_DbListElemNumToIndex(component,ElemNum)); }
00876 
00877       //! Determine if DbList index is same as element number.
00878       bool DbListIsIndexElemNum (
00879          ) const { return (m_DbListIsIndexElemNum); }
00880 
00881       //! Destroy all LAYERVIEW instances associated with this layer.
00882       void DestroyAllLayerViews (
00883          );
00884 
00885       //! Disable access to layer controls.
00886       void DisableControlPanel (
00887          ) { m_IsControlPanelDisabled = true; }
00888 
00889       //! Draw this layer.
00890       ERRVALUE Draw (
00891          GRE_LAYERDC& layerdc                   //!< Drawing control parameters
00892          ) { return (v_Draw(layerdc)); }
00893 
00894       //! Draw all views containing layer
00895       int DrawAllViews (
00896          UINT32 flags = 0                       //!< MDISPDRAW_... flags
00897          );
00898 
00899       //! Draw single element given ELEMTYPE and element number.
00900       ERRVALUE DrawElement (
00901          GRE_VIEW *view,                        //!< View to draw in, 0 for all
00902          ELEMTYPE ElemType,                     //!< Element type
00903          INT32 ElemNum,                         //!< Element number
00904          UINT32 drawflags
00905          );
00906 
00907       //! Draw single element given RVC::ELEMENT.
00908       ERRVALUE DrawElement (
00909          GRE_VIEW *view,                        //!< View to draw in, 0 for all
00910          const RVC::ELEMENT& element,           //!< Element specifier
00911          UINT32 flags
00912          ) { return (DrawElement(view,element.GetType(),element.GetNumber(),flags)); }
00913 
00914       //! Draw single element for this layer
00915       ERRVALUE DrawElementLow (
00916          GRE_LAYERDC& layerdc,                  //!< Drawing control parameters
00917          ELEMTYPE ElemType,                     //!< Element type
00918          INT32 ElemNum,                         //!< Element number
00919          const void *style                      //!< Style for override, 0 for default
00920          ) { return (v_DrawElementLow(layerdc,ElemType,ElemNum,style)); }
00921 
00922       //! Draw multiple elements specified by bit set.
00923       ERRVALUE DrawElements (
00924          GRE_VIEW *view,                        //!< View to draw in, 0 for all
00925          ELEMTYPE ElemType,                     //!< Element type
00926          UINT8 *ElemSet,                        //!< Bit set of elements to draw
00927          UINT32 drawflags
00928          );
00929 
00930       //! Draw set of elements for this layer
00931       ERRVALUE DrawElementsLow (
00932          GRE_LAYERDC& layerdc,                  //!< Drawing control parameters
00933          ELEMTYPE ElemType,                     //!< Element type
00934          const UINT8 *ElemSet,                  //!< Element set
00935          const void *style                      //!< Style for override, 0 for default
00936          ) { return (v_DrawElementsLow(layerdc,ElemType,ElemSet,style)); }
00937 
00938       //! Draw element sample.
00939       ERRVALUE DrawElementSample (
00940          const GRE_ELEMSAMPLE_DC& sampledc,     //!< Drawing control parameters
00941          const RVC::ELEMENT& element,           //!< Element
00942          const LRECT2D& samplerect              //!< Destination rectangle
00943          ) { return (v_DrawElementSample(sampledc,element,samplerect)); }
00944 
00945       //! Draw a single label for this layer
00946       ERRVALUE DrawLabel (
00947          GRE_LAYERDC& layerdc,                  //!< Drawing control parameters
00948          const GRE::LABELPLACE& place,
00949          const COLOR* ForegroundColor = 0       //!< Overrides foreground color if not NULL
00950          );
00951 
00952       //! Draw set of labels for this layer
00953       ERRVALUE DrawLabels (
00954          GRE_LAYERDC& layerdc                //!< Drawing control parameters
00955          );
00956 
00957       //! Display dialog to select highlighting colors.
00958       void EditColors (
00959          MDLGPARENT dlgparent                   //!< Parent for dialog
00960          );
00961 
00962       //! Enable DataTip for layer if available.
00963       //! The DataTip is enabled by default, this setting allows the user to easily turn DataTips on/off by layer.
00964       void EnableDataTip (
00965          bool enable = true
00966          ) { m_DataTipEnabled = enable; return; }
00967 
00968       //! Find closest element to specified point.
00969       //! @return element number, -1 if not found, < -1 if error
00970       INT32 FindClosestElement (
00971          const DPOINT2D& point,                 //!< Point in "object" coordinates
00972          double searchdist,                     //!< Distance to search in "object" coordinates
00973          double *distret,                       //!< Distance returned in "object" coordinates, (NULL if don't need)
00974          int component,                         //!< Component to search
00975          const UINT8 *SearchSet,                //!< Set of elements to search, NULL for all elements
00976          GRE_FIND_FLAGS findflags               //!< GRE_FIND_... flags
00977          ) { return (v_FindClosestElement(point,searchdist,distret,component,SearchSet,findflags)); }
00978 
00979       //! Find elements matching specified query.
00980       //! @return number of elements found, < 0 if error
00981       INT32 FindElementsByQuery (
00982          ELEMTYPE ElemType,                     //!< Element type
00983          BITSET_UNOWNED& ElemSet,               //!< Set of elements found
00984          const UNICODE *QueryScript,            //!< Query script string
00985          SMLCONTEXT* QueryContext = 0           //!< Query/SML context
00986          );
00987 
00988       //! Find elements matching specified query with "match quality".
00989       //! An array of values, one per element, is returned with values from 0-255 corresponding
00990       //! to query return values from 0.0 to 1.0.  Values < 0 will be 0, values > 255 will be 255.
00991       ERRVALUE FindElementsByQueryExt (
00992          ELEMTYPE ElemType,                     //!< Element type
00993          SIMPLE_ARRAY<UINT8>& Result,           //!< Result for each element
00994          const UNICODE *QueryScript,            //!< Query script string
00995          SMLCONTEXT* QueryContext = 0           //!< Query/SML context
00996          );
00997 
00998       //! Find surface layer for draping this layer onto in 3D.
00999       //! @return Pointer to surface layer or NULL if none.
01000       GRE_LAYER_SURFACE* FindSurfaceLayer (
01001          ) const;
01002 
01003    #ifndef GENERATING_DOXYGEN_OUTPUT
01004       //! Make protected when possible.
01005       void FinishCreation (UINT32 flags = 0);
01006    #endif // GENERATING_DOXYGEN_OUTPUT
01007 
01008       //! Get active element type and number.
01009       //! @return 'true' if have active element, false if not.
01010       inline bool GetActiveElement (
01011          ELEMTYPE& ElemType,                    //!< Element type returned
01012          INT32& ElemNum                         //!< Element number returned
01013          ) const;
01014 
01015       //! Get active element as RVC::ELEMENT.
01016       //! @return 'true' if have active element, false if not.
01017       inline bool GetActiveElement (
01018          RVC::ELEMENT& element                  //!< Element specifier returned
01019          ) const;
01020 
01021       //! Get active element number.
01022       //! @return Element number or -1 if no active element.
01023       inline INT32 GetActiveElemNum (
01024          ) const;
01025 
01026       //! Get active element type.
01027       //! @return Element type, ELEMTYPE_Empty if no active element.
01028       inline ELEMTYPE GetActiveElemType (
01029          ) const;
01030 
01031       //! Get color for 3D pedestal.
01032       inline const COLOR& GetColorPedestal (
01033          ) const;
01034 
01035       //! Get component for specified element type.
01036       //! @return Component index, -1 if no corresponding component.
01037       int GetComponent (
01038          ELEMTYPE ElemType                      //!< Element type
01039          ) const { return (v_GetComponent(ElemType)); }
01040 
01041       //! Get icon for component.
01042       //! @return Icon for component or NULL if none
01043       MICON GetComponentIcon (
01044          int component                          //!< Component index
01045          ) const { return (v_GetComponentIcon(component)); }
01046 
01047       //! Get component information.
01048       //! @return Pointer to component information or NULL if none.
01049       COMPINFO* GetComponentInfo (
01050          int component                          //!< Component index
01051          ) { return (v_GetComponentInfo(component)); }
01052 
01053       //! Get component information (const version).
01054       //! @return Pointer to component information or NULL if none.
01055       const COMPINFO* GetComponentInfo (
01056          int component
01057          ) const { return (const_cast<GRE_LAYER*>(this)->GetComponentInfo(component)); }
01058 
01059       //! Get component information by element type.
01060       //! @return Pointer to component information or NULL if none.
01061       COMPINFO* GetComponentInfoByType (
01062          ELEMTYPE elemtype                      //!< Element type
01063          );
01064 
01065       //! Get localized name of component.
01066       //! @return Component name.
01067       MISTRING GetComponentName (
01068          int component                          //!< Component index
01069          ) const { return (v_GetComponentName(component)); }
01070 
01071       //! Get "parent" for dialogs associated with layer.
01072       MDLGPARENT GetDialogParent (
01073          ) const;
01074 
01075       //! Get DISPFLAGS for layer.
01076       inline DISPFLAGS GetDispFlags (
01077          ) const;
01078 
01079       UINT16 GetDispParmUsage (
01080          ) const { return ((layerflags & LAYERFLAG_Editable) ? DPARMUSAGE_Edit : DPARMUSAGE_Display); }
01081 
01082       //! Get pointer to default style of element type.
01083       //! @return Pointer to style, do not free.
01084       const void* GetElemDefaultStyle (
01085          ELEMTYPE ElemType                      //!< Element type
01086          ) const { return (v_GetElemDefaultStyle(ElemType)); }
01087 
01088       //! Get selection mode for element drawing
01089       //! @return Selection mode
01090       UINT16 GetElemDrawSelectionMode (
01091          ELEMTYPE ElemType                      //!< Element type
01092          ) const { return (v_GetElemDrawSelectionMode(ElemType)); }
01093 
01094       //! Get style mode for element drawing.
01095       //! @return style mode
01096       UINT16 GetElemDrawStyleMode (
01097          ELEMTYPE ElemType                      //!< Element type
01098          ) const { return (v_GetElemDrawStyleMode(ElemType)); }
01099 
01100       //! Get extents of specified element.
01101       ERRVALUE GetElemExtents (
01102          ELEMTYPE ElemType,                     //!< Element type
01103          INT32 ElemNum,                         //!< Element number
01104          DRECT3D& Extents                       //!< Extents returned
01105          ) { return (v_GetElemExtents(ElemType,ElemNum,Extents)); }
01106 
01107       //! Get element search structure.
01108       ERRVALUE GetElemSearchInfo (
01109          ELEMTYPE ElemType,                     //!< Element type
01110          GRE_ELEMSEARCH **sip                   //!< Pointer to search structure returned, DO NOT FREE!
01111          );
01112 
01113       UINT8 GetElemSelectMode (
01114          ) const;
01115 
01116       //! Get combined extents of all elements in set.
01117       ERRVALUE GetElemSetExtents (
01118          ELEMTYPE ElemType,                     //!< Element type
01119          const BITSET_UNOWNED& ElemSet,         //!< Set of elements
01120          DRECT3D& Extents                       //!< Extents in layer object coordinates returned
01121          );
01122 
01123       //! Get element type associated with specified component.
01124       ELEMTYPE GetElemType (
01125          int component                          //!< Component index
01126          ) const { return (v_GetElemType(component)); }
01127 
01128       //! Get layer extents in 'object' coordinates.
01129       const DRECT3D& GetExtents (
01130          ) const { return (m_ObjRegion.GetExtents()); }
01131 
01132       //! Get group containing layer.
01133       GRE_GROUP * GetGroup (
01134          ) const { return (group); }
01135 
01136       //! Get georeference name for layer component.
01137       //! @return 'True' if layer has a georeference name, 'false' if not
01138       bool GetGeorefName (
01139          RVC::OBJECTNAME& gname,
01140          int component = 0                      //!< Component index
01141          ) const { return (v_GetGeorefName(gname,component)); }
01142 
01143       //! Get LAYERDRAWFLAGS for layer.
01144       LAYERDRAWFLAGS GetLayerDrawFlags (
01145          ) const { return (static_cast<LAYERDRAWFLAGS>(drawflags)); }
01146 
01147       //! Get LAYERFLAGS for layer.
01148       LAYERFLAGS GetLayerFlags (
01149          ) const { return (static_cast<LAYERFLAGS>(layerflags)); }
01150 
01151       //! Get layer type.
01152       TYPE GetLayerType (
01153          ) const { return (m_layertype); }
01154 
01155       //! Get legend for specified element type.
01156       //! @return Pointer to legend or NULL if no legend.
01157       const GRE_LEGEND* GetLegend (
01158          ELEMTYPE ElemType = ELEMTYPE_Empty     //!< Element type
01159          ) { return (v_GetLegend(ElemType)); }
01160 
01161       GraphicTreeItemMsgHandler GetLegendMsgHandler (
01162          ) const { return (m_LegendMsgHandler); }
01163 
01164       //! Get the LABLEPLACEMENT for this layer.
01165       //! Will return NULL if the layer type does not support LABELPLACEMENT
01166       //! If bReturnNULLIfEmpty is true, will return NULL if there are no
01167       //!  labels.
01168       GRE::LABELPLACEMENT* GetLabelPlacement (
01169          GRE_VIEW* view,
01170          bool bReturnNULLIfEmpty = true
01171          );
01172 
01173       //! Get current layer drawing order position in list.
01174       //! @return 0 for first layer, 1 for second, etc.
01175       int GetListPos (
01176          );
01177 
01178       //! Get map coordinate reference system used by layer.
01179       //! This is not necessarily the CRS the layer will be rendered in as that
01180       //! is determined by the containing group.
01181       const SPATREF::COORDREFSYS& GetMapCoordRefSys (
01182          ) const { return (GetMapRegion().GetCoordRefSys()); }
01183 
01184       //! Get bounding region in map (georeferenced) coordinates.
01185       const REGION2D& GetMapRegion (
01186          ) const { return (m_MapRegion); }
01187 
01188       double GetMapScale (
01189          ) const;
01190 
01191       UINT8 GetMaskBlue (
01192          ) const { return (m_MaskBlue); }
01193 
01194       UINT8 GetMaskGreen (
01195          ) const { return (m_MaskGreen); }
01196 
01197       UINT8 GetMaskRed (
01198          ) const { return (m_MaskRed); }
01199 
01200       double GetMaxScaleVisible (
01201          ) const;
01202 
01203       double GetMinScaleVisible (
01204          ) const;
01205 
01206       UINT32 GetModifyStamp (
01207          ) const { return (m_ModifyStamp); }
01208 
01209       //! Get name of layer as MISTRING.
01210       void GetName (
01211          MISTRING& retname
01212          ) { retname = this->name; }
01213 
01214       //! Get name of layer.
01215       const UNICODE* GetName (
01216          ) const { return (name); }
01217 
01218       //! Get next layer in group.
01219       GRE_LAYER* GetNext (
01220          ) const { return (nextlayer); }
01221 
01222       inline int GetNumComponents (
01223          ) const;
01224 
01225       //! Get number of elements of specified type.
01226       //! @return number of elements, < 0 if error.
01227       INT32 GetNumElements (
01228          ELEMTYPE ElemType                      //!< Element type
01229          ) { return (v_GetNumElements(ElemType)); }
01230 
01231       inline int GetNumObjects (
01232          ) const;
01233 
01234    #ifdef X_NATIVE
01235       OBJMGRFORM& GetObjMgrForm (
01236          ) { return (m_ObjMgrForm); }
01237    #endif
01238 
01239       //! Get RVC::OBJITEM for layer component.
01240       //! @return Reference to object item, will be unattached if no object
01241       const RVC::OBJITEM& GetObjItem (
01242          int component = 0                      //!< Component index
01243          ) const { return (v_GetObjItem(component)); }
01244 
01245       //! Get bounding region in 'object' coordinates.
01246       const REGION2D& GetObjRegion (
01247          ) const { return (m_ObjRegion); }
01248 
01249       //! Get previous layer in group.