The Battle for Wesnoth  1.15.2+dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
gui2::dialogs::lobby_player_info Class Reference

#include <player_info.hpp>

Inheritance diagram for gui2::dialogs::lobby_player_info:
Inheritance graph

Public Member Functions

 lobby_player_info (events::chat_handler &chat, mp::user_info &info, const mp::lobby_info &li)
 
 ~lobby_player_info ()
 
bool result_open_whisper () const
 
- Public Member Functions inherited from gui2::dialogs::modal_dialog
 modal_dialog ()
 
virtual ~modal_dialog ()
 
bool show (const unsigned auto_close_time=0)
 Shows the window. More...
 
windowget_window () const
 Returns a pointer to the dialog's window. More...
 
int get_retval () const
 
void set_always_save_fields (const bool always_save_fields)
 
void set_restore (const bool restore)
 
void set_allow_plugin_skip (const bool allow_plugin_skip)
 
void set_show_even_without_video (const bool show_even_without_video)
 

Private Member Functions

virtual const std::string & window_id () const override
 Inherited from modal_dialog, implemented by REGISTER_DIALOG. More...
 
virtual void pre_show (window &window) override
 Inherited from modal_dialog. More...
 
virtual void post_show (window &window) override
 Inherited from modal_dialog. More...
 
void update_relation ()
 
void add_to_friends_button_callback ()
 
void add_to_ignores_button_callback ()
 
void remove_from_list_button_callback ()
 
void start_whisper_button_callback (window &w)
 
void check_status_button_callback (window &w)
 
void kick_button_callback (window &w)
 
void kick_ban_button_callback (window &w)
 
void stopgame_button_callback (window &w)
 
void do_stopgame ()
 
void do_kick_ban (bool ban)
 

Private Attributes

events::chat_handlerchat_
 
mp::user_infoinfo_
 
text_boxreason_
 
text_boxtime_
 
labelrelation_
 
buttonadd_to_friends_
 
buttonadd_to_ignores_
 
buttonremove_from_list_
 
bool result_open_whisper_
 
const mp::lobby_infolobby_info_
 

Additional Inherited Members

- Protected Member Functions inherited from gui2::dialogs::modal_dialog
field_boolregister_bool (const std::string &id, const bool mandatory, const std::function< bool()> callback_load_value=nullptr, const std::function< void(bool)> callback_save_value=nullptr, const std::function< void(widget &)> callback_change=nullptr, const bool initial_fire=false)
 Creates a new boolean field. More...
 
field_boolregister_bool (const std::string &id, const bool mandatory, bool &linked_variable, const std::function< void(widget &)> callback_change=nullptr, const bool initial_fire=false)
 Creates a new boolean field. More...
 
field_integerregister_integer (const std::string &id, const bool mandatory, const std::function< int()> callback_load_value=nullptr, const std::function< void(int)> callback_save_value=nullptr)
 Creates a new integer field. More...
 
field_integerregister_integer (const std::string &id, const bool mandatory, int &linked_variable)
 Creates a new integer field. More...
 
field_textregister_text (const std::string &id, const bool mandatory, const std::function< std::string()> callback_load_value=nullptr, const std::function< void(const std::string &)> callback_save_value=nullptr, const bool capture_focus=false)
 Creates a new text field. More...
 
field_textregister_text (const std::string &id, const bool mandatory, std::string &linked_variable, const bool capture_focus=false)
 Creates a new text field. More...
 
field_labelregister_label (const std::string &id, const bool mandatory, const std::string &text, const bool use_markup=false)
 Registers a new styled_widget as a label. More...
 
field_labelregister_image (const std::string &id, const bool mandatory, const std::string &filename)
 Registers a new styled_widget as image. More...
 
- Protected Attributes inherited from gui2::dialogs::modal_dialog
std::unique_ptr< windowwindow_
 The window object build for this dialog. More...
 

Detailed Description

Definition at line 31 of file player_info.hpp.

Constructor & Destructor Documentation

◆ lobby_player_info()

gui2::dialogs::lobby_player_info::lobby_player_info ( events::chat_handler chat,
mp::user_info info,
const mp::lobby_info li 
)

Definition at line 36 of file player_info.cpp.

◆ ~lobby_player_info()

gui2::dialogs::lobby_player_info::~lobby_player_info ( )

Definition at line 52 of file player_info.cpp.

Member Function Documentation

◆ add_to_friends_button_callback()

void gui2::dialogs::lobby_player_info::add_to_friends_button_callback ( )
private

◆ add_to_ignores_button_callback()

