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

Method createNode

UnitTests/UnitTest_GraphView/DemoKeeper.cpp:168–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166 }
167
168 BaseAnimationNode* DemoKeeper::createNode(std::string_view _type, std::string_view _name)
169 {
170 BaseAnimationNode* node = mGraphNodeFactory.createNode("GraphNode" + std::string{_type}, _name);
171 assert(node);
172
173 mNodes.push_back(node);
174
175 mGraphView->addItem(node);
176 node->setAbsolutePosition(mClickPosition);
177
178 animation::IAnimationNode* anim_node = mNodeFactory.createNode(_type, _name, mGraph);
179 mGraph->addNode(anim_node);
180 node->setAnimationNode(anim_node);
181
182 node->eventInvalidateNode = MyGUI::newDelegate(this, &DemoKeeper::notifyInvalidateNode);
183
184 return node;
185 }
186
187 void DemoKeeper::SaveGraph()
188 {

Callers

nothing calls this directly

Calls 6

newDelegateFunction · 0.85
setAbsolutePositionMethod · 0.80
addNodeMethod · 0.80
setAnimationNodeMethod · 0.80
push_backMethod · 0.45
addItemMethod · 0.45

Tested by

no test coverage detected