当前位置: 首页>>代码示例>>C++>>正文


C++ LLCtrlListInterface类代码示例

本文整理汇总了C++中LLCtrlListInterface的典型用法代码示例。如果您正苦于以下问题:C++ LLCtrlListInterface类的具体用法?C++ LLCtrlListInterface怎么用?C++ LLCtrlListInterface使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了LLCtrlListInterface类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: childGetListInterface

void LLFloaterWorldMap::clearLocationSelection(BOOL clear_ui)
{
	LLCtrlListInterface *list = childGetListInterface("search_results");
	if (list)
	{
		list->operateOnAll(LLCtrlListInterface::OP_DELETE);
	}
	LLWorldMap::getInstance()->cancelTracking();
	mCompletingRegionName = "";
}
开发者ID:Katharine,项目名称:kittyviewer,代码行数:10,代码来源:llfloaterworldmap.cpp

示例2: 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);
        }
    }
}
开发者ID:jakit,项目名称:PartyHatViewer,代码行数:55,代码来源:rlvfloaterbehaviour.cpp

示例3: childGetListInterface

void LLFloaterWorldMap::clearLandmarkSelection(BOOL clear_ui)
{
	if (clear_ui || !childHasKeyboardFocus("landmark combo"))
	{
		LLCtrlListInterface *list = childGetListInterface("landmark combo");
		if (list)
		{
			list->selectByValue( "None" );
		}
	}
}
开发者ID:,项目名称:,代码行数:11,代码来源:

示例4: onClickInventory

// static
void LLFloaterGesture::onClickInventory(void* data)
{
	LLFloaterGesture* self = (LLFloaterGesture*)data;

	LLCtrlListInterface *list = self->childGetListInterface("gesture_list");
	if (!list) return;
	const LLUUID& item_id = list->getCurrentID();

	LLInventoryView* inv = LLInventoryView::showAgentInventory();
	if (!inv) return;
	inv->getPanel()->setSelection(item_id, TRUE);
}
开发者ID:9skunks,项目名称:imprudence,代码行数:13,代码来源:llfloatergesture.cpp

示例5: childGetListInterface

void LLPanelScriptLimitsAttachment::clearList()
{
	LLCtrlListInterface *list = childGetListInterface("scripts_list");

	if (list)
	{
		list->operateOnAll(LLCtrlListInterface::OP_DELETE);
	}

	std::string msg_waiting = LLTrans::getString("ScriptLimitsRequestWaiting");
	childSetValue("loading_text", LLSD(msg_waiting));
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:12,代码来源:llfloaterscriptlimits.cpp

示例6: childGetListInterface

void LLFloaterTopObjects::clearList()
{
	LLCtrlListInterface *list = childGetListInterface("objects_list");
	
	if (list) 
	{
		list->operateOnAll(LLCtrlListInterface::OP_DELETE);
	}

	mObjectListData.clear();
	mObjectListIDs.clear();
	mtotalScore = 0.f;
}
开发者ID:Xara,项目名称:Astra-Viewer-2,代码行数:13,代码来源:llfloatertopobjects.cpp

示例7: 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 );
}
开发者ID:,项目名称:,代码行数:48,代码来源:

示例8: onClickPlay

// static
void LLFloaterGesture::onClickPlay(void* data)
{
	LLFloaterGesture* self = (LLFloaterGesture*)data;

	LLCtrlListInterface *list = self->childGetListInterface("gesture_list");
	if (!list) return;
	const LLUUID& item_id = list->getCurrentID();

	if (gGestureManager.isGesturePlaying(item_id))
	{
		gGestureManager.stopGesture(item_id);
	}
	else
	{
		gGestureManager.playGesture(item_id);
	}
}
开发者ID:9skunks,项目名称:imprudence,代码行数:18,代码来源:llfloatergesture.cpp

示例9: buildAvatarIDList

// No longer really builds a list.  Instead, just updates mAvatarCombo.
void LLFloaterWorldMap::buildAvatarIDList()
{
	LLCtrlListInterface *list = mListFriendCombo;
	if (!list) return;
	
    // Delete all but the "None" entry
	S32 list_size = list->getItemCount();
	if (list_size > 1)
	{
		list->selectItemRange(1, -1);
		list->operateOnSelection(LLCtrlListInterface::OP_DELETE);
	}
	
	// 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();
}
开发者ID:,项目名称:,代码行数:29,代码来源:

