本文整理汇总了C++中LLScrollListItem::getHandle方法的典型用法代码示例。如果您正苦于以下问题:C++ LLScrollListItem::getHandle方法的具体用法?C++ LLScrollListItem::getHandle怎么用?C++ LLScrollListItem::getHandle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLScrollListItem
的用法示例。
在下文中一共展示了LLScrollListItem::getHandle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addNameItemRow
LLScrollListItem* LLNameListCtrl::addNameItemRow(const LLSD& value, EAddPosition pos, void* userdata)
{
LLScrollListItem* item = LLScrollListCtrl::addElement(value, pos, userdata);
if (!item) return NULL;
LLUUID id = item->getUUID();
// use supplied name by default
std::string fullname = value["name"].asString();
switch(value["target"].asInteger())
{
case GROUP:
gCacheName->getGroupName(id, fullname);
// fullname will be "nobody" if group not found
break;
case SPECIAL:
// just use supplied name
break;
case INDIVIDUAL:
{
LLAvatarName av_name;
if (id.isNull())
{
fullname = LLTrans::getString("AvatarNameNobody");
}
else if (LLAvatarNameCache::get(id, &av_name))
{
if (mShortNames)
fullname = av_name.mDisplayName;
else
fullname = av_name.getCompleteName();
}
else
{
fullname = " ( " + LLTrans::getString("LoadingData") + " ) ";
// ...schedule a callback
LLAvatarNameCache::get(id,
boost::bind(&LLNameListCtrl::onAvatarNameCache,
this, _1, _2, item->getHandle()));
}
break;
}
default:
break;
}
// Append optional suffix.
std::string suffix = value["suffix"];
if(!suffix.empty())
{
fullname.append(suffix);
}
LLScrollListCell* cell = item->getColumn(mNameColumnIndex);
if (cell && !fullname.empty() && cell->getValue().asString().empty())
{
cell->setValue(fullname);
}
dirtyColumns();
// this column is resizable
LLScrollListColumn* columnp = getColumn(mNameColumnIndex);
if (columnp && columnp->mHeader)
{
columnp->mHeader->setHasResizableElement(TRUE);
}
return item;
}