LLPrefsAscentSysImpl::LLPrefsAscentSysImpl() : LLPanel(std::string("Ascent")) { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_system.xml"); childSetCommitCallback("speed_rez_check", onCommitCheckBox, this); childSetCommitCallback("show_look_at_check", onCommitCheckBox, this); refreshValues(); refresh(); }
// Default constructor LLFloaterProperties::LLFloaterProperties(const std::string& name, const LLRect& rect, const std::string& title, const LLUUID& item_id, const LLUUID& object_id) : LLFloater(name, rect, title), mItemID(item_id), mObjectID(object_id), mDirty(TRUE) // <edit> , mExpanded(FALSE) // </edit> { LLUICtrlFactory::getInstance()->buildFloater(this,"floater_inventory_item_properties.xml"); if (!sPropertiesObserver) { sPropertiesObserver = new LLPropertiesObserver; } sPropertiesObserverCount++; // add the object to the static structure LLUUID key = mItemID ^ mObjectID; sInstances.insert(instance_map::value_type(key, this)); // build the UI // item name & description childSetPrevalidate("LabelItemName",&LLLineEditor::prevalidatePrintableNotPipe); childSetCommitCallback("LabelItemName",onCommitName,this); childSetPrevalidate("LabelItemDesc",&LLLineEditor::prevalidatePrintableNotPipe); childSetCommitCallback("LabelItemDesc", onCommitDescription, this); // Creator information childSetAction("BtnCreator",onClickCreator,this); // owner information childSetAction("BtnOwner",onClickOwner,this); // acquired date // owner permissions // Permissions debug text // group permissions childSetCommitCallback("CheckShareWithGroup",&onCommitPermissions, this); // everyone permissions childSetCommitCallback("CheckEveryoneCopy",&onCommitPermissions, this); // next owner permissions childSetCommitCallback("CheckNextOwnerModify",&onCommitPermissions, this); childSetCommitCallback("CheckNextOwnerCopy",&onCommitPermissions, this); childSetCommitCallback("CheckNextOwnerTransfer",&onCommitPermissions, this); // Mark for sale or not, and sale info childSetCommitCallback("CheckPurchase",&onCommitSaleInfo, this); childSetCommitCallback("RadioSaleType",&onCommitSaleType, this); // "Price" label for edit childSetCommitCallback("EditPrice",&onCommitSaleInfo, this); // <edit> childSetAction("more_btn", &onClickMore, this); childSetAction("less_btn", &onClickLess, this); childSetAction("copy_btn", &onClickCopy, this); childSetAction("update_btn", &onClickUpdate, this); setExpanded(mExpanded); // </edit> // The UI has been built, now fill in all the values refresh(); }
BOOL LLPanelAvatarNotes::postBuild() { childSetCommitCallback("status_check", boost::bind(&LLPanelAvatarNotes::onCommitRights, this), NULL); childSetCommitCallback("map_check", boost::bind(&LLPanelAvatarNotes::onCommitRights, this), NULL); childSetCommitCallback("objects_check", boost::bind(&LLPanelAvatarNotes::onCommitRights, this), NULL); childSetCommitCallback("add_friend", boost::bind(&LLPanelAvatarNotes::onAddFriendButtonClick, this),NULL); childSetCommitCallback("im", boost::bind(&LLPanelAvatarNotes::onIMButtonClick, this), NULL); childSetCommitCallback("call", boost::bind(&LLPanelAvatarNotes::onCallButtonClick, this), NULL); childSetCommitCallback("teleport", boost::bind(&LLPanelAvatarNotes::onTeleportButtonClick, this), NULL); childSetCommitCallback("share", boost::bind(&LLPanelAvatarNotes::onShareButtonClick, this), NULL); childSetCommitCallback("show_on_map_btn", (boost::bind( &LLPanelAvatarNotes::onMapButtonClick, this)), NULL); LLTextEditor* te = getChild<LLTextEditor>("notes_edit"); te->setCommitCallback(boost::bind(&LLPanelAvatarNotes::onCommitNotes,this)); te->setCommitOnFocusLost(TRUE); resetControls(); resetData(); LLVoiceClient::getInstance()->addObserver((LLVoiceClientStatusObserver*)this); return TRUE; }
BOOL LLPanelVoiceDeviceSettings::postBuild() { LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider"); // set mic volume tuning slider based on last mic volume setting volume_slider->setValue(mMicVolume); childSetCommitCallback("voice_input_device", onCommitInputDevice, this); childSetCommitCallback("voice_output_device", onCommitOutputDevice, this); return TRUE; }
BOOL LLFloaterMemLeak::postBuild(void) { childSetCommitCallback("leak_speed", onChangeLeakingSpeed, this); childSetCommitCallback("max_leak", onChangeMaxMemLeaking, this); childSetAction("start_btn", onClickStart, this); childSetAction("stop_btn", onClickStop, this); childSetAction("release_btn", onClickRelease, this); childSetAction("close_btn", onClickClose, this); return TRUE ; }
BOOL LLFloaterSellLandUI::postBuild() { childSetCommitCallback("sell_to", onChangeValue, this); childSetCommitCallback("price", onChangeValue, this); getChild<LLLineEditor>("price")->setPrevalidate(LLLineEditor::prevalidateNonNegativeS32); childSetCommitCallback("sell_objects", onChangeValue, this); childSetAction("sell_to_select_agent", doSelectAgent, this); childSetAction("cancel_btn", doCancel, this); childSetAction("sell_btn", doSellLand, this); childSetAction("show_objects", doShowObjects, this); return TRUE; }
BOOL LLPrefsIMImpl::postBuild() { requires("online_visibility"); requires("send_im_to_email"); if (!checkRequirements()) { return FALSE; } childSetLabelArg("send_im_to_email", "[EMAIL]", getString("log_in_to_change")); // Don't enable this until we get personal data childDisable("include_im_in_chat_console"); childDisable("include_im_in_chat_history"); childDisable("show_timestamps_check"); childDisable("friends_online_notify_checkbox"); childDisable("online_visibility"); childDisable("send_im_to_email"); childDisable("log_instant_messages"); childDisable("log_chat"); childDisable("log_show_history"); childDisable("log_path_button"); childDisable("busy_response"); childDisable("log_instant_messages_timestamp"); childDisable("log_chat_timestamp"); childDisable("log_chat_IM"); childDisable("log_date_timestamp"); childDisable("logfile_name_datestamp"); childSetText("busy_response", getString("log_in_to_change")); childSetValue("include_im_in_chat_console", gSavedSettings.getBOOL("IMInChatConsole")); childSetValue("include_im_in_chat_history", gSavedSettings.getBOOL("IMInChatHistory")); childSetValue("show_timestamps_check", gSavedSettings.getBOOL("IMShowTimestamps")); childSetValue("friends_online_notify_checkbox", gSavedSettings.getBOOL("ChatOnlineNotification")); childSetText("chat_logs_location", gSavedPerAccountSettings.getString("InstantMessageLogPath")); childSetValue("log_instant_messages", gSavedPerAccountSettings.getBOOL("LogInstantMessages")); childSetValue("log_chat", gSavedPerAccountSettings.getBOOL("LogChat")); childSetValue("log_show_history", gSavedPerAccountSettings.getBOOL("LogShowHistory")); childSetValue("log_instant_messages_timestamp", gSavedPerAccountSettings.getBOOL("IMLogTimestamp")); childSetValue("log_chat_timestamp", gSavedPerAccountSettings.getBOOL("LogChatTimestamp")); childSetValue("log_chat_IM", gSavedPerAccountSettings.getBOOL("LogChatIM")); childSetValue("log_date_timestamp", gSavedPerAccountSettings.getBOOL("LogTimestampDate")); childSetValue("logfile_name_datestamp", gSavedPerAccountSettings.getBOOL("LogFileNamewithDate")); childSetCommitCallback("log_chat",onCommitLogging,this); childSetCommitCallback("log_instant_messages",onCommitLogging,this); return TRUE; }
BOOL LLFloaterJoystick::postBuild() { F32 range = gSavedSettings.getBOOL("Cursor3D") ? 1024.f : 2.f; LLUIString axis = getString("Axis"); LLUIString joystick = getString("JoystickMonitor"); // use this child to get relative positioning info; we'll place the // joystick monitor on its right, vertically aligned to it. LLView* child = getChild<LLView>("FlycamAxisScale1"); LLRect rect; if (child) { LLRect r = child->getRect(); rect = LLRect(350, r.mTop, r.mRight + 200, 0); } LLStatView::Params params; params.name("axis values"); params.rect(rect); params.show_label(true); params.label(joystick); mAxisStatsView = LLUICtrlFactory::create<LLStatView>(params); for (U32 i = 0; i < 6; i++) { axis.setArg("[NUM]", llformat("%d", i)); std::string stat_name(llformat("Joystick axis %d", i)); mAxisStats[i] = new LLStat(stat_name,4); mAxisStatsBar[i] = mAxisStatsView->addStat(axis, mAxisStats[i]); mAxisStatsBar[i]->mMinBar = -range; mAxisStatsBar[i]->mMaxBar = range; mAxisStatsBar[i]->mLabelSpacing = range * 0.5f; mAxisStatsBar[i]->mTickSpacing = range * 0.25f; } addChild(mAxisStatsView); mCheckJoystickEnabled = getChild<LLCheckBoxCtrl>("enable_joystick"); childSetCommitCallback("enable_joystick",onCommitJoystickEnabled,this); mCheckFlycamEnabled = getChild<LLCheckBoxCtrl>("JoystickFlycamEnabled"); childSetCommitCallback("JoystickFlycamEnabled",onCommitJoystickEnabled,this); getChild<LLUICtrl>("Default")->setCommitCallback(boost::bind(&LLFloaterJoystick::onClickDefault, this, _2)); childSetAction("cancel_btn", onClickCancel, this); childSetAction("ok_btn", onClickOK, this); refresh(); return TRUE; }
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); }
BOOL LLFloaterMessageLog::postBuild() { childSetCommitCallback("net_list", onCommitNetList, this); childSetCommitCallback("message_log", onCommitMessageLog, this); childSetAction("filter_choice_btn", onClickFilterChoice, this); childSetAction("filter_apply_btn", onClickFilterApply, this); childSetCommitCallback("filter_edit", onCommitFilter, this); childSetAction("clear_log_btn", onClickClearLog, this); childSetText("filter_edit", sMessageLogFilterString); refreshNetList(); refreshNetInfo(TRUE); startApplyingFilter(sMessageLogFilterString, TRUE); return TRUE; }
BOOL LLFloaterSellLandUI::postBuild() { childSetCommitCallback("sell_to", onChangeValue, this); childSetCommitCallback("price", onChangeValue, this); getChild<LLLineEditor>("price")->setPrevalidate(LLTextValidate::validateNonNegativeS32); childSetCommitCallback("sell_objects", onChangeValue, this); childSetAction("sell_to_select_agent", boost::bind( &LLFloaterSellLandUI::doSelectAgent, this)); childSetAction("cancel_btn", doCancel, this); childSetAction("sell_btn", doSellLand, this); childSetAction("show_objects", doShowObjects, this); center(); getChild<LLUICtrl>("profile_scroll")->setTabStop(true); return TRUE; }
// virtual BOOL LLPanelFriends::postBuild() { mFriendsList = getChild<LLScrollListCtrl>("friend_list"); mFriendsList->setMaxSelectable(MAX_FRIEND_SELECT); mFriendsList->setMaximumSelectCallback(onMaximumSelect); mFriendsList->setCommitOnSelectionChange(TRUE); childSetCommitCallback("friend_list", onSelectName, this); childSetCommitCallback("buddy_group_combobox", onChangeContactGroup, this); childSetDoubleClickCallback("friend_list", onClickIM); // <dogmode> // Contact search and group system. // 09/05/2010 - Charley Levenque LLLineEditor* contact = getChild<LLLineEditor>("buddy_search_lineedit"); if (contact) { contact->setKeystrokeCallback(&onContactSearchKeystroke); } getChild<LLTextBox>("s_num")->setValue("0"); getChild<LLTextBox>("f_num")->setValue(llformat("%d", mFriendsList->getItemCount())); U32 changed_mask = LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE; refreshNames(changed_mask); childSetAction("im_btn", onClickIM, this); childSetAction("assign_btn", onClickAssign, this); childSetAction("expand_collapse_btn", onClickExpand, this); childSetAction("profile_btn", onClickProfile, this); childSetAction("offer_teleport_btn", onClickOfferTeleport, this); childSetAction("pay_btn", onClickPay, this); childSetAction("add_btn", onClickAddFriend, this); childSetAction("remove_btn", onClickRemove, this); //childSetAction("export_btn", onClickExport, this); Making Dummy View -HgB //childSetAction("import_btn", onClickImport, this); Making Dummy View -HgB setDefaultBtn("im_btn"); updateFriends(LLFriendObserver::ADD); refreshUI(); // primary sort = online status, secondary sort = name mFriendsList->sortByColumn(std::string("friend_name"), TRUE); mFriendsList->sortByColumn(std::string("icon_online_status"), FALSE); updateColumns(this); return TRUE; }
BOOL LLFloaterAvatarPicker::postBuild() { childSetKeystrokeCallback("Edit", editKeystroke, this); childSetKeystrokeCallback("EditUUID", editKeystroke, this); childSetAction("Find", onBtnFind, this); childDisable("Find"); childSetAction("Refresh", onBtnRefresh, this); childSetCommitCallback("near_me_range", onRangeAdjust, this); childSetDoubleClickCallback("SearchResults", onBtnSelect); childSetDoubleClickCallback("NearMe", onBtnSelect); childSetCommitCallback("SearchResults", onList, this); childSetCommitCallback("NearMe", onList, this); childDisable("SearchResults"); childSetAction("Select", onBtnSelect, this); childDisable("Select"); childSetAction("Cancel", onBtnClose, this); childSetFocus("Edit"); LLPanel* search_panel = getChild<LLPanel>("SearchPanel"); if (search_panel) { // Start searching when Return is pressed in the line editor. search_panel->setDefaultBtn("Find"); } getChild<LLScrollListCtrl>("SearchResults")->addCommentText(getString("no_results")); /*LLInventoryPanel* inventory_panel = getChild<LLInventoryPanel>("InventoryPanel"); inventory_panel->setFilterTypes(0x1 << LLInventoryType::IT_CALLINGCARD); inventory_panel->setFollowsAll(); inventory_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); inventory_panel->openDefaultFolderForType(LLAssetType::AT_CALLINGCARD); inventory_panel->setSelectCallback(LLFloaterAvatarPicker::onCallingCardSelectionChange, this);*/ init_cards = FALSE; childSetTabChangeCallback("ResidentChooserTabs", "SearchPanel", onTabChanged, this); childSetTabChangeCallback("ResidentChooserTabs", "CallingCardsPanel", onTabChanged, this); childSetTabChangeCallback("ResidentChooserTabs", "NearMePanel", onTabChanged, this); childSetTabChangeCallback("ResidentChooserTabs", "KeyPanel", onTabChanged, this); setAllowMultiple(FALSE); return TRUE; }
BOOL LLPanelDirEvents::postBuild() { LLPanelDirBrowser::postBuild(); childSetCommitCallback("date_mode", onDateModeCallback, this); childSetAction("<<", onBackBtn, this); childSetAction(">>", onForwardBtn, this); childSetAction("Today", onClickToday, this); childSetAction("Search", LLPanelDirBrowser::onClickSearchCore, this); setDefaultBtn("Search"); childSetAction("Delete", onClickDelete, this); childDisable("Delete"); childHide("Delete"); onDateModeCallback(NULL, this); mCurrentSortColumn = "time"; if (!gDisplayEventHack) { setDay(0); // for today //performQuery(); // Temporary change to help DB - Sabin } gDisplayEventHack = FALSE; childSetVisible("filter_gaming", (gAgent.getRegion()->getGamingFlags() & REGION_GAMING_PRESENT) && !(gAgent.getRegion()->getGamingFlags() & REGION_GAMING_HIDE_FIND_EVENTS)); return TRUE; }
BOOL LLChatBar::postBuild() { childSetAction("History", toggleChatHistory, this); childSetCommitCallback("Say", onClickSay, this); // attempt to bind to an existing combo box named gesture setGestureCombo(getChild<LLComboBox>( "Gesture")); LLButton * sayp = getChild<LLButton>("Say"); if(sayp) { setDefaultBtn(sayp); } mInputEditor = getChild<LLLineEditor>("Chat Editor"); if (mInputEditor) { mInputEditor->setCallbackUserData(this); mInputEditor->setKeystrokeCallback(&onInputEditorKeystroke); mInputEditor->setFocusLostCallback(&onInputEditorFocusLost, this); mInputEditor->setFocusReceivedCallback( &onInputEditorGainFocus, this ); mInputEditor->setCommitOnFocusLost( FALSE ); mInputEditor->setRevertOnEsc( FALSE ); mInputEditor->setIgnoreTab(TRUE); mInputEditor->setPassDelete(TRUE); mInputEditor->setReplaceNewlinesWithSpaces(FALSE); mInputEditor->setMaxTextLength(DB_CHAT_MSG_STR_LEN); mInputEditor->setEnableLineHistory(TRUE); } mIsBuilt = TRUE; return TRUE; }
BOOL LLFloaterSellLandUI::postBuild() { std::string type_currency = LLGridManager::getInstance()->getCurrency(); childSetCommitCallback("sell_to", onChangeValue, this); childSetCommitCallback("price", onChangeValue, this); getChild<LLLineEditor>("price")->setPrevalidate(LLTextValidate::validateNonNegativeS32); getChild<LLUICtrl>("price_ld")->setTextArg("[CUR]", type_currency); childSetCommitCallback("sell_objects", onChangeValue, this); childSetAction("sell_to_select_agent", boost::bind( &LLFloaterSellLandUI::doSelectAgent, this)); childSetAction("cancel_btn", doCancel, this); childSetAction("sell_btn", doSellLand, this); childSetAction("show_objects", doShowObjects, this); center(); getChild<LLUICtrl>("profile_scroll")->setTabStop(true); return TRUE; }
// virtual BOOL LLPanelFriends::postBuild() { mFriendsList = getChild<LLScrollListCtrl>("friend_list"); mFriendsList->setMaxSelectable(MAX_FRIEND_SELECT); mFriendsList->setMaximumSelectCallback(onMaximumSelect); mFriendsList->setCommitOnSelectionChange(TRUE); childSetCommitCallback("friend_list", onSelectName, this); childSetDoubleClickCallback("friend_list", onClickIM); U32 changed_mask = LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE; refreshNames(changed_mask); childSetAction("im_btn", onClickIM, this); childSetAction("profile_btn", onClickProfile, this); childSetAction("offer_teleport_btn", onClickOfferTeleport, this); childSetAction("pay_btn", onClickPay, this); childSetAction("add_btn", onClickAddFriend, this); childSetAction("remove_btn", onClickRemove, this); setDefaultBtn("im_btn"); updateFriends(LLFriendObserver::ADD); refreshUI(); // primary sort = online status, secondary sort = name mFriendsList->sortByColumn(std::string("friend_name"), TRUE); mFriendsList->sortByColumn(std::string("icon_online_status"), FALSE); return TRUE; }
BOOL LLPanelGroups::postBuild() { childSetCommitCallback("group list", onGroupList, this); childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count())); childSetTextArg("groupcount", "[MAX]", llformat("%d", gHippoLimits->getMaxAgentGroups())); const std::string none_text = getString("none"); init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text); childSetAction("Activate", onBtnActivate, this); childSetAction("Info", onBtnInfo, this); childSetAction("IM", onBtnIM, this); childSetAction("Leave", onBtnLeave, this); childSetAction("Create", onBtnCreate, this); childSetAction("Search...", onBtnSearch, this); childSetAction("Invite...", onBtnInvite, this); childSetAction("Titles...", onBtnTitles, this); setDefaultBtn("IM"); childSetDoubleClickCallback("group list", onBtnIM); childSetUserData("group list", this); reset(); return TRUE; }
// virtual BOOL LLFloaterGesture::postBuild() { std::string label; // Translate title label = getTitle(); setTitle(label); childSetCommitCallback("gesture_list", onCommitList, this); childSetDoubleClickCallback("gesture_list", onClickPlay); childSetAction("inventory_btn", onClickInventory, this); childSetAction("edit_btn", onClickEdit, this); childSetAction("play_btn", onClickPlay, this); childSetAction("stop_btn", onClickPlay, this); childSetAction("new_gesture_btn", onClickNew, this); childSetVisible("play_btn", true); childSetVisible("stop_btn", false); setDefaultBtn("play_btn"); return TRUE; }
//--------------------------------------------------------------------------- // LLFloaterClothing //--------------------------------------------------------------------------- LLFloaterClothing::LLFloaterClothing() : LLFloater("floater_clothing", "FloaterClothingRect", ""), mSelectedID(), mAllowSelection(FALSE) { gUICtrlFactory->buildFloater(this, "floater_clothing.xml"); sInstance = this; sObserver = new LLFloaterClothingObserver; gInventory.addObserver(sObserver); childSetAction("take_off_btn", onClickTakeOff, this); childSetAction("wear_btn", onClickWear, this); childSetDoubleClickCallback("clothing_list", onClickWear); childSetCommitCallback("clothing_list", onCommitList, this); LLScrollListCtrl* list = gUICtrlFactory->getScrollListByName(this, "clothing_list"); if (list) { list->addCommentText(LOADING_STRING); } setDefaultBtn("wear_btn"); gInventory.startBackgroundFetch(); }
// virtual BOOL LLPreviewSound::postBuild() { const LLInventoryItem* item = getItem(); if (item) { getChild<LLUICtrl>("desc")->setValue(item->getDescription()); mIsCopyable = (item->getPermissions().getCreator() == gAgentID); if (gAudiop) // <edit> // that thing above doesn't actually start a sound transfer, so I will do it if (LLAudioSource* asp = gAgentAvatarp->getAudioSource(gAgentID)) asp->preload(item->getAssetUUID()); // preload the sound // </edit> } childSetAction("Sound play btn",&LLPreviewSound::playSound,this); childSetAction("Sound audition btn",&LLPreviewSound::auditionSound,this); // <edit> childSetAction("Sound copy uuid btn", &LLPreviewSound::copyUUID, this); childSetAction("Play ambient btn", &LLPreviewSound::playAmbient, this); // </edit> LLButton* button = getChild<LLButton>("Sound play btn"); button->setSoundFlags(LLView::SILENT); button = getChild<LLButton>("Sound audition btn"); button->setSoundFlags(LLView::SILENT); childSetCommitCallback("desc", LLPreview::onText, this); getChild<LLLineEditor>("desc")->setPrevalidate(&LLLineEditor::prevalidatePrintableNotPipe); return LLPreview::postBuild(); }
LLFloaterHtml::LLFloaterHtml() : LLFloater( "HTML Floater" ) #if LL_LIBXUL_ENABLED , mWebBrowser( 0 ) #endif // LL_LIBXUL_ENABLED { // create floater from its XML definition gUICtrlFactory->buildFloater( this, "floater_html.xml" ); childSetAction("back_btn", onClickBack, this); childSetAction("home_btn", onClickHome, this); childSetAction("forward_btn", onClickForward, this); childSetAction("close_btn", onClickClose, this); childSetCommitCallback("url_edit", onCommitUrlEdit, this ); childSetAction("go_btn", onClickGo, this ); // reposition floater from saved settings LLRect rect = gSavedSettings.getRect( "HtmlFloaterRect" ); reshape( rect.getWidth(), rect.getHeight(), FALSE ); setRect( rect ); #if LL_LIBXUL_ENABLED mWebBrowser = LLViewerUICtrlFactory::getWebBrowserByName(this, "html_floater_browser" ); if ( mWebBrowser ) { // open links in internal browser mWebBrowser->setOpenInExternalBrowser( false ); } #endif // LL_LIBXUL_ENABLED }
BOOL LLPanelGroups::postBuild() { childSetCommitCallback("group list", onGroupList, this); childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count())); childSetTextArg("groupcount", "[MAX]", llformat("%d",MAX_AGENT_GROUPS)); init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID()); childSetAction("Activate", onBtnActivate, this); childSetAction("Info", onBtnInfo, this); childSetAction("IM", onBtnIM, this); childSetAction("Leave", onBtnLeave, this); childSetAction("Create", onBtnCreate, this); childSetAction("Search...", onBtnSearch, this); childSetAction("Invite...", onBtnInvite, this); setDefaultBtn("IM"); childSetDoubleClickCallback("group list", onBtnIM); childSetUserData("group list", this); reset(); return TRUE; }
LLFloaterHtml::LLFloaterHtml() : LLFloater( std::string("HTML Floater") ) , mWebBrowser( 0 ) { LLUICtrlFactory::getInstance()->buildFloater( this, "floater_html.xml" ); childSetAction("back_btn", onClickBack, this); childSetAction("home_btn", onClickHome, this); childSetAction("forward_btn", onClickForward, this); childSetAction("close_btn", onClickClose, this); childSetCommitCallback("url_edit", onCommitUrlEdit, this ); childSetAction("go_btn", onClickGo, this ); // reposition floater from saved settings LLRect rect = gSavedSettings.getRect( "FloaterHtmlRect" ); reshape( rect.getWidth(), rect.getHeight(), FALSE ); setRect( rect ); mWebBrowser = getChild<LLWebBrowserCtrl>("html_floater_browser" ); if ( mWebBrowser ) { // open links in internal browser mWebBrowser->setOpenInExternalBrowser( false ); } }
BOOL FloaterGridManager::postBuild() { LLLineEditor* password_edit = getChild<LLLineEditor>("avatar_password"); if (password_edit) { password_edit->setDrawAsterixes(TRUE); } childSetAction("btn_delete", onClickDelete, this); childSetAction("btn_add", onClickAdd, this); childSetAction("btn_copy", onClickCopy, this); childSetAction("btn_ok", onClickOk, this); childSetAction("btn_apply", onClickApply, this); // childSetAction("set_default", onClickDefault, this); // We use the last selected grid as the default childSetAction("btn_cancel", onClickCancel, this); childSetAction("btn_clear", onClickClear, this); childSetAction("btn_gridinfo", onClickGridInfo, this); // childSetAction("btn_help_render_compat", onClickHelpRenderCompat, this); // Ugly ugly ugly childSetCommitCallback("grid_selector", onSelectGrid, this); LLScrollListCtrl* combo = getChild<LLScrollListCtrl>("grid_selector"); combo->setFocus(TRUE); refreshGrids(); return TRUE; }
BOOL FloaterVoiceLicense::postBuild() { childSetAction("Continue", onContinue, this); childSetAction("Cancel", onCancel, this); childSetCommitCallback("agree_chk", updateAgree, this); // disable Agree to License radio button until the page has fully loaded LLCheckBoxCtrl* license_agreement = getChild<LLCheckBoxCtrl>("agree_chk"); license_agreement->setEnabled( false ); // hide the SL text widget if we're displaying license with using a browser widget. LLTextEditor *editor = getChild<LLTextEditor>("license_text"); editor->setVisible( FALSE ); LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("license_html"); if ( web_browser ) { // start to observe it so we see navigate complete events web_browser->addObserver( this ); std::string url = getString( "real_url" ); if(url.substr(0,4) == "http") { gResponsePtr = LLIamHereVoice::build( this ); LLHTTPClient::get( url, gResponsePtr ); } else { setSiteIsAlive(false); } } return TRUE; }
LLPreviewAnim::LLPreviewAnim(const std::string& name, const LLRect& rect, const std::string& title, const LLUUID& item_uuid, const S32& activate, const LLUUID& object_uuid ) : LLPreview( name, rect, title, item_uuid, object_uuid) { LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_animation.xml"); childSetAction("Anim play btn",playAnim,this); childSetAction("Anim audition btn",auditionAnim,this); // <edit> childSetAction("Anim copy uuid btn", copyAnimID, this); // </edit> childSetAction("Anim remake btn",dupliAnim,this); childSetAction("Anim export btn",exportAnim,this); childSetAction("Anim .anim btn",exportasdotAnim,this); childSetEnabled("Anim remake btn", FALSE); childSetEnabled("Anim export btn", FALSE); childSetEnabled("Anim .anim btn", FALSE); mAnimBuffer = NULL; const LLInventoryItem* item = getItem(); childSetCommitCallback("desc", LLPreview::onText, this); childSetText("desc", item->getDescription()); childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe); setTitle(title); if (!getHost()) { LLRect curRect = getRect(); translate(rect.mLeft - curRect.mLeft, rect.mTop - curRect.mTop); } mAnimBuffer = NULL; // preload the animation if(item) { gAgent.getAvatarObject()->createMotion(item->getAssetUUID()); gAssetStorage->getAssetData(item->getAssetUUID(), LLAssetType::AT_ANIMATION, downloadCompleteCallback, (void *)(new LLHandle<LLFloater>(this->getHandle())), TRUE); } switch ( activate ) { case 1: { playAnim( (void *) this ); break; } case 2: { auditionAnim( (void *) this ); break; } default: { //do nothing } } }
BOOL LLPrefsVoice::postBuild() { childSetCommitCallback("enable_voice_check", onCommitEnableVoiceChat, this); childSetAction("reset_voice", onClickResetVoice, this); childSetAction("set_voice_hotkey_button", onClickSetKey, this); childSetAction("set_voice_middlemouse_button", onClickSetMiddleMouse, this); childSetAction("device_settings_btn", onClickVoiceDeviceSettings, NULL); BOOL voice_disabled = gSavedSettings.getBOOL("CmdLineDisableVoice"); childSetVisible("voice_unavailable", voice_disabled); childSetVisible("enable_voice_check", !voice_disabled); childSetEnabled("enable_voice_check", !voice_disabled); bool enable = !voice_disabled && gSavedSettings.getBOOL("EnableVoiceChat"); childSetValue("enable_voice_check", enable); onCommitEnableVoiceChat(getChild<LLCheckBoxCtrl>("enable_voice_check"), this); childSetValue("modifier_combo", gSavedSettings.getString("PushToTalkButton")); childSetValue("voice_call_friends_only_check", gSavedSettings.getBOOL("VoiceCallsFriendsOnly")); childSetValue("auto_disengage_mic_check", gSavedSettings.getBOOL("AutoDisengageMic")); childSetValue("push_to_talk_toggle_check", gSavedSettings.getBOOL("PushToTalkToggle")); childSetValue("ear_location", gSavedSettings.getS32("VoiceEarLocation")); return TRUE; }
// virtual BOOL LLFloaterFriends::postBuild() { mFriendsList = LLUICtrlFactory::getScrollListByName(this, "friend_list"); mFriendsList->setMaxSelectable(MAX_FRIEND_SELECT); mFriendsList->setMaximumSelectCallback(onMaximumSelect); mFriendsList->setCommitOnSelectionChange(TRUE); childSetCommitCallback("friend_list", onSelectName, this); childSetDoubleClickCallback("friend_list", onClickIM); refreshNames(); childSetAction("im_btn", onClickIM, this); childSetAction("profile_btn", onClickProfile, this); childSetAction("offer_teleport_btn", onClickOfferTeleport, this); childSetAction("pay_btn", onClickPay, this); childSetAction("add_btn", onClickAddFriend, this); childSetAction("remove_btn", onClickRemove, this); childSetAction("close_btn", onClickClose, this); setDefaultBtn("im_btn"); updateFriends(LLFriendObserver::ADD); refreshUI(); // primary sort = online status, secondary sort = name mFriendsList->sortByColumn("friend_name", TRUE); mFriendsList->sortByColumn("icon_online_status", TRUE); return TRUE; }
BOOL PanelRadar::postBuild() { mRadarTabs = getChild<LLTabContainer>("radar_tab_container"); mRadarList = getChild<LLScrollListCtrl>("RadarList"); childSetCommitCallback("RadarList", onUseRadarList, this); mRadarList->setDoubleClickCallback(onClickIM); childSetAction("im_btn", onClickIM, this); childSetAction("profile_btn", onClickProfile, this); childSetAction("offer_teleport_btn", onClickOfferTeleport, this); childSetAction("teleport_btn", onClickTeleport, this); childSetAction("track_btn", onClickTrack, this); childSetAction("invite_btn", onClickInvite, this); childSetAction("add_btn", onClickAddFriend, this); childSetAction("cam_btn", onClickCam, this); childSetAction("freeze_btn", onClickFreeze, this); childSetAction("eject_btn", onClickEject, this); childSetAction("mute_btn", onClickMute, this); childSetAction("unmute_btn", onClickUnmute, this); childSetAction("ar_btn", onClickAR, this); //childSetAction("estate_eject_btn", onClickEjectFromEstate, this); //childSetAction("estate_ban_btn", onClickBanFromEstate, this); childSetAction("ban_btn", onClickBan, this); setDefaultBtn("im_btn"); updateRadarInfo(); return TRUE; }