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


C++ LLFloater类代码示例

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


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

示例1: add_location

void LLFloaterFeed::onClickPost()
{
	if (mPNGImage.notNull())
	{
		static LLCachedControl<bool> add_location("SnapshotFeedAddLocation");
		const std::string caption = childGetValue("caption").asString();
		LLWebProfile::setImageUploadResultCallback(boost::bind(&LLFloaterSnapshot::saveFeedDone, _1, mPNGImage));
		LLWebProfile::uploadImage(mPNGImage, caption, add_location);

		// give user feedback of the event
		gViewerWindow->playSnapshotAnimAndSound();

		// don't destroy the window until the upload is done
		// this way we keep the information in the form
		setVisible(FALSE);

		// remove any dependency on snapshot floater
		// so we outlive it during the upload.
		LLFloater* dependee = getDependee();
		if (dependee)
		{
			dependee->removeDependentFloater(this);
		}
	}
	else
	{
		LLNotificationsUtil::add("ErrorProcessingSnapshot");
	}
}
开发者ID:ap0110,项目名称:SingularityViewer,代码行数:29,代码来源:llfloaterfeed.cpp

示例2: export_test_floaters

void export_test_floaters()
{
	// Convert all test floaters to new XML format
	std::string delim = gDirUtilp->getDirDelimiter();
	std::string xui_dir = get_xui_dir() + "en" + delim;
	std::string filename;

	LLDirIterator iter(xui_dir, "floater_test_*.xml");
	while (iter.next(filename))
	{
		if (filename.find("_new.xml") != std::string::npos)
		{
			// don't re-export other test floaters
			continue;
		}
		llinfos << "Converting " << filename << llendl;
		// Build a floater and output new attributes
		LLXMLNodePtr output_node = new LLXMLNode();
		LLFloater* floater = new LLFloater(LLSD());
		floater->buildFromFile(	filename,
								//	 FALSE,	// don't open floater
								output_node);
		std::string out_filename = xui_dir + filename;
		std::string::size_type extension_pos = out_filename.rfind(".xml");
		out_filename.resize(extension_pos);
		out_filename += "_new.xml";
		
		llinfos << "Output: " << out_filename << llendl;
		LLFILE* floater_file = LLFile::fopen(out_filename.c_str(), "w");
		LLXMLNode::writeHeaderToFile(floater_file);
		output_node->writeToFile(floater_file);
		fclose(floater_file);
	}
}
开发者ID:HizWylder,项目名称:GIS,代码行数:34,代码来源:llui_libtest.cpp

示例3: LLFloaterColorPicker

void LLColorSwatchCtrl::showPicker(BOOL take_focus)
{
	LLFloaterColorPicker* pickerp = (LLFloaterColorPicker*)mPickerHandle.get();
	if (!pickerp)
	{
		pickerp = new LLFloaterColorPicker(this, mCanApplyImmediately);
		LLFloater* parent = gFloaterView->getParentFloater(this);
		if (parent)
		{
			parent->addDependentFloater(pickerp);
		}
		mPickerHandle = pickerp->getHandle();
	}

	// initialize picker with current color
	pickerp->initUI ( mColor.mV [ VRED ], mColor.mV [ VGREEN ], mColor.mV [ VBLUE ] );

	// display it
	pickerp->showUI ();

	if (take_focus)
	{
		pickerp->setFocus(TRUE);
	}
}
开发者ID:Belxjander,项目名称:Kirito,代码行数:25,代码来源:llcolorswatch.cpp

示例4: getProfileFloater

//static 
bool LLAvatarActions::profileVisible(const LLUUID& id)
{
	LLSD sd;
	sd["id"] = id;
	LLFloater* browser = getProfileFloater(id);
	return browser && browser->isShown();
}
开发者ID:Belxjander,项目名称:Kirito,代码行数:8,代码来源:llavataractions.cpp

示例5: getProfileFloater

//static
void LLAvatarActions::hideProfile(const LLUUID& id)
{
	LLFloater* browser = getProfileFloater(id);
	if (browser)
	{
		browser->close();
	}
}
开发者ID:Ratany,项目名称:SingularityViewer,代码行数:9,代码来源:llavataractions.cpp

示例6: findInstance

//static
// returns true if the instance exists
bool LLFloaterReg::hideInstance(const std::string& name, const LLSD& key) 
{ 
	LLFloater* instance = findInstance(name, key); 
	if (instance)
	{
		instance->closeHostedFloater();
	}
	return (instance != NULL);
}
开发者ID:CaseyraeStarfinder,项目名称:Firestorm-Viewer,代码行数:11,代码来源:llfloaterreg.cpp

示例7: handleEvent

	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
	{
		LLFloater* top = gFloaterView->getFrontmost();
		if (top)
		{
			top->saveAsType(true);
		}
		return true;
	}
