ScummVM API documentation
dibdoc.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef HODJNPODJ_HNPLIBS_DIBDOC_H
23 #define HODJNPODJ_HNPLIBS_DIBDOC_H
24 
25 #include "bagel/hodjnpodj/hnplibs/dibapi.h"
26 
27 namespace Bagel {
28 namespace HodjNPodj {
29 
30 class CDibDoc : public CDocument {
31  DECLARE_DYNCREATE(CDibDoc)
32  friend class CSprite;
33 
34 public:
35  CDibDoc();
36 
37  // Attributes
38  HDIB GetHDIB() const {
39  return m_hDIB;
40  }
41  CPalette *GetDocPalette() const {
42  return m_palDIB;
43  }
44  CPalette *DetachPalette();
45  CSize GetDocSize() const {
46  return m_sizeDoc;
47  }
48 
49  // Operations
50  void ReplaceHDIB(HDIB hDIB);
51  void InitDIBData();
52 
53  // Implementation
54  virtual ~CDibDoc();
55  virtual bool SaveDocument(const char* pszPathName);
56  virtual bool OpenDocument(const char* pszPathName);
57  virtual bool OpenResourceDocument(const int nResID);
58  virtual bool OpenResourceDocument(const char* pszPathName);
59 
60 private:
61  HDIB m_hDIB = nullptr;
62  CPalette *m_palDIB = nullptr;
63  CSize m_sizeDoc;
64 
65 protected:
66  //{{AFX_MSG(CDibDoc)
67  //}}AFX_MSG
68  DECLARE_MESSAGE_MAP()
69 };
70 
71 } // namespace HodjNPodj
72 } // namespace Bagel
73 
74 #endif
Definition: managed_surface.h:51
Definition: dibdoc.h:30
Definition: afxwin.h:667
Definition: atltypes.h:40
Definition: afxwin.h:1061
Definition: afxwin.h:27
Definition: sprite.h:41