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();
00047 
00048     void rebuild();
00049 
00050     virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
00051 
00052     virtual void handleKeyDown(Common::KeyState state);
00053     virtual void handleKeyUp(Common::KeyState state);
00054     bool doGameDetection(const Common::String &path);
00055 protected:
00056     EditTextWidget  *_searchWidget;
00057     ListWidget      *_list;
00058     ButtonWidget    *_addButton;
00059     Widget          *_startButton;
00060     ButtonWidget    *_loadButton;
00061     Widget          *_editButton;
00062     Widget          *_removeButton;
00063 #ifndef DISABLE_FANCY_THEMES
00064     GraphicsWidget      *_logo;
00065     GraphicsWidget      *_searchPic;
00066 #endif
00067     StaticTextWidget    *_searchDesc;
00068     ButtonWidget    *_searchClearButton;
00069     StringArray     _domains;
00070     BrowserDialog   *_browser;
00071     SaveLoadChooser *_loadDialog;
00072 
00073     String _search;
00074 
00075     virtual void reflowLayout();
00076 
00081     void updateListing();
00082 
00083     void updateButtons();
00084     void switchButtonsText(ButtonWidget *button, const char *normalText, const char *shiftedText);
00085 
00086     void build();
00087     void clean();
00088 
00089     void open();
00090     void close();
00091 
00095     virtual void addGame();
00096 
00100     void removeGame(int item);
00101 
00105     void editGame(int item);
00106 
00110     void loadGameButtonPressed(int item);
00111 
00115     void recordGame(int item);
00116 
00120     void loadGame(int item);
00121 
00128     void selectTarget(const String &target);
00129 private:
00130     bool checkModifier(int modifier);
00131 };
00132 
00133 } // End of namespace GUI
00134 
00135 #endif


Generated on Sat May 18 2019 05:01:06 for ResidualVM by doxygen 1.7.1
curved edge   curved edge