开发者ID:aragornarda,项目名称:SingularityViewer,代码行数:9,代码来源:llviewermenufile.cpp

示例8: clearAndClose

void LLFacebookCheckinPanel::clearAndClose()
{
	mMessageTextEditor->setValue("");

	LLFloater* floater = getParentByType<LLFloater>();
	if (floater)
	{
		floater->closeFloater();
	}
}
开发者ID:CaseyraeStarfinder,项目名称:Firestorm-Viewer,代码行数:10,代码来源:llfloaterfacebook.cpp

示例9: getBuiltFloater

//-----------------------------------------------------------------------------
// getBuiltFloater()
//-----------------------------------------------------------------------------
LLFloater* LLUICtrlFactory::getBuiltFloater(const std::string name) const
{
	for (built_floater_t::const_iterator i = mBuiltFloaters.begin(); i != mBuiltFloaters.end(); ++i)
	{
		LLFloater* floater = i->first.get();
		if (floater && floater->getName() == name)
			return floater;
	}
	return NULL;
}
开发者ID:OS-Development,项目名称:VW.Singularity,代码行数:13,代码来源:lluictrlfactory.cpp

示例10: endAnimCallback

// static
void LLPreviewAnim::endAnimCallback( void *userdata )
{
	LLHandle<LLFloater>* handlep = ((LLHandle<LLFloater>*)userdata);
	LLFloater* self = handlep->get();
	delete handlep; // done with the handle
	if (self)
	{
		self->childSetValue("Anim play btn", FALSE);
		self->childSetValue("Anim audition btn", FALSE);
	}
}
开发者ID:Nora28,项目名称:imprudence,代码行数:12,代码来源:llpreviewanim.cpp

示例11: restoreVisibleInstances

//static
void LLFloaterReg::restoreVisibleInstances()
{
	// Iterate through all active instances and restore visibility
	for (instance_map_t::iterator iter = sInstanceMap.begin(); iter != sInstanceMap.end(); ++iter)
	{
		instance_list_t& list = iter->second;
		for (instance_list_t::iterator iter = list.begin(); iter != list.end(); ++iter)
		{
			LLFloater* floater = *iter;
			floater->popVisible();
		}
	}
}
开发者ID:CaseyraeStarfinder,项目名称:Firestorm-Viewer,代码行数:14,代码来源:llfloaterreg.cpp

示例12: getParent

void LLPanelGroup::close()
{
	// Pass this to the parent, if it is a floater.
	LLView* viewp = getParent();
	LLFloater* floaterp = dynamic_cast<LLFloater*>(viewp);
	if (floaterp)
	{
		// First, set the force close flag, since the floater
		// will be asking us whether it can close.
		mForceClose = TRUE;
		// Tell the parent floater to close.
		floaterp->close();
	}
}
开发者ID:VirtualReality,项目名称:Viewer,代码行数:14,代码来源:llpanelgroup.cpp

示例13: onClickUpload

//static
void KVFloaterFlickrUpload::onClickUpload(void* data)
{
	if(!data)
		return;
	KVFloaterFlickrUpload *self = (KVFloaterFlickrUpload*)data;
	self->uploadSnapshot();
	self->saveSettings();
	self->setVisible(false);
	// Make sure that, if we were attached to anything, that we detach from it.
	// Otherwise bad things happen.
	LLFloater *dependee = self->getDependee();
	if(dependee)
		dependee->removeDependentFloater(self);
}
开发者ID:Krazy-Bish-Margie,项目名称:Thunderstorm,代码行数:15,代码来源:kvfloaterflickrupload.cpp

示例14: getInstance

//static
LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, BOOL focus) 
{
	if( sBlockShowFloaters
			// see EXT-7090
			&& sAlwaysShowableList.find(name) == sAlwaysShowableList.end())
		return 0;//
	LLFloater* instance = getInstance(name, key); 
	if (instance) 
	{
		instance->openFloater(key);
		if (focus)
			instance->setFocus(TRUE);
	}
	return instance;
}
开发者ID:Katharine,项目名称:kittyviewer,代码行数:16,代码来源:llfloaterreg.cpp

示例15: hideVisibleInstances

//static
void LLFloaterReg::hideVisibleInstances(const std::set<std::string>& exceptions)
{
	// Iterate through alll active instances and hide them
	for (instance_map_t::iterator iter = sInstanceMap.begin(); iter != sInstanceMap.end(); ++iter)
	{
		const std::string& name = iter->first;
		if (exceptions.find(name) != exceptions.end())
			continue;
		instance_list_t& list = iter->second;
		for (instance_list_t::iterator iter = list.begin(); iter != list.end(); ++iter)
		{
			LLFloater* floater = *iter;
			floater->pushVisible(FALSE);
		}
	}
}
开发者ID:CaseyraeStarfinder,项目名称:Firestorm-Viewer,代码行数:17,代码来源:llfloaterreg.cpp


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