The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
gui2::tlobby_main Class Reference

#include <lobby.hpp>

Inheritance diagram for gui2::tlobby_main:
Inheritance graph

Public Types

enum  legacy_result {
  QUIT, JOIN, OBSERVE, CREATE,
  PREFERENCES
}
 
enum  t_notify_mode {
  NOTIFY_NONE, NOTIFY_MESSAGE, NOTIFY_MESSAGE_OTHER_WINDOW, NOTIFY_SERVER_MESSAGE,
  NOTIFY_OWN_NICK, NOTIFY_FRIEND_MESSAGE, NOTIFY_WHISPER, NOTIFY_WHISPER_OTHER_WINDOW,
  NOTIFY_LOBBY_JOIN, NOTIFY_LOBBY_QUIT, NOTIFY_COUNT
}
 

Public Member Functions

 tlobby_main (const config &game_config, lobby_info &info, CVideo &video, twesnothd_connection &wesnothd_connection)
 
 ~tlobby_main ()
 
void set_preferences_callback (std::function< void()> f)
 Set the callback used to show the preferences. More...
 
void update_gamelist ()
 
void send_to_server (const config &cfg) override
 
void update_playerlist ()
 
legacy_result get_legacy_result () const
 
void do_notify (t_notify_mode mode)
 
void do_notify (t_notify_mode mode, const std::string &sender, const std::string &message)
 
- Public Member Functions inherited from gui2::tdialog
 tdialog ()
 
virtual ~tdialog ()
 
bool show (CVideo &video, const unsigned auto_close_time=0)
 Shows the window. More...
 
int get_retval () const
 
void set_always_save_fields (const bool always_save_fields)
 
void set_restore (const bool restore)
 

Protected Member Functions

void update_gamelist_header ()
 
void update_gamelist_diff ()
 
void update_gamelist_filter ()
 
std::map< std::string, string_mapmake_game_row_data (const game_info &game)
 
void adjust_game_row_contents (const game_info &game, int idx, tgrid *grid)
 
virtual void send_chat_message (const std::string &message, bool)
 inherited form chat_handler More...
 
virtual void user_relation_changed (const std::string &name)
 Called when a processed command results in a relation (friend/ignore) change for a user whose name is passed as the 'name' arg. More...
 
virtual void add_chat_message (const time_t &time, const std::string &speaker, int side, const std::string &message, events::chat_handler::MESSAGE_TYPE type=events::chat_handler::MESSAGE_PRIVATE)
 inherited form chat_handler More...
 
virtual void add_whisper_sent (const std::string &receiver, const std::string &message)
 inherited form chat_handler More...
 
virtual void add_whisper_received (const std::string &sender, const std::string &message)
 inherited form chat_handler More...
 
virtual void add_chat_room_message_sent (const std::string &room, const std::string &message)
 inherited form chat_handler More...
 
virtual void add_chat_room_message_received (const std::string &room, const std::string &speaker, const std::string &message)
 inherited form chat_handler More...
 
- Protected Member Functions inherited from gui2::tdialog
tfield_boolregister_bool (const std::string &id, const bool mandatory, const std::function< bool()> &callback_load_value=std::function< bool()>(), const std::function< void(const bool)> &callback_save_value=std::function< void(const bool)>(), const std::function< void(twidget &)> &callback_change=std::function< void(twidget &)>())
 Creates a new boolean field. More...
 
tfield_boolregister_bool (const std::string &id, const bool mandatory, bool &linked_variable, const std::function< void(twidget &)> &callback_change=std::function< void(twidget &)>())
 Creates a new boolean field. More...
 
tfield_integerregister_integer (const std::string &id, const bool mandatory, const std::function< int()> &callback_load_value=std::function< int()>(), const std::function< void(const int)> &callback_save_value=std::function< void(const int)>())
 Creates a new integer field. More...
 
tfield_integerregister_integer (const std::string &id, const bool mandatory, int &linked_variable)
 Creates a new integer field. More...
 
tfield_textregister_text (const std::string &id, const bool mandatory, const std::function< std::string()> &callback_load_value=std::function< std::string()>(), const std::function< void(const std::string &)> &callback_save_value=std::function< void(const std::string &)>(), const bool capture_focus=false)
 Creates a new text field. More...
 
tfield_textregister_text (const std::string &id, const bool mandatory, std::string &linked_variable, const bool capture_focus=false)
 Creates a new text field. More...
 
