summaryrefslogtreecommitdiff
path: root/src/gui/chat.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/chat.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/chat.h')
-rw-r--r--src/gui/chat.h55
1 files changed, 7 insertions, 48 deletions
diff --git a/src/gui/chat.h b/src/gui/chat.h
index 46358268..736f9284 100644
--- a/src/gui/chat.h
+++ b/src/gui/chat.h
@@ -47,21 +47,6 @@ class Network;
#endif
class WhisperTab;
-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
-};
-
/**
* gets in between usernick and message text depending on
* message type
@@ -119,29 +104,11 @@ class ChatWindow : public Window,
void resetToDefaultSize();
/**
- * Adds a line of text to our message list. Parameters:
- *
- * @param line Text message.
- * @param own Type of message (usually the owner-type).
- * @param channelName which channel to send the message to.
- * @param ignoreRecord should this not be recorded?
- */
- void chatLog(std::string line,
- int own = BY_SERVER,
- std::string channelName = "",
- bool ignoreRecord = false);
-
- /**
* Gets the focused tab.
*/
ChatTab* getFocused() const;
/**
- * Clear the tab with the given name.
- */
- void clearTab(const std::string &tab);
-
- /**
* Clear the given tab.
*/
void clearTab(ChatTab* tab);
@@ -169,16 +136,6 @@ class ChatWindow : public Window,
*/
bool isInputFocused();
- ChatTab* findTab(const std::string &tabName);
-
- /** Remove the given tab from the window */
- void removeTab(ChatTab *tab);
-
- void removeTab(const std::string &tabName);
-
- /** Add the tab to the window */
- void addTab(ChatTab *tab);
-
/**
* Passes the text to the current tab as input
*
@@ -199,9 +156,6 @@ class ChatWindow : public Window,
/** Override to reset mTmpVisible */
void setVisible(bool visible);
- /** Check if tab with that name already exists */
- bool tabExists(const std::string &tabName);
-
/**
* Scrolls the chat window
*
@@ -234,6 +188,12 @@ class ChatWindow : public Window,
friend class ChatTab;
friend class WhisperTab;
+ /** Remove the given tab from the window */
+ void removeTab(ChatTab *tab);
+
+ /** Add the tab to the window */
+ void addTab(ChatTab *tab);
+
void adjustTabSize();
#ifdef EATHENA_SUPPORT
@@ -256,8 +216,7 @@ class ChatWindow : public Window,
Tab *currentTab;
typedef std::map<const std::string, ChatTab*> TabMap;
- /** Map each tab to its browser and scroll area. */
- TabMap mTabs;
+ /** Manage whisper tabs */
TabMap mWhispers;
typedef std::list<std::string> History;