本文整理汇总了C++中LLCtrlSelectionInterface::selectFirstItem方法的典型用法代码示例。如果您正苦于以下问题:C++ LLCtrlSelectionInterface::selectFirstItem方法的具体用法?C++ LLCtrlSelectionInterface::selectFirstItem怎么用?C++ LLCtrlSelectionInterface::selectFirstItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLCtrlSelectionInterface
的用法示例。
在下文中一共展示了LLCtrlSelectionInterface::selectFirstItem方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: show
// static
void LLFloaterClothing::show(void*)
{
if (sInstance)
{
sInstance->setVisibleAndFrontmost();
}
else
{
LLFloaterClothing *self = new LLFloaterClothing();
self->buildClothingList();
if (self->mAllowSelection)
{
LLCtrlSelectionInterface* iface = self->childGetSelectionInterface("clothing_list");
if (iface) iface->selectFirstItem();
}
self->childSetFocus("clothing_list");
self->mSelectedID = LLUUID::null;
// Update button labels
onCommitList(NULL, self);
}
gSavedSettings.setBOOL("ClothingBtnState", TRUE);
}
示例2: postBuild
//-----------------------------------------------------------------------------
// postBuild()
//-----------------------------------------------------------------------------
BOOL LLFloaterImagePreview::postBuild()
{
if (!LLFloaterNameDesc::postBuild())
{
return FALSE;
}
LLCtrlSelectionInterface* iface = childGetSelectionInterface("clothing_type_combo");
if (iface)
{
iface->selectFirstItem();
}
childSetCommitCallback("clothing_type_combo", onPreviewTypeCommit, this);
mPreviewRect.set(PREVIEW_HPAD,
PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD,
getRect().getWidth() - PREVIEW_HPAD,
PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
mPreviewImageRect.set(0.f, 1.f, 1.f, 0.f);
getChildView("bad_image_text")->setVisible(FALSE);
if (mRawImagep.notNull() && gAgent.getRegion() != NULL)
{
mAvatarPreview = new LLImagePreviewAvatar(256, 256);
mAvatarPreview->setPreviewTarget("mPelvis", "mUpperBodyMesh0", mRawImagep, 2.f, FALSE);
mSculptedPreview = new LLImagePreviewSculpted(256, 256);
mSculptedPreview->setPreviewTarget(mRawImagep, 2.0f);
if (mRawImagep->getWidth() * mRawImagep->getHeight () <= LL_IMAGE_REZ_LOSSLESS_CUTOFF * LL_IMAGE_REZ_LOSSLESS_CUTOFF)
getChildView("lossless_check")->setEnabled(TRUE);
// <FS:CR> Temporary texture uploads
if (LLGlobalEconomy::Singleton::getInstance()->getPriceUpload() == 0
|| gAgent.getRegion()->getCentralBakeVersion() > 0)
{
gSavedSettings.setBOOL("TemporaryUpload", FALSE);
getChild<LLCheckBoxCtrl>("temp_check")->setVisible(FALSE);
}
// </FS:CR>
}
else
{
mAvatarPreview = NULL;
mSculptedPreview = NULL;
getChildView("bad_image_text")->setVisible(TRUE);
getChildView("clothing_type_combo")->setEnabled(FALSE);
getChildView("ok_btn")->setEnabled(FALSE);
if(!mImageLoadError.empty())
{
getChild<LLUICtrl>("bad_image_text")->setValue(mImageLoadError.c_str());
}
}
getChild<LLUICtrl>("ok_btn")->setCommitCallback(boost::bind(&LLFloaterNameDesc::onBtnOK, this));
return TRUE;
}
示例3: postBuild
//-----------------------------------------------------------------------------
// postBuild()
//-----------------------------------------------------------------------------
BOOL LLFloaterImagePreview::postBuild()
{
if (!LLFloaterNameDesc::postBuild())
{
return FALSE;
}
childSetLabelArg("ok_btn", "[UPLOADFEE]", gHippoGridManager->getConnectedGrid()->getUploadFee());
childSetAction("ok_btn", onBtnOK, this);
LLCtrlSelectionInterface* iface = childGetSelectionInterface("clothing_type_combo");
if (iface)
{
iface->selectFirstItem();
}
childSetCommitCallback("clothing_type_combo", onPreviewTypeCommit, this);
mPreviewRect.set(PREVIEW_HPAD,
PREVIEW_TEXTURE_HEIGHT,
getRect().getWidth() - PREVIEW_HPAD,
PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
mPreviewImageRect.set(0.f, 1.f, 1.f, 0.f);
childHide("bad_image_text");
if (mRawImagep.notNull() && gAgent.getRegion() != NULL)
{
mAvatarPreview = new LLImagePreviewAvatar(256, 256);
mAvatarPreview->setPreviewTarget("mPelvis", "mUpperBodyMesh0", mRawImagep, 2.f, FALSE);
mSculptedPreview = new LLImagePreviewSculpted(256, 256);
mSculptedPreview->setPreviewTarget(mRawImagep, 2.0f);
if (mRawImagep->getWidth() * mRawImagep->getHeight () <= LL_IMAGE_REZ_LOSSLESS_CUTOFF * LL_IMAGE_REZ_LOSSLESS_CUTOFF)
childEnable("lossless_check");
// <edit>
gSavedSettings.setBOOL("TemporaryUpload",FALSE);
childSetValue("temp_check",FALSE);
// </edit>
}
else
{
mAvatarPreview = NULL;
mSculptedPreview = NULL;
childShow("bad_image_text");
childDisable("clothing_type_combo");
childDisable("ok_btn");
}
return TRUE;
}
示例4: postBuild
//-----------------------------------------------------------------------------
// postBuild()
//-----------------------------------------------------------------------------
BOOL LLFloaterSculptPreview::postBuild()
{
childSetLabelArg("ok_btn", "[AMOUNT]", llformat("%d",sUploadAmount));
LLCtrlSelectionInterface* iface = childGetSelectionInterface("clothing_type_combo");
if (iface)
{
iface->selectFirstItem();
}
childSetCommitCallback("clothing_type_combo", onPreviewTypeCommit, this);
mPreviewRect.set(PREVIEW_HPAD,
PREVIEW_TEXTURE_HEIGHT,
getRect().getWidth() - PREVIEW_HPAD,
PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
mPreviewImageRect.set(0.f, 1.f, 1.f, 0.f);
childHide("bad_image_text");
if (mRawImagep.notNull() && gAgent.getRegion() != NULL)
{
mAvatarPreview = new LLPreviewAvatar(256, 256);
mAvatarPreview->setPreviewTarget("mPelvis", "mUpperBodyMesh0", mRawImagep, 2.f, FALSE);
mSculptedPreview = new LLPreviewSculpted(256, 256);
mSculptedPreview->setPreviewTarget(mRawImagep, 2.0f);
if (mRawImagep->getWidth() * mRawImagep->getHeight () <= LL_IMAGE_REZ_LOSSLESS_CUTOFF * LL_IMAGE_REZ_LOSSLESS_CUTOFF)
childEnable("lossless_check");
childSetValue("temp_check",FALSE);
}
else
{
mAvatarPreview = NULL;
mSculptedPreview = NULL;
childShow("bad_image_text");
childDisable("clothing_type_combo");
childDisable("ok_btn");
}
return TRUE;
}