本文整理汇总了C++中LLCheckBoxCtrl::setCallbackUserData方法的典型用法代码示例。如果您正苦于以下问题:C++ LLCheckBoxCtrl::setCallbackUserData方法的具体用法?C++ LLCheckBoxCtrl::setCallbackUserData怎么用?C++ LLCheckBoxCtrl::setCallbackUserData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLCheckBoxCtrl
的用法示例。
在下文中一共展示了LLCheckBoxCtrl::setCallbackUserData方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateCovenantInfo
void LLFloaterBuyLandUI::updateCovenantInfo()
{
LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
if(!region) return;
LLTextBox* region_name = getChild<LLTextBox>("region_name_text");
if (region_name)
{
region_name->setText(region->getName());
}
LLTextBox* resellable_clause = getChild<LLTextBox>("resellable_clause");
if (resellable_clause)
{
if (region->getRegionFlags() & REGION_FLAGS_BLOCK_LAND_RESELL)
{
resellable_clause->setText(getString("can_not_resell"));
}
else
{
resellable_clause->setText(getString("can_resell"));
}
}
LLTextBox* changeable_clause = getChild<LLTextBox>("changeable_clause");
if (changeable_clause)
{
if (region->getRegionFlags() & REGION_FLAGS_ALLOW_PARCEL_CHANGES)
{
changeable_clause->setText(getString("can_change"));
}
else
{
changeable_clause->setText(getString("can_not_change"));
}
}
LLCheckBoxCtrl* check = getChild<LLCheckBoxCtrl>("agree_covenant");
if(check)
{
check->set(false);
check->setEnabled(true);
check->setCallbackUserData(this);
check->setCommitCallback(onChangeAgreeCovenant);
}
LLTextBox* box = getChild<LLTextBox>("covenant_text");
if(box)
{
box->setVisible(FALSE);
}
// send EstateCovenantInfo message
LLMessageSystem *msg = gMessageSystem;
msg->newMessage("EstateCovenantRequest");
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID,gAgent.getSessionID());
msg->sendReliable(region->getHost());
}
示例2:
BOOL LLPanelFace::postBuild()
{
LLRect rect = this->getRect();
LLTextureCtrl* mTextureCtrl;
LLColorSwatchCtrl* mColorSwatch;
LLComboBox* mComboTexGen;
LLCheckBoxCtrl *mCheckFullbright;
LLTextBox* mLabelColorTransp;
LLSpinCtrl* mCtrlColorTransp; // transparency = 1 - alpha
LLSpinCtrl* mCtrlGlow;
setMouseOpaque(FALSE);
mTextureCtrl = getChild<LLTextureCtrl>("texture control");
if(mTextureCtrl)
{
mTextureCtrl->setDefaultImageAssetID(LLUUID( gSavedSettings.getString( "DefaultObjectTexture" )));
mTextureCtrl->setCommitCallback( LLPanelFace::onCommitTexture );
mTextureCtrl->setOnCancelCallback( LLPanelFace::onCancelTexture );
mTextureCtrl->setOnSelectCallback( LLPanelFace::onSelectTexture );
mTextureCtrl->setDragCallback(LLPanelFace::onDragTexture);
mTextureCtrl->setCallbackUserData( this );
mTextureCtrl->setFollowsTop();
mTextureCtrl->setFollowsLeft();
// Don't allow (no copy) or (no transfer) textures to be selected during immediate mode
mTextureCtrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER);
// Allow any texture to be used during non-immediate mode.
mTextureCtrl->setNonImmediateFilterPermMask(PERM_NONE);
LLAggregatePermissions texture_perms;
if (LLSelectMgr::getInstance()->selectGetAggregateTexturePermissions(texture_perms))
{
BOOL can_copy =
texture_perms.getValue(PERM_COPY) == LLAggregatePermissions::AP_EMPTY ||
texture_perms.getValue(PERM_COPY) == LLAggregatePermissions::AP_ALL;
BOOL can_transfer =
texture_perms.getValue(PERM_TRANSFER) == LLAggregatePermissions::AP_EMPTY ||
texture_perms.getValue(PERM_TRANSFER) == LLAggregatePermissions::AP_ALL;
mTextureCtrl->setCanApplyImmediately(can_copy && can_transfer);
}
else
{
mTextureCtrl->setCanApplyImmediately(FALSE);
}
}
mColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
if(mColorSwatch)
{
mColorSwatch->setCommitCallback(LLPanelFace::onCommitColor);
mColorSwatch->setOnCancelCallback(LLPanelFace::onCancelColor);
mColorSwatch->setOnSelectCallback(LLPanelFace::onSelectColor);
mColorSwatch->setCallbackUserData( this );
mColorSwatch->setFollowsTop();
mColorSwatch->setFollowsLeft();
mColorSwatch->setCanApplyImmediately(TRUE);
}
mLabelColorTransp = getChild<LLTextBox>("color trans");
if(mLabelColorTransp)
{
mLabelColorTransp->setFollowsTop();
mLabelColorTransp->setFollowsLeft();
}
mCtrlColorTransp = getChild<LLSpinCtrl>("ColorTrans");
if(mCtrlColorTransp)
{
mCtrlColorTransp->setCommitCallback(LLPanelFace::onCommitAlpha);
mCtrlColorTransp->setCallbackUserData(this);
mCtrlColorTransp->setPrecision(0);
mCtrlColorTransp->setFollowsTop();
mCtrlColorTransp->setFollowsLeft();
}
mCheckFullbright = getChild<LLCheckBoxCtrl>("checkbox fullbright");
if (mCheckFullbright)
{
mCheckFullbright->setCommitCallback(LLPanelFace::onCommitFullbright);
mCheckFullbright->setCallbackUserData( this );
}
mComboTexGen = getChild<LLComboBox>("combobox texgen");
if(mComboTexGen)
{
mComboTexGen->setCommitCallback(LLPanelFace::onCommitTexGen);
mComboTexGen->setFollows(FOLLOWS_LEFT | FOLLOWS_TOP);
mComboTexGen->setCallbackUserData( this );
}
mCtrlGlow = getChild<LLSpinCtrl>("glow");
if(mCtrlGlow)
{
mCtrlGlow->setCommitCallback(LLPanelFace::onCommitGlow);
mCtrlGlow->setCallbackUserData(this);
}
childSetCommitCallback("combobox shininess",&LLPanelFace::onCommitShiny,this);
//.........这里部分代码省略.........
示例3: postBuild
BOOL LLPreviewGesture::postBuild()
{
LLLineEditor* edit;
LLComboBox* combo;
LLButton* btn;
LLScrollListCtrl* list;
LLTextBox* text;
LLCheckBoxCtrl* check;
edit = LLViewerUICtrlFactory::getLineEditorByName(this, "trigger_editor");
edit->setKeystrokeCallback(onKeystrokeCommit);
edit->setCommitCallback(onCommitSetDirty);
edit->setCommitOnFocusLost(TRUE);
edit->setCallbackUserData(this);
edit->setIgnoreTab(TRUE);
mTriggerEditor = edit;
text = LLViewerUICtrlFactory::getTextBoxByName(this, "replace_text");
text->setEnabled(FALSE);
mReplaceText = text;
edit = LLViewerUICtrlFactory::getLineEditorByName(this, "replace_editor");
edit->setEnabled(FALSE);
edit->setKeystrokeCallback(onKeystrokeCommit);
edit->setCommitCallback(onCommitSetDirty);
edit->setCommitOnFocusLost(TRUE);
edit->setCallbackUserData(this);
edit->setIgnoreTab(TRUE);
mReplaceEditor = edit;
combo = LLViewerUICtrlFactory::getComboBoxByName(this, "modifier_combo");
combo->setCommitCallback(onCommitSetDirty);
combo->setCallbackUserData(this);
mModifierCombo = combo;
combo = LLViewerUICtrlFactory::getComboBoxByName(this, "key_combo");
combo->setCommitCallback(onCommitSetDirty);
combo->setCallbackUserData(this);
mKeyCombo = combo;
list = LLViewerUICtrlFactory::getScrollListByName(this, "library_list");
list->setCommitCallback(onCommitLibrary);
list->setDoubleClickCallback(onClickAdd);
list->setCallbackUserData(this);
mLibraryList = list;
btn = LLViewerUICtrlFactory::getButtonByName(this, "add_btn");
btn->setClickedCallback(onClickAdd);
btn->setCallbackUserData(this);
btn->setEnabled(FALSE);
mAddBtn = btn;
btn = LLViewerUICtrlFactory::getButtonByName(this, "up_btn");
btn->setClickedCallback(onClickUp);
btn->setCallbackUserData(this);
btn->setEnabled(FALSE);
mUpBtn = btn;
btn = LLViewerUICtrlFactory::getButtonByName(this, "down_btn");
btn->setClickedCallback(onClickDown);
btn->setCallbackUserData(this);
btn->setEnabled(FALSE);
mDownBtn = btn;
btn = LLViewerUICtrlFactory::getButtonByName(this, "delete_btn");
btn->setClickedCallback(onClickDelete);
btn->setCallbackUserData(this);
btn->setEnabled(FALSE);
mDeleteBtn = btn;
list = LLViewerUICtrlFactory::getScrollListByName(this, "step_list");
list->setCommitCallback(onCommitStep);
list->setCallbackUserData(this);
mStepList = list;
// Options
text = LLViewerUICtrlFactory::getTextBoxByName(this, "options_text");
text->setBorderVisible(TRUE);
mOptionsText = text;
combo = LLViewerUICtrlFactory::getComboBoxByName(this, "animation_list");
combo->setVisible(FALSE);
combo->setCommitCallback(onCommitAnimation);
combo->setCallbackUserData(this);
mAnimationCombo = combo;
LLRadioGroup* group;
group = LLViewerUICtrlFactory::getRadioGroupByName(this, "animation_trigger_type");
group->setVisible(FALSE);
group->setCommitCallback(onCommitAnimationTrigger);
group->setCallbackUserData(this);
mAnimationRadio = group;
combo = LLViewerUICtrlFactory::getComboBoxByName(this, "sound_list");
combo->setVisible(FALSE);
combo->setCommitCallback(onCommitSound);
combo->setCallbackUserData(this);
mSoundCombo = combo;
edit = LLViewerUICtrlFactory::getLineEditorByName(this, "chat_editor");
//.........这里部分代码省略.........