00001 /* 00002 /-------------------------------------------------------------------- 00003 | 00004 | $Id: Doc_8h-source.html,v 1.2 2004/09/15 15:26:23 uzadow Exp $ 00005 | Document class declaration 00006 | 00007 | Copyright (c) 1998 Bernard Delmée 00008 | 00009 \-------------------------------------------------------------------- 00010 */ 00011 00012 #ifndef INCL_DOCUMENT 00013 #define INCL_DOCUMENT 00014 00015 #include "WinBmpEx.h" 00016 00017 // Jo Hagelberg 15.4.99: inherit from PLIProgressNotification 00018 #include "plprognot.h" 00019 00020 00021 // Jo Hagelberg 15.4.99: inherit from PLIProgressNotification 00022 class CPLViewerDoc : public CDocument, PLIProgressNotification 00023 { 00024 protected: // create from serialization only 00025 CPLViewerDoc(); 00026 DECLARE_DYNCREATE(CPLViewerDoc) 00027 00028 // Attributes 00029 public: 00030 CSize GetDocSize() 00031 { 00032 return m_pDib->GetSize(); 00033 } 00034 HPALETTE GetDocPalette() 00035 { 00036 return m_pDib->GetLogPalette(); 00037 } 00038 00039 // Operations 00040 public: 00041 void ConvertTo8BPP(UINT iDitherPaletteType, UINT iDitherType); 00042 virtual void DeleteContents(); 00043 PLWinBmpEx *GetDib() 00044 { 00045 return m_pDib; 00046 } 00047 // Jo Hagelberg 15.4.99: copied OnProgress from DibStatic 00048 void OnProgress( double Part); 00049 00050 // Implementation 00051 protected: 00052 virtual ~CPLViewerDoc(); 00053 virtual BOOL OnOpenDocument(LPCTSTR lpszPathName); 00054 00055 protected: 00056 PLWinBmpEx* m_pDib; 00057 00058 #ifdef _DEBUG 00059 virtual void AssertValid() const; 00060 virtual void Dump(CDumpContext& dc) const; 00061 #endif 00062 00063 // virtual bool OnSaveDocument( LPCTSTR lpszPathName ); 00064 00065 // Generated message map functions 00066 protected: 00067 //{{AFX_MSG(CPLViewerDoc) 00068 afx_msg void OnFileSave(); 00069 afx_msg void OnUpdateFileSave(CCmdUI* pCmdUI); 00070 //}}AFX_MSG 00071 DECLARE_MESSAGE_MAP() 00072 }; 00073 00074 #endif // INCL_DOCUMENT 00075 /* 00076 /-------------------------------------------------------------------- 00077 | 00078 | $Log: Doc_8h-source.html,v $ 00078 | Revision 1.2 2004/09/15 15:26:23 uzadow 00078 | Linux compatibility changes, doc update. 00078 | 00079 | Revision 1.9 2001/09/16 19:03:23 uzadow 00080 | Added global name prefix PL, changed most filenames. 00081 | 00082 | Revision 1.8 2000/03/31 11:53:31 Ulrich von Zadow 00083 | Added quantization support. 00084 | 00085 | Revision 1.7 2000/03/28 21:05:03 Ulrich von Zadow 00086 | Added zoom capability. 00087 | 00088 | Revision 1.6 2000/01/10 23:53:01 Ulrich von Zadow 00089 | Changed formatting & removed tabs. 00090 | 00091 | Revision 1.5 1999/12/02 17:07:35 Ulrich von Zadow 00092 | Changes by bdelmee. 00093 | 00094 | Revision 1.4 1999/11/08 22:15:05 Ulrich von Zadow 00095 | Added File/SaveAs 00096 | 00097 | 00098 \-------------------------------------------------------------------- 00099 */