The Battle for Wesnoth  1.19.5+dev
connect.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2008 - 2024
3  by Mark de Wever <koraq@xs4all.nl>
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 
24 {
25 public:
26  /**
27  * Constructor.
28  *
29  * @param host_name The parameter's usage is:
30  * - Input: The initial value for the host_name.
31  * - Output :The final value of the host_name if
32  * the dialog returns retval::OK or 3
33  * undefined otherwise.
34  * @param allow_remove Sets @ref allow_remove_.
35  */
36  addon_connect(std::string& host_name, bool allow_remove);
37 
38 private:
39  /** Enable the addon remove button? */
41 
42  void help_button_callback();
43 
44  virtual const std::string& window_id() const override;
45 
46  virtual void pre_show() override;
47 
48  virtual void post_show() override;
49 };
50 
51 } // namespace dialogs
addon_connect(std::string &host_name, bool allow_remove)
Constructor.
Definition: connect.cpp:32
virtual void pre_show() override
Actions to be taken before showing the window.
Definition: connect.cpp:44
bool allow_remove_
Enable the addon remove button?
Definition: connect.hpp:40
virtual void post_show() override
Actions to be taken after the window has been shown.
Definition: connect.cpp:54
virtual const std::string & window_id() const override
The ID of the window to build.
Abstract base class for all modal dialogs.