#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 std::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 std::time_t & | time, |
const std::string & | speaker, | ||
int | side, | ||
const std::string & | msg, | ||
events::chat_handler::MESSAGE_TYPE | type, | ||
bool | bell | ||
) |
Definition at line 45 of file display_chat_manager.cpp.
References font::add_floating_label(), add_whisperer(), chat_messages_, display::context(), ERR_NG, mp::ui_alerts::friend_message(), prefs::get(), prefs::get_chat_timestamp(), font::get_floating_label_rect(), team::get_side_color_range(), video::headless(), prefs::is_ignored(), display_context::is_observer(), font::LEFT_ALIGN, prefs::login(), display::map_outside_area(), events::chat_handler::MESSAGE_PRIVATE, events::chat_handler::MESSAGE_PUBLIC, color_range::mid(), wfl::msg(), my_disp_, font::pango_word_wrap(), prefs::parse_should_show_lobby_join(), mp::ui_alerts::private_message(), prune_chat_messages(), mp::ui_alerts::public_message(), remove_whisperer(), mp::ui_alerts::server_message(), font::floating_label::set_alignment(), font::floating_label::set_bg_color(), font::floating_label::set_border_size(), font::floating_label::set_clip_rect(), font::floating_label::set_color(), font::floating_label::set_font_size(), font::floating_label::set_position(), font::SIZE_15, font::floating_label::use_markup(), w, whisperers(), and utils::word_match().
Referenced by chat_message(), wfl::builtins::DEFINE_WFL_FUNCTION(), gui2::dialogs::lua_interpreter::display(), ai::formula_ai::display_message(), do_replay_handle(), ai::readonly_context_impl::log_message(), game_lua_kernel::lua_chat(), playmp_controller::process_network_data_impl(), game_events::wml_event_pump::show_wml_messages(), and gui::floating_textbox::tab().
|
inline |
Definition at line 32 of file display_chat_manager.hpp.
References observers_.
Referenced by playmp_controller::process_network_data_impl().
|
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 game_lua_kernel::intf_clear_messages().
|
inline |
Definition at line 34 of file display_chat_manager.hpp.
References observers_.
|
private |
Definition at line 183 of file display_chat_manager.cpp.
References prefs::chat_message_aging(), chat_messages_, prefs::get(), 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 playmp_controller::process_network_data_impl().
|
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().