示例10: 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);
	}
}
开发者ID:Boy,项目名称:netbook,代码行数:34,代码来源:llfloatergodtools.cpp

示例11: getListInterface

void LLGestureComboList::onCommitGesture()
{
	LLCtrlListInterface* gestures = getListInterface();
	if (gestures)
	{
		S32 sel_index = gestures->getFirstSelectedIndex();
		if (sel_index == 0)
		{
			return;
		}

		S32 index = gestures->getSelectedValue().asInteger();

		if (mViewAllItemIndex == index)
		{
			// The same behavior as Ctrl+G. EXT-823
			LLFloaterReg::toggleInstance("gestures");
			gestures->selectFirstItem();
			return;
		}

		if (mGetMoreItemIndex == index)
		{
			LLWeb::loadURLExternal(gSavedSettings.getString("GesturesMarketplaceURL"));
			return;
		}

		if (index<0 || index >= (S32)mGestures.size())
		{
			llwarns << "out of range gesture index" << llendl;
		}
		else
		{
			LLMultiGesture* gesture = mGestures.at(index);
			if(gesture)
			{
				LLGestureMgr::instance().playGesture(gesture);
				if(!gesture->mReplaceText.empty())
				{
					LLNearbyChatBar::sendChatFromViewer(gesture->mReplaceText, CHAT_TYPE_NORMAL, FALSE);
				}
			}
		}
	}
}
开发者ID:Krazy-Bish-Margie,项目名称:Thunderstorm,代码行数:45,代码来源:llnearbychatbar.cpp

示例12: 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);
	}
}
开发者ID:Boy,项目名称:rainbow,代码行数:28,代码来源:llfloatergodtools.cpp

示例13: 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);
	}
}
开发者ID:Belxjander,项目名称:Kirito,代码行数:32,代码来源:llfloatergodtools.cpp

示例14: childGetListInterface

void LLFloaterWorldMap::onCommitSearchResult()
{
	LLCtrlListInterface *list = childGetListInterface("search_results");
	if (!list) return;

	LLSD selected_value = list->getSelectedValue();
	std::string sim_name = selected_value.asString();
	if (sim_name.empty())
	{
		return;
	}
	LLStringUtil::toLower(sim_name);

	std::map<U64, LLSimInfo*>::const_iterator it;
	for (it = LLWorldMap::getInstance()->getRegionMap().begin(); it != LLWorldMap::getInstance()->getRegionMap().end(); ++it)
	{
		LLSimInfo* info = it->second;

		if (info->isName(sim_name))
		{
			LLVector3d pos_global = info->getGlobalOrigin();

			const F64 SIM_COORD_DEFAULT = 128.0;
			LLVector3 pos_local(SIM_COORD_DEFAULT, SIM_COORD_DEFAULT, 0.0f);

			// Did this value come from a trackURL() request?
			if (!mCompletingRegionPos.isExactlyZero())
			{
				pos_local = mCompletingRegionPos;
				mCompletingRegionPos.clear();
			}
			pos_global.mdV[VX] += (F64)pos_local.mV[VX];
			pos_global.mdV[VY] += (F64)pos_local.mV[VY];
			pos_global.mdV[VZ] = (F64)pos_local.mV[VZ];

			childSetValue("location", sim_name);
			trackLocation(pos_global);
			setDefaultBtn("Teleport");
			break;
		}
	}

	onShowTargetBtn();
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:44,代码来源:llfloaterworldmap.cpp

示例15: refresh

void LLChatBar::refresh()
{
	// HACK: Leave the name of the gesture in place for a few seconds.
	const F32 SHOW_GESTURE_NAME_TIME = 2.f;
	if (mGestureLabelTimer.getStarted() && mGestureLabelTimer.getElapsedTimeF32() > SHOW_GESTURE_NAME_TIME)
	{
		LLCtrlListInterface* gestures = mGestureCombo ? mGestureCombo->getListInterface() : NULL;
		if (gestures) gestures->selectFirstItem();
		mGestureLabelTimer.stop();
	}

	if ((gAgent.getTypingTime() > AGENT_TYPING_TIMEOUT) && (gAgent.getRenderState() & AGENT_STATE_TYPING))
	{
		gAgent.stopTyping();
	}

	childSetEnabled("Say", mInputEditor->getText().size() > 0);

}
开发者ID:Xara,项目名称:Opensource-V2-SL-Viewer,代码行数:19,代码来源:llchatbar.cpp


注:本文中的LLCtrlListInterface类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。