MyGUI 3.2.2

MyGUI_IItemContainer.h
Go to the documentation of this file.
1 /*
2 * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3 * Distributed under the MIT License
4 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5 */
6
7 #ifndef MYGUI_I_ITEM_CONTAINER_H_
8 #define MYGUI_I_ITEM_CONTAINER_H_
9
10 #include "MyGUI_Prerequest.h"
11 #include "MyGUI_Constants.h"
12
13 namespace MyGUI
14 {
15
16 class IItem;
17
18 class MYGUI_EXPORT IItemContainer
19 {
20 public:
21 IItemContainer() { }
22 virtual ~IItemContainer() { }
23
24 virtual size_t _getItemCount()
25 {
26 return 0;
27 }
28
29 virtual void _addItem(const MyGUI::UString& _name) { }
30
31 virtual void _removeItemAt(size_t _index) { }
32
33 virtual Widget* _getItemAt(size_t _index)
34 {
35 return nullptr;
36 }
37
38 virtual void _setItemNameAt(size_t _index, const UString& _name) { }
39 virtual const UString& _getItemNameAt(size_t _index)
40 {
41 return Constants::getEmptyUString();
42 }
43
44 virtual void _setItemSelected(IItem* _item) { }
45 };
46
47 } // namespace MyGUI
48
49 #endif // MYGUI_I_ITEM_CONTAINER_H_
MyGUI::Widget
Widget properties. Widget_skin_childs Skin childs. Widget widget description should be here...
Definition: MyGUI_Widget.h:29
MyGUI_Prerequest.h
MyGUI::IItemContainer::_setItemNameAt
virtual void _setItemNameAt(size_t _index, const UString &_name)
Definition: MyGUI_IItemContainer.h:38
MyGUI::IItemContainer::_getItemNameAt
virtual const UString & _getItemNameAt(size_t _index)
Definition: MyGUI_IItemContainer.h:39
MyGUI::IItemContainer::_getItemCount
virtual size_t _getItemCount()
Definition: MyGUI_IItemContainer.h:24
MyGUI::IItemContainer
Definition: MyGUI_IItemContainer.h:18
MyGUI::IItemContainer::_setItemSelected
virtual void _setItemSelected(IItem *_item)
Definition: MyGUI_IItemContainer.h:44
MyGUI_Constants.h
MyGUI
Definition: MyGUI_ActionController.h:14
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:103
MyGUI::Constants::getEmptyUString
static const UString & getEmptyUString()
Definition: MyGUI_Constants.h:20
MyGUI::UString
A UTF-16 string with implicit conversion to/from std::string and std::wstring.
Definition: MyGUI_UString.h:168
MyGUI::IItemContainer::~IItemContainer
virtual ~IItemContainer()
Definition: MyGUI_IItemContainer.h:22
MyGUI::IItemContainer::IItemContainer
IItemContainer()
Definition: MyGUI_IItemContainer.h:21
MyGUI::IItem
Definition: MyGUI_IItem.h:17
MyGUI::IItemContainer::_addItem
virtual void _addItem(const MyGUI::UString &_name)
Definition: MyGUI_IItemContainer.h:29
MyGUI::IItemContainer::_removeItemAt
virtual void _removeItemAt(size_t _index)
Definition: MyGUI_IItemContainer.h:31
MyGUI::IItemContainer::_getItemAt
virtual Widget * _getItemAt(size_t _index)
Definition: MyGUI_IItemContainer.h:33