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
30namespace Common {
31struct Point;
32}
33
34namespace Titanic {
35
36class CGameManager;
37class CGameView;
38class CScreenManager;
39class Image;
40class TitanicEngine;
41
43private:
44 TitanicEngine *_vm;
45 int _pendingLoadSlot;
46 uint32 _priorLeftDownTime;
47 uint32 _priorMiddleDownTime;
48private:
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;
89public:
90 CGameView *_gameView;
91 CGameManager *_gameManager;
92 CProjectItem *_project;
93 bool _inputAllowed;
94 Image *_image;
95 void *_cursor;
96public:
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 void actionStart(Common::CustomEventType action) override;
113
118
122 void setActiveView(CViewItem *viewItem);
123
127 void draw();
128
133
137 void loadGame(int slotId);
138};
139
140} // End of namespace Titanic
141
142#endif /* TITANIC_MAIN_GAME_WINDOW_H */
Definition: events.h:46
Definition: game_manager.h:48
Definition: game_view.h:36
Definition: main_game_window.h:42
void mouseMove(const Point &mousePos) override
void setActiveView(CViewItem *viewItem)
void loadGame(int slotId)
void onIdle() override
Definition: project_item.h:84
Definition: screen_manager.h:49
Definition: view_item.h:32
Definition: image.h:31
Definition: titanic.h:121
uint32 CustomEventType
Definition: events.h:212
Definition: algorithm.h:29
Definition: keyboard.h:294
Definition: rect.h:144
Definition: display_client.h:58