MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / addObject

Method addObject

Engine/source/gui/containers/guiFrameCtrl.cpp:339–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337//-----------------------------------------------------------------------------
338
339void GuiFrameSetCtrl::addObject(SimObject *object)
340{
341 AssertFatal(object != NULL, "GuiFrameSetCtrl::addObject: NULL object");
342
343 // assign the object to a frame - give it default frame details
344 Parent::addObject(object);
345 GuiControl *gc = dynamic_cast<GuiControl *>(object);
346 if (gc != NULL)
347 {
348 FrameDetail *detail = new FrameDetail;
349 detail->mMinExtent = gc->getMinExtent();
350 mFrameDetails.push_back(detail);
351 }
352 else
353 mFrameDetails.push_back(NULL);
354 // resize it to fit into the frame to which it is assigned (if no frame for it, don't bother resizing)
355 if(isAwake())
356 computeSizes();
357}
358
359//-----------------------------------------------------------------------------
360void GuiFrameSetCtrl::removeObject(SimObject *object)

Callers

nothing calls this directly

Calls 3

isAwakeFunction · 0.50
getMinExtentMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected