summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tab.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-14 17:22:07 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-14 17:22:07 +0300
commit0b3aafe2859d9ea1c4009eed8a87f69c41cbc14b (patch)
tree5489a0ab504f34e7dcc7c273f274b52c76269206 /src/gui/widgets/tab.h
parentc23959e3c40e97f9c1aeb9eabc52131b6fa68f2a (diff)
downloadmanaplus-0b3aafe2859d9ea1c4009eed8a87f69c41cbc14b.tar.gz
manaplus-0b3aafe2859d9ea1c4009eed8a87f69c41cbc14b.tar.bz2
manaplus-0b3aafe2859d9ea1c4009eed8a87f69c41cbc14b.tar.xz
manaplus-0b3aafe2859d9ea1c4009eed8a87f69c41cbc14b.zip
Dont use guichan tab and tabbedarea anymore.
It have some methods and widget connections what cant be changed by overloading.
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();