formrcmp.h

Go to the documentation of this file.
00001 /**
00002  * \file mgui/formrcmp.h
00003  * \brief MGUI::FORM_RASTER_COMPRESSION class definitions
00004  *
00005  * \if NODOC
00006  * $Id: formrcmp.h_v 1.10 2003/11/24 15:19:16 mju Exp $
00007  *
00008  * $Log: formrcmp.h_v $
00009  * Revision 1.10  2003/11/24 15:19:16  mju
00010  * Change default for SetCompression quality/ratio to 0 for max/lossless.
00011  *
00012  * Revision 1.9  2003/11/24 15:11:03  mju
00013  * Add SetFromMakeParms.
00014  *
00015  * Revision 1.8  2003/11/24 14:59:20  mju
00016  * Redesign to -
00017  *   not use MAKEPARMS
00018  *   use formstyle flags for NoLossy, NoReadOnly.
00019  *
00020  * Revision 1.7  2003/10/30 21:51:23  scowan
00021  * Added flags parameter.
00022  *
00023  * Revision 1.6  2003/10/22 22:26:06  scowan
00024  * Added correct jp2K items to dialog.
00025  *
00026  * Revision 1.5  2003/10/03 19:58:19  linux32build!build
00027  * Doxygen
00028  *
00029  * Revision 1.4  2003/09/15 13:49:32  fileserver!dwilliss
00030  * Doxygen
00031  *
00032  * Revision 1.3  2003/09/05 14:01:45  scowan
00033  * Added jp2000 selection
00034  *
00035  * Revision 1.2  2003/03/05 17:09:37  scowan
00036  * Chagned default size alignment.
00037  *
00038  * Revision 1.1  2003/03/04 22:53:58  scowan
00039  * Initial revision
00040  *
00041  * \endif
00042 **/
00043 
00044 #ifndef  INC_MGUI_FORMRCMP_H
00045 #define  INC_MGUI_FORMRCMP_H
00046 
00047 #ifndef  INC_MGUI_COMBOBOX_H
00048 #include <mgui/combobox.h>
00049 #endif
00050 
00051 #ifndef  INC_RVC_RASTER_H
00052 #include <rvc/raster.h>
00053 #endif
00054 
00055 namespace MGUI {
00056 
00057 //! Form for setting raster internal compression type and quality.
00058 class FORM_RASTER_COMPRESSION : public MGUI::FORM_COMPOSITE {
00059    public:
00060 
00061       //! Form style enumeration.   
00062       enum FORMSTYLE {
00063          FORMSTYLE_Default =     0x00,
00064          FORMSTYLE_NoLossy =     0x01,    //!< Don't allow lossy compression choices
00065          FORMSTYLE_NoReadOnly =  0x02     //!< Don't allow compression which does not support overwrite
00066          };
00067    
00068       //! Constructor.
00069       //! Defaults to a celltype of RVC::IMAGE::CELLTYPE_Unsigned_8 for menu generation purposes
00070       FORM_RASTER_COMPRESSION (
00071          );
00072 
00073       //! Destructor.
00074       virtual ~FORM_RASTER_COMPRESSION (
00075          );
00076          
00077       //! Create the form.
00078       ERRVALUE Create (
00079          MGUI::LAYOUT_PANE_BASE& ParentPane,          //!< Parent pane
00080          FORMSTYLE Style = FORMSTYLE_Default,         //!< Form style
00081          MGUI::LAYOUT_SIZEALIGN sizealign = MGUI::LAYOUT_SIZEALIGN_FixedHeight
00082          );
00083 
00084       //! Get currently selected compression quality/ratio.
00085       //! @return Compression quality/ratio.
00086       UINT16 GetCompressionQualityRatio (
00087          );
00088 
00089       //! Get currently selected compression type.
00090       RVC::RASTER::COMPTYPE GetCompressionType (
00091          ) const;
00092 
00093       //! Determine if lossy compression type is selected.
00094       bool IsLossy (
00095          ) const;
00096 
00097       //! Set cell type for limiting compression choices.
00098       //! If current compression type not allowed for specified CELLTYPE
00099       //! the selection will be reset to 'uncompressed'.
00100       //! Create() must be called before using this method.
00101       void SetCellType (
00102          RVC::IMAGE::CELLTYPE CellType
00103          );
00104 
00105       //! Set selected compression parameters.
00106       //! If specified values are not allowed for current CELLTYPE the
00107       //! selection will be left unchanged.
00108       //! Create() must be called before using this method.
00109       void SetCompression (
00110          RVC::RASTER::COMPTYPE CompType,              //!< Compression type
00111          UINT16 CompQualityRatio = 0                  //!< Compression quality or ratio, 0 for maximum quality/lossless
00112          );
00113 
00114       //! Set cell type and compression selection from RASTER::MAKEPARMS.
00115       void SetFromMakeParms (
00116          const RVC::RASTER::MAKEPARMS& MakeParms
00117          );
00118 
00119    private:
00120       #ifndef GENERATING_DOXYGEN_OUTPUT
00121 
00122       FORMSTYLE m_FormStyle;
00123       RVC::IMAGE::CELLTYPE m_CellType;
00124       MGUI::FORM_COMBOBOX_T<FORM_RASTER_COMPRESSION> m_ComboType;
00125       MGUI::FORM_EDIT_NUMBER m_EditQuality;
00126       MGUI::FORM_EDIT_NUMBER m_EditRatio;
00127 
00128       void OnComboType ();
00129       #endif // GENERATING_DOXYGEN_OUTPUT
00130 
00131    };
00132    
00133 DEFINE_ENUM_OP_BITWISE(FORM_RASTER_COMPRESSION::FORMSTYLE)
00134 
00135 }     //End of MGUI namespace
00136 
00137 
00138 #endif      // INC_MGUI_FORMRCMP_H

Generated on Tue Dec 14 13:18:17 2004 for TNTsdk by  doxygen 1.3.8-20040913