void gui2::dialogs::lobby_player_info::add_to_ignores_button_callback ( )
private

◆ check_status_button_callback()

void gui2::dialogs::lobby_player_info::check_status_button_callback ( window w)
private

◆ do_kick_ban()

void gui2::dialogs::lobby_player_info::do_kick_ban ( bool  ban)
private

◆ do_stopgame()

void gui2::dialogs::lobby_player_info::do_stopgame ( )
private

◆ kick_ban_button_callback()

void gui2::dialogs::lobby_player_info::kick_ban_button_callback ( window w)
private

Definition at line 207 of file player_info.cpp.

References gui2::window::close(), and do_kick_ban().

Referenced by pre_show(), and result_open_whisper().

◆ kick_button_callback()

void gui2::dialogs::lobby_player_info::kick_button_callback ( window w)
private

Definition at line 201 of file player_info.cpp.

References gui2::window::close(), and do_kick_ban().

Referenced by pre_show(), and result_open_whisper().

◆ post_show()

void gui2::dialogs::lobby_player_info::post_show ( window window)
overrideprivatevirtual

Inherited from modal_dialog.

Reimplemented from gui2::dialogs::modal_dialog.

Definition at line 135 of file player_info.cpp.

Referenced by result_open_whisper().

◆ pre_show()

void gui2::dialogs::lobby_player_info::pre_show ( window window)
overrideprivatevirtual

◆ remove_from_list_button_callback()

void gui2::dialogs::lobby_player_info::remove_from_list_button_callback ( )
private

◆ result_open_whisper()

bool gui2::dialogs::lobby_player_info::result_open_whisper ( ) const
inline

◆ start_whisper_button_callback()

void gui2::dialogs::lobby_player_info::start_whisper_button_callback ( window w)
private

Definition at line 189 of file player_info.cpp.

References gui2::window::close(), and result_open_whisper_.

Referenced by pre_show(), and result_open_whisper().

◆ stopgame_button_callback()

void gui2::dialogs::lobby_player_info::stopgame_button_callback ( window w)
private

Definition at line 213 of file player_info.cpp.

References gui2::window::close(), and do_stopgame().

Referenced by pre_show(), and result_open_whisper().

◆ update_relation()

void gui2::dialogs::lobby_player_info::update_relation ( )
private

◆ window_id()

virtual const std::string& gui2::dialogs::lobby_player_info::window_id ( ) const
overrideprivatevirtual

Inherited from modal_dialog, implemented by REGISTER_DIALOG.

Implements gui2::dialogs::modal_dialog.

Referenced by result_open_whisper().

Member Data Documentation

◆ add_to_friends_

button* gui2::dialogs::lobby_player_info::add_to_friends_
private

Definition at line 87 of file player_info.hpp.

Referenced by pre_show(), and update_relation().

◆ add_to_ignores_

button* gui2::dialogs::lobby_player_info::add_to_ignores_
private

Definition at line 89 of file player_info.hpp.

Referenced by pre_show(), and update_relation().

◆ chat_

events::chat_handler& gui2::dialogs::lobby_player_info::chat_
private

Definition at line 77 of file player_info.hpp.

Referenced by check_status_button_callback(), do_kick_ban(), and do_stopgame().

◆ info_

mp::user_info& gui2::dialogs::lobby_player_info::info_
private

◆ lobby_info_

const mp::lobby_info& gui2::dialogs::lobby_player_info::lobby_info_
private

Definition at line 95 of file player_info.hpp.

Referenced by pre_show().

◆ reason_

text_box* gui2::dialogs::lobby_player_info::reason_
private

Definition at line 81 of file player_info.hpp.

Referenced by do_kick_ban(), do_stopgame(), and pre_show().

◆ relation_

label* gui2::dialogs::lobby_player_info::relation_
private

Definition at line 85 of file player_info.hpp.

Referenced by pre_show(), and update_relation().

◆ remove_from_list_

button* gui2::dialogs::lobby_player_info::remove_from_list_
private

Definition at line 91 of file player_info.hpp.

Referenced by pre_show(), and update_relation().

◆ result_open_whisper_

bool gui2::dialogs::lobby_player_info::result_open_whisper_
private

Definition at line 93 of file player_info.hpp.

Referenced by result_open_whisper(), and start_whisper_button_callback().

◆ time_

text_box* gui2::dialogs::lobby_player_info::time_
private

Definition at line 83 of file player_info.hpp.

Referenced by do_kick_ban(), and pre_show().


The documentation for this class was generated from the following files: