// static void LLFloaterGesture::refreshAll() { if (sInstance) { sInstance->buildGestureList(); LLCtrlListInterface *list = sInstance->childGetListInterface("gesture_list"); if (!list) return; if (sInstance->mSelectedID.isNull()) { list->selectFirstItem(); } else { if (list->setCurrentByID(sInstance->mSelectedID)) { LLCtrlScrollInterface *scroll = sInstance->childGetScrollInterface("gesture_list"); if (scroll) scroll->scrollToShowSelected(); } else { list->selectFirstItem(); } } // Update button labels onCommitList(NULL, sInstance); } }
// 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(); }
// static void LLFloaterClothing::show(void*) { if (sInstance) { sInstance->setVisibleAndFrontmost(); } else { LLFloaterClothing *self = new LLFloaterClothing(); self->buildClothingList(); if (self->mAllowSelection) { LLCtrlSelectionInterface* iface = self->childGetSelectionInterface("clothing_list"); if (iface) iface->selectFirstItem(); } self->childSetFocus("clothing_list"); self->mSelectedID = LLUUID::null; // Update button labels onCommitList(NULL, self); } gSavedSettings.setBOOL("ClothingBtnState", TRUE); }
// setup results when shown void LLPanelDirBrowser::handleVisibilityChange(BOOL new_visibility) { if (new_visibility) { onCommitList(); } LLPanel::handleVisibilityChange(new_visibility); }
// setup results when shown void LLPanelDirBrowser::onVisibilityChange(BOOL new_visibility) { if (new_visibility) { onCommitList(NULL, this); } LLPanel::onVisibilityChange(new_visibility); }
// virtual BOOL LLFloaterGesture::postBuild() { std::string label; label = getTitle(); setTitle(label); mGestureList = getChild<LLScrollListCtrl>("gesture_list"); mGestureList->setCommitCallback(boost::bind(&LLFloaterGesture::onCommitList, this)); mGestureList->setDoubleClickCallback(boost::bind(&LLFloaterGesture::onClickPlay, this)); getChild<LLUICtrl>("edit_btn")->setCommitCallback(boost::bind(&LLFloaterGesture::onClickEdit, this)); getChild<LLUICtrl>("play_btn")->setCommitCallback(boost::bind(&LLFloaterGesture::onClickPlay, this)); getChild<LLUICtrl>("stop_btn")->setCommitCallback(boost::bind(&LLFloaterGesture::onClickPlay, this)); getChild<LLButton>("activate_btn")->setClickedCallback(boost::bind(&LLFloaterGesture::onActivateBtnClick, this)); getChild<LLUICtrl>("FSShowOnlyActiveGestures")->setCommitCallback(boost::bind(&LLFloaterGesture::refreshForActiveSort, this)); // <FS:PP> FIRE-5646: Option to show only active gestures getChild<LLUICtrl>("new_gesture_btn")->setCommitCallback(boost::bind(&LLFloaterGesture::onClickNew, this)); getChild<LLButton>("del_btn")->setClickedCallback(boost::bind(&LLFloaterGesture::onDeleteSelected, this)); getChildView("play_btn")->setVisible( true); getChildView("stop_btn")->setVisible( false); setDefaultBtn("play_btn"); mGestureFolderID = gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE, false); uuid_vec_t folders; folders.push_back(mGestureFolderID); //perform loading Gesture directory anyway to make sure that all subdirectory are loaded too. See method done() for details. gInventory.addObserver(this); setFetchIDs(folders); startFetch(); if (mGestureList) { buildGestureList(); mGestureList->setFocus(TRUE); const BOOL ascending = TRUE; mGestureList->sortByColumn(std::string("name"), ascending); mGestureList->selectFirstItem(); } // Update button labels onCommitList(); return TRUE; }
void LLPanelDirBrowser::selectByUUID(const LLUUID& id) { LLScrollListCtrl* list = findChild<LLScrollListCtrl>("results"); if (!list) return; BOOL found = list->setCurrentByID(id); if (found) { // we got it, don't wait for network // Don't bother looking for this in the draw loop. mWantSelectID.setNull(); // Make sure UI updates. onCommitList(); } else { // waiting for this item from the network mWantSelectID = id; } }
void LLFloaterGesture::refreshAll() { if (!mGestureList) return; buildGestureList(); if (mSelectedID.isNull()) { mGestureList->selectFirstItem(); } else { if (! mGestureList->setCurrentByID(mSelectedID)) { mGestureList->selectFirstItem(); } } // Update button labels onCommitList(); }
// static void LLFloaterClothing::refreshAll() { if (sInstance) { sInstance->buildClothingList(); LLCtrlListInterface* list = sInstance->childGetListInterface("clothing_list"); if (list) { if (!sInstance->mAllowSelection) { // no selection, no commit on change list->operateOnSelection(LLCtrlListInterface::OP_DESELECT); } else if (sInstance->mSelectedID.isNull()) { list->selectFirstItem(); } else { if (list->setCurrentByID(sInstance->mSelectedID)) { LLCtrlScrollInterface *scroll = sInstance->childGetScrollInterface("clothing_list"); if (scroll) { scroll->scrollToShowSelected(); } } else { list->selectFirstItem(); } } // Update button labels onCommitList(NULL, sInstance); } } }
// static void LLFloaterGesture::show() { if (sInstance) { sInstance->open(); /*Flawfinder: ignore*/ return; } LLFloaterGesture *self = new LLFloaterGesture(); // Builds and adds to gFloaterView LLUICtrlFactory::getInstance()->buildFloater(self, "floater_gesture.xml"); // Fix up rectangle LLRect rect = gSavedSettings.getRect("FloaterGestureRect2"); self->reshape(rect.getWidth(), rect.getHeight()); self->setRect(rect); self->buildGestureList(); self->childSetFocus("gesture_list"); LLCtrlListInterface *list = self->childGetListInterface("gesture_list"); if (list) { const BOOL ascending = TRUE; list->sortByColumn(std::string("name"), ascending); list->selectFirstItem(); } self->mSelectedID = LLUUID::null; // Update button labels onCommitList(NULL, self); self->open(); /*Flawfinder: ignore*/ }