00001 /* $Id: data_manage.hpp 52533 2012-01-07 02:35:17Z shadowmaster $ */ 00002 /* 00003 Copyright (C) 2010 - 2012 by Jody Northup 00004 Part of the Battle for Wesnoth Project http://www.wesnoth.org/ 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY. 00012 00013 See the COPYING file for more details. 00014 */ 00015 00016 #ifndef GUI_DIALOGS_MANAGE_DATA_HPP_INCLUDED 00017 #define GUI_DIALOGS_MANAGE_DATA_HPP_INCLUDED 00018 00019 #include "gui/dialogs/dialog.hpp" 00020 #include "gui/widgets/listbox.hpp" 00021 #include "gui/widgets/text.hpp" 00022 #include "savegame.hpp" 00023 #include "tstring.hpp" 00024 00025 namespace gui2 { 00026 00027 class tdata_manage : public tdialog 00028 { 00029 public: 00030 explicit tdata_manage(const config& cache_config); 00031 00032 const std::string& filename() const { return filename_; } 00033 00034 protected: 00035 /** Inherited from tdialog. */ 00036 void pre_show(CVideo& video, twindow& window); 00037 00038 private: 00039 00040 /** Inherited from tdialog, implemented by REGISTER_DIALOG. */ 00041 virtual const std::string& window_id() const; 00042 00043 bool filter_text_changed(ttext_* textbox, const std::string& text); 00044 void list_item_clicked(twindow& window); 00045 void delete_button_callback(twindow& window); 00046 00047 void fill_game_list(twindow& window, std::vector<savegame::save_info>& games); 00048 00049 tfield_text* txtFilter_; 00050 00051 std::string filename_; 00052 00053 std::vector<savegame::save_info> games_; 00054 const config& cache_config_; 00055 00056 std::vector<std::string> last_words_; 00057 }; 00058 00059 } 00060 00061 #endif 00062
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:02:42 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |