summaryrefslogtreecommitdiff
path: root/src/gui/chat.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/chat.h')
-rw-r--r--src/gui/chat.h21
1 files changed, 5 insertions, 16 deletions
diff --git a/src/gui/chat.h b/src/gui/chat.h
index db5fe293..3a001432 100644
--- a/src/gui/chat.h
+++ b/src/gui/chat.h
@@ -25,6 +25,7 @@
#include "listener.h"
#include "gui/widgets/window.h"
+#include "gui/widgets/textfield.h"
#include <guichan/actionlistener.hpp>
#include <guichan/keylistener.hpp>
@@ -76,7 +77,6 @@ struct CHATLOG
*/
class ChatWindow : public Window,
public gcn::ActionListener,
- public gcn::KeyListener,
public Mana::Listener
{
public:
@@ -146,9 +146,6 @@ class ChatWindow : public Window,
*/
void chatInput(const std::string &msg);
- /** Called when key is pressed */
- void keyPressed(gcn::KeyEvent &event);
-
/** Add the given text to the chat input. */
void addInputText(const std::string &text);
@@ -158,7 +155,6 @@ class ChatWindow : public Window,
/** Override to reset mTmpVisible */
void setVisible(bool visible);
-
void mousePressed(gcn::MouseEvent &event);
void mouseDragged(gcn::MouseEvent &event);
@@ -193,6 +189,7 @@ class ChatWindow : public Window,
protected:
friend class ChatTab;
friend class WhisperTab;
+ friend class ChatAutoComplete;
/** Remove the given tab from the window */
void removeTab(ChatTab *tab);
@@ -204,13 +201,6 @@ class ChatWindow : public Window,
void removeAllWhispers();
- void autoComplete();
-
- std::string autoCompleteHistory(std::string partName);
-
- std::string autoComplete(std::vector<std::string> &names,
- std::string partName) const;
-
/** Used for showing item popup on clicking links **/
ItemLinkHandler *mItemLinkHandler;
Recorder *mRecorder;
@@ -218,6 +208,9 @@ class ChatWindow : public Window,
/** Input box for typing chat messages. */
ChatInput *mChatInput;
+ TextHistory *mHistory;
+ AutoCompleteLister *mAutoComplete;
+
private:
bool mTmpVisible;
@@ -228,10 +221,6 @@ class ChatWindow : public Window,
/** Manage whisper tabs */
TabMap mWhispers;
- typedef std::list<std::string> History;
- typedef History::iterator HistoryIterator;
- History mHistory; /**< Command history. */
- HistoryIterator mCurHist; /**< History iterator. */
bool mReturnToggles; /**< Marks whether <Return> toggles the chat log
or not */
};