TIFFDoc.h
上传用户:lbr_007
上传日期:2019-05-31
资源大小:282k
文件大小:2k
- // TIFFDoc.h : interface of the TIFFDoc class
- //
- /////////////////////////////////////////////////////////////////////////////
- #if !defined(AFX_TIFFDOC_H__19DDBC64_14EE_4F2A_BF6C_1FEDFBDB36B3__INCLUDED_)
- #define AFX_TIFFDOC_H__19DDBC64_14EE_4F2A_BF6C_1FEDFBDB36B3__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include <string>
- #include <arraycontainer.h>
- #include <dibsect.h>
- class TIFFDoc : public CDocument
- {
- public:
- enum ImageFileTypes {
- JPEGFileType,
- BMPFileType,
- TIFFFileType,
- GIFFileType,
- OtherFileType,
- UnknownFileType
- };
- protected: // create from serialization only
- TIFFDoc();
- DECLARE_DYNCREATE(TIFFDoc)
- // Attributes
- ImageFileTypes m_fileType;
- ArrayContainer<DIBSection *> m_dibs;
- std::string m_filename;
- UINT32 m_currentDIB;
- public:
- // Operations
- public:
- ImageFileTypes DetermineFileType(CString& filename);
- ImageFileTypes GetImageType(void)const{ return m_fileType;}
- DIBSection * GetDIB(UINT32 ndx = 0)
- {
- DIBSection * ptr = 0;
- if (ndx < m_dibs.GetSize())
- {
- ptr = m_dibs.GetData()[ndx];
- m_currentDIB = ndx;
- }
- return ptr;
- }
- ArrayContainer<DIBSection *> * GetDIBs(void){ return &m_dibs;}
- void ClearImages(void);
- const std::string& GetFilename(void)const{ return m_filename;}
- void GetFilenameParts(const std::string& fullFilePath,
- std::string& pathOnly, std::string& fileNameOnly, std::string& extOnly);
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(TIFFDoc)
- public:
- virtual BOOL OnNewDocument();
- virtual void Serialize(CArchive& ar);
- //}}AFX_VIRTUAL
- // Implementation
- public:
- virtual ~TIFFDoc();
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
- protected:
- // Generated message map functions
- protected:
- //{{AFX_MSG(TIFFDoc)
- afx_msg void OnFileOpen();
- afx_msg void OnFileSave();
- afx_msg void OnFileSaveAs();
- afx_msg void OnUpdateFileProperties(CCmdUI* pCmdUI);
- afx_msg void OnFileProperties();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_TIFFDOC_H__19DDBC64_14EE_4F2A_BF6C_1FEDFBDB36B3__INCLUDED_)