diff options
Diffstat (limited to 'src/gui/widgets/tabs/chat/chattab.h')
-rw-r--r-- | src/gui/widgets/tabs/chat/chattab.h | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/src/gui/widgets/tabs/chat/chattab.h b/src/gui/widgets/tabs/chat/chattab.h index 7a3774fc2..3cab5f54d 100644 --- a/src/gui/widgets/tabs/chat/chattab.h +++ b/src/gui/widgets/tabs/chat/chattab.h @@ -1,11 +1,11 @@ /* - * The ManaPlus Client + * The ManaVerse Client * Copyright (C) 2009 The Mana World Development Team * Copyright (C) 2009-2010 The Mana Developers * Copyright (C) 2011-2020 The ManaPlus Developers - * Copyright (C) 2020-2023 The ManaVerse Developers + * Copyright (C) 2020-2025 The ManaVerse Developers * - * This file is part of The ManaPlus Client. + * This file is part of The ManaVerse Client. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -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,13 +159,8 @@ 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); + void loadFromLogFile(const std::string &name, + const unsigned maxLines); bool getAllowHighlight() const noexcept2 A_WARN_UNUSED { return mAllowHightlight; } |