summaryrefslogtreecommitdiff
path: root/src/gui/chatwindow.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-07 12:13:34 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-07 12:13:34 +0300
commite6094dc9cff6e6876f8493b47f9e51278bd48dad (patch)
treed2fc75f2ef46aa878db7fecec50dca79b14f6f5b /src/gui/chatwindow.h
parent91ea2aa6ac07291fffa99a5684da65d6c6840476 (diff)
downloadmanaplus-e6094dc9cff6e6876f8493b47f9e51278bd48dad.tar.gz
manaplus-e6094dc9cff6e6876f8493b47f9e51278bd48dad.tar.bz2
manaplus-e6094dc9cff6e6876f8493b47f9e51278bd48dad.tar.xz
manaplus-e6094dc9cff6e6876f8493b47f9e51278bd48dad.zip
improve chatwindow class.
Diffstat (limited to 'src/gui/chatwindow.h')
-rw-r--r--src/gui/chatwindow.h27
1 files changed, 12 insertions, 15 deletions
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
@@ -109,11 +109,6 @@ class ChatWindow final : public Window,
~ChatWindow();
/**
- * Reset the chat window to default positions.
- */
- void resetToDefaultSize();
-
- /**
* Gets the focused tab.
*/
ChatTab *getFocused() const A_WARN_UNUSED;
@@ -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<std::string> &onlinePlayers);
+ void updateOnline(std::set<std::string> &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<const std::string, WhisperTab*> TabMap;
/** Manage whisper tabs */
@@ -370,6 +366,7 @@ class ChatWindow final : public Window,
bool mAutoHide;
bool mShowBattleEvents;
bool mShowAllLang;
+ bool mTmpVisible;
};
extern ChatWindow *chatWindow;