#include <chattab.h>
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 | |
ScrollArea * | mScrollArea |
BrowserBox * | mTextOutput |
Friends | |
class | ChatWindow |
class | WhisperWindow |
ChatTab::ChatTab | ( | const std::string & | name | ) |
ChatTab::~ChatTab | ( | ) |
Definition at line 64 of file chattab.cpp.
void ChatTab::chatLog | ( | std::string | line, | |
int | own = BY_SERVER , |
|||
bool | ignoreRecord = false | |||
) |
Adds a line of text to our message list.
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.
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.
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.
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 | ( | ) |
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.
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.
Reimplemented in ChannelTab, WhisperTab, and PartyTab.
virtual void ChatTab::setCurrent | ( | ) | [inline, protected, virtual] |
void ChatTab::handleInput | ( | const std::string & | msg | ) | [protected, virtual] |
void ChatTab::handleCommand | ( | const std::string & | msg | ) | [protected, virtual] |
friend class ChatWindow [friend] |
ScrollArea* ChatTab::mScrollArea [protected] |
BrowserBox* ChatTab::mTextOutput [protected] |