MCPcopy Create free account
hub / github.com/MyGUI/mygui / InitialiseProperty

Method InitialiseProperty

Tools/EditorFramework/PropertyPanelControl.cpp:41–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39 }
40
41 void PropertyPanelControl::InitialiseProperty(PropertyPtr _property, int& _height)
42 {
43 const std::string& type = _property->getType()->getType();
44 PropertyControl* control = nullptr;
45
46 for (auto& child : mPropertyControls)
47 {
48 if (child.first == type && !child.second->getRoot()->getVisible())
49 {
50 control = child.second;
51 control->getRoot()->setVisible(true);
52 break;
53 }
54 }
55
56 if (control == nullptr)
57 {
58 control =
59 components::FactoryManager::GetInstance().CreateItem<PropertyControl>(_property->getType()->getType());
60 if (control != nullptr)
61 {
62 control->Initialise(this, mScrollView, std::string_view{});
63
64 mPropertyControls.emplace_back(_property->getType()->getType(), control);
65 }
66 }
67
68 if (control != nullptr)
69 {
70 control->setProperty(_property);
71 control->getRoot()->setPosition(0, _height);
72
73 _height += control->getRoot()->getHeight() + mDistance;
74 }
75 }
76
77 void PropertyPanelControl::setCurrentData(DataPtr _data)
78 {

Callers

nothing calls this directly

Calls 8

getTypeMethod · 0.45
getVisibleMethod · 0.45
getRootMethod · 0.45
setVisibleMethod · 0.45
InitialiseMethod · 0.45
setPropertyMethod · 0.45
setPositionMethod · 0.45
getHeightMethod · 0.45

Tested by

no test coverage detected