tfield_labelregister_label (const std::string &id, const bool mandatory, const std::string &text, const bool use_markup=false)
 Registers a new control as a label. More...
 
tfield_labelregister_image (const std::string &id, const bool mandatory, const std::string &filename)
 Registers a new control as image. More...
 

Private Member Functions

void update_selected_game ()
 
void append_to_chatbox (const std::string &text, const bool force_scroll=false)
 Append some text to the active chat log. More...
 
void append_to_chatbox (const std::string &text, size_t id, const bool force_scroll=false)
 Append some text to the chat log for window "id". More...
 
room_infoactive_window_room ()
 Get the room* corresponding to the currently active window, or nullptr if a whisper window is active at the moment. More...
 
tlobby_chat_windowroom_window_open (const std::string &room, bool open_new)
 Check if a room window for "room" is open, if open_new is true then it will be created if not found. More...
 
tlobby_chat_windowwhisper_window_open (const std::string &name, bool open_new)
 Check if a whisper window for user "name" is open, if open_new is true then it will be created if not found. More...
 
tlobby_chat_windowsearch_create_window (const std::string &name, bool whisper, bool open_new)
 Helper function to find and open a new window, used by *_window_open. More...
 
bool whisper_window_active (const std::string &name)
 
bool room_window_active (const std::string &room)
 
void increment_waiting_whsipers (const std::string &name)
 Mark the whisper window for "name" as having one more pending message. More...
 
void increment_waiting_messages (const std::string &room)
 Mark the room window for "room" as having one more pending message. More...
 
void add_whisper_window_whisper (const std::string &sender, const std::string &message)
 Add a whisper message to the whisper window. More...
 
void add_active_window_whisper (const std::string &sender, const std::string &message, const bool force_scroll=false)
 Add a whisper message to the current window which is not the whisper window for "name". More...
 
void add_room_window_message (const std::string &room, const std::string &sender, const std::string &message)
 Add a message to the window for room "room". More...
 
void add_active_window_message (const std::string &sender, const std::string &message, const bool force_scroll=false)
 Add a message to the window for room "room". More...
 
