The Battle for Wesnoth  1.17.0-dev
player_info.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2009 - 2018 by Tomasz Sniatowski <kailoran@gmail.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 "chat_events.hpp"
20 
21 namespace gui2
22 {
23 
24 class button;
25 class label;
26 class text_box;
27 
28 namespace dialogs
29 {
30 
32 {
33 public:
36  const mp::lobby_info& li);
37 
39 
40  bool result_open_whisper() const
41  {
42  return result_open_whisper_;
43  }
44 
45 private:
46  virtual const std::string& window_id() const override;
47 
48  virtual void pre_show(window& window) override;
49 
50  virtual void post_show(window& window) override;
51 
52  void update_relation();
53 
55 
57 
59 
61 
63 
64  void kick_button_callback();
65 
67 
69 
70  void do_stopgame();
71 
72  void do_kick_ban(bool ban);
73 
75 
77 
79 
81 
83 
85 
87 
89 
91 
93 };
94 
95 } // namespace dialogs
96 } // end namespace gui2
virtual void pre_show(window &window) override
Actions to be taken before showing the window.
Definition: player_info.cpp:56
lobby_player_info(events::chat_handler &chat, mp::user_info &info, const mp::lobby_info &li)
Definition: player_info.cpp:36
logger & info()
Definition: log.cpp:88
This class represents the collective information the client has about the players and games on the se...
Definition: lobby_info.hpp:30
A label displays a text, the text can be wrapped but no scrollbars are provided.
Definition: label.hpp:56
Class for a single line text area.
Definition: text_box.hpp:140
const mp::lobby_info & lobby_info_
Definition: player_info.hpp:92
Generic file dialog.
Definition: field-fwd.hpp:22
virtual const std::string & window_id() const override
The id of the window to build.
std::string label
What to show in the filter&#39;s drop-down list.
Definition: manager.cpp:216
Various uncategorised dialogs.
events::chat_handler & chat_
Definition: player_info.hpp:74
virtual void post_show(window &window) override
Actions to be taken after the window has been shown.
This class represents the information a client has about another player.
Definition: lobby_data.hpp:104
Abstract base class for all modal dialogs.
Simple push button.
Definition: button.hpp:35
base class of top level items, the only item which needs to store the final canvases to draw on...
Definition: window.hpp:64