ScummVM API documentation
main_game_window.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 TITANIC_MAIN_GAME_WINDOW_H
23 #define TITANIC_MAIN_GAME_WINDOW_H
24 
25 #include "titanic/core/project_item.h"
26 #include "titanic/events.h"
27 #include "common/array.h"
28 #include "common/scummsys.h"
29 
30 namespace Common {
31 struct Point;
32 }
33 
34 namespace Titanic {
35 
36 class CGameManager;
37 class CGameView;
38 class CScreenManager;
39 class Image;
40 class TitanicEngine;
41 
42 class CMainGameWindow : public CEventTarget {
43 private:
44  TitanicEngine *_vm;
45  int _pendingLoadSlot;
46  uint32 _priorLeftDownTime;
47  uint32 _priorMiddleDownTime;
48 private:
53  bool isLoadingFromLauncher() const;
54 
59  int getSavegameSlot();
60 
65  int selectSavegame();
66 
70  void drawPet(CScreenManager *screenManager);
71 
75  void drawView();
76 
80  void drawViewContents(CScreenManager *screenManager);
81 
82  void leftButtonDoubleClick(const Point &mousePos) override;
83  void middleButtonDoubleClick(const Point &mousePos) override;
84 
88  bool isMouseControlEnabled() const;
89 public:
90  CGameView *_gameView;
91  CGameManager *_gameManager;
92  CProjectItem *_project;
93  bool _inputAllowed;
94  Image *_image;
95  void *_cursor;
96 public:
98  ~CMainGameWindow() override;
99 
103  void onIdle() override;
104 
105  void mouseMove(const Point &mousePos) override;
106  void leftButtonDown(const Point &mousePos) override;
107  void leftButtonUp(const Point &mousePos) override;
108  void middleButtonDown(const Point &mousePos) override;
109  void middleButtonUp(const Point &mousePos) override;
110  void mouseWheel(const Point &mousePos, bool wheelUp) override;
111  void keyDown(Common::KeyState keyState) override;
112 
116  bool applicationStarting();
117 
121  void setActiveView(CViewItem *viewItem);
122 
126  void draw();
127 
131  void mouseChanged();
132 
136  void loadGame(int slotId);
137 };
138 
139 } // End of namespace Titanic
140 
141 #endif /* TITANIC_MAIN_GAME_WINDOW_H */
Definition: display_client.h:58
Definition: screen_manager.h:49
Definition: titanic.h:81
Definition: game_manager.h:48
Definition: game_view.h:36
Definition: algorithm.h:29
Definition: rect.h:45
Definition: arm.h:30
Definition: project_item.h:84
Definition: keyboard.h:294
Definition: main_game_window.h:42
Definition: movie_decoder.h:32
Definition: events.h:46
Definition: view_item.h:32