ChatTab Class Reference

#include <chattab.h>

Inheritance diagram for ChatTab:

Tab ChannelTab PartyTab WhisperTab

List of all members.


Detailed Description

A tab for the chat window.

This is special to ease chat handling.

Definition at line 47 of file chattab.h.


Public Member Functions

 ChatTab (const std::string &name)
 Constructor.
 ~ChatTab ()
void chatLog (std::string line, int own=BY_SERVER, bool ignoreRecord=false)
 Adds a line of text to our message list.
void chatLog (const std::string &nick, const std::string &msg)
 Adds the text to the message list.
void chatInput (std::string &msg)
 Determines whether the message is a command or message, then sends the given message to the game server to be said, or to the command handler.
void scroll (int amount)
 Scrolls the chat window.
void clearText ()
 Clears the text from the tab.
virtual void showHelp ()
 Add any extra help text to the output.
virtual bool handleCommand (const std::string &type, const std::string &args)
 Handle special commands.

Protected Member Functions

virtual void setCurrent ()
virtual void handleInput (const std::string &msg)
virtual void handleCommand (const std::string &msg)

Protected Attributes

ScrollAreamScrollArea
BrowserBoxmTextOutput

Friends

class ChatWindow
class WhisperWindow

Constructor & Destructor Documentation

ChatTab::ChatTab ( const std::string &  name  ) 

Constructor.

Definition at line 46 of file chattab.cpp.

ChatTab::~ChatTab (  ) 

Definition at line 64 of file chattab.cpp.


Member Function Documentation

void ChatTab::chatLog ( std::string  line,
int  own = BY_SERVER,
bool  ignoreRecord = false 
)

Adds a line of text to our message list.

Parameters:

Parameters:
line Text message.
own Type of message (usually the owner-type).
channelName which channel to send the message to.
ignoreRecord should this not be recorded?

Definition at line 71 of file chattab.cpp.

void ChatTab::chatLog ( const std::string &  nick,
const std::string &  msg 
)

Adds the text to the message list.

Parameters:
msg The message text which is to be sent.

Definition at line 208 of file chattab.cpp.

void ChatTab::chatInput ( std::string &  msg  ) 

Determines whether the message is a command or message, then sends the given message to the game server to be said, or to the command handler.

Parameters:
msg The message text which is to be sent.

Definition at line 215 of file chattab.cpp.

void ChatTab::scroll ( int  amount  ) 

Scrolls the chat window.

Parameters:
amount direction and amount to scroll. Negative numbers scroll up, positive numbers scroll down. The absolute amount indicates the amount of 1/8ths of chat window real estate that should be scrolled.

Definition at line 260 of file chattab.cpp.

void ChatTab::clearText (  ) 

Clears the text from the tab.

Definition at line 269 of file chattab.cpp.

virtual void ChatTab::showHelp (  )  [inline, virtual]

Add any extra help text to the output.

Allows tabs to define help for commands defined by the tab itself.

Reimplemented in ChannelTab, WhisperTab, and PartyTab.

Definition at line 100 of file chattab.h.

virtual bool ChatTab::handleCommand ( const std::string &  type,
const std::string &  args 
) [inline, virtual]

Handle special commands.

Allows a tab to handle commands it defines itself.

Returns:
true if the command was handled false if the command was not handled

Reimplemented in ChannelTab, WhisperTab, and PartyTab.

Definition at line 109 of file chattab.h.

virtual void ChatTab::setCurrent (  )  [inline, protected, virtual]

Reimplemented from Tab.

Definition at line 117 of file chattab.h.

void ChatTab::handleInput ( const std::string &  msg  )  [protected, virtual]

Reimplemented in ChannelTab, WhisperTab, and PartyTab.

Definition at line 274 of file chattab.cpp.

void ChatTab::handleCommand ( const std::string &  msg  )  [protected, virtual]

Reimplemented in WhisperTab.

Definition at line 279 of file chattab.cpp.


Friends And Related Function Documentation

friend class ChatWindow [friend]

Reimplemented in WhisperTab.

Definition at line 114 of file chattab.h.

friend class WhisperWindow [friend]

Definition at line 115 of file chattab.h.


Member Data Documentation

Definition at line 123 of file chattab.h.

Definition at line 124 of file chattab.h.


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

Generated on Sun Apr 26 17:30:43 2009 for The Mana World by  doxygen 1.5.5