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


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

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


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

示例1: postBuild

// Checked: 2011-11-08 (RLVa-1.5.0)
BOOL RlvFloaterStrings::postBuild()
{
	// Set up the UI controls
	m_pStringList = findChild<LLComboBox>("string_list");
	m_pStringList->setCommitCallback(boost::bind(&RlvFloaterStrings::checkDirty, this, true));

	LLUICtrl* pDefaultBtn = findChild<LLUICtrl>("default_btn");
	pDefaultBtn->setCommitCallback(boost::bind(&RlvFloaterStrings::onStringRevertDefault, this));

	// Read all string metadata from the default strings file
	llifstream fileStream(RlvStrings::getStringMapPath(), std::ios::binary); LLSD sdFileData;
	if ( (fileStream.is_open()) && (LLSDSerialize::fromXMLDocument(sdFileData, fileStream)) )
	{
		m_sdStringsInfo = sdFileData["strings"];
		fileStream.close();
	}

	// Populate the combo box
	for (LLSD::map_const_iterator itString = m_sdStringsInfo.beginMap(); itString != m_sdStringsInfo.endMap(); ++itString)
	{
		const LLSD& sdStringInfo = itString->second;
		if ( (!sdStringInfo.has("customizable")) || (!sdStringInfo["customizable"].asBoolean()) )
			continue;
		m_pStringList->add( (sdStringInfo.has("label")) ? sdStringInfo["label"].asString() : itString->first, itString->first);
	}

	refresh();

	return TRUE;
}
开发者ID:HanHeld,项目名称:SingularityViewerFeb2016,代码行数:31,代码来源:rlvfloaters.cpp

示例2: childSetCommitCallback

// *TODO: Deprecate; for backwards compatability only:
// Prefer getChild<LLUICtrl>("foo")->setCommitCallback(boost:bind(...)),
// which takes a generic slot.  Or use mCommitCallbackRegistrar.add() with
// a named callback and reference it in XML.
void LLPanel::childSetCommitCallback(const std::string& id, boost::function<void (LLUICtrl*,void*)> cb, void* data)
{
	LLUICtrl* child = findChild<LLUICtrl>(id);
	if (child)
	{
		child->setCommitCallback(boost::bind(cb, child, data));
	}
}
开发者ID:otwstephanie,项目名称:hpa2oar,代码行数:12,代码来源:llpanel.cpp

示例3: childSetCommitCallback

void LLPanel::childSetCommitCallback(const std::string& id, void (*cb)(LLUICtrl*, void*), void *userdata )
{
	LLUICtrl* child = getChild<LLUICtrl>(id, true);
	if (child)
	{
		child->setCommitCallback(cb);
		child->setCallbackUserData(userdata);
	}
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:9,代码来源:llpanel.cpp

示例4: postBuild

BOOL LLFloaterAutoReplaceSettings::postBuild(void)
{
	// get copies of the current settings that we will operate on
	mEnabled  = gSavedSettings.getBOOL("AutoReplace");
	LL_DEBUGS("AutoReplace") << ( mEnabled ? "enabled" : "disabled") << LL_ENDL;

	mSettings = LLAutoReplace::getInstance()->getSettings();
	
	// global checkbox for whether or not autoreplace is active
	LLUICtrl* enabledCheckbox = getChild<LLUICtrl>("autoreplace_enable");
	enabledCheckbox->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onAutoReplaceToggled, this));
	enabledCheckbox->setValue(LLSD(mEnabled));

	// top row list creation and deletion
	getChild<LLUICtrl>("autoreplace_import_list")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onImportList,this));
	getChild<LLUICtrl>("autoreplace_export_list")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onExportList,this));
	getChild<LLUICtrl>("autoreplace_new_list")->setCommitCallback(   boost::bind(&LLFloaterAutoReplaceSettings::onNewList,this));
	getChild<LLUICtrl>("autoreplace_delete_list")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onDeleteList,this));

	// the list of keyword->replacement lists
	mListNames = getChild<LLScrollListCtrl>("autoreplace_list_name");
	mListNames->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onSelectList, this));
	mListNames->setCommitOnSelectionChange(true);
	
	// list ordering
	getChild<LLUICtrl>("autoreplace_list_up")->setCommitCallback(  boost::bind(&LLFloaterAutoReplaceSettings::onListUp,this));
	getChild<LLUICtrl>("autoreplace_list_down")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onListDown,this));

	// keyword->replacement entry add / delete
	getChild<LLUICtrl>("autoreplace_add_entry")->setCommitCallback(   boost::bind(&LLFloaterAutoReplaceSettings::onAddEntry,this));
	getChild<LLUICtrl>("autoreplace_delete_entry")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onDeleteEntry,this));

	// entry edits
	mKeyword     = getChild<LLLineEditor>("autoreplace_keyword");
	mReplacement = getChild<LLLineEditor>("autoreplace_replacement");
	getChild<LLUICtrl>("autoreplace_save_entry")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onSaveEntry, this));

	// dialog termination ( Save Changes / Cancel )
	getChild<LLUICtrl>("autoreplace_save_changes")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onSaveChanges, this));
	getChild<LLUICtrl>("autoreplace_cancel")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::close, this, false));

	// the list of keyword->replacement pairs
	mReplacementsList = getChild<LLScrollListCtrl>("autoreplace_list_replacements");
	mReplacementsList->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onSelectEntry, this));
	mReplacementsList->setCommitOnSelectionChange(true);

	center();

	mSelectedListName.clear();
	updateListNames();
	updateListNamesControls();
	updateReplacementsList();

	return true;
}
开发者ID:1234-,项目名称:SingularityViewer,代码行数:55,代码来源:llfloaterautoreplacesettings.cpp


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