#include <multiplayer_ui.hpp>
Public Member Functions | |
chat () | |
void | add_message (const time_t &time, const std::string &user, const std::string &message) |
void | init_textbox (gui::textbox &textbox) |
void | update_textbox (gui::textbox &textbox) |
Private Types | |
typedef std::deque< msg > | msg_hist |
Private Member Functions | |
std::string | format_message (const msg &message) |
Private Attributes | |
msg_hist | message_history_ |
msg_hist::size_type | last_update_ |
Classes | |
struct | msg |
Definition at line 43 of file multiplayer_ui.hpp.
typedef std::deque<msg> mp::chat::msg_hist [private] |
Definition at line 62 of file multiplayer_ui.hpp.
mp::chat::chat | ( | ) |
Definition at line 175 of file multiplayer_ui.cpp.
void mp::chat::add_message | ( | const time_t & | time, | |
const std::string & | user, | |||
const std::string & | message | |||
) |
Definition at line 179 of file multiplayer_ui.cpp.
References last_update_, and message_history_.
Referenced by mp::ui::add_chat_message(), mp::ui::handle_key_event(), and mp::ui::process_message().
void mp::chat::init_textbox | ( | gui::textbox & | textbox | ) |
Definition at line 192 of file multiplayer_ui.cpp.
References format_message(), last_update_, message_history_, gui::textbox::scroll_to_bottom(), and gui::textbox::set_text().
Referenced by mp::ui::set_location().
void mp::chat::update_textbox | ( | gui::textbox & | textbox | ) |
Definition at line 206 of file multiplayer_ui.cpp.
References gui::textbox::append_text(), format_message(), last_update_, and message_history_.
Referenced by mp::ui::add_chat_message(), mp::ui::handle_key_event(), and mp::ui::process_message().
std::string mp::chat::format_message | ( | const msg & | message | ) | [private] |
Definition at line 220 of file multiplayer_ui.cpp.
References preferences::get_chat_timestamp(), mp::chat::msg::message, mp::chat::msg::time, and mp::chat::msg::user.
Referenced by init_textbox(), and update_textbox().
msg_hist mp::chat::message_history_ [private] |
Definition at line 66 of file multiplayer_ui.hpp.
Referenced by add_message(), init_textbox(), and update_textbox().
msg_hist::size_type mp::chat::last_update_ [private] |
Definition at line 67 of file multiplayer_ui.hpp.
Referenced by add_message(), init_textbox(), and update_textbox().
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |