summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabs/chat
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/tabs/chat')
-rw-r--r--src/gui/widgets/tabs/chat/chattab.cpp15
-rw-r--r--src/gui/widgets/tabs/chat/chattab.h22
2 files changed, 27 insertions, 10 deletions
diff --git a/src/gui/widgets/tabs/chat/chattab.cpp b/src/gui/widgets/tabs/chat/chattab.cpp
index b1847cde1..b09e57585 100644
--- a/src/gui/widgets/tabs/chat/chattab.cpp
+++ b/src/gui/widgets/tabs/chat/chattab.cpp
@@ -38,6 +38,7 @@
#include "gui/windows/chatwindow.h"
#include "gui/windows/helpwindow.h"
+#include "gui/widgets/browserbox.h"
#include "gui/widgets/scrollarea.h"
#include "gui/widgets/itemlinkhandler.h"
#include "gui/widgets/tabbedarea.h"
@@ -51,9 +52,9 @@
#include "utils/delete2.h"
#include "utils/gettext.h"
-#ifdef WIN32
+#ifdef _WIN32
#include <sys/time.h>
-#endif // WIN32
+#endif // _WIN32
#include <sstream>
@@ -437,6 +438,16 @@ void ChatTab::clearText()
mTextOutput->clearRows();
}
+const std::list<std::string> &ChatTab::getRows() const
+{
+ return mTextOutput->getRows();
+}
+
+bool ChatTab::hasRows() const
+{
+ return mTextOutput->hasRows();
+}
+
void ChatTab::handleInput(const std::string &msg)
{
if (chatHandler)
diff --git a/src/gui/widgets/tabs/chat/chattab.h b/src/gui/widgets/tabs/chat/chattab.h
index a08429b24..3cab5f54d 100644
--- a/src/gui/widgets/tabs/chat/chattab.h
+++ b/src/gui/widgets/tabs/chat/chattab.h
@@ -31,12 +31,11 @@
#include "enums/simpletypes/online.h"
#include "enums/simpletypes/tryremovecolors.h"
-#include "gui/widgets/browserbox.h"
-
#include "gui/widgets/tabs/tab.h"
#include "localconsts.h"
+class BrowserBox;
class ScrollArea;
#define debugMsg(str) \
@@ -115,10 +114,23 @@ class ChatTab notfinal : public Tab
/**
* Clears the text from the tab
+ * @see BrowserBox::clearRows
*/
void clearText();
/**
+ * Returns lines of text from the widget,
+ * @see BrowserBox::getRows
+ */
+ const std::list<std::string> &getRows() const A_WARN_UNUSED;
+
+ /**
+ * true if the widget has any lines
+ * @see BrowserBox::hasRows
+ */
+ bool hasRows() const A_WARN_UNUSED;
+
+ /**
* Handle special commands. Allows a tab to handle commands it
* defines itself.
*
@@ -147,12 +159,6 @@ class ChatTab notfinal : public Tab
void saveToLogFile(const std::string &msg) const;
- const std::list<std::string> &getRows() const A_WARN_UNUSED
- { return mTextOutput->getRows(); }
-
- bool hasRows() const A_WARN_UNUSED
- { return mTextOutput->hasRows(); }
-
void loadFromLogFile(const std::string &name,
const unsigned maxLines);