summaryrefslogtreecommitdiff
path: root/src/gui/widgets/chattab.h
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-03-26 23:04:14 -0600
committerJared Adams <jaxad0127@gmail.com>2009-03-26 23:04:14 -0600
commite64b5a25a54f56bc836af57223e37449a1daffe8 (patch)
treef14f80a0bdc5268a2c4e2c70b6afcac080242ac5 /src/gui/widgets/chattab.h
parente03bd01fa02da71d41b85d3710a971da5a9c6c32 (diff)
downloadMana-e64b5a25a54f56bc836af57223e37449a1daffe8.tar.gz
Mana-e64b5a25a54f56bc836af57223e37449a1daffe8.tar.bz2
Mana-e64b5a25a54f56bc836af57223e37449a1daffe8.tar.xz
Mana-e64b5a25a54f56bc836af57223e37449a1daffe8.zip
Major clean up of ChatTab handling
ChatTabs now manage their own adding/removal from the chat window, which lost most of it's chat related messages. Whisper handling is stil done by the ChatWindow, but it no longer manages any other tabs. ChannelTab handling is now the sole responsability of the Channels they are attached to. The general tab is handled by Game.
Diffstat (limited to 'src/gui/widgets/chattab.h')
-rw-r--r--src/gui/widgets/chattab.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/gui/widgets/chattab.h b/src/gui/widgets/chattab.h
index 9e2aff6b..a478abeb 100644
--- a/src/gui/widgets/chattab.h
+++ b/src/gui/widgets/chattab.h
@@ -32,6 +32,21 @@ class BrowserBox;
class Recorder;
class ScrollArea;
+enum
+{
+ BY_GM,
+#ifdef EATHENA_SUPPORT
+ BY_PARTY,
+#endif
+ BY_PLAYER,
+ BY_OTHER,
+ BY_SERVER,
+ BY_CHANNEL,
+ ACT_WHISPER, // getting whispered at
+ ACT_IS, // equivalent to "/me" on IRC
+ BY_LOGGER
+};
+
/**
* A tab for the chat window. This is special to ease chat handling.
*/
@@ -56,7 +71,8 @@ class ChatTab : public Tab
* @param channelName which channel to send the message to.
* @param ignoreRecord should this not be recorded?
*/
- void chatLog(std::string line, int own, bool ignoreRecord);
+ void chatLog(std::string line, int own = BY_SERVER, bool ignoreRecord = false);
+ void chatLog(const char* line, int own = BY_SERVER, bool ignoreRecord = false);
/**
* Adds the text to the message list
@@ -97,4 +113,6 @@ class ChatTab : public Tab
//Recorder *mRecorder;
};
+extern ChatTab *localChatTab;
+
#endif // CHATTAB_H