diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-05-18 01:38:38 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-05-18 01:48:04 +0300 |
commit | 7cd309e7c9e0200cedb45edfeeba5a601d3fb446 (patch) | |
tree | c52eb86ae689ffbd088442d90b6da073ac7d98c0 /src/gui/widgets/browserbox.h | |
parent | ed41c67908b8d6289f0e5eb49f101c851d9adc75 (diff) | |
download | manaverse-7cd309e7c9e0200cedb45edfeeba5a601d3fb446.tar.gz manaverse-7cd309e7c9e0200cedb45edfeeba5a601d3fb446.tar.bz2 manaverse-7cd309e7c9e0200cedb45edfeeba5a601d3fb446.tar.xz manaverse-7cd309e7c9e0200cedb45edfeeba5a601d3fb446.zip |
Impliment support for images in browser box. Enabled for help window.
Diffstat (limited to 'src/gui/widgets/browserbox.h')
-rw-r--r-- | src/gui/widgets/browserbox.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h index a1939bc6d..258e0bd09 100644 --- a/src/gui/widgets/browserbox.h +++ b/src/gui/widgets/browserbox.h @@ -30,6 +30,8 @@ #include <list> #include <vector> +class Image; +class Resource; class LinkHandler; struct BROWSER_LINK @@ -43,13 +45,22 @@ class LinePart { public: LinePart(int x, int y, gcn::Color color, std::string text) : - mX(x), mY(y), mColor(color), mText(text) + mX(x), mY(y), mColor(color), mText(text), mType(0), mImage(0) { } + LinePart(int x, int y, gcn::Color color, Image *image) : + mX(x), mY(y), mColor(color), mText(""), mType(1), mImage(image) + { + } + + ~LinePart(); + int mX, mY; gcn::Color mColor; std::string mText; + unsigned char mType; + Image *mImage; }; /** @@ -101,6 +112,8 @@ class BrowserBox : public gcn::Widget, */ void addRow(const std::string &row, bool atTop = false); + void addImage(const std::string &path); + /** * Remove all rows. */ @@ -178,6 +191,9 @@ class BrowserBox : public gcn::Widget, void setProcessVersion(bool n) { mProcessVersion = n; } + void setEnableImages(bool n) + { mEnableImages = n; } + private: int calcHeight(); @@ -205,6 +221,7 @@ class BrowserBox : public gcn::Widget, int mUpdateTime; bool mAlwaysUpdate; bool mProcessVersion; + bool mEnableImages; }; #endif |