lrformula.h

Go to the documentation of this file.
00001 /**
00002  * \file lrformula.h <gre/lrformula.h>
00003  * \brief GRE_LAYER_FORMULA definitions
00004  *
00005  * \if NODOC
00006  * $Id: lrformula.h_v 1.2 2005/02/28 18:11:37 scowan Exp $
00007  *
00008  * $Log: lrformula.h_v $
00009  * Revision 1.2  2005/02/28 18:11:37  scowan
00010  * Support layer copy virtual method.
00011  *
00012  * Revision 1.1  2005/01/20 16:56:25  mju
00013  * Initial revision
00014  *
00015  * \endif
00016 **/
00017 
00018 #ifndef  INC_GRE_LRFORMULA_H
00019 #define  INC_GRE_LRFORMULA_H
00020 
00021 #ifndef INC_GRE_LAYER_H
00022 #include <gre/layer.h>
00023 #endif
00024 
00025 #ifndef INC_MI32_GEOFRMLA_H
00026    #include <mi32/geofrmla.h>
00027 #endif
00028 
00029 //===================================================================================================================
00030 
00031 class GRE_LAYER_FORMULA : public GRE_LAYER {
00032    public:
00033 
00034       // GRE_LAYER_FORMULA::DISPPARM
00035       class DISPPARM : public GRE_LAYER::DISPPARM {
00036          public:
00037 
00038             class DLG;
00039 
00040             GEOFORMULA Formula;
00041             CONTPARM contparmgray;     //!< Contrast parameters for grayscale
00042             CBPARMS ColorBalance;      //!< For adjusting color
00043 
00044             DISPPARM ();
00045             DISPPARM (
00046                const DISPPARM& rhs
00047                ): GRE_LAYER::DISPPARM(rhs) { Copy(rhs); }
00048             virtual ~DISPPARM (
00049                ) { Free(); }
00050 
00051             //! Assignment.
00052             DISPPARM& operator= (
00053                const DISPPARM& rhs
00054                ) { if (this != &rhs) { Free(); Copy(rhs); } return (*this); }
00055 
00056          protected:
00057             virtual const SERIALIZER::ITEMDEF* SerialGetItemDef (SERIALIZER& serializer) const;
00058 
00059          private:
00060             #ifndef GENERATING_DOXYGEN_OUTPUT
00061             static ERRVALUE SerializerCB_Formula (SERIALIZER&, const SERIALIZER::ITEMDEF*, void*, SERIALIZER::ITEMDEF::ACTION);
00062             void CloseObject ();
00063             void Copy (const DISPPARM&);
00064             void Free ();
00065             #endif // GENERATING_DOXYGEN_OUTPUT
00066          }; // End of GRE_LAYER_FORMULA::DISPPARM
00067 
00068       //! Register this layer type
00069       static void RegisterType (
00070          );
00071 
00072       //! Construct layer and insert into list
00073       explicit GRE_LAYER_FORMULA (
00074          GRE_GROUP *group,                            //!< Group to contain layer
00075          CREATEFLAGS createflags = CREATEFLAG_None,   //!< Creation flags
00076          GRE::LISTPOS listpos = GRE::LISTPOS_Last,    //!< Position in list
00077          GRE_LAYER *reflayer = 0                      //!< Reference layer for insertion
00078          );
00079 
00080       virtual ~GRE_LAYER_FORMULA ();
00081 
00082       //! Retrieve layer-specific display parameters.
00083       const DISPPARM& GetDispParm (
00084          ) const { return (m_dispparm); }
00085 
00086       //! Set layer-specific display parameters.
00087       //! This is the recommended method for changing how an existing layer is to be
00088       //! rendered.  Validation will be performed on the specified parameters and
00089       //! adjustments made to the layer's copy if necessary.  Use of this method
00090       //! usually result in a ChangeBegin / ChangeEnd message pair, and will also
00091       //! generate a ChangeObject message if the spatial object used in the layer
00092       //! is changed.
00093       ERRVALUE SetDispParm (
00094          const DISPPARM& dispparm               //!< Parameters to set
00095          );
00096 
00097    protected:
00098 
00099       DISPPARM m_dispparm;                      //!< Layer-specific display parameters
00100 
00101    private:
00102       #ifndef GENERATING_DOXYGEN_OUTPUT
00103 
00104       ERRVALUE Draw2D (GRE_LAYERDC& layerdc);
00105       ERRVALUE Draw3D (GRE_LAYERDC& layerdc);
00106 
00107       //! Overrides from GRE_LAYER.
00108    #if defined(X_NATIVE) || defined(WIN32_MFC)
00109       virtual int v_ControlPanel (MDLGPARENT dlgparent,UINT32 flags = 0);
00110    #endif
00111       virtual GRE_LAYER* v_Copy (GRE_GROUP *group) const;
00112       virtual ERRVALUE v_Draw (GRE_LAYERDC& layerdc);
00113       virtual bool v_HasNullImageCells () const;
00114       virtual const char* v_SerialGetTagName () const;
00115       virtual void v_SetDftName (bool ReplaceExisting);
00116       virtual ERRVALUE v_TemplateRead (SERIALIZER& serializer);
00117       virtual int v_UpdateExtents (bool forceupdate);
00118 
00119       GRE_LAYER_FORMULA (const GRE_LAYER_FORMULA&);
00120       GRE_LAYER_FORMULA& operator= (const GRE_LAYER_FORMULA&);
00121 
00122       #endif // GENERATING_DOXYGEN_OUTPUT
00123    };
00124 
00125 
00126 //===================================================================================================================
00127 
00128 #endif   // INC_GRE_LRFORMULA_H

Generated on Wed May 31 15:26:40 2006 for TNTsdk by  doxygen 1.3.8-20040913