MyGUI 3.4.3
MyGUI_MultiListItem.cpp
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#include "MyGUI_Precompiled.h"
10
11namespace MyGUI
12{
13
15 {
17 }
18
20 {
22 }
23
25 {
26 MultiListBox* owner = getOwner();
27 if (owner != nullptr)
28 owner->setColumnName(this, _value);
29 else
31 }
32
34 {
35 MultiListBox* owner = getOwner();
36 if (owner != nullptr)
37 return owner->getColumnName(this);
38
39 return Base::getCaption();
40 }
41
43 {
44 MultiListBox* owner = getOwner();
45 if (owner != nullptr)
46 owner->setColumnResizingPolicy(this, _value);
47 }
48
50 {
51 MultiListBox* owner = getOwner();
52 if (owner != nullptr)
53 owner->setColumnWidth(this, _value);
54 }
55
56 void MultiListItem::setPropertyOverride(std::string_view _key, std::string_view _value)
57 {
59 if (_key == "ItemResizingPolicy")
61
63 else if (_key == "ItemWidth")
64 setItemWidth(utility::parseValue<int>(_value));
65
66 else
67 {
69 return;
70 }
71
73 }
74
75 MultiListBox* MultiListItem::getOwner() const
76 {
77 if (getParent() != nullptr)
78 {
80 return getParent()->castType<MultiListBox>();
81 if ((getParent()->getParent() != nullptr) && (getParent()->getParent()->getClientWidget() == getParent()))
82 {
85 }
86 }
87
88 return nullptr;
89 }
90
91} // namespace MyGUI
Type * castType(bool _throw=true)
widget description should be here.
void setPropertyOverride(std::string_view _key, std::string_view _value) override
void setItemWidth(int _value)
void initialiseOverride() override
void setCaption(const UString &_value) override
const UString & getCaption() const override
void setItemResizingPolicy(ResizingPolicy _value)
void shutdownOverride() override
A UTF-16 string with implicit conversion to/from std::string and std::wstring.
Widget * getParent() const
virtual bool isType(const std::type_info &_type) const override
EventHandle_WidgetStringString eventChangeProperty
Widget * getClientWidget()
static ResizingPolicy parse(std::string_view _value)