00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __MYGUI_TAB_ITEM_H__
00024 #define __MYGUI_TAB_ITEM_H__
00025
00026 #include "MyGUI_Prerequest.h"
00027 #include "MyGUI_Widget.h"
00028 #include "MyGUI_Tab.h"
00029
00030 namespace MyGUI
00031 {
00032
00033 class MYGUI_EXPORT TabItem :
00034 public Widget
00035 {
00036 MYGUI_RTTI_DERIVED( TabItem )
00037
00038 public:
00039 TabItem();
00040
00042 virtual void setCaption(const UString& _value);
00044 virtual const UString& getCaption();
00045
00047 void setButtonWidth(int _value = DEFAULT);
00049 int getButtonWidth();
00050
00052 void setItemName(const UString& _value);
00054 const UString& getItemName();
00055
00057 void setItemData(Any _value);
00058
00060 template <typename ValueType>
00061 ValueType * getItemData(bool _throw = true)
00062 {
00063 return mOwner->getItemData<ValueType>(this, _throw);
00064 }
00065
00067 void setItemSelected();
00068
00070 void removeItem();
00071
00073 virtual void setProperty(const std::string& _key, const std::string& _value);
00074
00075
00076 virtual void _initialise(WidgetStyle _style, const IntCoord& _coord, Align _align, ResourceSkin* _info, Widget* _parent, ICroppedRectangle * _croppedParent, IWidgetCreator * _creator, const std::string& _name);
00077
00078 protected:
00079 virtual ~TabItem();
00080
00081 void setSelected(bool _value);
00082
00083 private:
00084 Tab* mOwner;
00085
00086 };
00087
00088 }
00089
00090 #endif // __MYGUI_TAB_ITEM_H__