本文整理汇总了C++中LLComboBox::setCommitCallback方法的典型用法代码示例。如果您正苦于以下问题:C++ LLComboBox::setCommitCallback方法的具体用法?C++ LLComboBox::setCommitCallback怎么用?C++ LLComboBox::setCommitCallback使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLComboBox
的用法示例。
在下文中一共展示了LLComboBox::setCommitCallback方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initCallbacks
void LLFloaterDayCycle::initCallbacks(void)
{
initHelpBtn("WLDayCycleHelp", "HelpDayCycle");
// WL Day Cycle
childSetCommitCallback("WLTimeSlider", onTimeSliderMoved, NULL);
childSetCommitCallback("WLDayCycleKeys", onKeyTimeMoved, NULL);
childSetCommitCallback("WLCurKeyHour", onKeyTimeChanged, NULL);
childSetCommitCallback("WLCurKeyMin", onKeyTimeChanged, NULL);
childSetCommitCallback("WLKeyPresets", onKeyPresetChanged, NULL);
childSetCommitCallback("WLLengthOfDayHour", onTimeRateChanged, NULL);
childSetCommitCallback("WLLengthOfDayMin", onTimeRateChanged, NULL);
childSetCommitCallback("WLLengthOfDaySec", onTimeRateChanged, NULL);
childSetAction("WLUseLindenTime", onUseLindenTime, NULL);
childSetAction("WLAnimSky", onRunAnimSky, NULL);
childSetAction("WLStopAnimSky", onStopAnimSky, NULL);
LLComboBox* comboBox = getChild<LLComboBox>("DayCyclePresetsCombo");
//childSetAction("WLLoadPreset", onLoadPreset, comboBox);
childSetAction("DayCycleNewPreset", onNewPreset, comboBox);
childSetAction("DayCycleSavePreset", onSavePreset, comboBox);
childSetAction("DayCycleDeletePreset", onDeletePreset, comboBox);
comboBox->setCommitCallback(boost::bind(&LLFloaterDayCycle::onChangePresetName,_1));
childSetAction("WLAddKey", onAddKey, NULL);
childSetAction("WLDeleteKey", onDeleteKey, NULL);
}
示例2: postBuild
BOOL LLFloaterAO::postBuild(void)
{
LLComboBox* combo;
LLScrollListCtrl* list;
childSetAction("btn_save", onClickSave, this);
childSetAction("btn_load", onClickLoad, this);
combo = getChild<LLComboBox>( "combo_anim_type");
combo->setCommitCallback(onCommitType);
combo->setCallbackUserData(this);
combo->selectFirstItem();
mAnimTypeCombo = combo;
mCurrentAnimType = mAnimTypeCombo->getValue().asString();
combo = getChild<LLComboBox>( "combo_anim_list");
mAnimListCombo = combo;
childSetAction("combo_anim_add", onClickAnimAdd, this);
childSetAction("combo_anim_delete", onClickAnimRemove, this);
list = getChild<LLScrollListCtrl>("active_anim_list");
mAnimationList = list;
addAnimations();
refresh();
return TRUE;
}
示例3: postBuild
BOOL wlfPanel_AdvSettings::postBuild()
{
childSetAction("expand", onClickExpandBtn, this);
LLComboBox* comboBoxSky = getChild<LLComboBox>("WLSkyPresetsCombo");
if(comboBoxSky != NULL)
{
std::map<std::string, LLWLParamSet>::iterator mIt = LLWLParamManager::instance()->mParamList.begin();
for(; mIt != LLWLParamManager::instance()->mParamList.end(); mIt++)
{
if (mIt->first.length() > 0)
comboBoxSky->add(mIt->first);
}
comboBoxSky->add(LLStringUtil::null);
comboBoxSky->selectByValue(LLSD(current_preset));
}
comboBoxSky->setCommitCallback(onChangePresetName);
LLComboBox* comboBoxWater = getChild<LLComboBox>("WLWaterPresetsCombo");
if(comboBoxWater != NULL)
{
std::map<std::string, LLWaterParamSet>::iterator mIt = LLWaterParamManager::instance()->mParamList.begin();
for(; mIt != LLWaterParamManager::instance()->mParamList.end(); mIt++)
{
if (mIt->first.length() > 0)
comboBoxWater->add(mIt->first);
}
comboBoxWater->add(LLStringUtil::null);
comboBoxWater->selectByValue(LLSD(current_preset));
}
comboBoxWater->setCommitCallback(onChangePresetName);
fixPointer = this;
/*onClickExpandBtn(fixPointer);
onClickExpandBtn(fixPointer);*/
LLSliderCtrl* mCtrlSliderQuality = getChild<LLSliderCtrl>("QualityPerformanceSelection");
mCtrlSliderQuality->setSliderMouseUpCallback(onChangeQuality);
mCtrlSliderQuality->setCallbackUserData(this);
return TRUE;
}
示例4: postBuild
BOOL wlfPanel_AdvSettings::postBuild()
{
childSetAction("expand", onClickExpandBtn, this);
LLComboBox* comboBox = getChild<LLComboBox>("WLPresetsCombo");
if(comboBox != NULL) {
std::map<std::string, LLWLParamSet>::iterator mIt =
LLWLParamManager::instance()->mParamList.begin();
for(; mIt != LLWLParamManager::instance()->mParamList.end(); mIt++)
{
comboBox->add(mIt->first);
}
comboBox->add(LLStringUtil::null);
comboBox->selectByValue(LLSD("Default"));
}
comboBox->setCommitCallback(onChangePresetName);
fixPointer = this;
return TRUE;
}
示例5: LLFloater
LLFloaterPostProcess::LLFloaterPostProcess() : LLFloater(std::string("Post-Process Floater"))
{
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_post_process.xml");
/// Color Filter Callbacks
childSetCommitCallback("ColorFilterToggle", &LLFloaterPostProcess::onBoolToggle, (char*)"enable_color_filter");
childSetCommitCallback("ColorFilterGamma", &LLFloaterPostProcess::onFloatControlMoved, (char*)"gamma");
childSetCommitCallback("ColorFilterBrightness", &LLFloaterPostProcess::onFloatControlMoved, (char*)"brightness");
childSetCommitCallback("ColorFilterSaturation", &LLFloaterPostProcess::onFloatControlMoved, (char*)"saturation");
childSetCommitCallback("ColorFilterContrast", &LLFloaterPostProcess::onFloatControlMoved, (char*)"contrast");
childSetCommitCallback("ColorFilterBaseR", &LLFloaterPostProcess::onColorControlRMoved, (char*)"contrast_base");
childSetCommitCallback("ColorFilterBaseG", &LLFloaterPostProcess::onColorControlGMoved, (char*)"contrast_base");
childSetCommitCallback("ColorFilterBaseB", &LLFloaterPostProcess::onColorControlBMoved, (char*)"contrast_base");
childSetCommitCallback("ColorFilterBaseI", &LLFloaterPostProcess::onColorControlIMoved, (char*)"contrast_base");
/// Night Vision Callbacks
childSetCommitCallback("NightVisionToggle", &LLFloaterPostProcess::onBoolToggle, (char*)"enable_night_vision");
childSetCommitCallback("NightVisionBrightMult", &LLFloaterPostProcess::onFloatControlMoved, (char*)"brightness_multiplier");
childSetCommitCallback("NightVisionNoiseSize", &LLFloaterPostProcess::onFloatControlMoved, (char*)"noise_size");
childSetCommitCallback("NightVisionNoiseStrength", &LLFloaterPostProcess::onFloatControlMoved, (char*)"noise_strength");
/// Bloom Callbacks
/*childSetCommitCallback("BloomToggle", &LLFloaterPostProcess::onBoolToggle, (char*)"enable_bloom");
childSetCommitCallback("BloomExtract", &LLFloaterPostProcess::onFloatControlMoved, (char*)"extract_low");
childSetCommitCallback("BloomSize", &LLFloaterPostProcess::onFloatControlMoved, (char*)"bloom_width");
childSetCommitCallback("BloomStrength", &LLFloaterPostProcess::onFloatControlMoved, (char*)"bloom_strength");*/
// Gauss Blur Callbacks
childSetCommitCallback("GaussBlurToggle", &LLFloaterPostProcess::onBoolToggle, (char*)"enable_gauss_blur");
childSetCommitCallback("GaussBlurPasses", &LLFloaterPostProcess::onFloatControlMoved, (char*)"gauss_blur_passes");
// Effect loading and saving.
LLComboBox* comboBox = getChild<LLComboBox>("PPEffectsCombo");
childSetAction("PPLoadEffect", &LLFloaterPostProcess::onLoadEffect, comboBox);
comboBox->setCommitCallback(onChangeEffectName);
LLLineEditor* editBox = getChild<LLLineEditor>("PPEffectNameEditor");
childSetAction("PPSaveEffect", &LLFloaterPostProcess::onSaveEffect, editBox);
syncMenu();
}
示例6: postBuild
BOOL LLPanelClassifiedEdit::postBuild()
{
LLPanelClassifiedInfo::postBuild();
LLTextureCtrl* snapshot = getChild<LLTextureCtrl>("classified_snapshot");
snapshot->setOnSelectCallback(boost::bind(&LLPanelClassifiedEdit::onChange, this));
LLUICtrl* edit_icon = getChild<LLUICtrl>("edit_icon");
snapshot->setMouseEnterCallback(boost::bind(&LLPanelClassifiedEdit::onTexturePickerMouseEnter, this, edit_icon));
snapshot->setMouseLeaveCallback(boost::bind(&LLPanelClassifiedEdit::onTexturePickerMouseLeave, this, edit_icon));
edit_icon->setVisible(false);
LLLineEditor* line_edit = getChild<LLLineEditor>("classified_name");
line_edit->setKeystrokeCallback(boost::bind(&LLPanelClassifiedEdit::onChange, this), NULL);
LLTextEditor* text_edit = getChild<LLTextEditor>("classified_desc");
text_edit->setKeystrokeCallback(boost::bind(&LLPanelClassifiedEdit::onChange, this));
LLComboBox* combobox = getChild<LLComboBox>( "category");
LLClassifiedInfo::cat_map::iterator iter;
for (iter = LLClassifiedInfo::sCategories.begin();
iter != LLClassifiedInfo::sCategories.end();
iter++)
{
combobox->add(LLTrans::getString(iter->second));
}
combobox->setCommitCallback(boost::bind(&LLPanelClassifiedEdit::onChange, this));
childSetCommitCallback("content_type", boost::bind(&LLPanelClassifiedEdit::onChange, this), NULL);
childSetCommitCallback("price_for_listing", boost::bind(&LLPanelClassifiedEdit::onChange, this), NULL);
childSetCommitCallback("auto_renew", boost::bind(&LLPanelClassifiedEdit::onChange, this), NULL);
childSetAction("save_changes_btn", boost::bind(&LLPanelClassifiedEdit::onSaveClick, this));
childSetAction("set_to_curr_location_btn", boost::bind(&LLPanelClassifiedEdit::onSetLocationClick, this));
mSnapshotCtrl->setOnSelectCallback(boost::bind(&LLPanelClassifiedEdit::onTextureSelected, this));
return TRUE;
}
示例7: postBuild
BOOL LLWindlightRemoteCtrl::postBuild()
{
childSetAction("Environment", onClickToggleEnvironment, this);
childSetAction("Popup", onClickPopupBtn, this);
LLComboBox* presetsCombo = getChild<LLComboBox>("Presets");
if (presetsCombo)
{
presetsCombo->setSimple(LLWLParamManager::instance()->mCurParams.mName);
presetsCombo->setCommitCallback(onCommitPreset);
presetsCombo->setCallbackUserData(this);
// set up observer to follow changes
mObserver = new LLWindlightRemoteObserver(this);
LLWLParamManager::addObserver(mObserver);
// refresh list from current presets
refreshPresets();
}
return TRUE;
}
示例8:
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);
//.........这里部分代码省略.........
示例9: 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");
//.........这里部分代码省略.........
示例10: initCallbacks
//.........这里部分代码省略.........
initHelpBtn("WLStarBrightnessHelp", "HelpStarBrightness");
initHelpBtn("WLCloudColorHelp", "HelpCloudColor");
initHelpBtn("WLCloudDetailHelp", "HelpCloudDetail");
initHelpBtn("WLCloudDensityHelp", "HelpCloudDensity");
initHelpBtn("WLCloudCoverageHelp", "HelpCloudCoverage");
initHelpBtn("WLCloudScaleHelp", "HelpCloudScale");
initHelpBtn("WLCloudScrollXHelp", "HelpCloudScrollX");
initHelpBtn("WLCloudScrollYHelp", "HelpCloudScrollY");
initHelpBtn("WLClassicCloudsHelp", "HelpClassicClouds");
LLWLParamManager * param_mgr = LLWLParamManager::instance();
// blue horizon
childSetCommitCallback("WLBlueHorizonR", onColorControlRMoved, ¶m_mgr->mBlueHorizon);
childSetCommitCallback("WLBlueHorizonG", onColorControlGMoved, ¶m_mgr->mBlueHorizon);
childSetCommitCallback("WLBlueHorizonB", onColorControlBMoved, ¶m_mgr->mBlueHorizon);
childSetCommitCallback("WLBlueHorizonI", onColorControlIMoved, ¶m_mgr->mBlueHorizon);
// haze density, horizon, mult, and altitude
childSetCommitCallback("WLHazeDensity", onColorControlRMoved, ¶m_mgr->mHazeDensity);
childSetCommitCallback("WLHazeHorizon", onColorControlRMoved, ¶m_mgr->mHazeHorizon);
childSetCommitCallback("WLDensityMult", onFloatControlMoved, ¶m_mgr->mDensityMult);
childSetCommitCallback("WLMaxAltitude", onFloatControlMoved, ¶m_mgr->mMaxAlt);
// blue density
childSetCommitCallback("WLBlueDensityR", onColorControlRMoved, ¶m_mgr->mBlueDensity);
childSetCommitCallback("WLBlueDensityG", onColorControlGMoved, ¶m_mgr->mBlueDensity);
childSetCommitCallback("WLBlueDensityB", onColorControlBMoved, ¶m_mgr->mBlueDensity);
childSetCommitCallback("WLBlueDensityI", onColorControlIMoved, ¶m_mgr->mBlueDensity);
// Lighting
// sunlight
childSetCommitCallback("WLSunlightR", onColorControlRMoved, ¶m_mgr->mSunlight);
childSetCommitCallback("WLSunlightG", onColorControlGMoved, ¶m_mgr->mSunlight);
childSetCommitCallback("WLSunlightB", onColorControlBMoved, ¶m_mgr->mSunlight);
childSetCommitCallback("WLSunlightI", onColorControlIMoved, ¶m_mgr->mSunlight);
// glow
childSetCommitCallback("WLGlowR", onGlowRMoved, ¶m_mgr->mGlow);
childSetCommitCallback("WLGlowB", onGlowBMoved, ¶m_mgr->mGlow);
// ambient
childSetCommitCallback("WLAmbientR", onColorControlRMoved, ¶m_mgr->mAmbient);
childSetCommitCallback("WLAmbientG", onColorControlGMoved, ¶m_mgr->mAmbient);
childSetCommitCallback("WLAmbientB", onColorControlBMoved, ¶m_mgr->mAmbient);
childSetCommitCallback("WLAmbientI", onColorControlIMoved, ¶m_mgr->mAmbient);
// time of day
childSetCommitCallback("WLSunAngle", onSunMoved, ¶m_mgr->mLightnorm);
childSetCommitCallback("WLEastAngle", onSunMoved, ¶m_mgr->mLightnorm);
// Clouds
// Cloud Color
childSetCommitCallback("WLCloudColorR", onColorControlRMoved, ¶m_mgr->mCloudColor);
childSetCommitCallback("WLCloudColorG", onColorControlGMoved, ¶m_mgr->mCloudColor);
childSetCommitCallback("WLCloudColorB", onColorControlBMoved, ¶m_mgr->mCloudColor);
childSetCommitCallback("WLCloudColorI", onColorControlIMoved, ¶m_mgr->mCloudColor);
// Cloud
childSetCommitCallback("WLCloudX", onColorControlRMoved, ¶m_mgr->mCloudMain);
childSetCommitCallback("WLCloudY", onColorControlGMoved, ¶m_mgr->mCloudMain);
childSetCommitCallback("WLCloudDensity", onColorControlBMoved, ¶m_mgr->mCloudMain);
// Cloud Detail
childSetCommitCallback("WLCloudDetailX", onColorControlRMoved, ¶m_mgr->mCloudDetail);
childSetCommitCallback("WLCloudDetailY", onColorControlGMoved, ¶m_mgr->mCloudDetail);
childSetCommitCallback("WLCloudDetailDensity", onColorControlBMoved, ¶m_mgr->mCloudDetail);
// Cloud extras
childSetCommitCallback("WLCloudCoverage", onFloatControlMoved, ¶m_mgr->mCloudCoverage);
childSetCommitCallback("WLCloudScale", onFloatControlMoved, ¶m_mgr->mCloudScale);
childSetCommitCallback("WLCloudLockX", onCloudScrollXToggled, NULL);
childSetCommitCallback("WLCloudLockY", onCloudScrollYToggled, NULL);
childSetCommitCallback("WLCloudScrollX", onCloudScrollXMoved, NULL);
childSetCommitCallback("WLCloudScrollY", onCloudScrollYMoved, NULL);
childSetCommitCallback("WLDistanceMult", onFloatControlMoved, ¶m_mgr->mDistanceMult);
childSetCommitCallback("DrawClassicClouds", LLSavedSettingsGlue::setBOOL, (void*)"SkyUseClassicClouds");
// WL Top
childSetAction("WLDayCycleMenuButton", onOpenDayCycle, NULL);
// Load/save
LLComboBox* comboBox = getChild<LLComboBox>("WLPresetsCombo");
//childSetAction("WLLoadPreset", onLoadPreset, comboBox);
childSetAction("WLNewPreset", onNewPreset, comboBox);
childSetAction("WLSavePreset", onSavePreset, comboBox);
childSetAction("WLDeletePreset", onDeletePreset, comboBox);
comboBox->setCommitCallback(onChangePresetName);
// Dome
childSetCommitCallback("WLGamma", onFloatControlMoved, ¶m_mgr->mWLGamma);
childSetCommitCallback("WLStarAlpha", onStarAlphaMoved, NULL);
}
示例11: initCallbacks
void LLFloaterWater::initCallbacks(void) {
// help buttons
initHelpBtn("WaterFogColorHelp", "HelpWaterFogColor");
initHelpBtn("WaterFogDensityHelp", "HelpWaterFogDensity");
initHelpBtn("WaterUnderWaterFogModHelp", "HelpUnderWaterFogMod");
initHelpBtn("WaterGlowHelp", "HelpWaterGlow");
initHelpBtn("WaterNormalScaleHelp", "HelpWaterNormalScale");
initHelpBtn("WaterFresnelScaleHelp", "HelpWaterFresnelScale");
initHelpBtn("WaterFresnelOffsetHelp", "HelpWaterFresnelOffset");
initHelpBtn("WaterBlurMultiplierHelp", "HelpWaterBlurMultiplier");
initHelpBtn("WaterScaleBelowHelp", "HelpWaterScaleBelow");
initHelpBtn("WaterScaleAboveHelp", "HelpWaterScaleAbove");
initHelpBtn("WaterNormalMapHelp", "HelpWaterNormalMap");
initHelpBtn("WaterWave1Help", "HelpWaterWave1");
initHelpBtn("WaterWave2Help", "HelpWaterWave2");
LLWaterParamManager * param_mgr = LLWaterParamManager::instance();
childSetCommitCallback("WaterFogColor", onWaterFogColorMoved, ¶m_mgr->mFogColor);
//
childSetCommitCallback("WaterGlow", onColorControlAMoved, ¶m_mgr->mFogColor);
// fog density
childSetCommitCallback("WaterFogDensity", onExpFloatControlMoved, ¶m_mgr->mFogDensity);
childSetCommitCallback("WaterUnderWaterFogMod", onFloatControlMoved, ¶m_mgr->mUnderWaterFogMod);
// blue density
childSetCommitCallback("WaterNormalScaleX", onVector3ControlXMoved, ¶m_mgr->mNormalScale);
childSetCommitCallback("WaterNormalScaleY", onVector3ControlYMoved, ¶m_mgr->mNormalScale);
childSetCommitCallback("WaterNormalScaleZ", onVector3ControlZMoved, ¶m_mgr->mNormalScale);
// fresnel
childSetCommitCallback("WaterFresnelScale", onFloatControlMoved, ¶m_mgr->mFresnelScale);
childSetCommitCallback("WaterFresnelOffset", onFloatControlMoved, ¶m_mgr->mFresnelOffset);
// scale above/below
childSetCommitCallback("WaterScaleAbove", onFloatControlMoved, ¶m_mgr->mScaleAbove);
childSetCommitCallback("WaterScaleBelow", onFloatControlMoved, ¶m_mgr->mScaleBelow);
// blur mult
childSetCommitCallback("WaterBlurMult", onFloatControlMoved, ¶m_mgr->mBlurMultiplier);
// Load/save
LLComboBox* comboBox = getChild<LLComboBox>("WaterPresetsCombo");
//childSetAction("WaterLoadPreset", onLoadPreset, comboBox);
childSetAction("WaterNewPreset", onNewPreset, comboBox);
childSetAction("WaterDeletePreset", onDeletePreset, comboBox);
childSetCommitCallback("WaterSavePreset", onSavePreset, this);
// wave direction
childSetCommitCallback("WaterWave1DirX", onVector2ControlXMoved, ¶m_mgr->mWave1Dir);
childSetCommitCallback("WaterWave1DirY", onVector2ControlYMoved, ¶m_mgr->mWave1Dir);
childSetCommitCallback("WaterWave2DirX", onVector2ControlXMoved, ¶m_mgr->mWave2Dir);
childSetCommitCallback("WaterWave2DirY", onVector2ControlYMoved, ¶m_mgr->mWave2Dir);
comboBox->setCommitCallback(onChangePresetName);
LLTextureCtrl* textCtrl = getChild<LLTextureCtrl>("WaterNormalMap");
textCtrl->setDefaultImageAssetID(DEFAULT_WATER_NORMAL);
childSetCommitCallback("WaterNormalMap", onNormalMapPicked, NULL);
// next/prev buttons
childSetAction("next", onClickNext, this);
childSetAction("prev", onClickPrev, this);
}
示例12: if
//.........这里部分代码省略.........
sendChildToBack(getChildView("channel_text"));
sendChildToBack(getChildView("forgot_password_text"));
LLLineEditor* edit = getChild<LLLineEditor>("password_edit");
if (edit) edit->setDrawAsterixes(TRUE);
LLComboBox* combo = getChild<LLComboBox>("start_location_combo");
combo->setAllowTextEntry(TRUE, 128, FALSE);
// The XML file loads the combo with the following labels:
// 0 - "My Home"
// 1 - "My Last Location"
// 2 - "<Type region name>"
BOOL login_last = gSavedSettings.getBOOL("LoginLastLocation");
std::string sim_string = LLURLSimString::sInstance.mSimString;
if (!sim_string.empty())
{
// Replace "<Type region name>" with this region name
combo->remove(2);
combo->add( sim_string );
combo->setTextEntry(sim_string);
combo->setCurrentByIndex( 2 );
}
else if (login_last)
{
combo->setCurrentByIndex( 1 );
}
else
{
combo->setCurrentByIndex( 0 );
}
combo->setCommitCallback( &set_start_location );
LLComboBox* server_choice_combo = sInstance->getChild<LLComboBox>("server_combo");
server_choice_combo->setCommitCallback(onSelectServer);
server_choice_combo->setFocusLostCallback(onServerComboLostFocus);
childSetAction("connect_btn", onClickConnect, this);
setDefaultBtn("connect_btn");
// childSetAction("quit_btn", onClickQuit, this);
std::string channel = llformat("(%s)",
DX_CHANNEL );
// Kirsten uses version Viewer headers not saved settings! for channel info.
std::string version = llformat("%d.%d.%d (%d)",
LL_VERSION_MAJOR,
LL_VERSION_MINOR,
LL_VERSION_PATCH,
LL_VIEWER_BUILD );
LLTextBox* channel_text = getChild<LLTextBox>("channel_text");
channel_text->setTextArg("[CHANNEL]", channel); // though not displayed
channel_text->setTextArg("[VERSION]", version);
channel_text->setClickedCallback(onClickVersion);
channel_text->setCallbackUserData(this);
LLTextBox* forgot_password_text = getChild<LLTextBox>("forgot_password_text");
forgot_password_text->setClickedCallback(onClickForgotPassword);
LLTextBox* create_new_account_text = getChild<LLTextBox>("create_new_account_text");
create_new_account_text->setClickedCallback(onClickNewAccount);
#endif
示例13: postBuild
BOOL LLPanelEmerald::postBuild()
{
refresh();
LLComboBox* tagcombo = getChild<LLComboBox>("TagCombo");
tagcombo->setCommitCallback(onTagComboBoxCommit);
for(LLSD::map_iterator itr = ModularSystemsLink::emerald_tags.beginMap(); itr != ModularSystemsLink::emerald_tags.endMap(); ++itr)
{
tagcombo->add(itr->first,itr->second, ADD_BOTTOM, TRUE);
}
tagcombo->setSimple(gSavedSettings.getString("EmeraldTagColor"));
getChild<LLComboBox>("material")->setSimple(gSavedSettings.getString("EmeraldBuildPrefs_Material"));
getChild<LLComboBox>("combobox shininess")->setSimple(gSavedSettings.getString("EmeraldBuildPrefs_Shiny"));
LLSliderCtrl* mShapeScaleSlider = getChild<LLSliderCtrl>("EmeraldBeamShapeScale",TRUE,FALSE);
mShapeScaleSlider->setCommitCallback(&LLPanelEmerald::beamUpdateCall);
mShapeScaleSlider->setCallbackUserData(this);
LLSliderCtrl* mBeamsPerSecondSlider = getChild<LLSliderCtrl>("EmeraldMaxBeamsPerSecond",TRUE,FALSE);
mBeamsPerSecondSlider->setCommitCallback(&LLPanelEmerald::beamUpdateCall);
mBeamsPerSecondSlider->setCallbackUserData(this);
getChild<LLComboBox>("material")->setCommitCallback(onComboBoxCommit);
getChild<LLComboBox>("combobox shininess")->setCommitCallback(onComboBoxCommit);
getChild<LLComboBox>("EmeraldBeamShape_combo")->setCommitCallback(onComboBoxCommit);
getChild<LLComboBox>("BeamColor_combo")->setCommitCallback(onComboBoxCommit);
getChild<LLTextureCtrl>("texture control")->setDefaultImageAssetID(LLUUID("89556747-24cb-43ed-920b-47caed15465f"));
getChild<LLTextureCtrl>("texture control")->setCommitCallback(onTexturePickerCommit);
getChild<LLComboBox>("EmeraldSpellBase")->setCommitCallback(onSpellBaseComboBoxCommit);
//childSetCommitCallback("material",onComboBoxCommit);
//childSetCommitCallback("combobox shininess",onComboBoxCommit);
getChild<LLButton>("keyword_allert")->setClickedCallback(onKeywordAllertButton,this);
getChild<LLButton>("ac_button")->setClickedCallback(onAutoCorrectButton,this);
getChild<LLButton>("EmSpell_EditCustom")->setClickedCallback(onSpellEditCustom, this);
getChild<LLButton>("EmSpell_GetMore")->setClickedCallback(onSpellGetMore, this);
getChild<LLButton>("EmSpell_Add")->setClickedCallback(onSpellAdd, this);
getChild<LLButton>("EmSpell_Remove")->setClickedCallback(onSpellRemove, this);
getChild<LLButton>("BeamColor_new")->setClickedCallback(onCustomBeamColor, this);
getChild<LLButton>("BeamColor_refresh")->setClickedCallback(onRefresh,this);
getChild<LLButton>("BeamColor_delete")->setClickedCallback(onBeamColorDelete,this);
getChild<LLButton>("custom_beam_btn")->setClickedCallback(onCustomBeam, this);
getChild<LLButton>("refresh_beams")->setClickedCallback(onRefresh,this);
getChild<LLButton>("delete_beam")->setClickedCallback(onBeamDelete,this);
getChild<LLButton>("revert_production_voice_btn")->setClickedCallback(onClickVoiceRevertProd, this);
getChild<LLButton>("revert_debug_voice_btn")->setClickedCallback(onClickVoiceRevertDebug, this);
getChild<LLButton>("EmeraldBreastReset")->setClickedCallback(onClickBoobReset, this);
childSetCommitCallback("production_voice_field", onCommitApplyControl);//onCommitVoiceProductionServerName);
childSetCommitCallback("debug_voice_field", onCommitApplyControl);//onCommitVoiceDebugServerName);
childSetCommitCallback("EmeraldCmdLinePos", onCommitApplyControl);
childSetCommitCallback("EmeraldCmdLineGround", onCommitApplyControl);
childSetCommitCallback("EmeraldCmdLineHeight", onCommitApplyControl);
childSetCommitCallback("EmeraldCmdLineTeleportHome", onCommitApplyControl);
childSetCommitCallback("EmeraldCmdLineRezPlatform", onCommitApplyControl);
childSetCommitCallback("EmeraldCmdLineMapTo", onCommitApplyControl);
childSetCommitCallback("EmeraldCmdLineCalc", onCommitApplyControl);
childSetCommitCallback("EmeraldCmdLineDrawDistance", onCommitApplyControl);
childSetCommitCallback("EmeraldCmdTeleportToCam", onCommitApplyControl);
childSetCommitCallback("EmeraldCmdLineKeyToName", onCommitApplyControl);
childSetCommitCallback("EmeraldCmdLineOfferTp", onCommitApplyControl);
childSetCommitCallback("EmeraldCmdLineTP2", onCommitApplyControl);
childSetCommitCallback("EmeraldCmdLineAO", onCommitApplyControl);
childSetCommitCallback("EmeraldCmdLineClearChat", onCommitApplyControl);
childSetCommitCallback("X Modifier", onCommitAvatarModifier);
childSetCommitCallback("Y Modifier", onCommitAvatarModifier);
childSetCommitCallback("Z Modifier", onCommitAvatarModifier);
if(gAgent.getID() != LLUUID::null)
{
getChild<LLSpinCtrl>("X Modifier")->set(gSavedPerAccountSettings.getF32("EmeraldAvatarXModifier"));
getChild<LLSpinCtrl>("Y Modifier")->set(gSavedPerAccountSettings.getF32("EmeraldAvatarYModifier"));
getChild<LLSpinCtrl>("Z Modifier")->set(gSavedPerAccountSettings.getF32("EmeraldAvatarZModifier"));
}else
{
getChild<LLSpinCtrl>("X Modifier")->setEnabled(FALSE);
getChild<LLSpinCtrl>("Y Modifier")->setEnabled(FALSE);
getChild<LLSpinCtrl>("Z Modifier")->setEnabled(FALSE);
}
childSetValue("EmeraldUseOTR", LLSD((S32)gSavedSettings.getU32("EmeraldUseOTR"))); // [$PLOTR$]
getChild<LLButton>("otr_help_btn")->setClickedCallback(onClickOtrHelp, this); // [/$PLOTR$]
//.........这里部分代码省略.........
示例14: if
//---------------------------------------------------------------------------
// Public methods
//---------------------------------------------------------------------------
LLPanelLogin::LLPanelLogin(const LLRect &rect,
void (*callback)(S32 option, void* user_data),
void *cb_data)
: LLPanel(std::string("panel_login"), LLRect(0,600,800,0), FALSE), // not bordered
mLogoImage(),
mCallback(callback),
mCallbackData(cb_data),
mHtmlAvailable( TRUE )
{
setFocusRoot(TRUE);
setBackgroundVisible(FALSE);
setBackgroundOpaque(TRUE);
// instance management
if (LLPanelLogin::sInstance)
{
llwarns << "Duplicate instance of login view deleted" << llendl;
delete LLPanelLogin::sInstance;
// Don't leave bad pointer in gFocusMgr
gFocusMgr.setDefaultKeyboardFocus(NULL);
}
LLPanelLogin::sInstance = this;
// add to front so we are the bottom-most child
gViewerWindow->getRootView()->addChildAtEnd(this);
// Logo
mLogoImage = LLUI::getUIImage("startup_logo.j2c");
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_login.xml");
#if USE_VIEWER_AUTH
//leave room for the login menu bar
setRect(LLRect(0, rect.getHeight()-18, rect.getWidth(), 0));
#endif
reshape(rect.getWidth(), rect.getHeight());
#if !USE_VIEWER_AUTH
LLComboBox* name_combo = sInstance->getChild<LLComboBox>("name_combo");
name_combo->setCommitCallback(onSelectLoginEntry);
name_combo->setFocusLostCallback(onLoginComboLostFocus);
name_combo->setPrevalidate(LLLineEditor::prevalidatePrintableNotPipe);
name_combo->setSuppressTentative(true);
name_combo->setSuppressAutoComplete(true);
childSetCommitCallback("remember_name_check", onNameCheckChanged);
childSetCommitCallback("password_edit", mungePassword);
childSetKeystrokeCallback("password_edit", onPassKey, this);
childSetUserData("password_edit", this);
// change z sort of clickable text to be behind buttons
sendChildToBack(getChildView("channel_text"));
sendChildToBack(getChildView("forgot_password_text"));
LLLineEditor* edit = getChild<LLLineEditor>("password_edit");
if (edit) edit->setDrawAsterixes(TRUE);
//OGPX : This keeps the uris in a history file
//OGPX TODO: should this be inside an OGP only check?
LLComboBox* regioncombo = getChild<LLComboBox>("regionuri_edit");
regioncombo->setAllowTextEntry(TRUE, 256, FALSE);
std::string current_regionuri = gSavedSettings.getString("CmdLineRegionURI");
// iterate on uri list adding to combobox (couldn't figure out how to add them all in one call)
// ... and also append the command line value we might have gotten to the URLHistory
LLSD regionuri_history = LLURLHistory::getURLHistory("regionuri");
LLSD::array_iterator iter_history = regionuri_history.beginArray();
LLSD::array_iterator iter_end = regionuri_history.endArray();
for (; iter_history != iter_end; ++iter_history)
{
regioncombo->addSimpleElement((*iter_history).asString());
}
if ( LLURLHistory::appendToURLCollection("regionuri",current_regionuri))
{
// since we are in login, another read of urlhistory file is going to happen
// so we need to persist the new value we just added (or maybe we should do it in startup.cpp?)
// since URL history only populated on create of sInstance, add to combo list directly
regioncombo->addSimpleElement(current_regionuri);
}
// select which is displayed if we have a current URL.
regioncombo->setSelectedByValue(LLSD(current_regionuri),TRUE);
//llinfos << " url history: " << LLSDOStreamer<LLSDXMLFormatter>(LLURLHistory::getURLHistory("regionuri")) << llendl;
LLComboBox* combo = getChild<LLComboBox>("start_location_combo");
combo->setAllowTextEntry(TRUE, 128, FALSE);
// The XML file loads the combo with the following labels:
// 0 - "My Home"
// 1 - "My Last Location"
// 2 - "<Type region name>"
//.........这里部分代码省略.........
示例15:
BOOL LLPanelFace::postBuild()
{
childSetCommitCallback("combobox shininess",&LLPanelFace::onCommitShiny,this);
childSetCommitCallback("combobox bumpiness",&LLPanelFace::onCommitBump,this);
childSetCommitCallback("TexScaleU",&LLPanelFace::onCommitTextureInfo, this);
childSetCommitCallback("checkbox flip s",&LLPanelFace::onCommitTextureInfo, this);
childSetCommitCallback("TexScaleV",&LLPanelFace::onCommitTextureInfo, this);
childSetCommitCallback("checkbox flip t",&LLPanelFace::onCommitTextureInfo, this);
childSetCommitCallback("TexRot",&LLPanelFace::onCommitTextureInfo, this);
childSetAction("button apply",&LLPanelFace::onClickApply,this);
childSetCommitCallback("checkbox planar align",&LLPanelFace::onCommitPlanarAlign, this);
childSetCommitCallback("TexOffsetU",LLPanelFace::onCommitTextureInfo, this);
childSetCommitCallback("TexOffsetV",LLPanelFace::onCommitTextureInfo, this);
childSetAction("button align",&LLPanelFace::onClickAutoFix,this);
childSetAction("copytextures",&LLPanelFace::onClickCopy,this);
childSetAction("pastetextures",&LLPanelFace::onClickPaste,this);
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( boost::bind(&LLPanelFace::onCommitTexture, this, _2) );
mTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelTexture, this, _2) );
mTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectTexture, this, _2) );
mTextureCtrl->setDragCallback(boost::bind(&LLPanelFace::onDragTexture, this, _2));
mTextureCtrl->setOnTextureSelectedCallback(boost::bind(&LLPanelFace::onTextureSelectionChanged, this, _1));
mTextureCtrl->setFollowsTop();
mTextureCtrl->setFollowsLeft();
mTextureCtrl->setImmediateFilterPermMask(PERM_NONE);
mTextureCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
}
mColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
if(mColorSwatch)
{
mColorSwatch->setCommitCallback(boost::bind(&LLPanelFace::onCommitColor, this, _2));
mColorSwatch->setOnCancelCallback(boost::bind(&LLPanelFace::onCancelColor, this, _2));
mColorSwatch->setOnSelectCallback(boost::bind(&LLPanelFace::onSelectColor, this, _2));
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(boost::bind(&LLPanelFace::onCommitAlpha, this, _2));
mCtrlColorTransp->setPrecision(0);
mCtrlColorTransp->setFollowsTop();
mCtrlColorTransp->setFollowsLeft();
}
mCheckFullbright = getChild<LLCheckBoxCtrl>("checkbox fullbright");
if (mCheckFullbright)
{
mCheckFullbright->setCommitCallback(LLPanelFace::onCommitFullbright, this);
}
mComboTexGen = getChild<LLComboBox>("combobox texgen");
if(mComboTexGen)
{
mComboTexGen->setCommitCallback(LLPanelFace::onCommitTexGen, this);
mComboTexGen->setFollows(FOLLOWS_LEFT | FOLLOWS_TOP);
}
mCtrlGlow = getChild<LLSpinCtrl>("glow");
if(mCtrlGlow)
{
mCtrlGlow->setCommitCallback(LLPanelFace::onCommitGlow, this);
}
clearCtrls();
return TRUE;
}