MyGUI
3.0.3
|
#include <MyGUI_Tab.h>
Data Structures | |
struct | TabItemInfo |
Public Types | |
typedef RTTIBase | Base |
typedef Tab | RTTIBase |
typedef std::vector< TabItemInfo > | VectorTabItemInfo |
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 () const |
Get number of items. | |
TabItem * | insertItemAt (size_t _index, const UString &_name, Any _data=Any::Null) |
Insert an item into a array at a specified position. | |
TabItem * | insertItem (TabItem *_to, const UString &_name, Any _data=Any::Null) |
Insert an item into a array. | |
TabItem * | 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 (TabItem *_item) |
Remove item. | |
void | removeAllItems () |
Remove all items. | |
TabItem * | getItemAt (size_t _index) |
Get item from specified position. | |
size_t | getItemIndex (TabItem *_item) |
Get item index. | |
size_t | findItemIndex (TabItem *_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. | |
TabItem * | 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) | |
TabItem * | getItemSelected () |
Get selected item (nullptr if none selected) | |
void | setIndexSelected (size_t _index) |
Select specified _index. | |
void | setItemSelected (TabItem *_item) |
Select item. | |
void | setItemDataAt (size_t _index, Any _data) |
Replace an item data at a specified position. | |
void | setItemData (TabItem *_item, Any _data) |
Replace an item data. | |
void | clearItemDataAt (size_t _index) |
Clear an item data at a specified position. | |
void | clearItemData (TabItem *_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 (TabItem *_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 (TabItem *_item, const UString &_name) |
Replace an item name. | |
const UString & | getItemNameAt (size_t _index) |
Get item name from specified position. | |
const UString & | getItemName (TabItem *_item) |
Get item name. | |
void | beginToItemAt (size_t _index) |
Move all elements so specified becomes visible. | |
void | beginToItem (TabItem *_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 (TabItem *_item, int _width=DEFAULT) |
Set button width. | |
int | getButtonWidthAt (size_t _index) |
Get button width at a specified position. | |
int | getButtonWidth (TabItem *_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, Widget *_parent, ICroppedRectangle *_croppedParent, IWidgetCreator *_creator, const std::string &_name) |
void | setPosition (const IntCoord &_coord) |
void | setPosition (int _left, int _top, int _width, int _height) |
int | getSheetButtonWidthIndex (size_t _index) |
int | getSheetButtonWidth (TabItem *_sheet) |
void | setSheetButtonWidthIndex (size_t _index, int _width=DEFAULT) |
void | setSheetButtonWidth (TabItem *_sheet, int _width=DEFAULT) |
void | showBarButton (size_t _index) |
void | showBarSelectButton () |
size_t | getSheetCount () |
const UString & | getSheetName (TabItem *_sheet) |
const UString & | getSheetNameIndex (size_t _index) |
TabItem * | getSheet (size_t _index) |
void | setSheetNameIndex (size_t _index, const UString &_name, int _width=DEFAULT) |
void | setSheetName (TabItem *_sheet, const UString &_name, int _width=DEFAULT) |
TabItem * | addSheet (const UString &_name, int _width=DEFAULT) |
TabItem * | insertSheet (size_t _index, const UString &_name, int _width=DEFAULT) |
void | removeSheetIndex (size_t _index) |
void | removeSheet (TabItem *_sheet) |
void | selectSheetIndex (size_t _index, bool _smooth=true) |
void | selectSheet (TabItem *_sheet, bool _smooth=true) |
size_t | getSelectSheetIndex () |
size_t | getItemIndexSelected () |
void | setItemSelectedAt (size_t _index) |
Static Public Member Functions | |
static const std::string & | getClassTypeName () |
Data Fields | |
EventPair < EventHandle_WidgetSizeT, EventHandle_TabPtrSizeT > | eventTabChangeSelect |
Protected Member Functions | |
virtual | ~Tab () |
void | baseChangeWidgetSkin (ResourceSkin *_info) |
virtual Widget * | 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::Widget *_sender) |
void | notifyPressedBarButtonEvent (MyGUI::Widget *_sender) |
int | _getTextWidth (const UString &_text) |
void | _showItem (TabItem *_sheet, bool _show, bool _smooth) |
void | _createItemButton () |
void | _insertItem (size_t _index, const UString &_name, TabItem *_sheet, Any _data) |
void | _notifyDeleteItem (TabItem *_item) |
Friends | |
class | TabItem |
Definition at line 37 of file MyGUI_Tab.h.
typedef RTTIBase MyGUI::Tab::Base |
Definition at line 44 of file MyGUI_Tab.h.
typedef Tab MyGUI::Tab::RTTIBase |
Reimplemented from MyGUI::Widget.
Definition at line 44 of file MyGUI_Tab.h.
typedef std::vector<TabItemInfo> MyGUI::Tab::VectorTabItemInfo |
Definition at line 65 of file MyGUI_Tab.h.
MyGUI::Tab::Tab | ( | ) |
Definition at line 36 of file MyGUI_Tab.cpp.
MyGUI::Tab::~Tab | ( | ) | [protected, virtual] |
Definition at line 63 of file MyGUI_Tab.cpp.
void MyGUI::Tab::_createItemButton | ( | ) | [protected] |
Definition at line 530 of file MyGUI_Tab.cpp.
int MyGUI::Tab::_getTextWidth | ( | const UString & | _text | ) | [protected] |
Definition at line 538 of file MyGUI_Tab.cpp.
void MyGUI::Tab::_initialise | ( | WidgetStyle | _style, |
const IntCoord & | _coord, | ||
Align | _align, | ||
ResourceSkin * | _info, | ||
Widget * | _parent, | ||
ICroppedRectangle * | _croppedParent, | ||
IWidgetCreator * | _creator, | ||
const std::string & | _name | ||
) | [virtual] |
Reimplemented from MyGUI::Widget.
Definition at line 56 of file MyGUI_Tab.cpp.
void MyGUI::Tab::_insertItem | ( | size_t | _index, |
const UString & | _name, | ||
TabItem * | _sheet, | ||
Any | _data | ||
) | [protected] |
Definition at line 579 of file MyGUI_Tab.cpp.
void MyGUI::Tab::_notifyDeleteItem | ( | TabItem * | _item | ) | [protected] |
Definition at line 554 of file MyGUI_Tab.cpp.
void MyGUI::Tab::_showItem | ( | TabItem * | _sheet, |
bool | _show, | ||
bool | _smooth | ||
) | [protected] |
Definition at line 505 of file MyGUI_Tab.cpp.
TabItem* 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.
TabItem* MyGUI::Tab::addSheet | ( | const UString & | _name, |
int | _width = DEFAULT |
||
) | [inline] |
Definition at line 282 of file MyGUI_Tab.h.
void MyGUI::Tab::baseChangeWidgetSkin | ( | ResourceSkin * | _info | ) | [protected, virtual] |
Reimplemented from MyGUI::Widget.
Definition at line 69 of file MyGUI_Tab.cpp.
Widget * 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 | ||
) | [protected, virtual] |
Reimplemented from MyGUI::Widget.
Definition at line 160 of file MyGUI_Tab.cpp.
void MyGUI::Tab::beginToItem | ( | TabItem * | _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 392 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 | ( | TabItem * | _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 | ( | TabItem * | _item | ) |
Search item, returns the position of the first occurrence in array or ITEM_NONE if item not found.
Definition at line 659 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 668 of file MyGUI_Tab.cpp.
TabItem * 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 677 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 | ( | TabItem * | _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 606 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.
TabItem * MyGUI::Tab::getItemAt | ( | size_t | _index | ) |
Get item from specified position.
Definition at line 618 of file MyGUI_Tab.cpp.
size_t MyGUI::Tab::getItemCount | ( | ) | const [inline] |
Get number of items.
Definition at line 85 of file MyGUI_Tab.h.
ValueType* MyGUI::Tab::getItemData | ( | TabItem * | _item, |
bool | _throw = true |
||
) | [inline] |
Get item data.
Definition at line 164 of file MyGUI_Tab.h.
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 | ( | TabItem * | _item | ) |
Get item index.
Definition at line 650 of file MyGUI_Tab.cpp.
size_t MyGUI::Tab::getItemIndexSelected | ( | ) | [inline] |
Definition at line 297 of file MyGUI_Tab.h.
const UString& MyGUI::Tab::getItemName | ( | TabItem * | _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 612 of file MyGUI_Tab.cpp.
Get selected item (nullptr if none selected)
Definition at line 686 of file MyGUI_Tab.cpp.
size_t MyGUI::Tab::getSelectSheetIndex | ( | ) | [inline] |
Definition at line 294 of file MyGUI_Tab.h.
TabItem* MyGUI::Tab::getSheet | ( | size_t | _index | ) | [inline] |
Definition at line 276 of file MyGUI_Tab.h.
int MyGUI::Tab::getSheetButtonWidth | ( | TabItem * | _sheet | ) | [inline] |
Definition at line 260 of file MyGUI_Tab.h.
int MyGUI::Tab::getSheetButtonWidthIndex | ( | size_t | _index | ) | [inline] |
Definition at line 258 of file MyGUI_Tab.h.
size_t MyGUI::Tab::getSheetCount | ( | ) | [inline] |
Definition at line 270 of file MyGUI_Tab.h.
const UString& MyGUI::Tab::getSheetName | ( | TabItem * | _sheet | ) | [inline] |
Definition at line 272 of file MyGUI_Tab.h.
const UString& MyGUI::Tab::getSheetNameIndex | ( | size_t | _index | ) | [inline] |
Definition at line 274 of file MyGUI_Tab.h.
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] |
Get type name as string
Reimplemented from MyGUI::Widget.
Definition at line 44 of file MyGUI_Tab.h.
TabItem* MyGUI::Tab::insertItem | ( | TabItem * | _to, |
const UString & | _name, | ||
Any | _data = Any::Null |
||
) | [inline] |
Insert an item into a array.
Definition at line 90 of file MyGUI_Tab.h.
TabItem * 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.
TabItem* MyGUI::Tab::insertSheet | ( | size_t | _index, |
const UString & | _name, | ||
int | _width = DEFAULT |
||
) | [inline] |
Definition at line 284 of file MyGUI_Tab.h.
bool MyGUI::Tab::isType | ( | ) | const [inline] |
Compare with selected type
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] |
Compare with selected type
Reimplemented from MyGUI::Widget.
Definition at line 44 of file MyGUI_Tab.h.
void MyGUI::Tab::notifyPressedBarButtonEvent | ( | MyGUI::Widget * | _sender | ) | [protected] |
Definition at line 355 of file MyGUI_Tab.cpp.
void MyGUI::Tab::notifyPressedButtonEvent | ( | MyGUI::Widget * | _sender | ) | [protected] |
Definition at line 331 of file MyGUI_Tab.cpp.
void MyGUI::Tab::removeAllItems | ( | ) |
Remove all items.
Definition at line 630 of file MyGUI_Tab.cpp.
void MyGUI::Tab::removeItem | ( | TabItem * | _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 624 of file MyGUI_Tab.cpp.
void MyGUI::Tab::removeSheet | ( | TabItem * | _sheet | ) | [inline] |
Definition at line 288 of file MyGUI_Tab.h.
void MyGUI::Tab::removeSheetIndex | ( | size_t | _index | ) | [inline] |
Definition at line 286 of file MyGUI_Tab.h.
void MyGUI::Tab::selectSheet | ( | TabItem * | _sheet, |
bool | _smooth = true |
||
) | [inline] |
Definition at line 292 of file MyGUI_Tab.h.
void MyGUI::Tab::selectSheetIndex | ( | size_t | _index, |
bool | _smooth = true |
||
) | [inline] |
Definition at line 290 of file MyGUI_Tab.h.
void MyGUI::Tab::setButtonAutoWidth | ( | bool | _value | ) |
Enable or disable button auto width
Definition at line 434 of file MyGUI_Tab.cpp.
void MyGUI::Tab::setButtonDefaultWidth | ( | int | _value | ) |
Set default button width and disable autowidth mode
Definition at line 427 of file MyGUI_Tab.cpp.
void MyGUI::Tab::setButtonWidth | ( | TabItem * | _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 451 of file MyGUI_Tab.cpp.
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::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::setIndexSelected | ( | size_t | _index | ) |
Select specified _index.
Definition at line 482 of file MyGUI_Tab.cpp.
void MyGUI::Tab::setItemData | ( | TabItem * | _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 600 of file MyGUI_Tab.cpp.
void MyGUI::Tab::setItemName | ( | TabItem * | _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 467 of file MyGUI_Tab.cpp.
void MyGUI::Tab::setItemSelected | ( | TabItem * | _item | ) | [inline] |
Select item.
Definition at line 139 of file MyGUI_Tab.h.
void MyGUI::Tab::setItemSelectedAt | ( | size_t | _index | ) | [inline] |
Definition at line 299 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::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 IntCoord & | _coord | ) | [inline] |
Reimplemented from MyGUI::Widget.
Definition at line 253 of file MyGUI_Tab.h.
void MyGUI::Tab::setPosition | ( | int | _left, |
int | _top, | ||
int | _width, | ||
int | _height | ||
) | [inline] |
Reimplemented from MyGUI::Widget.
Definition at line 255 of file MyGUI_Tab.h.
void MyGUI::Tab::setProperty | ( | const std::string & | _key, |
const std::string & | _value | ||
) | [virtual] |
Set any widget property
_key | Property name (for example Widget_Alpha or Edit_MultiLine) |
_value | Value converted to string |
Reimplemented from MyGUI::Widget.
Definition at line 691 of file MyGUI_Tab.cpp.
void MyGUI::Tab::setSheetButtonWidth | ( | TabItem * | _sheet, |
int | _width = DEFAULT |
||
) | [inline] |
Definition at line 264 of file MyGUI_Tab.h.
void MyGUI::Tab::setSheetButtonWidthIndex | ( | size_t | _index, |
int | _width = DEFAULT |
||
) | [inline] |
Definition at line 262 of file MyGUI_Tab.h.
void MyGUI::Tab::setSheetName | ( | TabItem * | _sheet, |
const UString & | _name, | ||
int | _width = DEFAULT |
||
) | [inline] |
Definition at line 280 of file MyGUI_Tab.h.
void MyGUI::Tab::setSheetNameIndex | ( | size_t | _index, |
const UString & | _name, | ||
int | _width = DEFAULT |
||
) | [inline] |
Definition at line 278 of file MyGUI_Tab.h.
void MyGUI::Tab::setSize | ( | const IntSize & | _value | ) | [virtual] |
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::setSmoothShow | ( | bool | _value | ) | [inline] |
Enable or disable smooth sheets showing
Definition at line 231 of file MyGUI_Tab.h.
void MyGUI::Tab::showBarButton | ( | size_t | _index | ) | [inline] |
Definition at line 266 of file MyGUI_Tab.h.
void MyGUI::Tab::showBarSelectButton | ( | ) | [inline] |
Definition at line 268 of file MyGUI_Tab.h.
void MyGUI::Tab::updateBar | ( | ) | [protected] |
Definition at line 203 of file MyGUI_Tab.cpp.
friend class TabItem [friend] |
Definition at line 42 of file MyGUI_Tab.h.
Event : Active Tab sheet changed
signature : void method(MyGUI::Tab* _sender, size_t _index)
_sender | widget that called this event |
_index | Index of selected sheet |
Definition at line 244 of file MyGUI_Tab.h.