MyGUI::Tab Class Reference

#include <MyGUI_Tab.h>

Inheritance diagram for MyGUI::Tab:
Inheritance graph
[legend]

Data Structures

struct  TabItemInfo

Public Types

typedef RTTIBase Base
typedef Tab RTTIBase
typedef std::vector< TabItemInfoVectorTabItemInfo

Public Member Functions

virtual const std::string & getTypeName () const
virtual bool isType (const std::type_info &_type) const
template<typename Type >
bool isType () const
 Tab ()
virtual void setPosition (const IntPoint &_value)
virtual void setSize (const IntSize &_value)
virtual void setCoord (const IntCoord &_value)
void setPosition (int _left, int _top)
void setSize (int _width, int _height)
void setCoord (int _left, int _top, int _width, int _height)
size_t getItemCount ()
 Get number of items.
TabItemPtr insertItemAt (size_t _index, const UString &_name, Any _data=Any::Null)
 Insert an item into a array at a specified position.
TabItemPtr insertItem (TabItemPtr _to, const UString &_name, Any _data=Any::Null)
 Insert an item into a array.
TabItemPtr addItem (const UString &_name, Any _data=Any::Null)
 Add an item to the end of a array.
void removeItemAt (size_t _index)
 Remove item at a specified position.
void removeItem (TabItemPtr _item)
 Remove item.
void removeAllItems ()
 Remove all items.
TabItemPtr getItemAt (size_t _index)
 Get item from specified position.
size_t getItemIndex (TabItemPtr _item)
 Get item index.
size_t findItemIndex (TabItemPtr _item)
 Search item, returns the position of the first occurrence in array or ITEM_NONE if item not found.
size_t findItemIndexWith (const UString &_name)
 Search item, returns the position of the first occurrence in array or ITEM_NONE if item not found.
TabItemPtr findItemWith (const UString &_name)
 Search item, returns the item of the first occurrence in array or nullptr if item not found.
size_t getIndexSelected ()
 Get index of selected item (ITEM_NONE if none selected).
TabItemPtr getItemSelected ()
 Get selected item (nullptr if none selected).
void setIndexSelected (size_t _index)
 Select specified _index.
void setItemSelected (TabItemPtr _item)
 Select item.
void setItemDataAt (size_t _index, Any _data)
 Replace an item data at a specified position.
void setItemData (TabItemPtr _item, Any _data)
 Replace an item data.
void clearItemDataAt (size_t _index)
 Clear an item data at a specified position.
void clearItemData (TabItemPtr _item)
 Clear an item data.
template<typename ValueType >
ValueType * getItemDataAt (size_t _index, bool _throw=true)
 Get item data from specified position.
template<typename ValueType >
ValueType * getItemData (TabItemPtr _item, bool _throw=true)
 Get item data.
void setItemNameAt (size_t _index, const UString &_name)
 Replace an item name at a specified position.
void setItemName (TabItemPtr _item, const UString &_name)
 Replace an item name.
const UStringgetItemNameAt (size_t _index)
 Get item name from specified position.
const UStringgetItemName (TabItemPtr _item)
 Get item name.
void beginToItemAt (size_t _index)
 Move all elements so specified becomes visible.
void beginToItem (TabItemPtr _item)
 Move all elements so specified becomes visible.
void beginToItemFirst ()
 Move all elements so first becomes visible.
void beginToItemLast ()
 Move all elements so last becomes visible.
void beginToItemSelected ()
 Move all elements so selected becomes visible.
void setButtonWidthAt (size_t _index, int _width=DEFAULT)
 Set button width at a specified position.
void setButtonWidth (TabItemPtr _item, int _width=DEFAULT)
 Set button width.
int getButtonWidthAt (size_t _index)
 Get button width at a specified position.
int getButtonWidth (TabItemPtr _item)
 Get button width.
