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


C++ LLUICtrl::setEnabled方法代码示例

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


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

示例1: controlListener

// static
bool LLUICtrl::controlListener(const LLSD& newvalue, LLHandle<LLUICtrl> handle, std::string type)
{
	LLUICtrl* ctrl = handle.get();
	if (ctrl)
	{
		if (type == "value")
		{
			ctrl->setValue(newvalue);
			return true;
		}
		else if (type == "enabled")
		{
			ctrl->setEnabled(newvalue.asBoolean());
			return true;
		}
		else if(type =="disabled")
		{
			ctrl->setEnabled(!newvalue.asBoolean());
			return true;
		}
		else if (type == "visible")
		{
			ctrl->setVisible(newvalue.asBoolean());
			return true;
		}
		else if (type == "invisible")
		{
			ctrl->setVisible(!newvalue.asBoolean());
			return true;
		}
	}
	return false;
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:34,代码来源:lluictrl.cpp

示例2: setCtrlsEnabled

void LLPanel::setCtrlsEnabled( BOOL b )
{
	LLView::ctrl_list_t ctrls = getCtrlList();
	for (LLView::ctrl_list_t::iterator ctrl_it = ctrls.begin(); ctrl_it != ctrls.end(); ++ctrl_it)
	{
		LLUICtrl* ctrl = *ctrl_it;
		ctrl->setEnabled( b );
	}
}
开发者ID:otwstephanie,项目名称:hpa2oar,代码行数:9,代码来源:llpanel.cpp

示例3: clearCtrls

// virtual
void LLPanel::clearCtrls()
{
	LLView::ctrl_list_t ctrls = getCtrlList();
	for (LLView::ctrl_list_t::iterator ctrl_it = ctrls.begin(); ctrl_it != ctrls.end(); ++ctrl_it)
	{
		LLUICtrl* ctrl = *ctrl_it;
		ctrl->setFocus( FALSE );
		ctrl->setEnabled( FALSE );
		ctrl->clear();
	}
}
开发者ID:otwstephanie,项目名称:hpa2oar,代码行数:12,代码来源:llpanel.cpp

示例4: enableTeleportCoordsDisplay

// enable/disable teleport destination coordinates 
void LLFloaterWorldMap::enableTeleportCoordsDisplay( bool enabled )
{
// [RLVa:KB] - Checked: 2012-02-08 (RLVa-1.4.5) | Added: RLVa-1.4.5
	LLUICtrl* pCtrl = getChild<LLUICtrl>("events_label");
	pCtrl->setVisible(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));

	pCtrl = getChild<LLUICtrl>("teleport_coordinate_x");
	pCtrl->setVisible(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));
	pCtrl->setEnabled(enabled);

	pCtrl = getChild<LLUICtrl>("teleport_coordinate_y");
	pCtrl->setVisible(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));
	pCtrl->setEnabled(enabled);

	pCtrl = getChild<LLUICtrl>("teleport_coordinate_z");
	pCtrl->setVisible(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));
	pCtrl->setEnabled(enabled);
// [/RLVa:KB]
//	childSetEnabled("teleport_coordinate_x", enabled );
//	childSetEnabled("teleport_coordinate_y", enabled );
//	childSetEnabled("teleport_coordinate_z", enabled );
}
开发者ID:wish-ds,项目名称:firestorm-ds,代码行数:23,代码来源:llfloaterworldmap.cpp

示例5: refresh

void LLMakeOutfitDialog::refresh()
{
	bool fUseOutfits = getUseOutfits();

	for (S32 idxType = 0; idxType < LLWearableType::WT_COUNT; idxType++)
	{
		LLWearableType::EType wtType = (LLWearableType::EType)idxType;
		if (LLAssetType::AT_BODYPART != LLWearableType::getAssetType(wtType))
			continue;
		LLUICtrl* pCheckCtrl = getChild<LLUICtrl>(std::string("checkbox_") + LLWearableType::getTypeLabel(wtType));
		if (!pCheckCtrl)
			continue;

		pCheckCtrl->setEnabled(!fUseOutfits);
		if (fUseOutfits)
			pCheckCtrl->setValue(true);
	}
	childSetEnabled("checkbox_use_links", !fUseOutfits);
}
开发者ID:aragornarda,项目名称:SingularityViewer,代码行数:19,代码来源:llmakeoutfitdialog.cpp

示例6: postBuild

// virtual
BOOL LLFloaterReporter::postBuild()
{
	LLSLURL slurl;
	LLAgentUI::buildSLURL(slurl);
	getChild<LLUICtrl>("abuse_location_edit")->setValue(slurl.getSLURLString());

	enableControls(TRUE);

	// convert the position to a string
	LLVector3d pos = gAgent.getPositionGlobal();
	LLViewerRegion *regionp = gAgent.getRegion();
	if (regionp)
	{
		getChild<LLUICtrl>("sim_field")->setValue(regionp->getName());
		pos -= regionp->getOriginGlobal();
	}
	setPosBox(pos);

	// Take a screenshot, but don't draw this floater.
	setVisible(FALSE);
	takeScreenshot();
	setVisible(TRUE);

	// Default text to be blank
	getChild<LLUICtrl>("object_name")->setValue(LLStringUtil::null);
	getChild<LLUICtrl>("owner_name")->setValue(LLStringUtil::null);
	mOwnerName = LLStringUtil::null;

	getChild<LLUICtrl>("summary_edit")->setFocus(TRUE);

	mDefaultSummary = getChild<LLUICtrl>("details_edit")->getValue().asString();

	// send a message and ask for information about this region -
	// result comes back in processRegionInfo(..)
	LLMessageSystem* msg = gMessageSystem;
	msg->newMessage("RequestRegionInfo");
	msg->nextBlock("AgentData");
	msg->addUUID("AgentID", gAgent.getID());
	msg->addUUID("SessionID", gAgent.getSessionID());
	gAgent.sendReliableMessage();


	// abuser name is selected from a list
	LLUICtrl* le = getChild<LLUICtrl>("abuser_name_edit");
	le->setEnabled( false );

	LLButton* pick_btn = getChild<LLButton>("pick_btn");
	// XUI: Why aren't these in viewerart.ini?
	pick_btn->setImages(std::string("UIImgFaceUUID"),
						std::string("UIImgFaceSelectedUUID") );
	childSetAction("pick_btn", onClickObjPicker, this);
	childSetAction("select_abuser", boost::bind(&LLFloaterReporter::onClickSelectAbuser, this));

	childSetAction("send_btn", onClickSend, this);
	childSetAction("cancel_btn", onClickCancel, this);
	// grab the user's name
	std::string reporter;
	gAgent.buildFullname(reporter);
	getChild<LLUICtrl>("reporter_field")->setValue(reporter);

	center();

	return TRUE;
}
开发者ID:OS-Development,项目名称:VW.Singularity,代码行数:65,代码来源:llfloaterreporter.cpp


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