Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes

mp::chat Class Reference

this class memorizes a chat session. More...

#include <multiplayer_ui.hpp>

Collaboration diagram for mp::chat:
Collaboration graph
[legend]

List of all members.

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< msgmsg_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_

Detailed Description

this class memorizes a chat session.

Definition at line 44 of file multiplayer_ui.hpp.


Member Typedef Documentation

typedef std::deque<msg> mp::chat::msg_hist [private]

Definition at line 63 of file multiplayer_ui.hpp.


Constructor & Destructor Documentation

mp::chat::chat (  ) 

Definition at line 202 of file multiplayer_ui.cpp.


Member Function Documentation

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

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().

Definition at line 68 of file multiplayer_ui.hpp.

Referenced by add_message(), init_textbox(), and update_textbox().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:24:52 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs