ScummVM API documentation
dialogs.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 GLOBAL_DIALOGS_H
23#define GLOBAL_DIALOGS_H
24
25#include "gui/dialog.h"
26#include "gui/options.h"
27#include "gui/widget.h"
28
29class Engine;
30
31namespace GUI {
32class ButtonWidget;
33class CommandSender;
34class GraphicsWidget;
35class SaveLoadChooser;
36}
37
39public:
40 enum {
41 kSaveCmd = 'SAVE',
42 kLoadCmd = 'LOAD',
43 kPlayCmd = 'PLAY',
44 kOptionsCmd = 'OPTN',
45 kHelpCmd = 'HELP',
46 kMainHelpCmd = 'MHLP',
47 kAboutCmd = 'ABOU',
48 kQuitCmd = 'QUIT',
49 kLauncherCmd = 'LNCR',
50 kChooseCmd = 'CHOS'
51 };
52
53public:
54 MainMenuDialog(Engine *engine);
56
57 virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override;
58
59 virtual void reflowLayout() override;
60
61protected:
62 void save();
63 void load();
64
65protected:
66 Engine *_engine;
67
69
70 GUI::ButtonWidget *_returnToLauncherButton;
71 GUI::ButtonWidget *_helpButton;
72
73 GUI::Dialog *_aboutDialog;
74
75 GUI::SaveLoadChooser *_loadDialog;
76 GUI::SaveLoadChooser *_saveDialog;
77};
78
79namespace GUI {
80
82public:
84 ~ConfigDialog() override;
85
86 // OptionsDialog API
87 void build() override;
88 void apply() override;
89
90private:
91 OptionsContainerWidget *_engineOptions;
92};
93
95public:
96 enum {
97 kClickGroupLeaderCmd = 'CGLC'
98 };
99
100public:
101 ExtraGuiOptionsWidget(GuiObject *widgetsBoss, const Common::String &name, const Common::String &domain, const ExtraGuiOptions &options);
102 ~ExtraGuiOptionsWidget() override;
103
104 virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override;
105
106 // OptionsContainerWidget API
107 void load() override;
108 bool save() override;
109
110protected:
111 void defineLayout(ThemeEval& layouts, const Common::String& layoutName, const Common::String& overlayedLayout) const override;
112
113private:
115
116 ExtraGuiOptions _options;
117 CheckboxWidgetList _checkboxes;
118};
119
120} // End of namespace GUI
121
122#endif
Definition: str.h:59
Definition: engine.h:149
Definition: widget.h:241
Definition: object.h:40
Definition: dialogs.h:81
Definition: dialog.h:49
Definition: dialogs.h:94
void defineLayout(ThemeEval &layouts, const Common::String &layoutName, const Common::String &overlayedLayout) const override
Definition: widget.h:453
Definition: object.h:60
Definition: widget.h:542
GuiObject * widgetsBoss()
Definition: widget.h:587
Definition: options.h:61
Definition: saveload.h:32
Definition: ThemeEval.h:37
Definition: dialogs.h:38