00001 /** 00002 * \file elemsampledc.h <gre/elemsampledc.h> 00003 * \brief GRE ELEMSAMPLE_DC class definitions 00004 * 00005 * \if NODOC 00006 * $Id: elemsampledc.h_v 1.5 2003/09/15 13:48:59 fileserver!dwilliss Exp $ 00007 * 00008 * $Log: elemsampledc.h_v $ 00009 * Revision 1.5 2003/09/15 13:48:59 fileserver!dwilliss 00010 * Doxygen 00011 * 00012 * Revision 1.4 2003/07/30 15:18:16 mju 00013 * Change back to GRE_ name as requires too many other changes. 00014 * 00015 * Revision 1.3 2003/07/30 14:47:37 mju 00016 * Put class in GRE namespace with typedef for old name. 00017 * Ignore private section. 00018 * 00019 * Revision 1.2 2003/06/18 13:57:05 mju 00020 * Include more req'd headers. 00021 * 00022 * Revision 1.1 2003/06/17 13:39:44 mju 00023 * Initial revision 00024 * \endif 00025 **/ 00026 00027 #ifndef INC_GRE_ELEMSAMPLEDC_H 00028 #define INC_GRE_ELEMSAMPLEDC_H 00029 00030 #ifndef INC_GRE_BASE_H 00031 #include <gre/base.h> 00032 #endif 00033 00034 #ifndef INC_MI32_MGD_H 00035 #include <mi32/mgd.h> 00036 #endif 00037 00038 #ifndef INC_MI32_TRANS2DC_H 00039 #include <mi32/trans2dc.h> 00040 #endif 00041 00042 #ifndef INC_RVC_STYLE_H 00043 #include <rvc/style.h> 00044 #endif 00045 00046 //=================================================================================================================== 00047 00048 //! Drawing Context for Element Samples. 00049 class GRE_ELEMSAMPLE_DC { 00050 public: 00051 00052 //! Constructor. 00053 explicit GRE_ELEMSAMPLE_DC ( 00054 MgdSAMPLEFLAGS SampleFlags = MgdSAMPLE_ShrinkToFit 00055 ); 00056 00057 //! Construct with MGC_GC. 00058 explicit GRE_ELEMSAMPLE_DC ( 00059 MGD_GC *gc, 00060 MgdSAMPLEFLAGS SampleFlags = MgdSAMPLE_ShrinkToFit 00061 ); 00062 00063 //! Destructor. 00064 virtual ~GRE_ELEMSAMPLE_DC ( 00065 ); 00066 00067 //! Close style object if was opened. 00068 void CloseStyleObject ( 00069 ) { m_StyleObj.Close(); } 00070 00071 //! Get graphic drawing context. 00072 MGD_GC* GetGC ( 00073 ) const { return (m_gc); } 00074 00075 //! Get flags for Draw...StyleSample() usage. 00076 MgdSAMPLEFLAGS GetSampleFlags ( 00077 ) const { return (m_SampleFlags); } 00078 00079 //! Get reference to style object. 00080 const RVC::STYLE& GetStyleObject ( 00081 ) const { return (m_StyleObj); } 00082 00083 //! Get the TransGen used to draw this sample 00084 //! Will be NULL if drawing into legend view, 00085 //! Will be valid if drawing for legend layer. 00086 const TRANS2D_MAPGEN* GetTransGen ( 00087 ) const { return (m_TransGen); } 00088 00089 //! Open specified style object. 00090 //! If specified path/inode matches currently open object it will not be opened again. 00091 ERRVALUE OpenStyleObject ( 00092 const RVC::OBJITEM& StyleObj 00093 ) { return (m_StyleObj.Open(StyleObj)); } 00094 00095 //! Set flags for Draw...StyleSample() usage. 00096 void SetSampleFlags ( 00097 MgdSAMPLEFLAGS SampleFlags 00098 ) { m_SampleFlags = SampleFlags; return; } 00099 00100 void SetTransGen ( 00101 const TRANS2D_MAPGEN* trans 00102 ) { m_TransGen = trans; return; } 00103 00104 private: 00105 #ifndef GENERATING_DOXYGEN_OUTPUT 00106 00107 MGD_GC *m_gc; 00108 MgdSAMPLEFLAGS m_SampleFlags; 00109 RVC::STYLE m_StyleObj; 00110 const TRANS2D_MAPGEN* m_TransGen; 00111 00112 GRE_ELEMSAMPLE_DC (const GRE_ELEMSAMPLE_DC&); 00113 GRE_ELEMSAMPLE_DC& operator= (const GRE_ELEMSAMPLE_DC&); 00114 00115 #endif //!< GENERATING_DOXYGEN_OUTPUT 00116 }; 00117 00118 //=================================================================================================================== 00119 00120 #endif //!< INC_GRE_ELEMSAMPLEDC_H
1.3.4-20031026