| 337 | //----------------------------------------------------------------------------- |
| 338 | |
| 339 | void 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 | //----------------------------------------------------------------------------- |
| 360 | void GuiFrameSetCtrl::removeObject(SimObject *object) |
nothing calls this directly
no test coverage detected