本文整理汇总了C++中LLCtrlListInterface::setCurrentByID方法的典型用法代码示例。如果您正苦于以下问题:C++ LLCtrlListInterface::setCurrentByID方法的具体用法?C++ LLCtrlListInterface::setCurrentByID怎么用?C++ LLCtrlListInterface::setCurrentByID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLCtrlListInterface
的用法示例。
在下文中一共展示了LLCtrlListInterface::setCurrentByID方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onAvatarComboPrearrange
// static
void LLFloaterWorldMap::onAvatarComboPrearrange( LLUICtrl* ctrl, void* userdata )
{
LLFloaterWorldMap* self = gFloaterWorldMap;
if( !self || self->mIsClosing )
{
return;
}
LLCtrlListInterface *list = self->childGetListInterface("friend combo");
if (!list) return;
LLUUID current_choice;
if( LLAvatarTracker::instance().haveTrackingInfo() )
{
current_choice = LLAvatarTracker::instance().getAvatarID();
}
self->buildAvatarIDList();
if( !list->setCurrentByID( current_choice ) || current_choice.isNull() )
{
LLTracker::stopTracking(NULL);
}
}
示例2: buildAvatarIDList
// No longer really builds a list. Instead, just updates mAvatarCombo.
void LLFloaterWorldMap::buildAvatarIDList()
{
LLCtrlListInterface *list = childGetListInterface("friend combo");
if (!list) return;
// Delete all but the "None" entry
S32 list_size = list->getItemCount();
while (list_size > 1)
{
list->selectNthItem(1);
list->operateOnSelection(LLCtrlListInterface::OP_DELETE);
--list_size;
}
LLSD default_column;
default_column["name"] = "friend name";
default_column["label"] = "Friend Name";
default_column["width"] = 500;
list->addColumn(default_column);
// Get all of the calling cards for avatar that are currently online
LLCollectMappableBuddies collector;
LLAvatarTracker::instance().applyFunctor(collector);
LLCollectMappableBuddies::buddy_map_t::iterator it;
LLCollectMappableBuddies::buddy_map_t::iterator end;
it = collector.mMappable.begin();
end = collector.mMappable.end();
for( ; it != end; ++it)
{
list->addSimpleElement((*it).first, ADD_BOTTOM, (*it).second);
}
list->setCurrentByID( LLAvatarTracker::instance().getAvatarID() );
list->selectFirstItem();
}
示例3: refreshAll
// static
void LLFloaterGesture::refreshAll()
{
if (sInstance)
{
sInstance->buildGestureList();
LLCtrlListInterface *list = sInstance->childGetListInterface("gesture_list");
if (!list) return;
if (sInstance->mSelectedID.isNull())
{
list->selectFirstItem();
}
else
{
if (list->setCurrentByID(sInstance->mSelectedID))
{
LLCtrlScrollInterface *scroll = sInstance->childGetScrollInterface("gesture_list");
if (scroll) scroll->scrollToShowSelected();
}
else
{
list->selectFirstItem();
}
}
// Update button labels
onCommitList(NULL, sInstance);
}
}
示例4: newClassified
void LLPanelDirBrowser::newClassified()
{
LLCtrlListInterface *list = childGetListInterface("results");
if (!list) return;
if (mFloaterDirectory->mPanelClassifiedp)
{
// Clear the panel on the right
mFloaterDirectory->mPanelClassifiedp->reset();
// Set up the classified with the info we've created
// and a sane default position.
mFloaterDirectory->mPanelClassifiedp->initNewClassified();
// We need the ID to select in the list.
LLUUID classified_id = mFloaterDirectory->mPanelClassifiedp->getClassifiedID();
// Put it in the list on the left
addClassified(list, classified_id, mFloaterDirectory->mPanelClassifiedp->getClassifiedName(),0,0);
// Select it.
list->setCurrentByID(classified_id);
// Make the right panel visible (should already be)
mFloaterDirectory->mPanelClassifiedp->setVisible(TRUE);
}
}
示例5: onLandmarkComboCommit
// static
void LLFloaterWorldMap::onLandmarkComboCommit( LLUICtrl* ctrl, void* userdata )
{
LLFloaterWorldMap* self = gFloaterWorldMap;
if( !self || self->mIsClosing )
{
return;
}
LLCtrlListInterface *list = gFloaterWorldMap->childGetListInterface("landmark combo");
if (!list) return;
LLUUID asset_id;
LLUUID item_id = list->getCurrentID();
LLTracker::stopTracking(NULL);
//RN: stopTracking() clears current combobox selection, need to reassert it here
list->setCurrentByID(item_id);
if( item_id.isNull() )
{
}
else if( item_id == sHomeID )
{
asset_id = sHomeID;
}
else
{
LLInventoryItem* item = gInventory.getItem( item_id );
if( item )
{
asset_id = item->getAssetUUID();
}
else
{
// Something went wrong, so revert to a safe value.
item_id.setNull();
}
}
self->trackLandmark( item_id);
onShowTargetBtn(self);
// Reset to user postion if nothing is tracked
self->mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING );
}
示例6: selectByUUID
void LLPanelDirBrowser::selectByUUID(const LLUUID& id)
{
LLCtrlListInterface *list = childGetListInterface("results");
if (!list) return;
BOOL found = list->setCurrentByID(id);
if (found)
{
// we got it, don't wait for network
// Don't bother looking for this in the draw loop.
mWantSelectID.setNull();
// Make sure UI updates.
onCommitList(NULL, this);
}
else
{
// waiting for this item from the network
mWantSelectID = id;
}
}
示例7: onLandmarkComboPrearrange
void LLFloaterWorldMap::onLandmarkComboPrearrange( )
{
if( mIsClosing )
{
return;
}
LLCtrlListInterface *list = childGetListInterface("landmark combo");
if (!list) return;
LLUUID current_choice = list->getCurrentID();
buildLandmarkIDLists();
if( current_choice.isNull() || !list->setCurrentByID( current_choice ) )
{
LLTracker::stopTracking(NULL);
}
}
示例8: onLandmarkComboPrearrange
// static
void LLFloaterWorldMap::onLandmarkComboPrearrange(LLUICtrl* ctrl, void* userdata)
{
LLFloaterWorldMap* self = gFloaterWorldMap;
if (!self || self->mIsClosing)
{
return;
}
LLCtrlListInterface *list = self->childGetListInterface("landmark combo");
if (!list) return;
LLUUID current_choice = list->getCurrentID();
gFloaterWorldMap->buildLandmarkIDLists();
if (current_choice.isNull() || !list->setCurrentByID(current_choice))
{
LLTracker::stopTracking(NULL);
}
}
示例9: refreshAll
// static
void LLFloaterClothing::refreshAll()
{
if (sInstance)
{
sInstance->buildClothingList();
LLCtrlListInterface* list = sInstance->childGetListInterface("clothing_list");
if (list)
{
if (!sInstance->mAllowSelection)
{
// no selection, no commit on change
list->operateOnSelection(LLCtrlListInterface::OP_DESELECT);
}
else if (sInstance->mSelectedID.isNull())
{
list->selectFirstItem();
}
else
{
if (list->setCurrentByID(sInstance->mSelectedID))
{
LLCtrlScrollInterface *scroll = sInstance->childGetScrollInterface("clothing_list");
if (scroll)
{
scroll->scrollToShowSelected();
}
}
else
{
list->selectFirstItem();
}
}
// Update button labels
onCommitList(NULL, sInstance);
}
}
}