The Battle for Wesnoth  1.17.0-dev
game_save.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2008 - 2021
3  by Jörg Hinrichs <joerg.hinrichs@alice-dsl.de>
4  Part of the Battle for Wesnoth Project https://www.wesnoth.org/
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY.
12 
13  See the COPYING file for more details.
14 */
15 
16 #pragma once
17 
19 
20 namespace gui2::dialogs
21 {
22 
23 /**
24  * @ingroup GUIWindowDefinitionWML
25  *
26  * This shows the dialog to create a savegame file.
27  * Key |Type |Mandatory|Description
28  * ------------------|--------------|---------|-----------
29  * lblTitle | @ref label |yes |The title of the window.
30  * txtFilename | text_box |yes |The name of the savefile.
31  */
32 class game_save : public modal_dialog
33 {
34 public:
35  game_save(std::string& filename, const std::string& title);
36 
38 
39 private:
40  virtual const std::string& window_id() const override;
41 };
42 
44 {
45 public:
46  game_save_message(std::string& filename,
47  const std::string& title,
48  const std::string& message);
49 
51 
52 private:
53  virtual const std::string& window_id() const override;
54 };
55 
57 {
58 public:
59  game_save_oos(bool& ignore_all,
60  std::string& filename,
61  const std::string& title,
62  const std::string& message);
63 
65 
66 private:
67  virtual const std::string& window_id() const override;
68 };
69 } // namespace dialogs
Main class to show messages to the user.
Definition: message.hpp:35
game_save(std::string &filename, const std::string &title)
Definition: game_save.cpp:31
This shows the dialog to create a savegame file.
Definition: game_save.hpp:32
Abstract base class for all modal dialogs.
virtual const std::string & window_id() const override
The id of the window to build.