00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069 #ifndef INC_RVC_FORMEDST_H
00070 #define INC_RVC_FORMEDST_H
00071
00072 #ifndef INC_MI32_STDDEFNS_H
00073 #include <mi32/stddefns.h>
00074 #endif
00075
00076 #ifndef INC_MGUI_CTRL_H
00077 #include <mgui/ctrl.h>
00078 #endif
00079
00080 #ifndef INC_MGUI_LISTITEM_H
00081 #include <mgui/listitem.h>
00082 #endif
00083
00084 #ifndef INC_MGUI_FORMRBTN_H
00085 #include <mgui/formrbtn.h>
00086 #endif
00087
00088 #ifndef INC_RVC_STYLE_H
00089 #include <rvc/style.h>
00090 #endif
00091
00092 #ifndef INC_MI32_ELEMSTYL_H
00093 #include <mi32/elemstyl.h>
00094 #endif
00095
00096 #ifndef INC_MGUI_IMAGELST_H
00097 #include <mgui/imagelst.h>
00098 #endif
00099
00100 namespace MGUI {
00101
00102 class CTRL_GRID;
00103
00104 class FORM_EDITSTYLE : public MGUI::FORM {
00105 public:
00106
00107
00108 FORM_EDITSTYLE (
00109 );
00110
00111
00112 virtual ~FORM_EDITSTYLE (
00113 );
00114
00115
00116 ERRVALUE CommitChanges (
00117 );
00118
00119
00120 ERRVALUE Create (
00121 MGUI::LAYOUT_PANE_BASE& ParentPane,
00122 RVC::STYLE::TYPE StyleType,
00123 RVC::EDITSTYLEFLAGS FormStyle = RVC::EDITSTYLEFLAG_None
00124 );
00125
00126
00127
00128 INT32 GetActiveStyleNum (
00129 ) const { return (GetActiveStyleNum(m_StyleType)); }
00130
00131
00132
00133 INT32 GetActiveStyleNum (
00134 RVC::STYLE::TYPE StyleType
00135 ) const;
00136
00137
00138 RVC::STYLE::TYPE GetActiveStyleType (
00139 ) const { return (m_StyleType); }
00140
00141
00142 double GetCurrentScale (
00143 ) { return (v_OnGetCurrentScale()); }
00144
00145
00146 void GetDefaultStyle (
00147 POINTSTYLE& PointStyle
00148 ) const;
00149
00150
00151 void GetDefaultStyle (
00152 LINESTYLE& LineStyle
00153 ) const;
00154
00155
00156 void GetDefaultStyle (
00157 POLYSTYLE& PolyStyle
00158 ) const;
00159
00160
00161 void GetDefaultStyle (
00162 TEXTSTYLE& TextStyle
00163 ) const;
00164
00165
00166 void GetDefaultStyle (
00167 MULTISTYLE& MultiStyle
00168 ) const;
00169
00170
00171 void GetStyleObjItem (
00172 RVC::OBJITEM& ObjItem
00173 ) const { m_StyleObj.GetObjectItem(ObjItem); }
00174
00175 virtual bool IsCreated () const;
00176
00177
00178 bool IsObjectModified (
00179 ) { CommitChanges(); return (m_ObjectModified); }
00180
00181
00182 void ResetModified (
00183 ) { m_ObjectModified = false; }
00184
00185
00186
00187 ERRVALUE SetActiveStyleNum (
00188 RVC::STYLE::TYPE StyleType,
00189 INT32 StyleNum
00190 );
00191
00192
00193 void SetCurrentMapScale (
00194 double CurMapScale
00195 ) { m_CurMapScale = CurMapScale; }
00196
00197
00198 void SetDefaultStyle (
00199 const LINESTYLE& LineStyle
00200 );
00201
00202
00203 void SetDefaultStyle (
00204 const POINTSTYLE& PointStyle
00205 );
00206
00207
00208 void SetDefaultStyle (
00209 const POLYSTYLE& PolygonStyle
00210 );
00211
00212
00213 void SetDefaultStyle (
00214 const TEXTSTYLE& TextStyle
00215 );
00216
00217
00218 void SetDefaultStyle (
00219 const MULTISTYLE& MultiStyle
00220 );
00221
00222
00223 virtual void SetEnabled (bool enabled = true);
00224
00225
00226
00227 void SetHardcopyDPI (
00228 double HardcopyDPI
00229 );
00230
00231
00232 ERRVALUE SetStyleObject (
00233 const RVC::OBJITEM& ObjItem,
00234 RVC::OBJECT::OPENMODE OpenMode = RVC::OBJECT::OPENMODE_Read
00235 );
00236
00237
00238 void SetStyleType (
00239 RVC::STYLE::TYPE StyleType
00240 );
00241
00242 protected:
00243
00244 void NotifyModified () { v_OnNotifyModified(); }
00245
00246 void SetObjectModified (
00247 bool ObjectModified = true
00248 ) { m_ObjectModified = ObjectModified; }
00249
00250 private:
00251 #ifndef GENERATING_DOXYGEN_OUTPUT
00252
00253 class FORM_STYLES;
00254 friend class FORM_STYLES;
00255 class FORM_TYPE;
00256 friend class FORM_TYPE;
00257 class FORM_POINT;
00258 friend class FORM_POINT;
00259 class FORM_LINE;
00260 friend class FORM_LINE;
00261 class FORM_POLYGON;
00262 friend class FORM_POLYGON;
00263 class FORM_TEXT;
00264 friend class FORM_TEXT;
00265
00266
00267 LAYOUT_PANE m_FormPane;
00268 RVC::STYLE m_StyleObj;
00269 LISTITEMDEF m_ComboItemScaleAt[4];
00270 FORM_RADIOBUTTONS_T<FORM_EDITSTYLE> m_StyleTypeRB;
00271 CTRL_EDIT_STRING_T<FORM_EDITSTYLE> m_SampleStrES;
00272 IMAGELIST m_IconImageList;
00273
00274
00275 RVC::EDITSTYLEFLAGS m_FormStyleFlags;
00276 MDLGPARENT m_dlgparent;
00277 bool m_ObjectModified;
00278 UINT32 m_NoDrawSample;
00279 double m_HardcopyDPI;
00280 double m_CurMapScale;
00281 RVC::STYLE::TYPE m_StyleType;
00282 FORM_STYLES *m_pFormStyles;
00283 FORM_POINT *m_pFormPoint;
00284 FORM_LINE *m_pFormLine;
00285 FORM_POLYGON *m_pFormPolygon;
00286 FORM_TEXT *m_pFormText;
00287 FORM_TYPE *m_pFormType[RVC::STYLE::TYPE_NumTypes];
00288 int m_IconIdxCheckBoxEmpty;
00289 int m_IconIdxCheckBoxBlack;
00290 int m_IconIdxCheckBoxGray;
00291
00292 ERRVALUE ChangeStyleObject ();
00293 bool DeletePattern (RVC::STYLE::PATTERN PatternType, INT32 PatternNum);
00294 void EnableControls ();
00295 MDLGPARENT GetDlgParent () const { return (m_dlgparent); }
00296 double GetSizeUnitScale (int units) const;
00297 bool HasDftStyle () const { return (HasDftStyle(m_StyleType)); }
00298 bool HasDftStyle (RVC::STYLE::TYPE StyleType) const;
00299 bool HasStyle (RVC::STYLE::TYPE StyleType) const;
00300 bool InsertPatterns (RVC::STYLE::PATTERN PatternType, INT32 PatternNum, const COLOR& varcolor);
00301 void InvalidateSample ();
00302 bool IsObjectWritable () const { return (m_StyleObj.IsWritable()); }
00303 ERRVALUE LoadStyle ();
00304 void OnEditSampleStr ();
00305 void OnRadioStyleType ();
00306 void ResetStyleNums ();
00307 void RedrawStylesList ();
00308 INT32 SaveNewStyle (const RVC::OBJECTNAME& NewStyleName);
00309
00310
00311 virtual bool IsEnabled () const;
00312 virtual void SetVisible (bool visible = true);
00313
00314 FORM_EDITSTYLE (const FORM_EDITSTYLE&);
00315 FORM_EDITSTYLE& operator= (const FORM_EDITSTYLE&);
00316
00317 #endif
00318
00319
00320
00321
00322
00323 virtual double v_OnGetCurrentScale (
00324 );
00325
00326
00327
00328 virtual void v_OnGetStyleDescription (
00329 RVC::STYLE::TYPE StyleType,
00330 INT32 StyleNum,
00331 MISTRING& desc
00332 );
00333
00334
00335 virtual void v_OnNotifyModified (
00336 );
00337
00338 };
00339
00340 }
00341
00342
00343 #endif