diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-03-01 19:13:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-03-01 19:13:11 +0300 |
commit | a260aeab234704ace8ba672b1d1ce57e18425e07 (patch) | |
tree | e215c6eeeae7e6c2ca4f4453718cef6ca9a8af6a /src/gui/widgets/browserbox.h | |
parent | 382067b05c4fe97bcf0da0143405375ec295f7c6 (diff) | |
parent | 2c62286a7ecf246e8a445dd7d00f618efae2a96a (diff) | |
download | plus-a260aeab234704ace8ba672b1d1ce57e18425e07.tar.gz plus-a260aeab234704ace8ba672b1d1ce57e18425e07.tar.bz2 plus-a260aeab234704ace8ba672b1d1ce57e18425e07.tar.xz plus-a260aeab234704ace8ba672b1d1ce57e18425e07.zip |
Merge branch 'master' into stable
Diffstat (limited to 'src/gui/widgets/browserbox.h')
-rw-r--r-- | src/gui/widgets/browserbox.h | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h index 09f06bc39..8202fa548 100644 --- a/src/gui/widgets/browserbox.h +++ b/src/gui/widgets/browserbox.h @@ -24,10 +24,9 @@ #ifndef GUI_WIDGETS_BROWSERBOX_H #define GUI_WIDGETS_BROWSERBOX_H -#include "gui/widgets/widget2.h" +#include "listeners/mouselistener.h" -#include <guichan/mouselistener.hpp> -#include <guichan/widget.hpp> +#include "gui/widgets/widget.h" #include <list> #include <vector> @@ -60,8 +59,8 @@ struct BrowserLink final class LinePart final { public: - LinePart(const int x, const int y, const gcn::Color &color, - const gcn::Color &color2, const std::string &text, + LinePart(const int x, const int y, const Color &color, + const Color &color2, const std::string &text, const bool bold) : mX(x), mY(y), @@ -74,8 +73,8 @@ class LinePart final { } - LinePart(const int x, const int y, const gcn::Color &color, - const gcn::Color &color2, Image *const image) : + LinePart(const int x, const int y, const Color &color, + const Color &color2, Image *const image) : mX(x), mY(y), mColor(color), @@ -90,8 +89,8 @@ class LinePart final ~LinePart(); int mX, mY; - gcn::Color mColor; - gcn::Color mColor2; + Color mColor; + Color mColor2; std::string mText; unsigned char mType; Image *mImage; @@ -102,9 +101,8 @@ class LinePart final * A simple browser box able to handle links and forward events to the * parent conteiner. */ -class BrowserBox final : public gcn::Widget, - public Widget2, - public gcn::MouseListener +class BrowserBox final : public Widget, + public MouseListener { public: /** @@ -158,14 +156,14 @@ class BrowserBox final : public gcn::Widget, /** * Handles mouse actions. */ - void mousePressed(gcn::MouseEvent &event) override final; + void mousePressed(MouseEvent &event) override final; - void mouseMoved(gcn::MouseEvent &event) override final; + void mouseMoved(MouseEvent &event) override final; /** * Draws the browser box. */ - void draw(gcn::Graphics *graphics) override final; + void draw(Graphics *graphics) override final; void updateHeight(); @@ -231,8 +229,8 @@ class BrowserBox final : public gcn::Widget, int getPadding() const A_WARN_UNUSED { return mPadding; } - void setForegroundColorAll(const gcn::Color &color1, - const gcn::Color &color2); + void setForegroundColorAll(const Color &color1, + const Color &color2); int getDataWidth() const { return mDataWidth; } @@ -269,9 +267,9 @@ class BrowserBox final : public gcn::Widget, int mItemPadding; unsigned int mDataWidth; - gcn::Color mHighlightColor; - gcn::Color mHyperLinkColor; - gcn::Color mColors[2][COLORS_MAX]; + Color mHighlightColor; + Color mHyperLinkColor; + Color mColors[2][COLORS_MAX]; bool mOpaque; bool mUseLinksAndUserColors; |