The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
mp_cmd_wrapper.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2009 - 2016 by Thomas Baumhauer
4  Part of the Battle for Wesnoth Project http://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 #ifndef GUI_DIALOGS_MP_CMD_WRAPPER_HPP_INCLUDED
17 #define GUI_DIALOGS_MP_CMD_WRAPPER_HPP_INCLUDED
18 
19 #include "gui/dialogs/dialog.hpp"
20 #include "tstring.hpp"
21 
22 namespace gui2
23 {
24 
25 class tmp_cmd_wrapper : public tdialog
26 {
27 public:
28  /**
29  * Constructor.
30  *
31  * The text which shows the selected user.
32  */
33  explicit tmp_cmd_wrapper(const t_string& user);
34 
35  /***** ***** ***** setters / getters for members ***** ****** *****/
36 
37  const std::string& message() const
38  {
39  return message_;
40  }
41  const std::string& reason() const
42  {
43  return reason_;
44  }
45  const std::string& time() const
46  {
47  return time_;
48  }
49 
50 private:
51  /** The message to send to another user. */
53 
54  /** The reason for an action; kick, ban. */
56 
57  /** The duration of a ban. */
59 
60  /** Inherited from tdialog. */
61  void pre_show(twindow& window);
62 
63  /** Inherited from tdialog, implemented by REGISTER_DIALOG. */
64  virtual const std::string& window_id() const;
65 };
66 
67 } // namespace gui2
68 
69 #endif // GUI_DIALOGS_MP_CMD_WRAPPER_HPP_INCLUDED
tmp_cmd_wrapper(const t_string &user)
Constructor.
base class of top level items, the only item which needs to store the final canvases to draw on ...
Definition: window.hpp:62
A class inherited from ttext_box that displays its input as stars.
Definition: field-fwd.hpp:23
Abstract base class for all dialogs.
Definition: dialog.hpp:121
std::string message_
The message to send to another user.
std::string reason_
The reason for an action; kick, ban.
std::string time_
The duration of a ban.
void pre_show(twindow &window)
Inherited from tdialog.
virtual const std::string & window_id() const
Inherited from tdialog, implemented by REGISTER_DIALOG.
const std::string & time() const
const std::string & message() const
GLsizei const GLcharARB ** string
Definition: glew.h:4503
const std::string & reason() const