summaryrefslogtreecommitdiff
path: root/src/gui/tabbedcontainer.h
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2007-02-27 16:31:34 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2007-02-27 16:31:34 +0000
commit88a86283083800443c4f5e934fface5988c42fe8 (patch)
treefa6a26c56836d8b1f148d362eb0b6b0e0ed3ce9b /src/gui/tabbedcontainer.h
parenta064b260e2950b5a153e51c13f579095c53a9a7a (diff)
downloadmana-client-88a86283083800443c4f5e934fface5988c42fe8.tar.gz
mana-client-88a86283083800443c4f5e934fface5988c42fe8.tar.bz2
mana-client-88a86283083800443c4f5e934fface5988c42fe8.tar.xz
mana-client-88a86283083800443c4f5e934fface5988c42fe8.zip
Tabbed containers now display the button of the active tab pressed all the time.
Diffstat (limited to 'src/gui/tabbedcontainer.h')
-rw-r--r--src/gui/tabbedcontainer.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/tabbedcontainer.h b/src/gui/tabbedcontainer.h
index 2dc017ae..7f8deef9 100644
--- a/src/gui/tabbedcontainer.h
+++ b/src/gui/tabbedcontainer.h
@@ -26,6 +26,7 @@
#include <iosfwd>
#include <vector>
+#include <map>
#include <guichan/actionlistener.hpp>
@@ -41,18 +42,25 @@ class TabbedContainer : public gcn::Container, public gcn::ActionListener
void addTab(gcn::Widget *widget, const std::string &caption);
+ void removeTab(const std::string &caption);
+
void logic();
void action(const gcn::ActionEvent &event);
void setOpaque(bool opaque);
+ short getNumberOfTabs();
+
+ std::string getActiveWidget();
+
private:
typedef std::vector<gcn::Widget*> Widgets;
typedef Widgets::iterator WidgetIterator;
- Widgets mTabs; // The actual tabs at the top
+ std::map<std::string, gcn::Widget*> mTabs; // tabs mapped to their channel name
Widgets mContents; // The contents of the tabs
+ std::map<gcn::Widget*, std::string> mWidgets;
gcn::Widget *mActiveContent;
};