ElementTabSet.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef ROCKETCONTROLSELEMENTTABSET_H
00029 #define ROCKETCONTROLSELEMENTTABSET_H
00030
00031 #include <Rocket/Core/Element.h>
00032 #include <Rocket/Core/EventListener.h>
00033 #include <Rocket/Controls/Header.h>
00034
00035 namespace Rocket {
00036 namespace Controls {
00037
00044 class ROCKETCONTROLS_API ElementTabSet : public Core::Element, public Core::EventListener
00045 {
00046 public:
00047 ElementTabSet(const Rocket::Core::String& tag);
00048 ~ElementTabSet();
00049
00053 void SetTab(int tab_index, const Rocket::Core::String& rml);
00057 void SetPanel(int tab_index, const Rocket::Core::String& rml);
00058
00062 void SetTab(int tab_index, Core::Element* element);
00066 void SetPanel(int tab_index, Core::Element* element);
00067
00070 void RemoveTab(int tab_index);
00071
00074 int GetNumTabs();
00075
00078 void SetActiveTab(int tab_index);
00079
00082 int GetActiveTab() const;
00083
00085 void ProcessEvent(Core::Event& event);
00086
00087 protected:
00088
00089 virtual void OnChildAdd(Core::Element* child);
00090 virtual void OnChildRemove(Core::Element* child);
00091
00092 private:
00093 Core::Element* GetChildByTag(const Rocket::Core::String& tag);
00094
00095 int active_tab;
00096 };
00097
00098 }
00099 }
00100
00101 #endif