summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabbedarea.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/tabbedarea.h')
-rw-r--r--src/gui/widgets/tabbedarea.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h
index 29ba2f76..a64d855f 100644
--- a/src/gui/widgets/tabbedarea.h
+++ b/src/gui/widgets/tabbedarea.h
@@ -23,6 +23,7 @@
#define TABBEDAREA_H
#include <guichan/widget.hpp>
+#include <guichan/widgetlistener.hpp>
#include <guichan/widgets/container.hpp>
#include <guichan/widgets/tabbedarea.hpp>
@@ -33,7 +34,7 @@ class Tab;
/**
* A tabbed area, the same as the guichan tabbed area in 0.8, but extended
*/
-class TabbedArea : public gcn::TabbedArea
+class TabbedArea : public gcn::TabbedArea, public gcn::WidgetListener
{
public:
/**
@@ -71,6 +72,14 @@ class TabbedArea : public gcn::TabbedArea
using gcn::TabbedArea::addTab;
/**
+ * Add a tab. Overridden since it needs to size the widget.
+ *
+ * @param tab The tab widget for the tab.
+ * @param widget The widget to view when the tab is selected.
+ */
+ void addTab(gcn::Tab* tab, gcn::Widget* widget);
+
+ /**
* Add a tab. Overridden since it needs to create an instance of Tab
* instead of gcn::Tab.
*
@@ -97,6 +106,8 @@ class TabbedArea : public gcn::TabbedArea
void setSelectedTab(gcn::Tab *tab);
+ void widgetResized(const gcn::Event &event);
+
private:
typedef std::vector< std::pair<gcn::Tab*, gcn::Widget*> > TabContainer;
};