MyGUI 3.4.2
MyGUI_TabItem.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"
8#include "MyGUI_TabItem.h"
9
10namespace MyGUI
11{
12
14 {
15 }
16
18 {
20
21 // FIXME проверить смену скина ибо должно один раз вызываться
22 //mOwner = getParent()->castType<TabControl>();
23 }
24
26 {
27 TabControl* owner = getParent() != nullptr ? getParent()->castType<TabControl>(false) : nullptr;
28 if (owner != nullptr)
29 owner->_notifyDeleteItem(this);
30
32 }
33
35 {
36 TabControl* owner = getParent() != nullptr ? getParent()->castType<TabControl>(false) : nullptr;
37 if (owner != nullptr)
38 owner->setItemName(this, _value);
39 else
41 }
42
44 {
45 TabControl* owner = getParent() != nullptr ? getParent()->castType<TabControl>(false) : nullptr;
46 if (owner != nullptr)
47 return owner->getItemName(this);
48 return Base::getCaption();
49 }
50
52 {
53 TabControl* owner = getParent() != nullptr ? getParent()->castType<TabControl>(false) : nullptr;
54 if (owner != nullptr)
55 owner->setButtonWidth(this, _width);
56 }
57
58 void TabItem::setPropertyOverride(const std::string& _key, const std::string& _value)
59 {
61 if (_key == "ButtonWidth")
62 setButtonWidth(utility::parseValue<int>(_value));
63
64 else
65 {
67 return;
68 }
69
71 }
72
73} // namespace MyGUI
Type * castType(bool _throw=true)
widget description should be here.
void setCaption(const UString &_value) override
void setPropertyOverride(const std::string &_key, const std::string &_value) override
void shutdownOverride() override
void setButtonWidth(int _value=DEFAULT)
Set button width.
void initialiseOverride() override
const UString & getCaption() const override
A UTF-16 string with implicit conversion to/from std::string and std::wstring.
Widget * getParent() const
EventHandle_WidgetStringString eventChangeProperty