00001
00029 #ifndef INC_RVC_UIFORMRASTERCOMPRESSION_H
00030 #define INC_RVC_UIFORMRASTERCOMPRESSION_H
00031
00032 #ifndef INC_MGUI_COMBOBOX_H
00033 #include <mgui/combobox.h>
00034 #endif
00035
00036 #ifndef INC_MGUI_EDIT_H
00037 #include <mgui/edit.h>
00038 #endif
00039
00040 #ifndef INC_RVC_RASTER_H
00041 #include <rvc/raster.h>
00042 #endif
00043
00044 namespace RVC {
00045 namespace UI {
00046
00048 class FORM_RASTER_COMPRESSION : public MGUI::FORM_COMPOSITE {
00049 public:
00050
00052 enum FORMSTYLE {
00053 FORMSTYLE_Default = 0x00,
00054 FORMSTYLE_NoLossy = 0x01,
00055 FORMSTYLE_NoReadOnly = 0x02
00056 };
00057
00060 FORM_RASTER_COMPRESSION (
00061 );
00062
00064 virtual ~FORM_RASTER_COMPRESSION (
00065 );
00066
00068 ERRVALUE Create (
00069 MGUI::LAYOUT_PANE_BASE& ParentPane,
00070 FORMSTYLE Style = FORMSTYLE_Default,
00071 MGUI::LAYOUT_SIZEALIGN sizealign = MGUI::LAYOUT_SIZEALIGN_FixedHeight
00072 );
00073
00076 UINT16 GetCompressionQualityRatio (
00077 );
00078
00080 RVC::RASTER::COMPTYPE GetCompressionType (
00081 ) const;
00082
00084 MGUI::CTRL_COMBOBOX& GetComboBox (
00085 ) { return (m_CbxType.GetComboBox()); }
00086
00089 MGUI::CTRL_LABEL& GetLabel (
00090 ) { return (m_CbxType.GetLabel()); }
00091
00093 void IniRead (
00094 INIHANDLE IniHandle,
00095 const char *IniGroup,
00096 const char *IniField,
00097 bool notify
00098 );
00099
00101 void IniWrite (
00102 INIHANDLE IniHandle,
00103 const char *IniGroup,
00104 const char *IniField
00105 ) const;
00106
00108 bool IsLossy (
00109 ) const;
00110
00115 void SetCellType (
00116 RVC::IMAGE::CELLTYPE CellType
00117 );
00118
00123 void SetCompression (
00124 RVC::RASTER::COMPTYPE CompType,
00125 UINT16 CompQualityRatio = 0
00126 );
00127
00129 void SetDelegateOnChangeCompressionType (
00130 DELEGATE_VOID_NOPARMS delegate
00131 ) { m_DelegateOnChangeCompressionType = delegate; }
00132
00134 void SetDelegateOnChangeQualityRatio (
00135 DELEGATE_VOID_NOPARMS delegate
00136 );
00137
00139 void SetFromMakeParms (
00140 const RVC::RASTER::MAKEPARMS& MakeParms
00141 );
00142
00143 private:
00144 #ifndef GENERATING_DOXYGEN_OUTPUT
00145
00146 DELEGATE_VOID_NOPARMS m_DelegateOnChangeCompressionType;
00147 DELEGATE_VOID_NOPARMS m_DelegateOnChangeQualityRatio;
00148 FORMSTYLE m_FormStyle;
00149 RVC::IMAGE::CELLTYPE m_CellType;
00150 MGUI::FORM_COMBOBOX m_CbxType;
00151 MGUI::FORM_EDIT_NUMBER m_EditQuality;
00152 MGUI::FORM_EDIT_NUMBER m_EditRatio;
00153
00154 void OnCbxType ();
00155 void OnEditRatio ();
00156 void UpdateUI ();
00157 #endif // GENERATING_DOXYGEN_OUTPUT
00158
00159 };
00160
00161 DEFINE_ENUM_OP_BITWISE(FORM_RASTER_COMPRESSION::FORMSTYLE)
00162
00163 }
00164 }
00165
00166
00167 #endif // INC_RVC_UIFORMRASTERCOMPRESSION_H