ScummVM API documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
gui_inv.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 AGS_SHARED_GUI_GUI_INV_H
23 #define AGS_SHARED_GUI_GUI_INV_H
24 
25 #include "common/std/vector.h"
26 #include "ags/shared/gui/gui_object.h"
27 
28 namespace AGS3 {
29 namespace AGS {
30 namespace Shared {
31 
32 class GUIInvWindow : public GUIObject {
33 public:
34  GUIInvWindow();
35 
36  bool HasAlphaChannel() const override;
37  // This function has distinct implementations in Engine and Editor
38  int GetCharacterId() const;
39 
40  // Operations
41  // This function has distinct implementations in Engine and Editor
42  void Draw(Bitmap *ds, int x = 0, int y = 0) override;
43 
44  // Events
45  void OnMouseEnter() override;
46  void OnMouseLeave() override;
47  void OnMouseUp() override;
48  void OnResized() override;
49 
50  // Serialization
51  void ReadFromFile(Stream *in, GuiVersion gui_version) override;
52  void WriteToFile(Stream *out) const override;
53  void ReadFromSavegame(Shared::Stream *in, GuiSvgVersion svg_ver) override;
54  void WriteToSavegame(Shared::Stream *out) const override;
55 
56  // TODO: these members are currently public; hide them later
57 public:
58  bool IsMouseOver;
59  int32_t CharId; // whose inventory (-1 = current player)
60  int32_t ItemWidth;
61  int32_t ItemHeight;
62  int32_t ColCount;
63  int32_t RowCount;
64  int32_t TopItem;
65 
66 private:
67  void CalculateNumCells();
68 };
69 
70 } // namespace Shared
71 } // namespace AGS
72 } // namespace AGS3
73 
74 #endif
Definition: achievements_tables.h:27
Definition: allegro_bitmap.h:44
Definition: gui_object.h:44
Definition: gui_inv.h:32
Definition: stream.h:52
Definition: ags.h:40