00001 00015 #ifndef INC_RVC_UILABELFRAMESTYLE_H 00016 #define INC_RVC_UILABELFRAMESTYLE_H 00017 00018 #ifndef INC_MGUI_DLGSHELL_H 00019 #include <mgui/dlgshell.h> 00020 #endif 00021 00022 #ifndef INC_MGUI_COMBOBOX_H 00023 #include <mgui/combobox.h> 00024 #endif 00025 00026 #ifndef INC_MGUI_EDIT_H 00027 #include <mgui/edit.h> 00028 #endif 00029 00030 #ifndef INC_RVC_UISTYLE_H 00031 #include <rvc/uistyle.h> 00032 #endif 00033 00034 #ifndef INC_MI32_LABLSTYL_H 00035 #include <mi32/lablstyl.h> 00036 #endif 00037 00038 00039 namespace RVC { 00040 namespace UI { 00041 00042 class DLG_LABELFRAMESTYLE : public MGUI::DLGSHELL { 00043 public: 00044 DLG_LABELFRAMESTYLE ( 00045 LABELFRAMEPARMS& parms, 00046 const RVC::OBJITEM& StyleObjItem, 00047 double CurrentScale 00048 ); 00049 00050 ~DLG_LABELFRAMESTYLE(); 00051 00052 const RVC::OBJITEM& GetStyleObjItem ( 00053 ) const { 00054 return m_StyleObjItem; 00055 } 00056 00057 LABELFRAMEPARMS& GetFrameParms ( 00058 ) { 00059 return (m_parms); 00060 } 00061 00062 // Used by pages to make sure they have current style 00063 void Update(); 00064 00065 private: 00066 #ifndef GENERATING_DOXYGEN_OUTPUT 00067 00068 class PAGE_FRAME : public MGUI::LAYOUT_PAGE { 00069 public: 00070 PAGE_FRAME ( 00071 DLG_LABELFRAMESTYLE* dlg, 00072 double CurrentMapScale 00073 ); 00074 00075 ~PAGE_FRAME() {} 00076 void Update(); 00077 00078 virtual void OnInitPage(); 00079 virtual void v_OnSetActive(); 00080 private: 00081 MGUI::CTRL_LABEL m_CtrlLabelPct1; 00082 MGUI::CTRL_LABEL m_CtrlLabelPct2; 00083 MGUI::CTRL_LABEL m_CtrlLabelPct3; 00084 MGUI::CTRL_LABEL m_CtrlLabelPct4; 00085 MGUI::FORM_COMBOBOX m_CbxFrameShape; 00086 MGUI::CTRL_TOGGLEBUTTON m_CtrlMarginToggle; 00087 MGUI::FORM_EDIT_NUMBER m_CtrlTMargin; 00088 MGUI::FORM_EDIT_NUMBER m_CtrlBMargin; 00089 MGUI::FORM_EDIT_NUMBER m_CtrlLMargin; 00090 MGUI::FORM_EDIT_NUMBER m_CtrlRMargin; 00091 RVC::UI::FORM_EDIT_STYLE m_StyleForm; 00092 DLG_LABELFRAMESTYLE* m_dlg; 00093 double m_CurrentMapScale; 00094 00095 void SetAllMargins (double val); 00096 void OnChangeTMargin (); 00097 void OnChangeBMargin (); 00098 void OnChangeLMargin (); 00099 void OnChangeRMargin (); 00100 void OnToggleMarginLock (); 00101 void OnShapeChange (); 00102 void UpdateUI (); 00103 }; 00104 00105 class PAGE_LEADER : public MGUI::LAYOUT_PAGE { 00106 public: 00107 PAGE_LEADER ( 00108 DLG_LABELFRAMESTYLE* dlg, 00109 double CurrentMapScale 00110 ); 00111 00112 ~PAGE_LEADER() {} 00113 virtual void OnInitPage(); 00114 virtual void v_OnSetActive(); 00115 void Update(); 00116 private: 00117 MGUI::CTRL_TOGGLEBUTTON m_CtrlBalloonLeader; 00118 RVC::UI::FORM_EDIT_STYLE m_StyleForm; 00119 DLG_LABELFRAMESTYLE* m_dlg; 00120 double m_CurrentMapScale; 00121 00122 void OnTglBalloonLeaders(); 00123 void UpdateUI(); 00124 }; 00125 00126 class PAGE_SAMPLE : public MGUI::LAYOUT_PAGE { 00127 public: 00128 PAGE_SAMPLE ( 00129 DLG_LABELFRAMESTYLE* dlg, 00130 double CurrentMapScale 00131 ); 00132 00133 ~PAGE_SAMPLE() {} 00134 00135 virtual void OnInitPage(); 00136 virtual void v_OnSetActive(); 00137 00138 private: 00139 DLG_LABELFRAMESTYLE* m_dlg; 00140 double m_CurrentMapScale; 00141 00142 }; 00143 00144 const RVC::OBJITEM& m_StyleObjItem; 00145 LABELFRAMEPARMS m_parms; 00146 LABELFRAMEPARMS& m_original; 00147 MGUI::LAYOUT_BOOK m_Book; 00148 PAGE_FRAME m_PageFrame; 00149 PAGE_LEADER m_PageLeader; 00150 PAGE_SAMPLE m_PageSample; 00151 00152 virtual ERRVALUE v_CreateContent(); 00153 virtual void v_OnApply(); 00154 #endif // GENERATING_DOXYGEN_OUTPUT 00155 }; 00156 00157 00158 } // End namespace UI 00159 } // End namespace RVC 00160 00161 00162 #endif // INC_RVC_UILABELFRAMESTYLE_H
1.6.1