------------------------------------------------------------------------------
| 1346 | |
| 1347 | //------------------------------------------------------------------------------ |
| 1348 | void GuiPopUpMenuCtrl::addChildren() |
| 1349 | { |
| 1350 | // Create Text List. |
| 1351 | mTl = new GuiPopupTextListCtrl( this ); |
| 1352 | AssertFatal( mTl, "Failed to create the GuiPopUpTextListCtrl for the PopUpMenu" ); |
| 1353 | // Use the children's profile rather than the parent's profile, if it exists. |
| 1354 | mTl->setControlProfile( mProfile->getChildrenProfile() ? mProfile->getChildrenProfile() : mProfile ); |
| 1355 | mTl->setField("noDuplicates", "false"); |
| 1356 | |
| 1357 | mSc = new GuiScrollCtrl; |
| 1358 | AssertFatal( mSc, "Failed to create the GuiScrollCtrl for the PopUpMenu" ); |
| 1359 | GuiControlProfile *prof; |
| 1360 | if ( Sim::findObject( "GuiScrollProfile", prof ) ) |
| 1361 | { |
| 1362 | mSc->setControlProfile( prof ); |
| 1363 | } |
| 1364 | else |
| 1365 | { |
| 1366 | // Use the children's profile rather than the parent's profile, if it exists. |
| 1367 | mSc->setControlProfile( mProfile->getChildrenProfile() ? mProfile->getChildrenProfile() : mProfile ); |
| 1368 | } |
| 1369 | |
| 1370 | mSc->setField( "hScrollBar", "AlwaysOff" ); |
| 1371 | mSc->setField( "vScrollBar", "dynamic" ); |
| 1372 | //if(mRenderScrollInNA) // Force the scroll control to render using fillColorNA rather than fillColor |
| 1373 | // mSc->mUseNABackground = true; |
| 1374 | |
| 1375 | mBackground = new GuiPopUpBackgroundCtrl( this, mTl ); |
| 1376 | AssertFatal( mBackground, "Failed to create the GuiBackgroundCtrl for the PopUpMenu" ); |
| 1377 | } |
| 1378 | |
| 1379 | //------------------------------------------------------------------------------ |
| 1380 | void GuiPopUpMenuCtrl::repositionPopup() |
nothing calls this directly
no test coverage detected