-
-
Notifications
You must be signed in to change notification settings - Fork 991
/
data_manage.hpp
62 lines (46 loc) · 1.47 KB
/
data_manage.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
Copyright (C) 2010 - 2014 by Jody Northup
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY.
See the COPYING file for more details.
*/
#ifndef GUI_DIALOGS_MANAGE_DATA_HPP_INCLUDED
#define GUI_DIALOGS_MANAGE_DATA_HPP_INCLUDED
#include "gui/dialogs/dialog.hpp"
#include "gui/widgets/listbox.hpp"
#include "gui/widgets/text.hpp"
#include "save_index.hpp"
#include "tstring.hpp"
namespace gui2
{
class tdata_manage : public tdialog
{
public:
tdata_manage();
const std::string& filename() const
{
return filename_;
}
protected:
/** Inherited from tdialog. */
void pre_show(CVideo& video, twindow& window);
private:
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
virtual const std::string& window_id() const;
bool filter_text_changed(ttext_* textbox, const std::string& text);
void list_item_clicked(twindow& window);
void delete_button_callback(twindow& window);
void fill_game_list(twindow& window,
std::vector<savegame::save_info>& games);
tfield_text* txtFilter_;
std::string filename_;
std::vector<savegame::save_info> games_;
std::vector<std::string> last_words_;
};
}
#endif