diff options
author | David Athay <ko2fan@gmail.com> | 2008-05-15 14:07:19 +0000 |
---|---|---|
committer | David Athay <ko2fan@gmail.com> | 2008-05-15 14:07:19 +0000 |
commit | f4c0d85edfc8c6fb0d4d436f098e841bac72f5f1 (patch) | |
tree | 34a053b8ec7995dab3b54b025764ff511a0b6954 /src/gui/widgets/tabbedarea.h | |
parent | 96b79b905b22bfcf4b35c26e6e70065e4ce3222c (diff) | |
download | mana-f4c0d85edfc8c6fb0d4d436f098e841bac72f5f1.tar.gz mana-f4c0d85edfc8c6fb0d4d436f098e841bac72f5f1.tar.bz2 mana-f4c0d85edfc8c6fb0d4d436f098e841bac72f5f1.tar.xz mana-f4c0d85edfc8c6fb0d4d436f098e841bac72f5f1.zip |
Added tab with image based on button
Diffstat (limited to 'src/gui/widgets/tabbedarea.h')
-rw-r--r-- | src/gui/widgets/tabbedarea.h | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h index bc623427..e24b9794 100644 --- a/src/gui/widgets/tabbedarea.h +++ b/src/gui/widgets/tabbedarea.h @@ -25,11 +25,12 @@ #define _TMW_TABBEDAREA_H #include <guichan/widget.hpp> -#include <guichan/widgets/tab.hpp> #include <guichan/widgets/tabbedarea.hpp> #include <string> +class Tab; + /** * A tabbed area, the same as the guichan tabbed area in 0.8, but extended */ @@ -54,7 +55,7 @@ class TabbedArea : public gcn::TabbedArea /** * Return tab with specified name as caption */ - gcn::Tab* getTab(const std::string &name); + Tab* getTab(const std::string &name); /** * Returns the widget with the tab that has specified caption @@ -62,9 +63,26 @@ class TabbedArea : public gcn::TabbedArea gcn::Widget* getWidget(const std::string &name); /** + * Add a tab + * @param caption The Caption to display + * @param widget The widget to show when tab is selected + */ + void addTab(const std::string &caption, gcn::Widget *widget); + + /** + * Add a tab + * @param tab The tab + * @param widget The widget to display + */ + void addTab(Tab *tab, gcn::Widget *widget); + + /** * Overload the remove tab function as its broken in guichan 0.8 */ - void removeTab(gcn::Tab *tab); + void removeTab(Tab *tab); + + private: + typedef std::vector< std::pair<gcn::Tab*, gcn::Widget*> > TabContainer; }; #endif |