The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
mp::chat Class Reference

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)
 
void clear_history ()
 

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 42 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 103 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 
)
void mp::chat::clear_history ( )

Definition at line 144 of file multiplayer_ui.cpp.

References last_update_, and message_history_.

SDL_Color mp::chat::color_message ( const msg message)
private
std::string mp::chat::format_message ( const msg message)
private
void mp::chat::init_textbox ( gui::textbox textbox)
void mp::chat::update_textbox ( gui::textbox textbox)

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(), clear_history(), 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(), clear_history(), init_textbox(), and update_textbox().


The documentation for this class was generated from the following files: