本文整理汇总了C++中LLCtrlListInterface::addColumn方法的典型用法代码示例。如果您正苦于以下问题:C++ LLCtrlListInterface::addColumn方法的具体用法?C++ LLCtrlListInterface::addColumn怎么用?C++ LLCtrlListInterface::addColumn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLCtrlListInterface
的用法示例。
在下文中一共展示了LLCtrlListInterface::addColumn方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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();
}