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

launcher.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 GUI_LAUNCHER_DIALOG_H
00024 #define GUI_LAUNCHER_DIALOG_H
00025 
00026 #include "gui/dialog.h"
00027 #include "engines/game.h"
00028 
00029 namespace GUI {
00030 
00031 class BrowserDialog;
00032 class CommandSender;
00033 class ListWidget;
00034 class ButtonWidget;
00035 class PicButtonWidget;
00036 class GraphicsWidget;
00037 class StaticTextWidget;
00038 class EditTextWidget;
00039 class SaveLoadChooser;
00040 
00041 class LauncherDialog : public Dialog {
00042     typedef Common::String String;
00043     typedef Common::Array<Common::String> StringArray;
00044 public:
00045     LauncherDialog();
00046     ~LauncherDialog() override;
00047 
00048     void rebuild();
00049 
00050     void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
00051 
00052     void handleKeyDown(Common::KeyState state) override;
00053     void handleKeyUp(Common::KeyState state) override;
00054     void handleOtherEvent(const Common::Event &evt) override;
00055     bool doGameDetection(const Common::String &path);
00056 protected:
00057     EditTextWidget  *_searchWidget;
00058     ListWidget      *_list;
00059     ButtonWidget    *_addButton;
00060     Widget          *_startButton;
00061     ButtonWidget    *_loadButton;
00062     Widget          *_editButton;
00063     Widget          *_removeButton;
00064 #ifndef DISABLE_FANCY_THEMES
00065     GraphicsWidget      *_logo;
00066     GraphicsWidget      *_searchPic;
00067 #endif
00068     StaticTextWidget    *_searchDesc;
00069     ButtonWidget    *_searchClearButton;
00070     StringArray     _domains;
00071     BrowserDialog   *_browser;
00072     SaveLoadChooser *_loadDialog;
00073 
00074     String _search;
00075 
00076     void reflowLayout() override;
00077 
00082     void updateListing();
00083 
00084     void updateButtons();
00085 
00086     void build();
00087     void clean();
00088 
00089     void open() override;
00090     void close() override;
00091 
00095     virtual void addGame();
00096     void massAddGame();
00097 
00101     void removeGame(int item);
00102 
00106     void editGame(int item);
00107 
00111     void recordGame(int item);
00112 
00116     void loadGame(int item);
00117 
00124     void selectTarget(const String &target);
00125 private:
00126     bool checkModifier(int modifier);
00127 };
00128 
00129 } // End of namespace GUI
00130 
00131 #endif


Generated on Sat Jul 4 2020 05:01:39 for ResidualVM by doxygen 1.7.1
curved edge   curved edge