The Battle for Wesnoth  1.15.12+dev
depcheck_confirm_change.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2012 - 2018 by Boldizs√°r Lipka <lipkab@zoho.com>
3  Part of the Battle for Wesnoth Project https://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 #pragma once
16 
18 #include <vector>
19 #include <string>
20 
21 namespace gui2::dialogs
22 {
23 
24 /**
25  * @ingroup GUIWindowDefinitionWML
26  *
27  * Asks the user to confirm a change required to proceed. Currently used for enabling/disabling modifications.
28  * Key |Type |Mandatory|Description
29  * ------------------|--------------|---------|-----------
30  * message | @ref label |yes |displays the details of the required changes
31  * itemlist | scroll_label |yes |displays the list of affected items
32  * cancel | @ref button |yes |refuse to apply changes
33  * ok | @ref button |yes |agree to apply changes
34  */
36 {
37 public:
38  /**
39  * Constructor.
40  *
41  * @param action true if the listed modifications are to be enabled,
42  * false if they're to be disabled
43  * @param mods the names of the affected modifications
44  * @param requester the name of the component which requests the change
45  *
46  */
47  depcheck_confirm_change(bool action,
48  const std::vector<std::string>& mods,
49  const std::string& requester);
50 
52 
53 protected:
54  virtual const std::string& window_id() const override;
55 };
56 
57 } // namespace dialogs
depcheck_confirm_change(bool action, const std::vector< std::string > &mods, const std::string &requester)
Constructor.
Asks the user to confirm a change required to proceed.
virtual const std::string & window_id() const override
The id of the window to build.
Abstract base class for all modal dialogs.