void setButtonDefaultWidth (int _value)
int getButtonDefaultWidth ()
void setButtonAutoWidth (bool _value)
bool getButtonAutoWidth ()
void setSmoothShow (bool _value)
bool getSmoothShow ()
virtual void setProperty (const std::string &_key, const std::string &_value)
virtual void _initialise (WidgetStyle _style, const IntCoord &_coord, Align _align, ResourceSkin *_info, WidgetPtr _parent, ICroppedRectangle *_croppedParent, IWidgetCreator *_creator, const std::string &_name)
 __declspec (deprecated("use : void Widget::setCoord(const IntCoord& _coord)")) void setPosition(const IntCoord &_coord)
 __declspec (deprecated("use : void Widget::setCoord(int _left, int _top, int _width, int _height)")) void setPosition(int _left
void baseChangeWidgetSkin (ResourceSkin *_info)
virtual WidgetPtr baseCreateWidget (WidgetStyle _style, const std::string &_type, const std::string &_skin, const IntCoord &_coord, Align _align, const std::string &_layer, const std::string &_name)
void updateBar ()
void notifyPressedButtonEvent (MyGUI::WidgetPtr _sender)
void notifyPressedBarButtonEvent (MyGUI::WidgetPtr _sender)
int _getTextWidth (const UString &_text)
void _showItem (TabItemPtr _sheet, bool _show, bool _smooth)
void _createItemButton ()
void _insertItem (size_t _index, const UString &_name, TabItemPtr _sheet, Any _data)
void _notifyDeleteItem (TabItemPtr _item)

Static Public Member Functions

static const std::string & getClassTypeName ()

Data Fields

EventPair
< EventHandle_WidgetSizeT,
EventHandle_TabPtrSizeT
eventTabChangeSelect
int _top
int int _width

Friends

class TabItem

Detailed Description

Definition at line 37 of file MyGUI_Tab.h.


Member Typedef Documentation

Definition at line 44 of file MyGUI_Tab.h.

Reimplemented from MyGUI::Widget.

Definition at line 44 of file MyGUI_Tab.h.

Definition at line 65 of file MyGUI_Tab.h.


Constructor & Destructor Documentation

MyGUI::Tab::Tab (  ) 

Definition at line 36 of file MyGUI_Tab.cpp.


Member Function Documentation

MyGUI::Tab::__declspec ( deprecated("use : void Widget::setCoord(int _left, int _top, int _width, int _height)")   ) 
Deprecated:
"use : void Widget::setCoord(int _left, int _top, int _width, int _height)"

Reimplemented from MyGUI::Widget.

MyGUI::Tab::__declspec ( deprecated("use : void Widget::setCoord(const IntCoord& _coord)")   )  const [inline]
Deprecated:
"use : void Widget::setCoord(const IntCoord& _coord)"

Reimplemented from MyGUI::Widget.

Definition at line 252 of file MyGUI_Tab.h.

void MyGUI::Tab::_createItemButton (  ) 

Definition at line 528 of file MyGUI_Tab.cpp.

int MyGUI::Tab::_getTextWidth ( const UString _text  ) 

Definition at line 536 of file MyGUI_Tab.cpp.

void MyGUI::Tab::_initialise ( WidgetStyle  _style,
const IntCoord _coord,
Align  _align,
ResourceSkin _info,
WidgetPtr  _parent,
ICroppedRectangle _croppedParent,
IWidgetCreator _creator,
const std::string &  _name 
) [virtual]

Definition at line 56 of file MyGUI_Tab.cpp.

void MyGUI::Tab::_insertItem ( size_t  _index,
const UString _name,
TabItemPtr  _sheet,
Any  _data 
)

Definition at line 577 of file MyGUI_Tab.cpp.

void MyGUI::Tab::_notifyDeleteItem ( TabItemPtr  _item  ) 

Definition at line 552 of file MyGUI_Tab.cpp.

void MyGUI::Tab::_showItem ( TabItemPtr  _sheet,
bool  _show,
bool  _smooth 
)

Definition at line 503 of file MyGUI_Tab.cpp.

TabItemPtr MyGUI::Tab::addItem ( const UString _name,
Any  _data = Any::Null 
) [inline]

Add an item to the end of a array.

Definition at line 96 of file MyGUI_Tab.h.

void MyGUI::Tab::baseChangeWidgetSkin ( ResourceSkin _info  )  [virtual]

Reimplemented from MyGUI::Widget.

Type Constraints

Definition at line 69 of file MyGUI_Tab.cpp.

WidgetPtr MyGUI::Tab::baseCreateWidget ( WidgetStyle  _style,
const std::string &  _type,
const std::string &  _skin,
const IntCoord _coord,
Align  _align,
const std::string &  _layer,
const std::string &  _name 
) [virtual]

Reimplemented from MyGUI::Widget.

Definition at line 160 of file MyGUI_Tab.cpp.

void MyGUI::Tab::beginToItem ( TabItemPtr  _item  )  [inline]

Move all elements so specified becomes visible.

Definition at line 193 of file MyGUI_Tab.h.

void MyGUI::Tab::beginToItemAt ( size_t  _index  ) 

Move all elements so specified becomes visible.

Definition at line 390 of file MyGUI_Tab.cpp.

void MyGUI::Tab::beginToItemFirst (  )  [inline]

Move all elements so first becomes visible.

Definition at line 196 of file MyGUI_Tab.h.

void MyGUI::Tab::beginToItemLast (  )  [inline]

Move all elements so last becomes visible.

Definition at line 199 of file MyGUI_Tab.h.

void MyGUI::Tab::beginToItemSelected (  )  [inline]

Move all elements so selected becomes visible.

Definition at line 202 of file MyGUI_Tab.h.

void MyGUI::Tab::clearItemData ( TabItemPtr  _item  )  [inline]

Clear an item data.

Definition at line 153 of file MyGUI_Tab.h.

void MyGUI::Tab::clearItemDataAt ( size_t  _index  )  [inline]

Clear an item data at a specified position.

Definition at line 151 of file MyGUI_Tab.h.

size_t MyGUI::Tab::findItemIndex ( TabItemPtr  _item  ) 

Search item, returns the position of the first occurrence in array or ITEM_NONE if item not found.

Definition at line 657 of file MyGUI_Tab.cpp.

size_t MyGUI::Tab::findItemIndexWith ( const UString _name  ) 

Search item, returns the position of the first occurrence in array or ITEM_NONE if item not found.

Definition at line 666 of file MyGUI_Tab.cpp.

TabItemPtr MyGUI::Tab::findItemWith ( const UString _name  ) 

Search item, returns the item of the first occurrence in array or nullptr if item not found.

Definition at line 675 of file MyGUI_Tab.cpp.

bool MyGUI::Tab::getButtonAutoWidth (  )  [inline]

Get button auto width flag

Definition at line 228 of file MyGUI_Tab.h.

int MyGUI::Tab::getButtonDefaultWidth (  )  [inline]

Get default button width

Definition at line 223 of file MyGUI_Tab.h.

int MyGUI::Tab::getButtonWidth ( TabItemPtr  _item  )  [inline]

Get button width.

Definition at line 216 of file MyGUI_Tab.h.

int MyGUI::Tab::getButtonWidthAt ( size_t  _index  ) 

Get button width at a specified position.

Definition at line 604 of file MyGUI_Tab.cpp.

static const std::string& MyGUI::Tab::getClassTypeName (  )  [inline, static]

Reimplemented from MyGUI::Widget.

Definition at line 44 of file MyGUI_Tab.h.

size_t MyGUI::Tab::getIndexSelected (  )  [inline]

Get index of selected item (ITEM_NONE if none selected).

Definition at line 130 of file MyGUI_Tab.h.

TabItemPtr MyGUI::Tab::getItemAt ( size_t  _index  ) 

Get item from specified position.

Definition at line 616 of file MyGUI_Tab.cpp.

size_t MyGUI::Tab::getItemCount (  )  [inline]

Get number of items.

Definition at line 85 of file MyGUI_Tab.h.

template<typename ValueType >
ValueType* MyGUI::Tab::getItemData ( TabItemPtr  _item,
bool  _throw = true 
) [inline]

Get item data.

Definition at line 164 of file MyGUI_Tab.h.

template<typename ValueType >
ValueType* MyGUI::Tab::getItemDataAt ( size_t  _index,
bool  _throw = true 
) [inline]

Get item data from specified position.

Definition at line 157 of file MyGUI_Tab.h.

size_t MyGUI::Tab::getItemIndex ( TabItemPtr  _item  ) 

Get item index.

Definition at line 648 of file MyGUI_Tab.cpp.

const UString& MyGUI::Tab::getItemName ( TabItemPtr  _item  )  [inline]

Get item name.

Definition at line 183 of file MyGUI_Tab.h.

const UString & MyGUI::Tab::getItemNameAt ( size_t  _index  ) 

Get item name from specified position.

Definition at line 610 of file MyGUI_Tab.cpp.

TabItemPtr MyGUI::Tab::getItemSelected (  ) 

Get selected item (nullptr if none selected).

Definition at line 684 of file MyGUI_Tab.cpp.

bool MyGUI::Tab::getSmoothShow (  )  [inline]

Get smooth sheets showing flag

Definition at line 233 of file MyGUI_Tab.h.

virtual const std::string& MyGUI::Tab::getTypeName (  )  const [inline, virtual]

Reimplemented from MyGUI::Widget.

Definition at line 44 of file MyGUI_Tab.h.

TabItemPtr MyGUI::Tab::insertItem ( TabItemPtr  _to,
const UString _name,
Any  _data = Any::Null 
) [inline]

Insert an item into a array.

Definition at line 90 of file MyGUI_Tab.h.

TabItemPtr MyGUI::Tab::insertItemAt ( size_t  _index,
const UString _name,
Any  _data = Any::Null 
)

Insert an item into a array at a specified position.

Definition at line 172 of file MyGUI_Tab.cpp.

template<typename Type >
bool MyGUI::Tab::isType (  )  const [inline]

Reimplemented from MyGUI::Widget.

Definition at line 44 of file MyGUI_Tab.h.

virtual bool MyGUI::Tab::isType ( const std::type_info &  _type  )  const [inline, virtual]

Reimplemented from MyGUI::Widget.

Definition at line 44 of file MyGUI_Tab.h.

void MyGUI::Tab::notifyPressedBarButtonEvent ( MyGUI::WidgetPtr  _sender  ) 

Definition at line 353 of file MyGUI_Tab.cpp.

void MyGUI::Tab::notifyPressedButtonEvent ( MyGUI::WidgetPtr  _sender  ) 

Definition at line 329 of file MyGUI_Tab.cpp.

void MyGUI::Tab::removeAllItems (  ) 

Remove all items.

Definition at line 628 of file MyGUI_Tab.cpp.

void MyGUI::Tab::removeItem ( TabItemPtr  _item  )  [inline]

Remove item.

Definition at line 104 of file MyGUI_Tab.h.

void MyGUI::Tab::removeItemAt ( size_t  _index  ) 

Remove item at a specified position.

Definition at line 622 of file MyGUI_Tab.cpp.

void MyGUI::Tab::setButtonAutoWidth ( bool  _value  ) 

Enable or disable button auto width

Definition at line 432 of file MyGUI_Tab.cpp.

void MyGUI::Tab::setButtonDefaultWidth ( int  _value  ) 

Set default button width and disable autowidth mode

Definition at line 425 of file MyGUI_Tab.cpp.

void MyGUI::Tab::setButtonWidth ( TabItemPtr  _item,
int  _width = DEFAULT 
) [inline]

Set button width.

Definition at line 211 of file MyGUI_Tab.h.

void MyGUI::Tab::setButtonWidthAt ( size_t  _index,
int  _width = DEFAULT 
)

Set button width at a specified position.

Definition at line 449 of file MyGUI_Tab.cpp.

void MyGUI::Tab::setCoord ( int  _left,
int  _top,
int  _width,
int  _height 
) [inline]

See Widget::setCoord(const IntCoord& _coord)

Reimplemented from MyGUI::Widget.

Definition at line 79 of file MyGUI_Tab.h.

void MyGUI::Tab::setCoord ( const IntCoord _value  )  [virtual]

Set widget position and size

Reimplemented from MyGUI::Widget.

Definition at line 196 of file MyGUI_Tab.cpp.

void MyGUI::Tab::setIndexSelected ( size_t  _index  ) 

Select specified _index.

Definition at line 480 of file MyGUI_Tab.cpp.

void MyGUI::Tab::setItemData ( TabItemPtr  _item,
Any  _data 
) [inline]

Replace an item data.

Definition at line 148 of file MyGUI_Tab.h.

void MyGUI::Tab::setItemDataAt ( size_t  _index,
Any  _data 
)

Replace an item data at a specified position.

Definition at line 598 of file MyGUI_Tab.cpp.

void MyGUI::Tab::setItemName ( TabItemPtr  _item,
const UString _name 
) [inline]

Replace an item name.

Definition at line 177 of file MyGUI_Tab.h.

void MyGUI::Tab::setItemNameAt ( size_t  _index,
const UString _name 
)

Replace an item name at a specified position.

Definition at line 465 of file MyGUI_Tab.cpp.

void MyGUI::Tab::setItemSelected ( TabItemPtr  _item  )  [inline]

Select item.

Definition at line 139 of file MyGUI_Tab.h.

void MyGUI::Tab::setPosition ( int  _left,
int  _top 
) [inline]

See Widget::setPosition(const IntPoint& _pos)

Reimplemented from MyGUI::Widget.

Definition at line 75 of file MyGUI_Tab.h.

void MyGUI::Tab::setPosition ( const IntPoint _value  )  [virtual]

Set widget position (position of left top corner)

Reimplemented from MyGUI::Widget.

Definition at line 182 of file MyGUI_Tab.cpp.

void MyGUI::Tab::setProperty ( const std::string &  _key,
const std::string &  _value 
) [virtual]

Reimplemented from MyGUI::Widget.

Definition at line 689 of file MyGUI_Tab.cpp.

void MyGUI::Tab::setSize ( int  _width,
int  _height 
) [inline]

See Widget::setSize(const IntSize& _size)

Reimplemented from MyGUI::Widget.

Definition at line 77 of file MyGUI_Tab.h.

void MyGUI::Tab::setSize ( const IntSize _value  )  [virtual]

Set widget size

Reimplemented from MyGUI::Widget.

Definition at line 189 of file MyGUI_Tab.cpp.

void MyGUI::Tab::setSmoothShow ( bool  _value  )  [inline]

Enable or disable smooth sheets showing

Definition at line 231 of file MyGUI_Tab.h.

void MyGUI::Tab::updateBar (  ) 

Definition at line 203 of file MyGUI_Tab.cpp.


Friends And Related Function Documentation

friend class TabItem [friend]

Definition at line 42 of file MyGUI_Tab.h.


Field Documentation

Reimplemented from MyGUI::Widget.

Definition at line 255 of file MyGUI_Tab.h.

Reimplemented from MyGUI::Widget.

Definition at line 255 of file MyGUI_Tab.h.

Event : Active Tab sheet changed
signature : void method(MyGUI::TabPtr _sender, size_t _index)

Parameters:
_sender widget that called this event
_index Index of selected sheet

Definition at line 244 of file MyGUI_Tab.h.


The documentation for this class was generated from the following files:

Generated on 3 Dec 2009 for MyGUI by  doxygen 1.6.1