this class memorizes a chat session. More...
#include <multiplayer_ui.hpp>

Classes | |
| struct | msg |
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) |
| SDL_Color | color_message (const msg &message) |
Private Attributes | |
| msg_hist | message_history_ |
| msg_hist::size_type | last_update_ |
this class memorizes a chat session.
Definition at line 44 of file multiplayer_ui.hpp.
typedef std::deque<msg> mp::chat::msg_hist [private] |
Definition at line 63 of file multiplayer_ui.hpp.
| mp::chat::chat | ( | ) |
Definition at line 202 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 208 of file multiplayer_ui.cpp.
References last_update_, message_history_, and game_logic::msg().
Referenced by mp::ui::add_chat_message(), mp::ui::handle_key_event(), mp::ui::process_message(), and mp::ui::process_network_data().


| SDL_Color mp::chat::color_message | ( | const msg & | message | ) | [private] |
Definition at line 260 of file multiplayer_ui.cpp.
References font::LABEL_COLOR, mp::chat::msg::message, font::NORMAL_COLOR, font::parse_markup(), and mp::chat::msg::user.
Referenced by init_textbox(), and update_textbox().


| std::string mp::chat::format_message | ( | const msg & | message | ) | [private] |
Definition at line 241 of file multiplayer_ui.cpp.
References preferences::get_chat_timestamp(), mp::chat::msg::message, font::parse_markup(), mp::chat::msg::time, and mp::chat::msg::user.
Referenced by init_textbox(), and update_textbox().


| void mp::chat::init_textbox | ( | gui::textbox & | textbox | ) |
Definition at line 221 of file multiplayer_ui.cpp.
References gui::textbox::append_text(), color_message(), format_message(), last_update_, and message_history_.
Referenced by mp::ui::set_location().


| void mp::chat::update_textbox | ( | gui::textbox & | textbox | ) |
Definition at line 231 of file multiplayer_ui.cpp.
References gui::textbox::append_text(), color_message(), format_message(), last_update_, and message_history_.
Referenced by mp::ui::add_chat_message(), mp::ui::handle_key_event(), mp::ui::process_message(), and mp::ui::process_network_data().


msg_hist::size_type mp::chat::last_update_ [private] |
Definition at line 69 of file multiplayer_ui.hpp.
Referenced by add_message(), init_textbox(), and update_textbox().
msg_hist mp::chat::message_history_ [private] |
Definition at line 68 of file multiplayer_ui.hpp.
Referenced by add_message(), init_textbox(), and update_textbox().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:24:52 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |