15 #ifndef GUI_DIALOGS_LOBBY_HPP_INCLUDED
16 #define GUI_DIALOGS_LOBBY_HPP_INCLUDED
23 #include <boost/scoped_ptr.hpp>
27 #ifdef GUI2_EXPERIMENTAL_LISTBOX
36 #ifndef GUI2_EXPERIMENTAL_LISTBOX
256 const bool force_scroll =
false);
270 const bool force_scroll =
false);
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".
tplayer_list player_list_
room_info * active_window_room()
Get the room* corresponding to the currently active window, or nullptr if a whisper window is active ...
void close_active_window()
bool room_window_active(const std::string &room)
std::function< void()> preferences_wrapper_
Wrapper for the preferences hotkey.
void observe_global_button_callback(twindow &window)
This class represents the information a client has about a room.
void update_gamelist_filter()
ttoggle_button * sort_by_name
void close_window(size_t idx)
virtual void add_whisper_received(const std::string &sender, const std::string &message)
inherited form chat_handler
void quit_button_callback(twindow &window)
GLuint GLuint GLsizei GLenum type
bool do_game_join(int idx, bool observe)
Assemble and send a game join request.
void set_preferences_callback(std::function< void()> f)
Set the callback used to show the preferences.
void active_window_changed()
void adjust_game_row_contents(const game_info &game, int idx, tgrid *grid)
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".
bool delay_gamelist_update_
void increment_waiting_whsipers(const std::string &name)
Mark the whisper window for "name" as having one more pending message.
ttoggle_button * filter_slots_
GLenum GLenum GLenum input
This class represents the collective information the client has about the players and games on the se...
void process_gamelist(const config &data)
std::map< std::string, string_map > make_game_row_data(const game_info &game)
ttoggle_button * show_toggle
void send_to_server(const config &cfg) override
void update_gamelist_header()
virtual void add_whisper_sent(const std::string &receiver, const std::string &message)
inherited form chat_handler
void process_gamelist_diff(const config &data)
void skip_replay_changed_callback(twidget &w)
void process_room_join(const config &data)
void pre_show(twindow &window)
Inherited from tdialog.
Class for a single line text area.
GLint GLenum GLsizei GLint GLsizei const GLvoid * data
tlobby_chat_window * search_create_window(const std::string &name, bool whisper, bool open_new)
Helper function to find and open a new window, used by *_window_open.
This class represents the information a client has about another player.
void process_network_data(const config &data)
void join_button_callback(twindow &window)
base class of top level items, the only item which needs to store the final canvases to draw on ...
bool gamelist_diff_update_
virtual void add_chat_room_message_sent(const std::string &room, const std::string &message)
inherited form chat_handler
A class inherited from ttext_box that displays its input as stars.
void increment_waiting_messages(const std::string &room)
Mark the room window for "room" as having one more pending message.
void send_message_button_callback(twindow &window)
legacy_result legacy_result_
Result flag for interfacing with other MP dialogs.
std::vector< int > gamelist_id_at_row_
ttoggle_button * filter_friends_
A class that represents a TCP/IP connection to the wesnothd server.
void process_message(const config &data, bool whisper=false)
void join_global_button_callback(twindow &window)
Abstract base class for all dialogs.
void init(twindow &w, const std::string &id)
void update_selected_game()
void post_show(twindow &window)
Inherited from tdialog.
GLubyte GLubyte GLubyte GLubyte w
void send_message_to_active_window(const std::string &input)
ttoggle_button * sort_by_relation
virtual void send_chat_message(const std::string &message, bool)
inherited form chat_handler
void process_room_part(const config &data)
const config & game_config_
bool delay_playerlist_update_
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...
std::vector< tlobby_chat_window > open_windows_
This represents the open chat windows (rooms and whispers at the moment) with 1 to 1 correspondence t...
void switch_to_window(tlobby_chat_window *t)
Switch to the window given by a valid pointer (e.g.
void room_switch_callback(twindow &window)
tsub_player_list active_room
std::function< void()> preferences_callback_
void show_preferences_button_callback(twindow &window)
void chat_input_keypress_callback(bool &handled, bool &halt, const SDLKey key, twindow &window)
tsub_player_list other_rooms
ttoggle_button * filter_invert_
void refresh_button_callback(twindow &window)
void observe_button_callback(twindow &window)
tlobby_chat_window(const std::string &name, bool whisper)
void game_filter_reload()
bool whisper_window_active(const std::string &name)
void close_window_button_callback(size_t idx)
Game configuration data as global variables.
size_t lobby_update_timer_
Timer for updating the lobby.
virtual void add_chat_room_message_received(const std::string &room, const std::string &speaker, const std::string &message)
inherited form chat_handler
void network_handler()
Network polling callback.
void update_gamelist_diff()
virtual const std::string & window_id() const
Inherited from tdialog, implemented by REGISTER_DIALOG.
virtual void post_build(twindow &window)
Inherited from tdialog.
void game_filter_keypress_callback(const SDLKey key)
tlobby_main(const config &game_config, lobby_info &info, CVideo &video, twesnothd_connection &wesnothd_connection)
tlobby_chat_window * whisper_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...
void create_button_callback(twindow &window)
GLuint const GLchar * name
void game_filter_change_callback(twidget &widget)
This class represents the info a client has about a game on the server.
void do_notify(t_notify_mode mode)
tsub_player_list other_games
tmulti_page * chat_log_container_
void player_filter_callback(twidget &widget)
void show_toggle_callback(twidget &widget)
GLsizei GLenum GLuint GLuint GLsizei char * message
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".
void add_whisper_window_whisper(const std::string &sender, const std::string &message)
Add a whisper message to the whisper window.
void process_room_query_response(const config &data)
ttoggle_button * filter_ignored_
tlobby_chat_window * room_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...
void gamelist_change_callback(twindow &window)
A config object defines a single node in a WML file, with access to child nodes.
void join_or_observe(int index)
GLsizei const GLcharARB ** string
void append_to_chatbox(const std::string &text, const bool force_scroll=false)
Append some text to the active chat log.
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
void user_dialog_callback(user_info *info)
tsub_player_list active_game
twesnothd_connection & wesnothd_connection_
unsigned last_gamelist_update_
legacy_result get_legacy_result() const