From 0b3aafe2859d9ea1c4009eed8a87f69c41cbc14b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 14 Oct 2012 17:22:07 +0300 Subject: Dont use guichan tab and tabbedarea anymore. It have some methods and widget connections what cant be changed by overloading. --- src/gui/widgets/tab.h | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) (limited to 'src/gui/widgets/tab.h') diff --git a/src/gui/widgets/tab.h b/src/gui/widgets/tab.h index 28ae9f392..8c6e7d115 100644 --- a/src/gui/widgets/tab.h +++ b/src/gui/widgets/tab.h @@ -23,19 +23,25 @@ #ifndef TAB_H #define TAB_H +#include +#include + #include -#include + #include class GraphicsVertexes; class ImageRect; +class Label; class TabbedArea; /** * A tab, the same as the Guichan tab in 0.8, but extended to allow * transparency. */ -class Tab : public gcn::Tab, public gcn::WidgetListener +class Tab : public gcn::BasicContainer, + public gcn::MouseListener, + public gcn::WidgetListener { public: Tab(); @@ -99,15 +105,35 @@ class Tab : public gcn::Tab, public gcn::WidgetListener void setLabelFont(gcn::Font *const font); - gcn::Label *getLabel() const + Label *getLabel() const { return mLabel; } + void adjustSize(); + + void setTabbedArea(TabbedArea* tabbedArea); + + TabbedArea* getTabbedArea(); + + void setCaption(const std::string& caption); + + const std::string &getCaption() const; + + void mouseEntered(gcn::MouseEvent &mouseEvent) override; + + void mouseExited(gcn::MouseEvent &mouseEvent) override; + protected: friend class TabbedArea; virtual void setCurrent() { } + Label* mLabel; + + bool mHasMouse; + + TabbedArea* mTabbedArea; + private: /** Load images if no other instances exist yet */ void init(); -- cgit v1.2.3-70-g09d2