ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

dialogs.h

Go to the documentation of this file.
00001 /* ScummVM - Graphic Adventure Engine
00002  *
00003  * ScummVM is the legal property of its developers, whose names
00004  * are too numerous to list here. Please refer to the COPYRIGHT
00005  * file distributed with this source distribution.
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation; either version 2
00010  * of the License, or (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00020  *
00021  */
00022 
00023 #ifndef GLOBAL_DIALOGS_H
00024 #define GLOBAL_DIALOGS_H
00025 
00026 #include "gui/dialog.h"
00027 #include "gui/options.h"
00028 #include "gui/widget.h"
00029 
00030 class Engine;
00031 
00032 namespace GUI {
00033 class ButtonWidget;
00034 class CommandSender;
00035 class GraphicsWidget;
00036 class SaveLoadChooser;
00037 }
00038 
00039 class MainMenuDialog : public GUI::Dialog {
00040 public:
00041     enum {
00042         kSaveCmd = 'SAVE',
00043         kLoadCmd = 'LOAD',
00044         kPlayCmd = 'PLAY',
00045         kOptionsCmd = 'OPTN',
00046         kHelpCmd = 'HELP',
00047         kAboutCmd = 'ABOU',
00048         kQuitCmd = 'QUIT',
00049         kLauncherCmd = 'LNCR',
00050         kChooseCmd = 'CHOS'
00051     };
00052 
00053 public:
00054     MainMenuDialog(Engine *engine);
00055     ~MainMenuDialog();
00056 
00057     virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
00058 
00059     virtual void reflowLayout();
00060 
00061 protected:
00062     void save();
00063     void load();
00064 
00065 protected:
00066     Engine *_engine;
00067 
00068     GUI::GraphicsWidget  *_logo;
00069 
00070     GUI::ButtonWidget    *_returnToLauncherButton;
00071     GUI::ButtonWidget    *_loadButton;
00072     GUI::ButtonWidget    *_saveButton;
00073     GUI::ButtonWidget    *_helpButton;
00074 
00075     GUI::Dialog          *_aboutDialog;
00076 
00077     GUI::SaveLoadChooser *_loadDialog;
00078     GUI::SaveLoadChooser *_saveDialog;
00079 };
00080 
00081 namespace GUI {
00082 
00083 class ConfigDialog : public OptionsDialog {
00084 public:
00085     ConfigDialog();
00086     ~ConfigDialog() override;
00087 
00088     void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
00089 
00090     // OptionsDialog API
00091     void build() override;
00092     void apply() override;
00093 
00094 private:
00095     OptionsContainerWidget *_engineOptions;
00096 
00097 #ifdef GUI_ENABLE_KEYSDIALOG
00098     Dialog *_keysDialog;
00099 #endif
00100 };
00101 
00102 class ExtraGuiOptionsWidget : public OptionsContainerWidget {
00103 public:
00104     ExtraGuiOptionsWidget(GuiObject *widgetsBoss, const Common::String &name, const Common::String &domain, const ExtraGuiOptions &options);
00105     ~ExtraGuiOptionsWidget() override;
00106 
00107     // OptionsContainerWidget API
00108     void load() override;
00109     bool save() override;
00110 
00111 private:
00112     typedef Common::Array<CheckboxWidget *> CheckboxWidgetList;
00113 
00114     static Common::String dialogLayout(const Common::String &domain);
00115 
00116     ExtraGuiOptions _options;
00117     CheckboxWidgetList _checkboxes;
00118 };
00119 
00120 } // End of namespace GUI
00121 
00122 #endif


Generated on Sat Aug 1 2020 05:01:09 for ResidualVM by doxygen 1.7.1
curved edge   curved edge