The Battle for Wesnoth  1.19.0-dev
game_save.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2008 - 2024
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
game_save_message(std::string &filename, const std::string &title, const std::string &message)
Definition: game_save.cpp:36
virtual const std::string & window_id() const override
The ID of the window to build.
game_save_oos(bool &ignore_all, std::string &filename, const std::string &title, const std::string &message)
Definition: game_save.cpp:48
virtual const std::string & window_id() const override
The ID of the window to build.
This shows the dialog to create a savegame file.
Definition: game_save.hpp:33
virtual const std::string & window_id() const override
The ID of the window to build.
game_save(std::string &filename, const std::string &title)
Definition: game_save.cpp:27
Main class to show messages to the user.
Definition: message.hpp:36
Abstract base class for all modal dialogs.
#define DEFINE_SIMPLE_EXECUTE_WRAPPER(dialog)
Adds a bare-bonesstatic execute function to a dialog class that immediately invokes and return the re...