|
Mana
|
A tab for the chat window. More...
#include <chattab.h>
Public Member Functions | |
| ChatTab (const std::string &name) | |
| ~ChatTab () override | |
| void | chatLog (std::string line, Own 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 (const 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. | |
| void | getAutoCompleteList (std::vector< std::string > &names) const override |
| virtual void | saveToLogFile (std::string &msg) |
| void | event (Event::Channel channel, const Event &event) override |
Public Member Functions inherited from Tab | |
| Tab () | |
| void | setCaption (const std::string &caption) |
| Sets the caption of the tab. | |
| void | draw (gcn::Graphics *graphics) override |
| Draw the tab. | |
| void | drawFrame (gcn::Graphics *graphics) override |
| Draw the tab frame. | |
| void | setTabColor (const gcn::Color *color) |
| Set the normal color fo the tab's text. | |
| void | setFlash (bool flash) |
| Set tab flashing state. | |
Public Member Functions inherited from AutoCompleteLister | |
| virtual | ~AutoCompleteLister ()=default |
Public Member Functions inherited from EventListener | |
| virtual | ~EventListener () |
| void | listen (Event::Channel channel) |
| void | ignore (Event::Channel channel) |
Protected Member Functions | |
| void | setCurrent () override |
| virtual void | handleInput (const std::string &msg) |
| virtual void | handleCommand (const std::string &msg) |
| virtual bool | checkNotify (Own own) const |
| Returns whether a notify sound may be played for the given type of message. | |
| void | updateTextFormat (int alpha) |
| Adapts the text format to the current gui opacity, for better readability. | |
Protected Attributes | |
| ScrollArea * | mScrollArea |
| BrowserBox * | mTextOutput |
Friends | |
| class | ChatWindow |
| class | WhisperWindow |
A tab for the chat window.
This is special to ease chat handling.
| ChatTab::ChatTab | ( | const std::string & | name | ) |
Definition at line 49 of file chattab.cpp.
|
override |
Definition at line 72 of file chattab.cpp.
| void ChatTab::chatInput | ( | const 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 259 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 252 of file chattab.cpp.
Adds a line of text to our message list.
Parameters:
| line | Text message. |
| own | Type of message (usually the owner-type). |
| ignoreRecord | should this not be recorded? |
Definition at line 111 of file chattab.cpp.
|
protectedvirtual |
Returns whether a notify sound may be played for the given type of message.
By default, only returns true for inline whispers.
Is never called for server-messages or when the window has focus and this is the current tab.
Reimplemented in WhisperTab.
Definition at line 327 of file chattab.cpp.
| void ChatTab::clearText | ( | ) |
Clears the text from the tab.
Definition at line 312 of file chattab.cpp.
|
overridevirtual |
Implements EventListener.
Definition at line 100 of file chattab.cpp.
|
overridevirtual |
Reimplemented from AutoCompleteLister.
Reimplemented in TmwAthena::PartyTab, and TmwAthena::GuildTab.
Definition at line 332 of file chattab.cpp.
|
protectedvirtual |
Reimplemented in WhisperTab.
Definition at line 322 of file chattab.cpp.
|
inlinevirtual |
Handle special commands.
Allows a tab to handle commands it defines itself.
Reimplemented in ChannelTab, WhisperTab, TmwAthena::GuildTab, and TmwAthena::PartyTab.
|
protectedvirtual |
Reimplemented in ChannelTab, WhisperTab, TmwAthena::GuildTab, and TmwAthena::PartyTab.
Definition at line 317 of file chattab.cpp.
|
virtual |
Reimplemented in WhisperTab, TmwAthena::GuildTab, and TmwAthena::PartyTab.
Definition at line 337 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 303 of file chattab.cpp.
|
inlineoverrideprotectedvirtual |
|
inlinevirtual |
Add any extra help text to the output.
Allows tabs to define help for commands defined by the tab itself.
Reimplemented in ChannelTab, WhisperTab, TmwAthena::GuildTab, and TmwAthena::PartyTab.
|
protected |
Adapts the text format to the current gui opacity, for better readability.
Definition at line 81 of file chattab.cpp.
|
friend |
|
protected |
|
protected |