00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef INC_GRE_LRREGION_H
00024 #define INC_GRE_LRREGION_H
00025
00026 #ifndef INC_MI32_GRE_H
00027 #include <mi32/gre.h>
00028 #endif
00029
00030 #ifndef INC_MI32_REGION2D_H
00031 #include <mi32/region2d.h>
00032 #endif
00033
00034 class GRE_LAYER_REGION : public GRE_LAYER {
00035 public:
00036
00037
00038 class DISPPARM : public GRE_LAYER::DISPPARM {
00039 public:
00040
00041 class DLG;
00042
00043 RVC::OBJITEM m_ObjItem;
00044 RVC::OBJITEM m_ObjItemStyle;
00045 POLYSTYLE m_Style;
00046
00047 DISPPARM ();
00048 DISPPARM (
00049 const DISPPARM& rhs
00050 ): GRE_LAYER::DISPPARM(rhs) { Copy(rhs); }
00051 ~DISPPARM (
00052 ) { Free(); }
00053
00054 DISPPARM& operator= (const DISPPARM& rhs) {
00055 if (this != &rhs) {
00056 Free();
00057 Copy(rhs);
00058 }
00059 return (*this);
00060 }
00061
00062
00063 ERRVALUE SetObject (
00064 const RVCOBJITEM& objitem,
00065 GRE_LAYER_REGION* layer,
00066 bool keepsettings = false
00067 );
00068
00069 protected:
00070 virtual const SERIALIZER::ITEMDEF* SerialGetItemDef (SERIALIZER& serializer) const;
00071
00072 private:
00073 #ifndef GENERATING_DOXYGEN_OUTPUT
00074 void Copy (const DISPPARM&);
00075 void Free ();
00076 static ERRVALUE SerializerCB_StyleFileName (SERIALIZER&, const SERIALIZER::ITEMDEF *, void *, SERIALIZER::ITEMDEF::ACTION);
00077
00078 virtual ERRVALUE v_SetObjItem (const RVC::OBJITEM& objitem, bool replace);
00079 virtual ERRVALUE v_Validate ();
00080 friend class GRE_LAYER_REGION;
00081 #endif
00082 }; // End of GRE_LAYER_REGION::DISPPARM
00083
00084
00085 static int Construct (
00086 GRE_GROUP *group,
00087 GRE_LAYER **retlayer,
00088 GRE_LAYER *reflayer,
00089 UINT32 flags
00090 );
00091
00092
00093 static void RegisterType (
00094 );
00095
00096
00097 explicit GRE_LAYER_REGION (
00098 GRE_GROUP *group,
00099 GRE_LAYER *reflayer = 0,
00100 UINT32 flags = MDISPCREATE_InsertAfter
00101 );
00102
00103
00104 virtual ~GRE_LAYER_REGION ();
00105
00106
00107 void ClearRegion (
00108 );
00109
00110
00111 const DISPPARM& GetDispParm (
00112 ) const { return (m_dispparm); }
00113
00114
00115
00116
00117
00118
00119
00120
00121 ERRVALUE SetDispParm (
00122 const DISPPARM& dispparm
00123 );
00124
00125 protected:
00126
00127 DISPPARM m_dispparm;
00128
00129 private:
00130 #ifndef GENERATING_DOXYGEN_OUTPUT
00131
00132 static void LegendMsgHandler (GRAPHICTREEITEM_MSG *msg);
00133
00134 GRE_LEGEND_POLY m_Legend;
00135 REGION2D m_Region2D;
00136
00137 int DrawSetup (void*, GRE_LAYERDC&);
00138
00139
00140 #ifdef WIN32_MFC
00141 virtual void v_AddTreeViewLegend (GRE_MFC_TREEVIEW& TreeView, HTREEITEM hParent, HTREEITEM hInsertAfter);
00142 #endif
00143 virtual ERRVALUE v_AssignObject (const RVC::OBJITEM& objitem);
00144 #if defined(X_NATIVE) || defined(WIN32_MFC)
00145 virtual int v_ControlPanel (MDLGPARENT dlgparent,UINT32 flags = 0);
00146 #endif
00147 virtual ERRVALUE v_Draw (GRE_LAYERDC& layerdc);
00148 virtual const GRE_LEGEND* v_GetLegend (ELEMTYPE ElemType);
00149 virtual const RVC::OBJITEM& v_GetObjItem (int component) const;
00150 #ifdef WIN32_MFC
00151 virtual bool v_HasTreeViewLegend () const;
00152 #endif
00153 #if defined(X_NATIVE) || defined(WIN32_MFC)
00154 virtual ERRVALUE v_PromptObject (bool OpenCtrlPanel, MDLGPARENT dlgparent);
00155 #endif
00156 virtual const char* v_SerialGetTagName () const;
00157 virtual void v_SetDftName (bool ReplaceExisting);
00158 virtual void v_SetLegendSampleFlags (MgdSAMPLEFLAGS SampleFlags);
00159 virtual ERRVALUE v_SetStyleObjItem (const RVC::OBJITEM& ObjItem);
00160 virtual int v_UpdateExtents (bool forceupdate);
00161 virtual bool v_UsesTransparency (const MGD::CONTEXT* gc = 0) const;
00162
00163 GRE_LAYER_REGION (const GRE_LAYER_REGION&);
00164 GRE_LAYER_REGION& operator= (const GRE_LAYER_REGION&);
00165
00166 class PRIVDRAWDATA;
00167 friend class PRIVDRAWDATA;
00168 friend class DISPPARM;
00169
00170 #endif
00171 };
00172
00173
00174 #endif