本文整理汇总了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");
}
}
示例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);
}
}
示例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);
}
}
示例4: getProfileFloater
//static
bool LLAvatarActions::profileVisible(const LLUUID& id)
{
LLSD sd;
sd["id"] = id;
LLFloater* browser = getProfileFloater(id);
return browser && browser->isShown();
}
示例5: getProfileFloater
//static
void LLAvatarActions::hideProfile(const LLUUID& id)
{
LLFloater* browser = getProfileFloater(id);
if (browser)
{
browser->close();
}
}
示例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);
}
示例7: handleEvent
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLFloater* top = gFloaterView->getFrontmost();
if (top)
{
top->saveAsType(true);
}
return true;
}
示例8: clearAndClose
void LLFacebookCheckinPanel::clearAndClose()
{
mMessageTextEditor->setValue("");
LLFloater* floater = getParentByType<LLFloater>();
if (floater)
{
floater->closeFloater();
}
}
示例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;
}
示例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);
}
}
示例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();
}
}
}
示例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();
}
}
示例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);
}
示例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;
}
示例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);
}
}
}