From 6ada0095e10a592ca78206edf851cc9e235619ab Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Thu, 9 Apr 2009 21:09:58 +0200 Subject: No need for ChatInput to be in the header file, even --- src/gui/chat.cpp | 29 +++++++++++++++++++++-------- src/gui/chat.h | 19 +------------------ 2 files changed, 22 insertions(+), 26 deletions(-) (limited to 'src') diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp index ab98b594..7f08ec48 100644 --- a/src/gui/chat.cpp +++ b/src/gui/chat.cpp @@ -28,6 +28,7 @@ #include "gui/widgets/chattab.h" #include "gui/widgets/scrollarea.h" #include "gui/widgets/tabbedarea.h" +#include "gui/widgets/textfield.h" #include "gui/widgets/whispertab.h" #include "beingmanager.h" @@ -38,18 +39,30 @@ #include "utils/stringutils.h" #include +#include -ChatInput::ChatInput() +/** + * The chat input hides when it loses focus. It is also invisible by default. + */ +class ChatInput : public TextField, public gcn::FocusListener { - setVisible(false); + public: + ChatInput() + { + setVisible(false); + addFocusListener(this); + } - addFocusListener(this); -} + /** + * Called if the chat input loses focus. It will set itself to + * invisible as result. + */ + void focusLost(const gcn::Event &event) + { + setVisible(false); + } +}; -void ChatInput::focusLost(const gcn::Event &event) -{ - setVisible(false); -} ChatWindow::ChatWindow(): Window(_("Chat")), diff --git a/src/gui/chat.h b/src/gui/chat.h index 20586add..65281c37 100644 --- a/src/gui/chat.h +++ b/src/gui/chat.h @@ -22,11 +22,9 @@ #ifndef CHAT_H #define CHAT_H -#include "gui/widgets/textfield.h" #include "gui/widgets/window.h" #include -#include #include #include #include @@ -38,6 +36,7 @@ class BrowserBox; class Channel; class ChatTab; +class ChatInput; class Recorder; class ScrollArea; class TabbedArea; @@ -55,21 +54,6 @@ struct CHATLOG int own; }; -/** - * The chat input hides when it loses focus. It is also invisible by default. - */ -class ChatInput : public TextField, public gcn::FocusListener -{ - public: - ChatInput(); - - /** - * Called if the chat input loses focus. It will set itself to - * invisible as result. - */ - void focusLost(const gcn::Event &event); -}; - /** * The chat window. * @@ -151,7 +135,6 @@ class ChatWindow : public Window, * Passes the text to the current tab as input * * @param msg The message text which is to be sent. - * */ void chatInput(std::string &msg); -- cgit v1.2.3-70-g09d2