本文整理汇总了C++中LLScrollListItem::getValue方法的典型用法代码示例。如果您正苦于以下问题:C++ LLScrollListItem::getValue方法的具体用法?C++ LLScrollListItem::getValue怎么用?C++ LLScrollListItem::getValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLScrollListItem
的用法示例。
在下文中一共展示了LLScrollListItem::getValue方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onClickAnimRemove
//static
void LLFloaterAO::onClickAnimRemove(void* user_data)
{
LLFloaterAO* floater = (LLFloaterAO*)user_data;
std::vector<LLScrollListItem*> items = floater->mAnimationList->getAllSelected();
for (std::vector<LLScrollListItem*>::iterator iter = items.begin(); iter != items.end(); ++iter)
{
LLScrollListItem* item = *iter;
if (item->getValue().asString() != "")
{
std::string anim_name = item->getValue().asString();
FLLua::callCommand(llformat("AO:RemoveOverride(\"%s\",\"%s\")",floater->mCurrentAnimType,anim_name));
}
}
onCommitAnim(NULL,user_data);
}
示例2: getXML
// virtual
LLXMLNodePtr LLComboBox::getXML(bool save_children) const
{
LLXMLNodePtr node = LLUICtrl::getXML();
node->setName(LL_COMBO_BOX_TAG);
// Attributes
node->createChild("allow_text_entry", TRUE)->setBoolValue(mAllowTextEntry);
node->createChild("max_chars", TRUE)->setIntValue(mMaxChars);
// Contents
std::vector<LLScrollListItem*> data_list = mList->getAllData();
std::vector<LLScrollListItem*>::iterator data_itor;
for (data_itor = data_list.begin(); data_itor != data_list.end(); ++data_itor)
{
LLScrollListItem* item = *data_itor;
LLScrollListCell* cell = item->getColumn(0);
if (cell)
{
LLXMLNodePtr item_node = node->createChild("combo_item", FALSE);
LLSD value = item->getValue();
item_node->createChild("value", TRUE)->setStringValue(value.asString());
item_node->createChild("enabled", TRUE)->setBoolValue(item->getEnabled());
item_node->setStringValue(cell->getValue().asString());
}
}
return node;
}
示例3: handleToolTip
BOOL LLLocationInputCtrl::handleToolTip(S32 x, S32 y, MASK mask)
{
if(mAddLandmarkBtn->parentPointInView(x,y))
{
updateAddLandmarkTooltip();
}
// Let the buttons show their tooltips.
if (LLUICtrl::handleToolTip(x, y, mask))
{
if (mList->getRect().pointInRect(x, y))
{
S32 loc_x, loc_y;
//x,y - contain coordinates related to the location input control, but without taking the expanded list into account
//So we have to convert it again into local coordinates of mList
localPointToOtherView(x,y,&loc_x,&loc_y,mList);
LLScrollListItem* item = mList->hitItem(loc_x,loc_y);
if (item)
{
LLSD value = item->getValue();
if (value.has("tooltip"))
{
LLToolTipMgr::instance().show(value["tooltip"]);
}
}
}
return TRUE;
}
return FALSE;
}
示例4: onClickRemoveURLFilter
// static
void LLPanelLandMedia::onClickRemoveURLFilter(void *data)
{
LLPanelLandMedia* panelp = (LLPanelLandMedia*)data;
if (panelp && panelp->mURLFilterList)
{
LLParcel* parcel = panelp->mParcel->getParcel();
if (parcel)
{
LLSD list = parcel->getMediaURLFilterList();
std::vector<LLScrollListItem*> domains = panelp->mURLFilterList->getAllSelected();
for (std::vector<LLScrollListItem*>::iterator iter = domains.begin(); iter != domains.end(); iter++)
{
LLScrollListItem* item = *iter;
const std::string domain = item->getValue().asString();
for(S32 i = 0; i < list.size(); i++)
{
if (list[i].asString() == domain)
{
list.erase(i);
break;
}
}
}
parcel->setMediaURLFilterList(list);
LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel );
panelp->refresh();
}
}
}
示例5: RevokeSelected
void LLFloaterExploreAnimations::RevokeSelected(void *userdata )
{
LLFloaterExploreAnimations *self = (LLFloaterExploreAnimations*)userdata;
LLDynamicArray<LLUUID> ids;
std::vector< LLScrollListItem * > items = self->getChild<LLScrollListCtrl>("anim_list")->getAllSelected();
for( std::vector< LLScrollListItem * >::iterator itr = items.begin(); itr != items.end(); itr++ )
{
LLScrollListItem *item = *itr;
const LLUUID &id = item->getValue().asUUID();
if( ids.find(id) == LLDynamicArray<LLUUID>::FAIL )
{
ids.put(id);
}
}
if( !ids.empty() )
{
for(LLDynamicArray<LLUUID>::iterator itr = ids.begin(); itr != ids.end(); ++itr)
{
LLUUID id = *itr;
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_RevokePermissions);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_Data);
msg->addUUIDFast(_PREHASH_ObjectID, id);
msg->addU32Fast(_PREHASH_ObjectPermissions, U32_MAX);
gAgent.sendReliableMessage();
}
}
}
示例6: getValue
LLSD LLGestureComboList::getValue() const
{
LLScrollListItem* item = mList->getFirstSelected();
if( item )
{
return item->getValue();
}
else
{
return LLSD();
}
}
示例7: getValue
// virtual
LLSD LLComboBox::getValue() const
{
LLScrollListItem* item = mList->getFirstSelected();
if( item )
{
return item->getValue();
}
else if (mAllowTextEntry)
{
return mTextEntry->getValue();
}
else
{
return LLSD();
}
}
示例8: StopSelected
void LLFloaterExploreAnimations::StopSelected(void *userdata )
{
LLFloaterExploreAnimations *self = (LLFloaterExploreAnimations*)userdata;
LLDynamicArray<LLUUID> ids;
std::vector< LLScrollListItem * > items = self->getChild<LLScrollListCtrl>("anim_list")->getAllSelected();
for( std::vector< LLScrollListItem * >::iterator itr = items.begin(); itr != items.end(); itr++ )
{
LLScrollListItem *item = *itr;
const LLUUID &id = item->getValue().asUUID();
if( ids.find(id) == LLDynamicArray<LLUUID>::FAIL )
{
ids.put(id);
}
}
gAgent.sendAnimationRequests(ids,ANIM_REQUEST_STOP);
}
示例9: onGroupList
void LLPanelGroups::onGroupList()
{
enableButtons();
LLScrollListCtrl *group_list = getChild<LLScrollListCtrl>("group list");
if(!group_list)
return;
LLScrollListItem *item = group_list->getFirstSelected();
if(!item)
return;
const LLUUID group_id = item->getValue().asUUID();
if(group_id.isNull())
return;
LLGroupData group_data;
if(!gAgent.getGroupData(group_id,group_data))
return;
bool list_in_profile = item->getColumn(1)->getValue().asBoolean();
bool receive_chat = item->getColumn(2)->getValue().asBoolean();
bool recieve_notify = item->getColumn(3)->getValue().asBoolean();
bool update_floaters = false;
if(gIMMgr->getIgnoreGroup(group_id) == receive_chat)
{
gIMMgr->updateIgnoreGroup(group_id, !receive_chat);
update_floaters = true;
}
if( (bool)group_data.mListInProfile != list_in_profile ||
(bool)group_data.mAcceptNotices != recieve_notify )
{
gAgent.setUserGroupFlags(group_id, recieve_notify, list_in_profile);
}
else if(update_floaters) //gAgent.setUserGroupFlags already calls update_group_floaters
update_group_floaters(group_id);
}
示例10: updateCommunicateList
void LLToolBar::updateCommunicateList()
{
LLFlyoutButton* communicate_button = mCommunicateBtn;
LLSD selected = communicate_button->getValue();
communicate_button->removeall();
LLFloater* frontmost_floater = LLFloaterChatterBox::getInstance()->getActiveFloater();
LLScrollListItem* itemp = NULL;
itemp = communicate_button->add(LLFloaterMyFriends::getInstance()->getShortTitle(), LLSD("contacts"), ADD_TOP);
if (LLFloaterMyFriends::getInstance() == frontmost_floater)
{
((LLScrollListText*)itemp->getColumn(0))->setFontStyle(LLFontGL::BOLD);
// make sure current tab is selected in list
if (selected.isUndefined())
{
selected = itemp->getValue();
}
}
itemp = communicate_button->add(LLFloaterChat::getInstance()->getShortTitle(), LLSD("local chat"), ADD_TOP);
if (LLFloaterChat::getInstance() == frontmost_floater)
{
((LLScrollListText*)itemp->getColumn(0))->setFontStyle(LLFontGL::BOLD);
if (selected.isUndefined())
{
selected = itemp->getValue();
}
}
communicate_button->addSeparator(ADD_TOP);
communicate_button->add(getString("Redock Windows"), LLSD("redock"), ADD_TOP);
communicate_button->addSeparator(ADD_TOP);
communicate_button->add(LLFloaterMute::getInstance()->getShortTitle(), LLSD("mute list"), ADD_TOP);
std::set<LLHandle<LLFloater> >::const_iterator floater_handle_it;
if (gIMMgr->getIMFloaterHandles().size() > 0)
{
communicate_button->addSeparator(ADD_TOP);
}
for(floater_handle_it = gIMMgr->getIMFloaterHandles().begin(); floater_handle_it != gIMMgr->getIMFloaterHandles().end(); ++floater_handle_it)
{
LLFloaterIMPanel* im_floaterp = (LLFloaterIMPanel*)floater_handle_it->get();
if (im_floaterp)
{
static LLCachedControl<bool> show_counts("ShowUnreadIMsCounts", true);
S32 count = im_floaterp->getNumUnreadMessages();
std::string floater_title;
if (count > 0) floater_title = "*";
floater_title.append(im_floaterp->getShortTitle());
if (show_counts && count > 0)
{
floater_title += " - ";
if (count > 1)
{
LLStringUtil::format_map_t args;
args["COUNT"] = llformat("%d", count);
floater_title += getString("IMs", args);
}
else
{
floater_title += getString("IM");
}
}
itemp = communicate_button->add(floater_title, im_floaterp->getSessionID(), ADD_TOP);
if (im_floaterp == frontmost_floater)
{
((LLScrollListText*)itemp->getColumn(0))->setFontStyle(LLFontGL::BOLD);
if (selected.isUndefined())
{
selected = itemp->getValue();
}
}
}
}
communicate_button->setToggleState(gSavedSettings.getBOOL("ShowCommunicate"));
communicate_button->setValue(selected);
}