The Battle for Wesnoth  1.19.0-dev
player_info.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2009 - 2024
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:
36  const mp::user_info& info,
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
Simple push button.
Definition: button.hpp:36
virtual void post_show(window &window) override
Actions to be taken after the window has been shown.
lobby_player_info(events::chat_handler &chat, const mp::user_info &info, const mp::lobby_info &li)
Definition: player_info.cpp:35
const mp::user_info & info_
Definition: player_info.hpp:77
virtual const std::string & window_id() const override
The ID of the window to build.
const mp::lobby_info & lobby_info_
Definition: player_info.hpp:93
virtual void pre_show(window &window) override
Actions to be taken before showing the window.
Definition: player_info.cpp:56
events::chat_handler & chat_
Definition: player_info.hpp:75
Abstract base class for all modal dialogs.
A label displays text that can be wrapped but no scrollbars are provided.
Definition: label.hpp:56
Class for a single line text area.
Definition: text_box.hpp:142
base class of top level items, the only item which needs to store the final canvases to draw on.
Definition: window.hpp:63
This class represents the collective information the client has about the players and games on the se...
Definition: lobby_info.hpp:31
std::string label
What to show in the filter's drop-down list.
Definition: manager.cpp:209
Various uncategorised dialogs.
Generic file dialog.
logger & info()
Definition: log.cpp:314
This class represents the information a client has about another player.
Definition: lobby_data.hpp:30