The Battle for Wesnoth  1.15.2+dev
mp_connect.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2008 - 2018 by Mark de Wever <koraq@xs4all.nl>
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 
19 namespace gui2
20 {
21 namespace dialogs
22 {
23 
24 class mp_connect : public modal_dialog
25 {
26  /** The unit test needs to be able to test the mp_connect dialog. */
28 
29 public:
30  mp_connect();
31 
32  /** The execute function. See @ref modal_dialog for more information. */
34 
35 private:
36  /** Inherited from modal_dialog, implemented by REGISTER_DIALOG. */
37  virtual const std::string& window_id() const override;
38 
39  /** Inherited from modal_dialog. */
40  virtual void pre_show(window& window) override;
41 
42  /** The host name of the selected servef. */
44 
45  /**
46  * The unit test needs to be able to test the mp_connect dialog.
47  *
48  * @returns A newly allocated mp_server_list.
49  */
51 };
52 
53 } // namespace dialogs
54 } // namespace gui2
static modal_dialog * mp_server_list_for_unit_test()
The unit test needs to be able to test the mp_connect dialog.
Definition: mp_connect.cpp:184
virtual const std::string & window_id() const override
The execute function.
field_text * host_name_
The host name of the selected servef.
Definition: mp_connect.hpp:43
Generic file dialog.
Definition: field-fwd.hpp:22
friend modal_dialog * unit_test_mp_server_list()
The unit test needs to be able to test the mp_connect dialog.
Definition: test_gui2.cpp:161
Various uncategorised dialogs.
virtual void pre_show(window &window) override
Inherited from modal_dialog.
Definition: mp_connect.cpp:172
Abstract base class for all modal dialogs.
Specialized field class for text.
Definition: field.hpp:592
base class of top level items, the only item which needs to store the final canvases to draw on ...
Definition: window.hpp:63