summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tab.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/tab.h')
-rw-r--r--src/gui/widgets/tab.h32
1 files changed, 29 insertions, 3 deletions
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 <guichan/basiccontainer.hpp>
+#include <guichan/mouselistener.hpp>
+
#include <guichan/widgets/label.hpp>
-#include <guichan/widgets/tab.hpp>
+
#include <guichan/widgetlistener.hpp>
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();