void switch_to_window (tlobby_chat_window *t)
 Switch to the window given by a valid pointer (e.g. More...
 
void switch_to_window (size_t id)
 
void active_window_changed ()
 
void close_active_window ()
 
void close_window (size_t idx)
 
void network_handler ()
 Network polling callback. More...
 
void process_network_data (const config &data)
 
void process_message (const config &data, bool whisper=false)
 
void process_gamelist (const config &data)
 
void process_gamelist_diff (const config &data)
 
void process_room_join (const config &data)
 
void process_room_part (const config &data)
 
void process_room_query_response (const config &data)
 
void join_button_callback (twindow &window)
 
void observe_button_callback (twindow &window)
 
void join_global_button_callback (twindow &window)
 
void observe_global_button_callback (twindow &window)
 
void join_or_observe (int index)
 
bool do_game_join (int idx, bool observe)
 Assemble and send a game join request. More...
 
void send_message_button_callback (twindow &window)
 
void send_message_to_active_window (const std::string &input)
 
void close_window_button_callback (size_t idx)
 
void create_button_callback (twindow &window)
 
void show_preferences_button_callback (twindow &window)
 
void refresh_button_callback (twindow &window)
 
void quit_button_callback (twindow &window)
 
void room_switch_callback (twindow &window)
 
void chat_input_keypress_callback (bool &handled, bool &halt, const SDLKey key, twindow &window)
 
void game_filter_reload ()
 
void game_filter_change_callback (twidget &widget)
 
void game_filter_keypress_callback (const SDLKey key)
 
void gamelist_change_callback (twindow &window)
 
void player_filter_callback (twidget &widget)
 
void user_dialog_callback (user_info *info)
 
void skip_replay_changed_callback (twidget &w)
 
virtual const std::stringwindow_id () const
 Inherited from tdialog, implemented by REGISTER_DIALOG. More...
 
virtual void post_build (twindow &window)
 Inherited from tdialog. More...
 
void pre_show (twindow &window)
 Inherited from tdialog. More...
 
void post_show (twindow &window)
 Inherited from tdialog. More...
 
- Private Member Functions inherited from events::chat_handler
 chat_handler ()
 
virtual ~chat_handler ()
 
void send_command (const std::string &cmd, const std::string &args="")
 
void do_speak (const std::string &message, bool allies_only=false)
 
virtual void send_whisper (const std::string &receiver, const std::string &message)
 
virtual void send_chat_room_message (const std::string &room, const std::string &message)
 
void change_logging (const std::string &data)
 Change the log level of a log domain. More...
 

Private Attributes

legacy_result legacy_result_
 Result flag for interfacing with other MP dialogs. More...
 
const configgame_config_
 
tlistboxgamelistbox_
 
tlistboxuserlistbox_
 
tlistboxroomlistbox_
 
tmulti_pagechat_log_container_
 
ttext_boxchat_input_
 
twindowwindow_
 
lobby_infolobby_info_
 
std::function< void()> preferences_callback_
 
std::vector< tlobby_chat_windowopen_windows_
 This represents the open chat windows (rooms and whispers at the moment) with 1 to 1 correspondence to what the user sees in the interface. More...
 
size_t active_window_
 
ttoggle_buttonfilter_friends_
 
ttoggle_buttonfilter_ignored_
 
ttoggle_buttonfilter_slots_
 
ttoggle_buttonfilter_invert_
 
ttext_boxfilter_text_
 
int selected_game_id_
 
tplayer_list player_list_
 
bool player_list_dirty_
 
bool gamelist_dirty_
 
unsigned last_gamelist_update_
 
bool gamelist_diff_update_
 
CVideovideo_
 
twesnothd_connectionwesnothd_connection_
 
size_t lobby_update_timer_
 Timer for updating the lobby. More...
 
std::function< void()> preferences_wrapper_
 Wrapper for the preferences hotkey. More...
 
std::vector< intgamelist_id_at_row_
 
bool delay_playerlist_update_
 
bool delay_gamelist_update_
 

Friends

struct lobby_delay_gamelist_update_guard
 

Additional Inherited Members

- Private Types inherited from events::chat_handler
enum  MESSAGE_TYPE { MESSAGE_PUBLIC, MESSAGE_PRIVATE }
 

Detailed Description

Definition at line 85 of file lobby.hpp.

Member Enumeration Documentation

Enumerator
QUIT 
JOIN 
OBSERVE 
CREATE 
PREFERENCES 

Definition at line 115 of file lobby.hpp.

Enumerator
NOTIFY_NONE 
NOTIFY_MESSAGE 
NOTIFY_MESSAGE_OTHER_WINDOW 
NOTIFY_SERVER_MESSAGE 
NOTIFY_OWN_NICK 
NOTIFY_FRIEND_MESSAGE 
NOTIFY_WHISPER 
NOTIFY_WHISPER_OTHER_WINDOW 
NOTIFY_LOBBY_JOIN 
NOTIFY_LOBBY_QUIT 
NOTIFY_COUNT 

Definition at line 128 of file lobby.hpp.

Constructor & Destructor Documentation

gui2::tlobby_main::tlobby_main ( const config game_config,
lobby_info info,
CVideo video,
twesnothd_connection wesnothd_connection 
)

Definition at line 339 of file lobby.cpp.

gui2::tlobby_main::~tlobby_main ( )

Definition at line 393 of file lobby.cpp.

References lobby_update_timer_, and gui2::remove_timer().

Member Function Documentation

void gui2::tlobby_main::active_window_changed ( )
private
room_info * gui2::tlobby_main::active_window_room ( )
private

Get the room* corresponding to the currently active window, or nullptr if a whisper window is active at the moment.

Definition at line 1040 of file lobby.cpp.

References active_window_, lobby_info::get_room(), lobby_info_, gui2::tlobby_chat_window::name, open_windows_, and gui2::tlobby_chat_window::whisper.

Referenced by process_room_join(), process_room_part(), process_room_query_response(), and update_playerlist().

void gui2::tlobby_main::add_active_window_message ( const std::string sender,
const std::string message,
const bool  force_scroll = false 
)
private

Add a message to the window for room "room".

Definition at line 1195 of file lobby.cpp.

References append_to_chatbox(), and font::escape_text().

Referenced by add_chat_room_message_received(), add_chat_room_message_sent(), add_whisper_received(), add_whisper_sent(), and process_room_query_response().

void gui2::tlobby_main::add_active_window_whisper ( const std::string sender,
const std::string message,
const bool  force_scroll = false 
)
private

Add a whisper message to the current window which is not the whisper window for "name".

Definition at line 1170 of file lobby.cpp.

References append_to_chatbox(), and font::escape_text().

Referenced by add_whisper_received(), and add_whisper_sent().

void gui2::tlobby_main::add_chat_message ( const time_t &  time,
const std::string speaker,
int  side,
const std::string message,
events::chat_handler::MESSAGE_TYPE  type = events::chat_handler::MESSAGE_PRIVATE 
)
protectedvirtual

inherited form chat_handler

Implements events::chat_handler.

Definition at line 184 of file lobby.cpp.

References append_to_chatbox(), and font::escape_text().

Referenced by send_chat_message().

void gui2::tlobby_main::add_chat_room_message_received ( const std::string room,
const std::string speaker,
const std::string message 
)
protectedvirtual
void gui2::tlobby_main::add_chat_room_message_sent ( const std::string room,
const std::string message 
)
protectedvirtual
void gui2::tlobby_main::add_room_window_message ( const std::string room,
const std::string sender,
const std::string message 
)
private

Add a message to the window for room "room".

Definition at line 1180 of file lobby.cpp.

References append_to_chatbox(), ERR_LB, font::escape_text(), open_windows_, and room_window_open().

Referenced by add_chat_room_message_received(), process_room_join(), and process_room_part().

void gui2::tlobby_main::add_whisper_received ( const std::string sender,
const std::string message 
)
protectedvirtual
void gui2::tlobby_main::add_whisper_sent ( const std::string receiver,
const std::string message 
)
protectedvirtual
void gui2::tlobby_main::add_whisper_window_whisper ( const std::string sender,
const std::string message 
)
private

Add a whisper message to the whisper window.

Definition at line 1156 of file lobby.cpp.

References append_to_chatbox(), ERR_LB, open_windows_, and whisper_window_open().

Referenced by add_whisper_received().

void gui2::tlobby_main::adjust_game_row_contents ( const game_info game,
int  idx,
tgrid grid 
)
protected
void gui2::tlobby_main::append_to_chatbox ( const std::string text,
const bool  force_scroll = false 
)
private
void gui2::tlobby_main::append_to_chatbox ( const std::string text,
size_t  id,
const bool  force_scroll = false 
)
private
void gui2::tlobby_main::chat_input_keypress_callback ( bool &  handled,
bool &  halt,
const SDLKey  key,
twindow window 
)
private
void gui2::tlobby_main::close_active_window ( )
private

Definition at line 1235 of file lobby.cpp.

References active_window_, close_window(), and DBG_LB.

void gui2::tlobby_main::close_window ( size_t  idx)
private
void gui2::tlobby_main::close_window_button_callback ( size_t  idx)
private

Definition at line 1596 of file lobby.cpp.

References close_window().

Referenced by search_create_window().

void gui2::tlobby_main::create_button_callback ( gui2::twindow window)
private

Definition at line 1601 of file lobby.cpp.

References gui2::twindow::close(), CREATE, and legacy_result_.

Referenced by pre_show().

bool gui2::tlobby_main::do_game_join ( int  idx,
bool  observe 
)
private

Assemble and send a game join request.

Ask for password if the game requires one.

Returns
true iff the request was actually sent, false if not for some reason like user canceled the password dialog or idx was invalid.

Definition at line 1525 of file lobby.cpp.

References config::add_child(), game_info::can_join(), game_info::can_observe(), ERR_LB, gui2::tmp_join_game_password_prompt::execute(), lobby_info::games(), game_info::id, utils::join(), lobby_info_, preferences::prv::password, game_info::password_required, twesnothd_connection::send_data(), game_info::started, video_, and wesnothd_connection_.

Referenced by join_global_button_callback(), join_or_observe(), and observe_global_button_callback().

void gui2::tlobby_main::do_notify ( t_notify_mode  mode)
inline
void gui2::tlobby_main::do_notify ( t_notify_mode  mode,
const std::string sender,
const std::string message 
)
void gui2::tlobby_main::game_filter_change_callback ( gui2::twidget widget)
private

Definition at line 1706 of file lobby.cpp.

References game_filter_reload(), and update_gamelist_filter().

Referenced by pre_show().

void gui2::tlobby_main::game_filter_keypress_callback ( const SDLKey  key)
private

Definition at line 1698 of file lobby.cpp.

References game_filter_reload(), and update_gamelist_filter().

Referenced by pre_show().

void gui2::tlobby_main::game_filter_reload ( )
private
void gui2::tlobby_main::gamelist_change_callback ( gui2::twindow window)
private

Definition at line 1712 of file lobby.cpp.

References update_selected_game().

Referenced by pre_show().

legacy_result gui2::tlobby_main::get_legacy_result ( ) const
inline

Definition at line 123 of file lobby.hpp.

References legacy_result_.

Referenced by enter_lobby_mode().

void gui2::tlobby_main::increment_waiting_messages ( const std::string room)
private

Mark the room window for "room" as having one more pending message.

Definition at line 1137 of file lobby.cpp.

References DBG_LB, gui2::tlistbox::get_row_grid(), preferences::grid(), open_windows_, room_window_open(), roomlistbox_, and gui2::twidget::tvisible::visible.

Referenced by add_chat_room_message_received().

void gui2::tlobby_main::increment_waiting_whsipers ( const std::string name)
private

Mark the whisper window for "name" as having one more pending message.

Definition at line 1119 of file lobby.cpp.

References DBG_LB, gui2::tlistbox::get_row_grid(), preferences::grid(), open_windows_, roomlistbox_, gui2::twidget::tvisible::visible, and whisper_window_open().

Referenced by add_whisper_received().

void gui2::tlobby_main::join_button_callback ( gui2::twindow window)
private

Definition at line 1486 of file lobby.cpp.

References join_global_button_callback(), and LOG_LB.

Referenced by adjust_game_row_contents().

void gui2::tlobby_main::join_global_button_callback ( gui2::twindow window)
private
void gui2::tlobby_main::join_or_observe ( int  index)
private
std::map< std::string, string_map > gui2::tlobby_main::make_game_row_data ( const game_info game)
protected
void gui2::tlobby_main::network_handler ( )
private
void gui2::tlobby_main::observe_button_callback ( gui2::twindow window)
private

Definition at line 1492 of file lobby.cpp.

References LOG_LB, and observe_global_button_callback().

Referenced by adjust_game_row_contents().

void gui2::tlobby_main::observe_global_button_callback ( gui2::twindow window)
private
void gui2::tlobby_main::player_filter_callback ( gui2::twidget widget)
private
void gui2::tlobby_main::post_build ( twindow window)
privatevirtual

Inherited from tdialog.

Todo:
Should become a global hotkey after 1.8, then remove it here.

Reimplemented from gui2::tdialog.

Definition at line 408 of file lobby.cpp.

References gui2::fullscreen(), gui2::function_wrapper(), hotkey::HOTKEY_FULLSCREEN, hotkey::HOTKEY_PREFERENCES, preferences_wrapper_, gui2::event::tdispatcher::register_hotkey(), show_preferences_button_callback(), and gui2::twindow::video().

void gui2::tlobby_main::post_show ( twindow window)
privatevirtual

Inherited from tdialog.

Reimplemented from gui2::tdialog.

Definition at line 1033 of file lobby.cpp.

References lobby_update_timer_, gui2::remove_timer(), and window_.

void gui2::tlobby_main::pre_show ( twindow window)
privatevirtual
void gui2::tlobby_main::process_gamelist ( const config data)
private
void gui2::tlobby_main::process_gamelist_diff ( const config data)
private
void gui2::tlobby_main::process_message ( const config data,
bool  whisper = false 
)
private
void gui2::tlobby_main::process_network_data ( const config data)
private
void gui2::tlobby_main::process_room_join ( const config data)
private
void gui2::tlobby_main::process_room_part ( const config data)
private
void gui2::tlobby_main::process_room_query_response ( const config data)
private
void gui2::tlobby_main::quit_button_callback ( twindow window)
private
void gui2::tlobby_main::refresh_button_callback ( gui2::twindow window)
private

Definition at line 1607 of file lobby.cpp.

References twesnothd_connection::send_data(), and wesnothd_connection_.

Referenced by pre_show().

void gui2::tlobby_main::room_switch_callback ( twindow window)
private

Definition at line 1629 of file lobby.cpp.

References gui2::tlistbox::get_selected_row(), roomlistbox_, and switch_to_window().

Referenced by pre_show().

bool gui2::tlobby_main::room_window_active ( const std::string room)
private
Returns
true if the room window for "room" is the active window

Definition at line 1113 of file lobby.cpp.

References active_window_, gui2::tlobby_chat_window::name, open_windows_, and gui2::tlobby_chat_window::whisper.

Referenced by add_chat_room_message_received(), and add_chat_room_message_sent().

tlobby_chat_window * gui2::tlobby_main::room_window_open ( const std::string room,
bool  open_new 
)
private

Check if a room window for "room" is open, if open_new is true then it will be created if not found.

Returns
valid ptr if the window was found or added, null otherwise

Definition at line 1048 of file lobby.cpp.

References search_create_window().

Referenced by add_chat_room_message_sent(), add_room_window_message(), increment_waiting_messages(), pre_show(), process_room_join(), and process_room_query_response().

tlobby_chat_window * gui2::tlobby_main::search_create_window ( const std::string name,
bool  whisper,
bool  open_new 
)
private
void gui2::tlobby_main::send_chat_message ( const std::string message,
bool   
)
protectedvirtual
void gui2::tlobby_main::send_message_button_callback ( gui2::twindow window)
private
void gui2::tlobby_main::send_message_to_active_window ( const std::string input)
private
void gui2::tlobby_main::send_to_server ( const config cfg)
overridevirtual

Implements events::chat_handler.

Definition at line 1768 of file lobby.cpp.

References twesnothd_connection::send_data(), and wesnothd_connection_.

void gui2::tlobby_main::set_preferences_callback ( std::function< void()>  f)

Set the callback used to show the preferences.

Definition at line 388 of file lobby.cpp.

References preferences_callback_.

Referenced by enter_lobby_mode().

void gui2::tlobby_main::show_preferences_button_callback ( gui2::twindow window)
private

The screen size might have changed force an update of the size.

Todo:
This might no longer be needed when gui2 is done.

Definition at line 1613 of file lobby.cpp.

References gui2::twindow::invalidate_layout(), preferences_callback_, twesnothd_connection::send_data(), and wesnothd_connection_.

Referenced by post_build(), and pre_show().

void gui2::tlobby_main::skip_replay_changed_callback ( twidget w)
private

Definition at line 1763 of file lobby.cpp.

References gui2::tselectable_::get_value_bool(), and preferences::set_skip_mp_replay().

Referenced by pre_show().

void gui2::tlobby_main::switch_to_window ( tlobby_chat_window t)
private

Switch to the window given by a valid pointer (e.g.

received from a call to *_window_open)

Definition at line 1204 of file lobby.cpp.

References open_windows_.

Referenced by add_chat_room_message_sent(), add_whisper_sent(), process_room_join(), room_switch_callback(), and user_dialog_callback().

void gui2::tlobby_main::switch_to_window ( size_t  id)
private
void gui2::tlobby_main::update_gamelist ( )
void gui2::tlobby_main::update_gamelist_diff ( )
protected
void gui2::tlobby_main::update_gamelist_filter ( )
protected
void gui2::tlobby_main::update_gamelist_header ( )
protected
void gui2::tlobby_main::update_playerlist ( )
void gui2::tlobby_main::update_selected_game ( )
private
void gui2::tlobby_main::user_dialog_callback ( user_info info)
private
void gui2::tlobby_main::user_relation_changed ( const std::string name)
protectedvirtual

Called when a processed command results in a relation (friend/ignore) change for a user whose name is passed as the 'name' arg.

Reimplemented from events::chat_handler.

Definition at line 179 of file lobby.cpp.

References player_list_dirty_.

bool gui2::tlobby_main::whisper_window_active ( const std::string name)
private
Returns
true if the whisper window for "name" is the active window

Definition at line 1107 of file lobby.cpp.

References active_window_, gui2::tlobby_chat_window::name, open_windows_, and gui2::tlobby_chat_window::whisper.

Referenced by add_whisper_received(), and add_whisper_sent().

tlobby_chat_window * gui2::tlobby_main::whisper_window_open ( const std::string name,
bool  open_new 
)
private

Check if a whisper window for user "name" is open, if open_new is true then it will be created if not found.

Returns
valid ptr if the window was found or added, null otherwise

Definition at line 1054 of file lobby.cpp.

References search_create_window().

Referenced by add_whisper_received(), add_whisper_sent(), add_whisper_window_whisper(), increment_waiting_whsipers(), and user_dialog_callback().

virtual const std::string& gui2::tlobby_main::window_id ( ) const
privatevirtual

Inherited from tdialog, implemented by REGISTER_DIALOG.

Implements gui2::tdialog.

Friends And Related Function Documentation

friend struct lobby_delay_gamelist_update_guard
friend

Definition at line 435 of file lobby.hpp.

Member Data Documentation

size_t gui2::tlobby_main::active_window_
private
ttext_box* gui2::tlobby_main::chat_input_
private

Definition at line 381 of file lobby.hpp.

Referenced by chat_input_keypress_callback(), pre_show(), and send_message_button_callback().

tmulti_page* gui2::tlobby_main::chat_log_container_
private
bool gui2::tlobby_main::delay_gamelist_update_
private
bool gui2::tlobby_main::delay_playerlist_update_
private

Definition at line 431 of file lobby.hpp.

Referenced by update_playerlist(), and user_dialog_callback().

ttoggle_button* gui2::tlobby_main::filter_friends_
private

Definition at line 397 of file lobby.hpp.

Referenced by game_filter_reload(), and pre_show().

ttoggle_button* gui2::tlobby_main::filter_ignored_
private

Definition at line 399 of file lobby.hpp.

Referenced by game_filter_reload(), and pre_show().

ttoggle_button* gui2::tlobby_main::filter_invert_
private

Definition at line 403 of file lobby.hpp.

Referenced by game_filter_reload(), and pre_show().

ttoggle_button* gui2::tlobby_main::filter_slots_
private

Definition at line 401 of file lobby.hpp.

Referenced by game_filter_reload(), and pre_show().

ttext_box* gui2::tlobby_main::filter_text_
private

Definition at line 405 of file lobby.hpp.

Referenced by game_filter_reload(), and pre_show().

const config& gui2::tlobby_main::game_config_
private

Definition at line 371 of file lobby.hpp.

Referenced by adjust_game_row_contents().

bool gui2::tlobby_main::gamelist_diff_update_
private

Definition at line 417 of file lobby.hpp.

Referenced by network_handler(), and process_gamelist().

bool gui2::tlobby_main::gamelist_dirty_
private
std::vector<int> gui2::tlobby_main::gamelist_id_at_row_
private

Definition at line 429 of file lobby.hpp.

Referenced by update_gamelist(), and update_gamelist_diff().

tlistbox* gui2::tlobby_main::gamelistbox_
private
unsigned gui2::tlobby_main::last_gamelist_update_
private

Definition at line 415 of file lobby.hpp.

Referenced by network_handler(), update_gamelist(), and update_gamelist_diff().

legacy_result gui2::tlobby_main::legacy_result_
private

Result flag for interfacing with other MP dialogs.

Definition at line 193 of file lobby.hpp.

Referenced by create_button_callback(), get_legacy_result(), join_global_button_callback(), join_or_observe(), and observe_global_button_callback().

lobby_info& gui2::tlobby_main::lobby_info_
private
size_t gui2::tlobby_main::lobby_update_timer_
private

Timer for updating the lobby.

Definition at line 424 of file lobby.hpp.

Referenced by post_show(), pre_show(), and ~tlobby_main().

std::vector<tlobby_chat_window> gui2::tlobby_main::open_windows_
private

This represents the open chat windows (rooms and whispers at the moment) with 1 to 1 correspondence to what the user sees in the interface.

Definition at line 393 of file lobby.hpp.

Referenced by active_window_changed(), active_window_room(), add_room_window_message(), add_whisper_window_whisper(), close_window(), increment_waiting_messages(), increment_waiting_whsipers(), room_window_active(), search_create_window(), send_message_to_active_window(), switch_to_window(), and whisper_window_active().

tplayer_list gui2::tlobby_main::player_list_
private

Definition at line 409 of file lobby.hpp.

Referenced by player_filter_callback(), pre_show(), and update_playerlist().

bool gui2::tlobby_main::player_list_dirty_
private
std::function<void()> gui2::tlobby_main::preferences_callback_
private

Definition at line 387 of file lobby.hpp.

Referenced by set_preferences_callback(), and show_preferences_button_callback().

std::function<void()> gui2::tlobby_main::preferences_wrapper_
private

Wrapper for the preferences hotkey.

Definition at line 427 of file lobby.hpp.

Referenced by post_build().

tlistbox* gui2::tlobby_main::roomlistbox_
private
int gui2::tlobby_main::selected_game_id_
private
tlistbox* gui2::tlobby_main::userlistbox_
private

Definition at line 375 of file lobby.hpp.

CVideo& gui2::tlobby_main::video_
private

Definition at line 419 of file lobby.hpp.

Referenced by do_game_join().

twesnothd_connection& gui2::tlobby_main::wesnothd_connection_
private
twindow* gui2::tlobby_main::window_
private

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