The Battle for Wesnoth  1.15.2+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  /** Inherited from modal_dialog, implemented by REGISTER_DIALOG. */
47  virtual const std::string& window_id() const override;
48 
49  /** Inherited from modal_dialog. */
50  virtual void pre_show(window& window) override;
51 
52  /** Inherited from modal_dialog. */
53  virtual void post_show(window& window) override;
54 
55  void update_relation();
56 
58 
60 
62 
63  void start_whisper_button_callback(window& w);
64 
65  void check_status_button_callback(window& w);
66 
67  void kick_button_callback(window& w);
68 
69  void kick_ban_button_callback(window& w);
70 
71  void stopgame_button_callback(window& w);
72 
73  void do_stopgame();
74 
75  void do_kick_ban(bool ban);
76 
78 
80 
82 
84 
86 
88 
90 
92 
94 
96 };
97 
98 } // namespace dialogs
99 } // end namespace gui2
virtual void pre_show(window &window) override
Inherited from modal_dialog.
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
void stopgame_button_callback(window &w)
void start_whisper_button_callback(window &w)
void check_status_button_callback(window &w)
logger & info()
Definition: log.cpp:90
This class represents the collective information the client has about the players and games on the se...
Definition: lobby_info.hpp:30
Label showing a text.
Definition: label.hpp:32
Class for a single line text area.
Definition: text_box.hpp:121
const mp::lobby_info & lobby_info_
Definition: player_info.hpp:95
Generic file dialog.
Definition: field-fwd.hpp:22
virtual const std::string & window_id() const override
Inherited from modal_dialog, implemented by REGISTER_DIALOG.
void kick_ban_button_callback(window &w)
Various uncategorised dialogs.
events::chat_handler & chat_
Definition: player_info.hpp:77
int w
virtual void post_show(window &window) override
Inherited from modal_dialog.
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:63