00001
00033 #ifndef INC_RVC_UIEDITRASTERVALUE_H
00034 #define INC_RVC_UIEDITRASTERVALUE_H
00035
00036 #ifndef INC_MGUI_EDIT_H
00037 #include <mgui/edit.h>
00038 #endif
00039
00040 #ifndef INC_MGUI_DLGSHELL_H
00041 #include <mgui/dlgshell.h>
00042 #endif
00043
00044 #ifndef INC_RVC_IMAGE_H
00045 #include <rvc/image.h>
00046 #endif
00047
00048 #ifndef INC_MI32_ANYRASTV_H
00049 #include <mi32/anyrastv.h>
00050 #endif
00051
00052 namespace RVC {
00053 namespace UI {
00054
00055
00057 class FORM_EDIT_RASTER_VALUE : public MGUI::FORM_COMPOSITE {
00058 public:
00059 enum STYLE {
00060 STYLE_Default = 0x00,
00061 STYLE_ComponentLabels = 0x01
00062 };
00063
00065 FORM_EDIT_RASTER_VALUE (
00066 );
00067
00069 virtual ~FORM_EDIT_RASTER_VALUE (
00070 );
00071
00073 void ClearValue (
00074 bool notify = true
00075 );
00076
00078 void Create (
00079 MGUI::LAYOUT_PANE_BASE& ParentPane,
00080 const MISTRING& label,
00081 RVC::IMAGE::CELLTYPE CellType,
00082 STYLE Style = STYLE_Default,
00083 MGUI::LAYOUT_ORIENTATION orientation = MGUI::LAYOUT_ORIENTATION_Horizontal,
00084 MGUI::LAYOUT_SIZEALIGN sizealign = MGUI::LAYOUT_SIZEALIGN_FixedSize
00085 );
00086
00089 MGUI::CTRL_LABEL& GetLabel (
00090 ) { return (m_label); }
00091
00093 void GetValue (
00094 ANYRASTVALUE& value
00095 );
00096
00098 bool HasValue (
00099 );
00100
00102 void SetCellType (
00103 RVC::IMAGE::CELLTYPE CellType
00104 );
00105
00107 void SetDelegateOnChangeValue (
00108 DELEGATE_VOID_NOPARMS delegate
00109 ) { m_DelegateOnChangeValue = delegate; }
00110
00112 void SetLabel (
00113 const MISTRING& label
00114 ) { m_label.SetLabel(label); }
00115
00119 void SetValue (
00120 const ANYRASTVALUE& value,
00121 bool notify = true
00122 );
00123
00124 protected:
00125
00129 virtual void v_OnChangeValue ();
00130
00131 private:
00132 #ifndef GENERATING_DOXYGEN_OUTPUT
00133 DELEGATE_VOID_NOPARMS m_DelegateOnChangeValue;
00134 RVC::IMAGE::CELLTYPE m_CellType;
00135 MGUI::CTRL_LABEL m_label;
00136 MGUI::CTRL_EDIT_NUMBER m_Value1;
00137 MGUI::CTRL_EDIT_NUMBER m_Value2;
00138 MGUI::CTRL_EDIT_NUMBER m_Value3;
00139 MGUI::CTRL_EDIT_NUMBER m_Value4;
00140
00142 MGUI::LAYOUT_PANE m_ValuePane1;
00143 MGUI::CTRL_LABEL m_ValueLabel1Real;
00144 MGUI::CTRL_LABEL m_ValueLabel1Magnitude;
00145 MGUI::CTRL_LABEL m_ValueLabel1Red;
00146 MGUI::CTRL_LABEL m_ValueLabel1Cyan;
00147 MGUI::LAYOUT_PANE m_ValuePane2;
00148 MGUI::CTRL_LABEL m_ValueLabel2Imaginary;
00149 MGUI::CTRL_LABEL m_ValueLabel2Phase;
00150 MGUI::CTRL_LABEL m_ValueLabel2Green;
00151 MGUI::CTRL_LABEL m_ValueLabel2Magenta;
00152 MGUI::LAYOUT_PANE m_ValuePane3;
00153 MGUI::CTRL_LABEL m_ValueLabel3Blue;
00154 MGUI::CTRL_LABEL m_ValueLabel3Yellow;
00155 MGUI::LAYOUT_PANE m_ValuePane4;
00156 MGUI::CTRL_LABEL m_ValueLabel4Alpha;
00157 MGUI::CTRL_LABEL m_ValueLabel4Black;
00158 bool m_IsVertical;
00159
00160 void OnValueChanged ();
00161 #endif // GENERATING_DOXYGEN_OUTPUT
00162 };
00163
00164
00165
00167 class DLG_EDIT_RASTER_VALUE : public MGUI::DLGSHELL {
00168 public:
00170 DLG_EDIT_RASTER_VALUE (
00171 const MISTRING& title,
00172 const MISTRING& label,
00173 RVC::IMAGE::CELLTYPE CellType,
00174 HELPID HelpID = HELPID__None
00175 );
00176
00178 virtual ~DLG_EDIT_RASTER_VALUE (
00179 );
00180
00182 void GetValue (
00183 ANYRASTVALUE& value
00184 );
00185
00187 bool HasValue (
00188 );
00189
00191 void SetDelegateOnChangeValue (
00192 DELEGATE_VOID_NOPARMS delegate
00193 );
00194
00198 void SetValue (
00199 const ANYRASTVALUE& value,
00200 bool notify = true
00201 );
00202
00203 private:
00204 FORM_EDIT_RASTER_VALUE m_FormEditRasterValue;
00205 RVC::IMAGE::CELLTYPE m_CellType;
00206 MISTRING m_label;
00207 ANYRASTVALUE m_value;
00208
00209 virtual ERRVALUE v_CreateContent ();
00210 };
00211
00212
00213
00214 }
00215 }
00216
00217 #endif // INC_RVC_UIEDITRASTERVALUE_H