summaryrefslogtreecommitdiff
path: root/src/gui/widgets/browserbox.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-05-18 01:38:38 +0300
committerAndrei Karas <akaras@inbox.ru>2011-05-18 01:48:04 +0300
commit7cd309e7c9e0200cedb45edfeeba5a601d3fb446 (patch)
treec52eb86ae689ffbd088442d90b6da073ac7d98c0 /src/gui/widgets/browserbox.h
parented41c67908b8d6289f0e5eb49f101c851d9adc75 (diff)
downloadmv-7cd309e7c9e0200cedb45edfeeba5a601d3fb446.tar.gz
mv-7cd309e7c9e0200cedb45edfeeba5a601d3fb446.tar.bz2
mv-7cd309e7c9e0200cedb45edfeeba5a601d3fb446.tar.xz
mv-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.h19
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