The Battle for Wesnoth  1.17.0-dev
player_info.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2009 - 2021
3  by Tomasz Sniatowski <kailoran@gmail.com>
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 #include "chat_events.hpp"
21 
22 namespace gui2
23 {
24 
25 class button;
26 class label;
27 class text_box;
28 
29 namespace dialogs
30 {
31 
33 {
34 public:
37  const mp::lobby_info& li);
38 
40 
41  bool result_open_whisper() const
42  {
43  return result_open_whisper_;
44  }
45 
46 private:
47  virtual const std::string& window_id() const override;
48 
49  virtual void pre_show(window& window) override;
50 
51  virtual void post_show(window& window) override;
52 
53  void update_relation();
54 
56 
58 
60 
62 
64 
65  void kick_button_callback();
66 
68 
70 
71  void do_stopgame();
72 
73  void do_kick_ban(bool ban);
74 
76 
78 
80 
82 
84 
86 
88 
90 
92 
94 };
95 
96 } // namespace dialogs
97 } // end namespace gui2
virtual void pre_show(window &window) override
Actions to be taken before showing the window.
Definition: player_info.cpp:57
lobby_player_info(events::chat_handler &chat, mp::user_info &info, const mp::lobby_info &li)
Definition: player_info.cpp:37
logger & info()
Definition: log.cpp:89
This class represents the collective information the client has about the players and games on the se...
Definition: lobby_info.hpp:31
A label displays a text, the text can be wrapped but no scrollbars are provided.
Definition: label.hpp:57
Class for a single line text area.
Definition: text_box.hpp:141
const mp::lobby_info & lobby_info_
Definition: player_info.hpp:93
Generic file dialog.
Definition: field-fwd.hpp:23
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:217
Various uncategorised dialogs.
events::chat_handler & chat_
Definition: player_info.hpp:75
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:105
Abstract base class for all modal dialogs.
Simple push button.
Definition: button.hpp:36
base class of top level items, the only item which needs to store the final canvases to draw on...
Definition: window.hpp:65