00001 00036 #ifndef INC_GRE_LRSCRIPT_H 00037 #define INC_GRE_LRSCRIPT_H 00038 00039 #ifndef INC_GRE_LAYER_H 00040 #include <gre/layer.h> 00041 #endif 00042 00043 #ifndef INC_RVC_OBJITEM_H 00044 #include <rvc/objitem.h> 00045 #endif 00046 00047 namespace GRE { 00048 //=================================================================================================================== 00049 00050 class LAYER_SCRIPT : public GRE::LAYER { 00051 public: 00052 00053 class DISPPARM : public GRE::LAYER::DISPPARM { 00054 public: 00055 00056 class DLG; 00057 00058 RVC::OBJITEM m_ObjItemScript; 00059 RVC::OBJITEM m_ObjItemStyle; 00060 MISTRING m_Script; 00061 DRECT2D m_Extents; 00062 int m_PageUnitsCode; 00063 int m_MapUnitsCode; 00064 int m_LatLonFmtCode; 00065 int m_ExtentsMode; 00066 double m_MapScale; 00067 double m_Margin; 00068 UINT8 m_UsePageUnits; 00069 SPATREF::COORDREFSYS m_CoordRefSys; 00070 00071 DISPPARM (); 00072 DISPPARM ( 00073 const DISPPARM& rhs 00074 ): GRE::LAYER::DISPPARM(rhs) { Copy(rhs); } 00075 virtual ~DISPPARM ( 00076 ) { Free(); } 00077 00078 DISPPARM& operator= (const DISPPARM& rhs) { 00079 if (this != &rhs) { 00080 Free(); 00081 Copy(rhs); 00082 } 00083 return (*this); 00084 } 00085 00086 ERRVALUE ComputeExtents (LAYER_SCRIPT*); 00087 00088 protected: 00089 virtual const SERIALIZERITEM* SerialGetItemDef (SERIALIZER& serializer) const; 00090 00091 private: 00092 #ifndef GENERATING_DOXYGEN_OUTPUT 00093 void Copy (const DISPPARM& rhs); 00094 void Free (); 00095 friend class LAYER_SCRIPT; 00096 #endif // GENERATING_DOXYGEN_OUTPUT 00097 }; 00098 00100 static void RegisterType ( 00101 ); 00102 00104 explicit LAYER_SCRIPT ( 00105 GRE::GROUP *group, 00106 CREATEFLAGS createflags = CREATEFLAG_None, 00107 GRE::LISTPOS listpos = GRE::LISTPOS_Last, 00108 GRE::LAYER *reflayer = 0 00109 ); 00110 00112 virtual ~LAYER_SCRIPT (); 00113 00114 double ComputeScale ( 00115 ) const; 00116 00118 const DISPPARM& GetDispParm ( 00119 ) const { 00120 return (m_dispparm); 00121 } 00122 00130 ERRVALUE SetDispParm ( 00131 const DISPPARM& dispparm 00132 ); 00133 00134 protected: 00135 00136 DISPPARM m_dispparm; 00137 00138 private: 00139 #ifndef GENERATING_DOXYGEN_OUTPUT 00140 00141 // Overrides from GRE::LAYER. 00142 #ifdef USE_MGUI 00143 virtual int v_ControlPanel (MDLGPARENT dlgparent,UINT32 flags = 0); 00144 #endif 00145 virtual GRE::LAYER* v_Copy (GRE::GROUP *group) const; 00146 virtual ERRVALUE v_Draw (GRE::LAYERDC& layerdc); 00147 virtual const RVC::OBJITEM& v_GetObjItem (int component) const; 00148 virtual const char* v_SerialGetTagName () const; 00149 virtual void v_SetDftName (bool ReplaceExisting); 00150 virtual int v_UpdateExtents (bool forceupdate); 00151 virtual void v_ComputeMargins(double& tmargin, double&bmargin, double&lmargin, double&rmargin); 00152 00153 LAYER_SCRIPT (const LAYER_SCRIPT&); 00154 LAYER_SCRIPT& operator= (const LAYER_SCRIPT&); 00155 00156 #endif // GENERATING_DOXYGEN_OUTPUT 00157 }; 00158 00159 //=================================================================================================================== 00160 } // End namespace GRE 00161 00162 #endif // INC_GRE_LRSCRIPT_H 00163
1.6.1