summaryrefslogtreecommitdiff
path: root/src/gui/browserbox.h
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2007-10-26 00:22:12 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2007-10-26 00:22:12 +0000
commitdb8b740bfa402c929247efd954096fac7b72b2a3 (patch)
tree62164d11ad6ce852bb672298068b69f9b5b4de7e /src/gui/browserbox.h
parent4f49eb94ddf9d2f0f3c59560c761188d101bd5f8 (diff)
downloadmana-client-db8b740bfa402c929247efd954096fac7b72b2a3.tar.gz
mana-client-db8b740bfa402c929247efd954096fac7b72b2a3.tar.bz2
mana-client-db8b740bfa402c929247efd954096fac7b72b2a3.tar.xz
mana-client-db8b740bfa402c929247efd954096fac7b72b2a3.zip
Added possibility of length limitation to browserbox and used it for the chatlog (length set by the config option "ChatLogLength").
Diffstat (limited to 'src/gui/browserbox.h')
-rw-r--r--src/gui/browserbox.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/browserbox.h b/src/gui/browserbox.h
index 666a7754..9c0e8ef1 100644
--- a/src/gui/browserbox.h
+++ b/src/gui/browserbox.h
@@ -74,6 +74,11 @@ class BrowserBox : public gcn::Widget, public gcn::MouseListener
void setHighlightMode(unsigned int highMode);
/**
+ * Sets the maximum numbers of rows in the browser box. 0 = no limit.
+ */
+ void setMaxRow(int max) {mMaxRows = max; };
+
+ /**
* Disable links & user defined colors to be used in chat input.
*/
void disableLinksAndUserColors();
@@ -144,7 +149,7 @@ class BrowserBox : public gcn::Widget, public gcn::MouseListener
};
private:
- typedef std::vector<std::string> TextRows;
+ typedef std::list<std::string> TextRows;
typedef TextRows::iterator TextRowIterator;
TextRows mTextRows;
@@ -158,6 +163,7 @@ class BrowserBox : public gcn::Widget, public gcn::MouseListener
bool mOpaque;
bool mUseLinksAndUserColors;
int mSelectedLink;
+ unsigned int mMaxRows;
#ifdef USE_OPENGL
static int instances; /**< Number of Window instances */