// virtual BOOL LLFloaterTopObjects::postBuild() { LLScrollListCtrl *objects_list = getChild<LLScrollListCtrl>("objects_list"); childSetFocus("objects_list"); objects_list->setDoubleClickCallback(onDoubleClickObjectsList, this); objects_list->setCommitOnSelectionChange(TRUE); setDefaultBtn("show_beacon_btn"); /* LLLineEditor* line_editor = getChild<LLLineEditor>("owner_name_editor"); if (line_editor) { line_editor->setCommitOnFocusLost(FALSE); line_editor->setCommitCallback(onGetByOwnerName, this); } line_editor = getChild<LLLineEditor>("object_name_editor"); if (line_editor) { line_editor->setCommitOnFocusLost(FALSE); line_editor->setCommitCallback(onGetByObjectName, this); }*/ mCurrentMode = STAT_REPORT_TOP_SCRIPTS; mFlags = 0; mFilter.clear(); return TRUE; }
// virtual void LLPanelDirBrowser::draw() { // HACK: If the results panel has data, we want to select the first // item. Unfortunately, we don't know when the find is actually done, // so only do this if it's been some time since the last packet of // results was received. if (mLastResultTimer.getElapsedTimeF32() > 0.5) { if (!mDidAutoSelect && hasChild("results") && !childHasFocus("results")) { LLCtrlListInterface *list = childGetListInterface("results"); if (list) { if (list->getCanSelect()) { list->selectFirstItem(); // select first item by default childSetFocus("results", TRUE); } // Request specific data from the server onCommitList(); } } mDidAutoSelect = TRUE; } LLPanel::draw(); }
void LLFloaterWorldMap::updateSims(bool found_null_sim) { if (mCompletingRegionName == "") { return; } LLScrollListCtrl *list = getChild<LLScrollListCtrl>("search_results"); list->operateOnAll(LLCtrlListInterface::OP_DELETE); S32 name_length = mCompletingRegionName.length(); LLSD match; S32 num_results = 0; std::map<U64, LLSimInfo*>::const_iterator it; for (it = LLWorldMap::getInstance()->getRegionMap().begin(); it != LLWorldMap::getInstance()->getRegionMap().end(); ++it) { LLSimInfo* info = it->second; std::string sim_name_lower = info->getName(); LLStringUtil::toLower(sim_name_lower); if (sim_name_lower.substr(0, name_length) == mCompletingRegionName) { if (sim_name_lower == mCompletingRegionName) { match = info->getName(); } LLSD value; value["id"] = info->getName(); value["columns"][0]["column"] = "sim_name"; value["columns"][0]["value"] = info->getName(); list->addElement(value); num_results++; } } if (found_null_sim) { mCompletingRegionName = ""; } // if match found, highlight it and go if (!match.isUndefined()) { list->selectByValue(match); childSetFocus("search_results"); onCommitSearchResult(); } // if we found nothing, say "none" if (num_results == 0) { list->setCommentText(LLTrans::getString("worldmap_results_none_found")); list->operateOnAll(LLCtrlListInterface::OP_DESELECT); } }
//virtual BOOL LLVoiceSetKeyDialog::postBuild() { childSetAction("Cancel", onCancel, this); childSetFocus("Cancel"); gFocusMgr.setKeystrokesOnly(TRUE); return TRUE; }
LLVoiceSetKeyDialog::LLVoiceSetKeyDialog(LLPrefsVoice* parent) : LLModalDialog(LLStringUtil::null, 240, 100), mParent(parent) { LLUICtrlFactory::getInstance()->buildFloater(this, "floater_select_key.xml"); childSetAction("Cancel", onCancel, this); childSetFocus("Cancel"); gFocusMgr.setKeystrokesOnly(TRUE); }
void LLFloaterPay::finishPayUI(const LLUUID& target_id, BOOL is_group) { gCacheName->get(target_id, is_group, boost::bind(&LLFloaterPay::onCacheOwnerName, this, _1, _2, _3, _4)); // Make sure the amount field has focus childSetFocus("amount", TRUE); LLLineEditor* amount = getChild<LLLineEditor>("amount"); amount->selectAll(); mTargetIsGroup = is_group; }
void LLFloaterSearchReplace::open() { LLFloater::open(); if (mEditor) { bool fReadOnly = mEditor->isReadOnly(); childSetEnabled("replace_label", !fReadOnly); childSetEnabled("replace_text", !fReadOnly); childSetEnabled("replace_btn", !fReadOnly); childSetEnabled("replace_all_btn", !fReadOnly); } childSetFocus("search_text", TRUE); }
// virtual BOOL LLFloaterTopObjects::postBuild() { childSetCommitCallback("objects_list", onCommitObjectsList, this); childSetDoubleClickCallback("objects_list", onDoubleClickObjectsList); childSetFocus("objects_list"); LLScrollListCtrl *objects_list = getChild<LLScrollListCtrl>("objects_list"); if (objects_list) { objects_list->setCommitOnSelectionChange(TRUE); } childSetAction("show_beacon_btn", onClickShowBeacon, this); setDefaultBtn("show_beacon_btn"); childSetAction("return_selected_btn", onReturnSelected, this); childSetAction("return_all_btn", onReturnAll, this); childSetAction("disable_selected_btn", onDisableSelected, this); childSetAction("disable_all_btn", onDisableAll, this); childSetAction("refresh_btn", onRefresh, this); childSetAction("filter_object_btn", onGetByObjectNameClicked, this); childSetAction("filter_owner_btn", onGetByOwnerNameClicked, this); /* LLLineEditor* line_editor = getChild<LLLineEditor>("owner_name_editor"); if (line_editor) { line_editor->setCommitOnFocusLost(FALSE); line_editor->setCommitCallback(onGetByOwnerName); line_editor->setCallbackUserData(this); } line_editor = getChild<LLLineEditor>("object_name_editor"); if (line_editor) { line_editor->setCommitOnFocusLost(FALSE); line_editor->setCommitCallback(onGetByObjectName); line_editor->setCallbackUserData(this); }*/ mCurrentMode = STAT_REPORT_TOP_SCRIPTS; mFlags = 0; mFilter.clear(); return TRUE; }
BOOL LLFloaterAvatarPicker::postBuild() { getChild<LLLineEditor>("Edit")->setKeystrokeCallback( boost::bind(&LLFloaterAvatarPicker::editKeystroke, this, _1, _2),NULL); childSetAction("Find", boost::bind(&LLFloaterAvatarPicker::onBtnFind, this)); childDisable("Find"); childSetAction("Refresh", boost::bind(&LLFloaterAvatarPicker::onBtnRefresh, this)); getChild<LLUICtrl>("near_me_range")->setCommitCallback(boost::bind(&LLFloaterAvatarPicker::onRangeAdjust, this)); LLScrollListCtrl* searchresults = getChild<LLScrollListCtrl>("SearchResults"); searchresults->setDoubleClickCallback( boost::bind(&LLFloaterAvatarPicker::onBtnSelect, this)); searchresults->setCommitCallback(boost::bind(&LLFloaterAvatarPicker::onList, this)); childDisable("SearchResults"); LLScrollListCtrl* nearme = getChild<LLScrollListCtrl>("NearMe"); nearme->setDoubleClickCallback(boost::bind(&LLFloaterAvatarPicker::onBtnSelect, this)); nearme->setCommitCallback(boost::bind(&LLFloaterAvatarPicker::onList, this)); LLScrollListCtrl* friends = getChild<LLScrollListCtrl>("Friends"); friends->setDoubleClickCallback(boost::bind(&LLFloaterAvatarPicker::onBtnSelect, this)); getChild<LLUICtrl>("Friends")->setCommitCallback(boost::bind(&LLFloaterAvatarPicker::onList, this)); childSetAction("ok_btn", boost::bind(&LLFloaterAvatarPicker::onBtnSelect, this)); childDisable("ok_btn"); childSetAction("cancel_btn", boost::bind(&LLFloaterAvatarPicker::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")->setCommentText(getString("no_results")); getChild<LLTabContainer>("ResidentChooserTabs")->setCommitCallback( boost::bind(&LLFloaterAvatarPicker::onTabChanged, this)); setAllowMultiple(FALSE); center(); populateFriend(); 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; }
// virtual void LLFloaterWorldMap::onOpen(const LLSD& key) { bool center_on_target = (key.asString() == "center"); mIsClosing = FALSE; LLWorldMapView* map_panel; map_panel = (LLWorldMapView*)gFloaterWorldMap->mPanel; map_panel->clearLastClick(); { // reset pan on show, so it centers on you again if (!center_on_target) { LLWorldMapView::setPan(0, 0, TRUE); } map_panel->updateVisibleBlocks(); // Reload items as they may have changed LLWorldMap::getInstance()->reloadItems(); // We may already have a bounding box for the regions of the world, // so use that to adjust the view. adjustZoomSliderBounds(); // Could be first show //LLFirstUse::useMap(); // Start speculative download of landmarks const LLUUID landmark_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK); gInventory.startBackgroundFetch(landmark_folder_id); childSetFocus("location", TRUE); gFocusMgr.triggerFocusFlash(); buildAvatarIDList(); buildLandmarkIDLists(); // If nothing is being tracked, set flag so the user position will be found mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING ); } if (center_on_target) { centerOnTarget(FALSE); } }
void LLPanelRegionTools::clearAllWidgets() { // clear all widgets childSetValue("region name", "unknown"); childSetFocus("region name", FALSE); childSetValue("check prelude", FALSE); childDisable("check prelude"); childSetValue("check fixed sun", FALSE); childDisable("check fixed sun"); childSetValue("check reset home", FALSE); childDisable("check reset home"); childSetValue("check damage", FALSE); childDisable("check damage"); childSetValue("check visible", FALSE); childDisable("check visible"); childSetValue("block terraform", FALSE); childDisable("block terraform"); childSetValue("block dwell", FALSE); childDisable("block dwell"); childSetValue("is sandbox", FALSE); childDisable("is sandbox"); childSetValue("billable factor", BILLABLE_FACTOR_DEFAULT); childDisable("billable factor"); childSetValue("land cost", PRICE_PER_METER_DEFAULT); childDisable("land cost"); childDisable("Apply"); childDisable("Bake Terrain"); childDisable("Autosave now"); }
BOOL LLFloaterAvatarPicker::postBuild() { childSetKeystrokeCallback("Edit", editKeystroke, this); childSetAction("Find", onBtnFind, this); childDisable("Find"); mListNames = getChild<LLScrollListCtrl>("Names"); childSetDoubleClickCallback("Names",onBtnAdd); childSetCommitCallback("Names", onList, this); childDisable("Names"); childSetAction("Select", onBtnAdd, this); childDisable("Select"); childSetAction("Close", onBtnClose, this); childSetFocus("Edit"); if (mListNames) { mListNames->addCommentText(std::string("No results")); // *TODO: Translate } mInventoryPanel = getChild<LLInventoryPanel>("Inventory Panel"); if(mInventoryPanel) { mInventoryPanel->setFilterTypes(LLInventoryType::NIT_CALLCARD); mInventoryPanel->setFollowsAll(); mInventoryPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); mInventoryPanel->openDefaultFolderForType(LLAssetType::AT_CALLINGCARD); mInventoryPanel->setSelectCallback(LLFloaterAvatarPicker::onSelectionChange, this); } setAllowMultiple(FALSE); return TRUE; }
BOOL LLFloaterPostcard::postBuild() { childSetAction("cancel_btn", onClickCancel, this); childSetAction("send_btn", onClickSend, this); childDisable("from_form"); childSetAction("publish_help_btn", onClickPublishHelp, this); if (gAgent.isTeen()) { // Disable these buttons if they are PG (Teen) users childDisable("allow_publish_check"); childHide("allow_publish_check"); childDisable("publish_help_btn"); childHide("publish_help_btn"); childDisable("mature_check"); childHide("mature_check"); } LLString name_string; gAgent.buildFullname(name_string); childSetValue("name_form", LLSD(name_string)); LLTextEditor *MsgField = LLUICtrlFactory::getTextEditorByName(this, "msg_form"); if (MsgField) { MsgField->setWordWrap(TRUE); // For the first time a user focusess to .the msg box, all text will be selected. MsgField->setFocusChangedCallback(onMsgFormFocusRecieved, this); } childSetFocus("to_form", TRUE); return TRUE; }
BOOL LLFloaterPostcard::postBuild() { childSetAction("cancel_btn", onClickCancel, this); childSetAction("send_btn", onClickSend, this); childDisable("from_form"); std::string name_string; gAgent.buildFullname(name_string); childSetValue("name_form", LLSD(name_string)); LLTextEditor* MsgField = getChild<LLTextEditor>("msg_form"); if (MsgField) { MsgField->setWordWrap(TRUE); // For the first time a user focusess to .the msg box, all text will be selected. MsgField->setFocusChangedCallback(onMsgFormFocusRecieved, this); } childSetFocus("to_form", TRUE); return TRUE; }
// virtual BOOL LLFloaterReporter::postBuild() { LLSLURL slurl; LLAgentUI::buildSLURL(slurl); childSetText("abuse_location_edit", slurl.getSLURLString()); enableControls(TRUE); // convert the position to a string LLVector3d pos = gAgent.getPositionGlobal(); LLViewerRegion *regionp = gAgent.getRegion(); if (regionp) { childSetText("sim_field", regionp->getName()); pos -= regionp->getOriginGlobal(); } setPosBox(pos); // Take a screenshot, but don't draw this floater. setVisible(FALSE); takeScreenshot(); setVisible(TRUE); // Default text to be blank childSetText("object_name", LLStringUtil::null); childSetText("owner_name", LLStringUtil::null); mOwnerName = LLStringUtil::null; childSetFocus("summary_edit"); mDefaultSummary = childGetText("details_edit"); // send a message and ask for information about this region - // result comes back in processRegionInfo(..) LLMessageSystem* msg = gMessageSystem; msg->newMessage("RequestRegionInfo"); msg->nextBlock("AgentData"); msg->addUUID("AgentID", gAgent.getID()); msg->addUUID("SessionID", gAgent.getSessionID()); gAgent.sendReliableMessage(); // abuser name is selected from a list LLUICtrl* le = getChild<LLUICtrl>("abuser_name_edit"); le->setEnabled( false ); setPosBox((LLVector3d)mPosition.getValue()); LLButton* pick_btn = getChild<LLButton>("pick_btn"); pick_btn->setImages(std::string("tool_face.tga"), std::string("tool_face_active.tga") ); childSetAction("pick_btn", onClickObjPicker, this); childSetAction("select_abuser", boost::bind(&LLFloaterReporter::onClickSelectAbuser, this)); childSetAction("send_btn", onClickSend, this); childSetAction("cancel_btn", onClickCancel, this); // grab the user's name std::string fullname; LLAgentUI::buildFullname(fullname); childSetText("reporter_field", fullname); center(); return TRUE; }
void LLPanelDirFind::focus() { if (hasChild("search_editor")) childSetFocus("search_editor"); }
void LLFloaterWorldMap::updateSims(bool found_null_sim) { if (mCompletingRegionName == "") { return; } LLScrollListCtrl *list = getChild<LLScrollListCtrl>("search_results"); list->operateOnAll(LLCtrlListInterface::OP_DELETE); LLSD selected_value = list->getSelectedValue(); S32 name_length = mCompletingRegionName.length(); BOOL match_found = FALSE; S32 num_results = 0; std::map<U64, LLSimInfo*>::const_iterator it; for (it = LLWorldMap::getInstance()->mSimInfoMap.begin(); it != LLWorldMap::getInstance()->mSimInfoMap.end(); ++it) { LLSimInfo* info = (*it).second; std::string sim_name = info->mName; std::string sim_name_lower = sim_name; LLStringUtil::toLower(sim_name_lower); if (sim_name_lower.substr(0, name_length) == mCompletingRegionName) { if (LLWorldMap::getInstance()->mIsTrackingCommit) { if (sim_name_lower == mCompletingRegionName) { selected_value = sim_name; match_found = TRUE; } } LLSD value; value["id"] = sim_name; value["columns"][0]["column"] = "sim_name"; value["columns"][0]["value"] = sim_name; list->addElement(value); num_results++; } } list->selectByValue(selected_value); if (found_null_sim) { mCompletingRegionName = ""; } if (match_found) { mExactMatch = TRUE; childSetFocus("search_results"); onCommitSearchResult(NULL, this); } else if (!mExactMatch && num_results > 0) { list->selectFirstItem(); // select first item by default childSetFocus("search_results"); onCommitSearchResult(NULL, this); } else { list->addCommentText(std::string("None found.")); list->operateOnAll(LLCtrlListInterface::OP_DESELECT); } }
//----------------------------------------------------------------------------- // Member functions //----------------------------------------------------------------------------- LLFloaterReporter::LLFloaterReporter( const std::string& name, const LLRect& rect, const std::string& title, EReportType report_type) : LLFloater(name, rect, title), mReportType(report_type), mObjectID(), mScreenID(), mAbuserID(), mDeselectOnClose( FALSE ), mPicking( FALSE), mPosition(), mCopyrightWarningSeen( FALSE ), mResourceDatap(new LLResourceData()) { if (report_type == BUG_REPORT) { LLUICtrlFactory::getInstance()->buildFloater(this, "floater_report_bug.xml"); } else { LLUICtrlFactory::getInstance()->buildFloater(this, "floater_report_abuse.xml"); } childSetText("abuse_location_edit", gAgent.getSLURL() ); // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-1.0.0a if (rlv_handler_t::isEnabled()) { // Can't filter these since they get sent as part of the report so just hide them instead if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) { childSetVisible("abuse_location_edit", false); childSetVisible("pos_field", false); } if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) { childSetVisible("owner_name", false); childSetVisible("abuser_name_edit", false); } } // [/RLVa:KB] LLButton* pick_btn = getChild<LLButton>("pick_btn"); if (pick_btn) { // XUI: Why aren't these in viewerart.ini? pick_btn->setImages( std::string("UIImgFaceUUID"), std::string("UIImgFaceSelectedUUID") ); childSetAction("pick_btn", onClickObjPicker, this); } if (report_type != BUG_REPORT) { // abuser name is selected from a list LLLineEditor* le = getChild<LLLineEditor>("abuser_name_edit"); le->setEnabled( FALSE ); } childSetAction("select_abuser", onClickSelectAbuser, this); childSetAction("send_btn", onClickSend, this); childSetAction("cancel_btn", onClickCancel, this); enableControls(TRUE); // convert the position to a string LLVector3d pos = gAgent.getPositionGlobal(); LLViewerRegion *regionp = gAgent.getRegion(); if (regionp) { pos -= regionp->getOriginGlobal(); } setPosBox(pos); gReporterInstances.addData(report_type, this); // Take a screenshot, but don't draw this floater. setVisible(FALSE); takeScreenshot(); setVisible(TRUE); // Default text to be blank childSetText("object_name", LLStringUtil::null); childSetText("owner_name", LLStringUtil::null); childSetFocus("summary_edit"); mDefaultSummary = childGetText("details_edit"); gDialogVisible = TRUE; // only request details for abuse reports (not BUG reports) if (report_type != BUG_REPORT) { // send a message and ask for information about this region - // result comes back in processRegionInfo(..) LLMessageSystem* msg = gMessageSystem; msg->newMessage("RequestRegionInfo"); msg->nextBlock("AgentData"); msg->addUUID("AgentID", gAgent.getID()); msg->addUUID("SessionID", gAgent.getSessionID()); gAgent.sendReliableMessage(); }; }
void LLPanelDirFind::focus() { childSetFocus("search_editor"); }