本文整理汇总了C++中childGetListInterface函数的典型用法代码示例。如果您正苦于以下问题:C++ childGetListInterface函数的具体用法?C++ childGetListInterface怎么用?C++ childGetListInterface使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了childGetListInterface函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: childGetListInterface
void LLPanelRequestTools::refresh()
{
std::string buffer = getChild<LLUICtrl>("destination")->getValue();
LLCtrlListInterface *list = childGetListInterface("destination");
if (!list) return;
S32 last_item = list->getItemCount();
if (last_item >=3)
{
list->selectItemRange(2,last_item);
list->operateOnSelection(LLCtrlListInterface::OP_DELETE);
}
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
{
LLViewerRegion* regionp = *iter;
std::string name = regionp->getName();
if (!name.empty())
{
list->addSimpleElement(name);
}
}
if(!buffer.empty())
{
list->selectByValue(buffer);
}
else
{
list->operateOnSelection(LLCtrlListInterface::OP_DESELECT);
}
}
示例2: LLFloater
//---------------------------------------------------------------------------
// LLFloaterClothing
//---------------------------------------------------------------------------
LLFloaterClothing::LLFloaterClothing()
: LLFloater("floater_clothing", "FloaterClothingRect", ""),
mSelectedID(),
mAllowSelection(FALSE)
{
gUICtrlFactory->buildFloater(this, "floater_clothing.xml");
sInstance = this;
sObserver = new LLFloaterClothingObserver;
gInventory.addObserver(sObserver);
childSetAction("take_off_btn", onClickTakeOff, this);
childSetAction("wear_btn", onClickWear, this);
childSetDoubleClickCallback("clothing_list", onClickWear);
childSetCommitCallback("clothing_list", onCommitList, this);
LLCtrlListInterface* list = childGetListInterface("clothing_list");
if (list)
{
list->addSimpleElement(LOADING_STRING);
}
setDefaultBtn("wear_btn");
gInventory.startBackgroundFetch();
}
示例3: childGetValue
void LLPanelRequestTools::refresh()
{
std::string buffer = childGetValue("destination");
LLCtrlListInterface *list = childGetListInterface("destination");
if (!list) return;
list->operateOnAll(LLCtrlListInterface::OP_DELETE);
list->addSimpleElement(SELECTION);
list->addSimpleElement(AGENT_REGION);
for (LLWorld::region_list_t::iterator iter = gWorldp->mActiveRegionList.begin();
iter != gWorldp->mActiveRegionList.end(); ++iter)
{
LLViewerRegion* regionp = *iter;
LLString name = regionp->getName();
//MK
if (RRenabled && gAgent.mRRInterface.mContainsShowloc)
{
name = "(Hidden)";
}
//mk
if (!name.empty())
{
list->addSimpleElement(name);
}
}
if(!buffer.empty())
{
list->selectByValue(buffer);
}
else
{
list->selectByValue(SELECTION);
}
}
示例4: childSetAction
BOOL LLFloaterLandHoldings::postBuild()
{
childSetAction("Teleport", onClickTeleport, this);
childSetAction("Show on Map", onClickMap, this);
// Grant list
childSetDoubleClickCallback("grant list", onGrantList);
childSetUserData("grant list", this);
LLCtrlListInterface *list = childGetListInterface("grant list");
if (!list) return TRUE;
S32 count = gAgent.mGroups.count();
for(S32 i = 0; i < count; ++i)
{
LLUUID id(gAgent.mGroups.get(i).mID);
LLSD element;
element["id"] = id;
element["columns"][0]["column"] = "group";
element["columns"][0]["value"] = gAgent.mGroups.get(i).mName;
element["columns"][0]["font"] = "SANSSERIF";
LLUIString areastr = getString("area_string");
areastr.setArg("[AREA]", llformat("%d", gAgent.mGroups.get(i).mContribution));
element["columns"][1]["column"] = "area";
element["columns"][1]["value"] = areastr;
element["columns"][1]["font"] = "SANSSERIF";
list->addElement(element, ADD_SORTED);
}
return TRUE;
}
示例5: hasChild
// virtual
void LLPanelDirBrowser::draw()
{
// HACK: If the results panel has data, we want to select the first
// item. Unfortunately, we don't know when the find is actually done,
// so only do this if it's been some time since the last packet of
// results was received.
if (mLastResultTimer.getElapsedTimeF32() > 0.5)
{
if (!mDidAutoSelect &&
hasChild("results") && !childHasFocus("results"))
{
LLCtrlListInterface *list = childGetListInterface("results");
if (list)
{
if (list->getCanSelect())
{
list->selectFirstItem(); // select first item by default
childSetFocus("results", TRUE);
}
// Request specific data from the server
onCommitList();
}
}
mDidAutoSelect = TRUE;
}
LLPanel::draw();
}
示例6: childGetListInterface
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);
}
}
示例7: childGetValue
void LLPanelRequestTools::refresh()
{
std::string buffer = childGetValue("destination");
LLCtrlListInterface *list = childGetListInterface("destination");
if (!list) return;
list->operateOnAll(LLCtrlListInterface::OP_DELETE);
list->addSimpleElement(SELECTION);
list->addSimpleElement(AGENT_REGION);
for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->mActiveRegionList.begin();
iter != LLWorld::getInstance()->mActiveRegionList.end(); ++iter)
{
LLViewerRegion* regionp = *iter;
std::string name = regionp->getName();
if (!name.empty())
{
list->addSimpleElement(name);
}
}
if(!buffer.empty())
{
list->selectByValue(buffer);
}
else
{
list->selectByValue(SELECTION);
}
}
示例8: childGetListInterface
void LLFloaterMediaBrowser::buildURLHistory()
{
LLCtrlListInterface* url_list = childGetListInterface("address");
if (url_list)
{
url_list->operateOnAll(LLCtrlListInterface::OP_DELETE);
}
// Get all of the entries in the "browser" collection
LLSD browser_history = LLURLHistory::getURLHistory("browser");
LLSD::array_iterator iter_history =
browser_history.beginArray();
LLSD::array_iterator end_history =
browser_history.endArray();
for(; iter_history != end_history; ++iter_history)
{
std::string url = (*iter_history).asString();
if(! url.empty())
url_list->addSimpleElement(url);
}
// initialize URL history in the plugin
if(mBrowser && mBrowser->getMediaPlugin())
{
mBrowser->getMediaPlugin()->initializeUrlHistory(browser_history);
}
}
示例9: childGetListInterface
void LLPanelGroups::startIM()
{
//llinfos << "LLPanelFriends::onClickIM()" << llendl;
LLCtrlListInterface *group_list = childGetListInterface("group list");
LLUUID group_id;
if (group_list && (group_id = group_list->getCurrentID()).notNull())
{
LLGroupData group_data;
if (gAgent.getGroupData(group_id, group_data))
{
gIMMgr->setFloaterOpen(TRUE);
gIMMgr->addSession(
group_data.mName,
IM_SESSION_GROUP_START,
group_id);
make_ui_sound("UISndStartIM");
}
else
{
// this should never happen, as starting a group IM session
// relies on you belonging to the group and hence having the group data
make_ui_sound("UISndInvalidOp");
}
}
}
示例10: childGetListInterface
void LLFloaterTopObjects::doToObjects(int action, bool all)
{
LLMessageSystem *msg = gMessageSystem;
LLViewerRegion* region = gAgent.getRegion();
if (!region) return;
LLCtrlListInterface *list = childGetListInterface("objects_list");
if (!list || list->getItemCount() == 0) return;
std::vector<LLUUID>::iterator id_itor;
bool start_message = true;
for (id_itor = mObjectListIDs.begin(); id_itor != mObjectListIDs.end(); ++id_itor)
{
LLUUID task_id = *id_itor;
if (!all && !list->isSelected(task_id))
{
// Selected only
continue;
}
if (start_message)
{
if (action == ACTION_RETURN)
{
msg->newMessageFast(_PREHASH_ParcelReturnObjects);
}
else
{
msg->newMessageFast(_PREHASH_ParcelDisableObjects);
}
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID,gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_ParcelData);
msg->addS32Fast(_PREHASH_LocalID, -1); // Whole region
msg->addS32Fast(_PREHASH_ReturnType, RT_NONE);
start_message = false;
}
msg->nextBlockFast(_PREHASH_TaskIDs);
msg->addUUIDFast(_PREHASH_TaskID, task_id);
if (msg->isSendFullFast(_PREHASH_TaskIDs))
{
msg->sendReliable(region->getHost());
start_message = true;
}
}
if (!start_message)
{
msg->sendReliable(region->getHost());
}
}
示例11: childGetListInterface
void LLPanelScriptLimitsRegionMemory::returnObjectsFromParcel(S32 local_id)
{
LLMessageSystem *msg = gMessageSystem;
LLViewerRegion* region = gAgent.getRegion();
if (!region) return;
LLCtrlListInterface *list = childGetListInterface("scripts_list");
if (!list || list->getItemCount() == 0) return;
std::vector<LLSD>::iterator id_itor;
bool start_message = true;
for (id_itor = mObjectListItems.begin(); id_itor != mObjectListItems.end(); ++id_itor)
{
LLSD element = *id_itor;
if (!list->isSelected(element["id"].asUUID()))
{
// Selected only
continue;
}
if(element["local_id"].asInteger() != local_id)
{
// Not the parcel we are looking for
continue;
}
if (start_message)
{
msg->newMessageFast(_PREHASH_ParcelReturnObjects);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID,gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_ParcelData);
msg->addS32Fast(_PREHASH_LocalID, element["local_id"].asInteger());
msg->addU32Fast(_PREHASH_ReturnType, RT_LIST);
start_message = false;
}
msg->nextBlockFast(_PREHASH_TaskIDs);
msg->addUUIDFast(_PREHASH_TaskID, element["id"].asUUID());
if (msg->isSendFullFast(_PREHASH_TaskIDs))
{
msg->sendReliable(region->getHost());
start_message = true;
}
}
if (!start_message)
{
msg->sendReliable(region->getHost());
}
}
示例12: childGetListInterface
void LLFloaterWorldMap::clearLocationSelection(BOOL clear_ui)
{
LLCtrlListInterface *list = childGetListInterface("search_results");
if (list)
{
list->operateOnAll(LLCtrlListInterface::OP_DELETE);
}
LLWorldMap::getInstance()->cancelTracking();
mCompletingRegionName = "";
}
示例13: childGetListInterface
// Checked: 2010-04-18 (RLVa-1.1.3b) | Modified: RLVa-1.2.0e
void RlvFloaterBehaviour::refreshAll()
{
LLCtrlListInterface* pBhvrList = childGetListInterface("behaviour_list");
if (!pBhvrList)
return;
pBhvrList->operateOnAll(LLCtrlListInterface::OP_DELETE);
if (!gAgentAvatarp)
return;
//
// Set-up a row we can just reuse
//
LLSD sdRow;
LLSD& sdColumns = sdRow["columns"];
sdColumns[0]["column"] = "behaviour";
sdColumns[0]["type"] = "text";
sdColumns[1]["column"] = "name";
sdColumns[1]["type"] = "text";
//
// List behaviours
//
const RlvHandler::rlv_object_map_t* pRlvObjects = gRlvHandler.getObjectMap();
for (RlvHandler::rlv_object_map_t::const_iterator itObj = pRlvObjects->begin(), endObj = pRlvObjects->end(); itObj != endObj; ++itObj)
{
sdColumns[1]["value"] = rlvGetItemNameFromObjID(itObj->first);
const rlv_command_list_t* pCommands = itObj->second.getCommandList();
for (rlv_command_list_t::const_iterator itCmd = pCommands->begin(), endCmd = pCommands->end(); itCmd != endCmd; ++itCmd)
{
std::string strBhvr = itCmd->asString();
LLUUID idOption(itCmd->getOption());
if (idOption.notNull())
{
std::string strLookup;
if ( (gCacheName->getFullName(idOption, strLookup)) || (gCacheName->getGroupName(idOption, strLookup)) )
{
if (strLookup.find("???") == std::string::npos)
strBhvr.assign(itCmd->getBehaviour()).append(":").append(strLookup);
}
else if (m_PendingLookup.end() == m_PendingLookup.find(idOption))
{
m_PendingLookup[idOption] = gCacheName->get(idOption, false, boost::bind(&RlvFloaterBehaviour::onAvatarNameLookup,this,_1));
}
}
sdColumns[0]["value"] = strBhvr;
pBhvrList->addElement(sdRow, ADD_BOTTOM);
}
}
}
示例14: childGetListInterface
void LLFloaterTopObjects::clearList()
{
LLCtrlListInterface *list = childGetListInterface("objects_list");
if (list)
{
list->operateOnAll(LLCtrlListInterface::OP_DELETE);
}
mObjectListData.clear();
mObjectListIDs.clear();
mtotalScore = 0.f;
}
示例15: childGetListInterface
// clear the group list, and get a fresh set of info.
void LLPanelGroups::reset()
{
LLCtrlListInterface *group_list = childGetListInterface("group list");
if (group_list)
{
group_list->operateOnAll(LLCtrlListInterface::OP_DELETE);
}
childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count()));
childSetTextArg("groupcount", "[MAX]", llformat("%d", gHippoLimits->getMaxAgentGroups()));
const std::string none_text = getString("none");
init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text);
enableButtons();
}