00001 00044 #ifndef INC_GRE_LRSCALEB_H 00045 #define INC_GRE_LRSCALEB_H 00046 00047 #ifndef INC_GRE_LAYER_H 00048 #include <gre/layer.h> 00049 #endif 00050 00051 00052 namespace GRE { 00053 //=================================================================================================================== 00055 class LAYER_SCALEBAR : public GRE::LAYER { 00056 public: 00057 00058 class DISPPARM : public GRE::LAYER::DISPPARM { 00059 public: 00060 00061 class DLG; 00062 00063 double Length; 00064 double BarWidth; 00065 double Scale; 00066 int MajorDiv; 00067 int MinorDiv; 00068 UINT8 LengthUnits; 00069 UINT8 BarWidthUnits; 00070 UINT8 LineWidthUnits; 00071 TEXTSTYLE TextStyle; 00072 LINESTYLE Style[4]; 00073 MISTRING UnitLabel; 00074 00075 DISPPARM (); 00076 DISPPARM (const DISPPARM& rhs) { 00077 Copy(rhs); 00078 } 00079 virtual ~DISPPARM () { 00080 Free(); 00081 } 00082 00083 DISPPARM& operator= (const DISPPARM& rhs) { 00084 if (this != &rhs) { 00085 Free(); 00086 Copy(rhs); 00087 } 00088 return (*this); 00089 } 00090 00091 protected: 00092 virtual const SERIALIZERITEM* SerialGetItemDef (SERIALIZER& serializer) const; 00093 00094 private: 00095 #ifndef GENERATING_DOXYGEN_OUTPUT 00096 void Copy (const DISPPARM&); 00097 void Free (); 00098 #endif 00099 }; 00100 00102 static void RegisterType ( 00103 ); 00104 00106 static void SMLClassInstall ( 00107 SMLCONTEXT *context 00108 ); 00109 00111 explicit LAYER_SCALEBAR ( 00112 GRE::GROUP *group, 00113 CREATEFLAGS createflags = CREATEFLAG_None, 00114 GRE::LISTPOS listpos = GRE::LISTPOS_Last, 00115 GRE::LAYER *reflayer = 0 00116 ); 00117 00119 virtual ~LAYER_SCALEBAR (); 00120 00121 #ifndef GENERATING_DOXYGEN_OUTPUT 00122 int DrawScaleBar (GRE::LAYERDC&, void*); 00123 #endif 00124 00126 const DISPPARM& GetDispParm ( 00127 ) const { return (m_dispparm); } 00128 00136 ERRVALUE SetDispParm ( 00137 const DISPPARM& dispparm 00138 ); 00139 00140 protected: 00141 00142 DISPPARM m_dispparm; 00143 00144 private: 00145 #ifndef GENERATING_DOXYGEN_OUTPUT 00146 00147 void ReadDefaultsIni (); 00148 void SaveDefaultsIni (); 00149 00151 #ifdef USE_MGUI 00152 virtual int v_ControlPanel (MDLGPARENT dlgparent,UINT32 flags = 0); 00153 #endif 00154 virtual GRE::LAYER* v_Copy (GRE::GROUP *group) const; 00155 virtual ERRVALUE v_Draw (GRE::LAYERDC& layerdc); 00156 virtual const char* v_SerialGetTagName () const; 00157 virtual void v_SetDftName (bool ReplaceExisting); 00158 virtual int v_UpdateExtents (bool forceupdate); 00159 00160 LAYER_SCALEBAR (const LAYER_SCALEBAR&); 00161 LAYER_SCALEBAR& operator= (const LAYER_SCALEBAR&); 00162 00163 #endif 00164 }; 00165 00166 #define SCALEBARDISPFLAG_NegativePart 0x00000001 00167 #define SCALEBARDISPFLAG_CenterLine 0x00000002 00168 #define SCALEBARDISPFLAG_ShowTicks 0x00000004 00169 #define SCALEBARDISPFLAG_TextOnBottom 0x00000008 00170 #define SCALEBARDISPFLAG_ShowUnits 0x00000010 00171 #define SCALEBARDISPFLAG_CenterUnits 0x00000020 00172 #define SCALEBARDISPFLAG_LayoutScale 0x00000040 00173 00174 //=================================================================================================================== 00175 } // End namespace GRE 00176 00177 #endif
1.6.1