From 27b8b7e9b6644767ad9de1e40c188a7abd631c4e Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 10 Jun 2012 04:06:25 +0200 Subject: GUI: Hide save/load chooser implementation. --- gui/saveload.h | 43 ++++--------------------------------------- 1 file changed, 4 insertions(+), 39 deletions(-) (limited to 'gui/saveload.h') diff --git a/gui/saveload.h b/gui/saveload.h index a19f5ab083..9cd3c4605f 100644 --- a/gui/saveload.h +++ b/gui/saveload.h @@ -27,46 +27,16 @@ namespace GUI { -class ListWidget; -class GraphicsWidget; -class ButtonWidget; -class CommandSender; -class ContainerWidget; -class StaticTextWidget; +class SaveLoadChooserImpl; -class SaveLoadChooser : GUI::Dialog { +class SaveLoadChooser { typedef Common::String String; - typedef Common::Array StringArray; protected: - GUI::ListWidget *_list; - GUI::ButtonWidget *_chooseButton; - GUI::ButtonWidget *_deleteButton; - GUI::GraphicsWidget *_gfxWidget; - GUI::ContainerWidget *_container; - GUI::StaticTextWidget *_date; - GUI::StaticTextWidget *_time; - GUI::StaticTextWidget *_playtime; - - const EnginePlugin *_plugin; - bool _delSupport; - bool _metaInfoSupport; - bool _thumbnailSupport; - bool _saveDateSupport; - bool _playTimeSupport; - String _target; - SaveStateList _saveList; - String _resultString; - - uint8 _fillR, _fillG, _fillB; - - void updateSaveList(); - void updateSelection(bool redraw); + SaveLoadChooserImpl *_impl; public: SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode); ~SaveLoadChooser(); - virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); - /** * Runs the save/load chooser with the currently active config manager * domain as target. @@ -75,9 +45,8 @@ public: */ int runModalWithCurrentTarget(); int runModalWithPluginAndTarget(const EnginePlugin *plugin, const String &target); - void open(); - const Common::String &getResultString() const; + Common::String getResultString() const; /** * Creates a default save description for the specified slot. Depending @@ -93,10 +62,6 @@ public: * @return The slot description. */ Common::String createDefaultSaveDescription(const int slot) const; - - virtual void reflowLayout(); - - virtual void close(); }; } // End of namespace GUI -- cgit v1.2.3 From 62c66cdb9c11c029e48706932c2513eaea1dd82b Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 14 Jun 2012 03:17:33 +0200 Subject: GUI: Fix include guard of saveload.h. --- gui/saveload.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gui/saveload.h') diff --git a/gui/saveload.h b/gui/saveload.h index 9cd3c4605f..a3834ff777 100644 --- a/gui/saveload.h +++ b/gui/saveload.h @@ -19,8 +19,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef GUI_SAVELOAD_DIALOG_H -#define GUI_SAVELOAD_DIALOG_H +#ifndef GUI_SAVELOAD_H +#define GUI_SAVELOAD_H #include "gui/dialog.h" #include "engines/metaengine.h" -- cgit v1.2.3 From 1aa5200bb824119651e19a1809d9c07292da57fe Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 14 Jun 2012 03:33:50 +0200 Subject: GUI: Create an interface for save/load dialogs. --- gui/saveload.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gui/saveload.h') diff --git a/gui/saveload.h b/gui/saveload.h index a3834ff777..ac61291b62 100644 --- a/gui/saveload.h +++ b/gui/saveload.h @@ -27,12 +27,12 @@ namespace GUI { -class SaveLoadChooserImpl; +class SaveLoadChooserDialog; class SaveLoadChooser { typedef Common::String String; protected: - SaveLoadChooserImpl *_impl; + SaveLoadChooserDialog *_impl; public: SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode); ~SaveLoadChooser(); -- cgit v1.2.3 From 72ea449431d9db61c45160f7c42d546599e84afe Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 15 Jun 2012 22:47:57 +0200 Subject: GUI: Hook up the new load chooser for > 320x200 and engines which support thumbnails. --- gui/saveload.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gui/saveload.h') diff --git a/gui/saveload.h b/gui/saveload.h index ac61291b62..26a8cd1bad 100644 --- a/gui/saveload.h +++ b/gui/saveload.h @@ -33,6 +33,12 @@ class SaveLoadChooser { typedef Common::String String; protected: SaveLoadChooserDialog *_impl; + + const String _title; + const String _buttonLabel; + const bool _saveMode; + + void selectChooser(const MetaEngine &engine); public: SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode); ~SaveLoadChooser(); -- cgit v1.2.3 From f006eddac56fdf4305a3d63914245b8707210725 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 24 Jul 2012 23:32:17 +0200 Subject: GUI: Let SaveLoadChooser::getResultString return a const reference. --- gui/saveload.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gui/saveload.h') diff --git a/gui/saveload.h b/gui/saveload.h index 26a8cd1bad..17fd99a31d 100644 --- a/gui/saveload.h +++ b/gui/saveload.h @@ -52,7 +52,7 @@ public: int runModalWithCurrentTarget(); int runModalWithPluginAndTarget(const EnginePlugin *plugin, const String &target); - Common::String getResultString() const; + const Common::String &getResultString() const; /** * Creates a default save description for the specified slot. Depending -- cgit v1.2.3