From e6094dc9cff6e6876f8493b47f9e51278bd48dad Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 7 May 2013 12:13:34 +0300 Subject: improve chatwindow class. --- src/gui/chatwindow.h | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'src/gui/chatwindow.h') diff --git a/src/gui/chatwindow.h b/src/gui/chatwindow.h index f658a7757..0fa8363f0 100644 --- a/src/gui/chatwindow.h +++ b/src/gui/chatwindow.h @@ -108,11 +108,6 @@ class ChatWindow final : public Window, */ ~ChatWindow(); - /** - * Reset the chat window to default positions. - */ - void resetToDefaultSize(); - /** * Gets the focused tab. */ @@ -126,7 +121,7 @@ class ChatWindow final : public Window, /** * Clear the current tab. */ - void clearTab(); + void clearTab() const; /** * Switch to the previous tab in order @@ -249,15 +244,15 @@ class ChatWindow final : public Window, const bool ignoreRecord, const bool tryRemoveColors); - void battleChatLog(std::string line, Own own = BY_UNKNOWN, + static void battleChatLog(const std::string &line, Own own = BY_UNKNOWN, const bool ignoreRecord = false, - const bool tryRemoveColors = true) const; + const bool tryRemoveColors = true); - void updateOnline(std::set &onlinePlayers); + void updateOnline(std::set &onlinePlayers) const; void loadState(); - void saveState(); + void saveState() const; void loadCustomList(); @@ -267,9 +262,9 @@ class ChatWindow final : public Window, void adjustTabSize(); - void addToAwayLog(std::string line); + void addToAwayLog(const std::string &line); - void displayAwayLog(); + void displayAwayLog() const; void clearAwayLog() { mAwayLog.clear(); } @@ -315,9 +310,9 @@ class ChatWindow final : public Window, std::string addColors(std::string &msg); - std::string autoCompleteHistory(std::string partName); + std::string autoCompleteHistory(const std::string &partName) const; - std::string autoComplete(std::string partName, + std::string autoComplete(const std::string &partName, History *const words) const; std::string autoComplete(StringVect &names, @@ -339,7 +334,8 @@ class ChatWindow final : public Window, private: void fillCommands(); - bool mTmpVisible; + void loadCommandsFile(const std::string &name); + typedef std::map TabMap; /** Manage whisper tabs */ @@ -370,6 +366,7 @@ class ChatWindow final : public Window, bool mAutoHide; bool mShowBattleEvents; bool mShowAllLang; + bool mTmpVisible; }; extern ChatWindow *chatWindow; -- cgit v1.2.3-60-g2f50