00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef TABBEDAREA_H
00023 #define TABBEDAREA_H
00024
00025 #include <guichan/widget.hpp>
00026 #include <guichan/widgets/container.hpp>
00027 #include <guichan/widgets/tabbedarea.hpp>
00028
00029 #include <string>
00030
00031 class Tab;
00032
00036 class TabbedArea : public gcn::TabbedArea
00037 {
00038 public:
00042 TabbedArea();
00043
00047 void draw(gcn::Graphics *graphics);
00048
00054 int getNumberOfTabs() const;
00055
00059 Tab *getTab(const std::string &name) const;
00060
00064 gcn::Widget *getWidget(const std::string &name) const;
00065
00066 using gcn::TabbedArea::addTab;
00067
00075 void addTab(const std::string &caption, gcn::Widget *widget);
00076
00080 void removeTab(Tab *tab);
00081
00085 void logic();
00086
00087 int getContainerHeight() const
00088 { return mWidgetContainer->getHeight(); }
00089
00090 void setSelectedTab(unsigned int index)
00091 { gcn::TabbedArea::setSelectedTab(index); }
00092
00093 void setSelectedTab(gcn::Tab *tab);
00094
00095 private:
00096 typedef std::vector< std::pair<gcn::Tab*, gcn::Widget*> > TabContainer;
00097 };
00098
00099 #endif