#include <display_chat_manager.hpp>
Classes | |
struct | chat_message |
Public Member Functions | |
display_chat_manager (display &disp) | |
void | add_observer (const std::string &name) |
void | remove_observer (const std::string &name) |
const std::set< std::string > & | observers () const |
void | add_whisperer (const std::string &nick) |
void | remove_whisperer (const std::string &nick) |
const std::set< std::string > & | whisperers () const |
void | add_chat_message (const time_t &time, const std::string &speaker, int side, const std::string &msg, events::chat_handler::MESSAGE_TYPE type, bool bell) |
void | clear_chat_messages () |
Private Member Functions | |
void | prune_chat_messages (bool remove_all=false) |
Private Attributes | |
std::set< std::string > | observers_ |
std::set< std::string > | whisperers_ |
std::vector< chat_message > | chat_messages_ |
display & | my_disp_ |
Friends | |
class | game_display |
Definition at line 28 of file display_chat_manager.hpp.
|
inline |
Definition at line 30 of file display_chat_manager.hpp.
void display_chat_manager::add_chat_message | ( | const time_t & | time, |
const std::string & | speaker, | ||
int | side, | ||
const std::string & | msg, | ||
events::chat_handler::MESSAGE_TYPE | type, | ||
bool | bell | ||
) |
Definition at line 49 of file display_chat_manager.cpp.
References font::add_floating_label(), add_whisperer(), chat_message(), chat_messages_, ERR_NG, CVideo::faked(), mp_ui_alerts::friend_message(), preferences::get_chat_timestamp(), display::get_disp_context(), font::get_floating_label_rect(), team::get_side_color_range(), int_to_color(), preferences::is_friend(), preferences::is_ignored(), display_context::is_observer(), font::LEFT_ALIGN, preferences::login(), display::map_outside_area(), events::chat_handler::MESSAGE_PRIVATE, events::chat_handler::MESSAGE_PUBLIC, game_logic::msg(), my_disp_, preferences::parse_admin_authentication(), preferences::parse_should_show_lobby_join(), pos, mp_ui_alerts::private_message(), prune_chat_messages(), mp_ui_alerts::public_message(), remove_whisperer(), mp_ui_alerts::server_message(), font::floating_label::set_font_size(), font::SIZE_SMALL, display::video(), whisperers(), utils::word_match(), and font::word_wrap_text().
Referenced by events::menu_handler::add_chat_message(), chat_message(), ai::formula_ai::display_message(), do_replay_handle(), ai::readonly_context_impl::log_message(), game_lua_kernel::lua_chat(), turn_info::process_network_data(), game_events::t_pump::show_wml_messages(), and gui::floating_textbox::tab().
|
inline |
Definition at line 32 of file display_chat_manager.hpp.
References observers_.
Referenced by turn_info::process_network_data().
|
inline |
Definition at line 36 of file display_chat_manager.hpp.
References whisperers_.
Referenced by add_chat_message().
|
inline |
Definition at line 42 of file display_chat_manager.hpp.
References prune_chat_messages().
Referenced by events::menu_handler::clear_messages(), events::console_handler::do_clear(), and game_lua_kernel::intf_clear_messages().
|
inline |
Definition at line 34 of file display_chat_manager.hpp.
References observers_.
|
private |
Definition at line 187 of file display_chat_manager.cpp.
References preferences::chat_lines(), preferences::chat_message_aging(), chat_messages_, font::get_floating_label_rect(), display_chat_manager::chat_message::handle, font::move_floating_label(), font::remove_floating_label(), and display_chat_manager::chat_message::speaker_handle.
Referenced by add_chat_message(), and clear_chat_messages().
|
inline |
Definition at line 33 of file display_chat_manager.hpp.
References observers_.
Referenced by turn_info::process_network_data().
|
inline |
Definition at line 37 of file display_chat_manager.hpp.
References whisperers_.
Referenced by add_chat_message().
|
inline |
Definition at line 38 of file display_chat_manager.hpp.
References whisperers_.
Referenced by add_chat_message().
|
friend |
Definition at line 44 of file display_chat_manager.hpp.
|
private |
Definition at line 60 of file display_chat_manager.hpp.
Referenced by add_chat_message(), and prune_chat_messages().
|
private |
Definition at line 62 of file display_chat_manager.hpp.
Referenced by add_chat_message().
|
private |
Definition at line 46 of file display_chat_manager.hpp.
Referenced by add_observer(), observers(), and remove_observer().
|
private |
Definition at line 47 of file display_chat_manager.hpp.
Referenced by add_whisperer(), remove_whisperer(), and whisperers().