Beispiel #1
0
/* Reaction to a change in bitmaplist, this function finds a texture picker floater's appropriate scrolllist
   and passes this scrolllist's pointer to UpdateTextureCtrlList for processing.
   it also processes timer start/stops as needed */
void LocalAssetBrowser::onChangeHappened()
{
	/* own floater update */
	FloaterLocalAssetBrowser::UpdateBitmapScrollList();

	/* texturepicker related */
	const LLView::child_list_t* child_list = gFloaterView->getChildList();
	LLView::child_list_const_iter_t child_list_iter = child_list->begin();

	for (; child_list_iter != child_list->end(); child_list_iter++)
	{
		LLView* view = *child_list_iter;
		if ( view->getName() == LOCAL_TEXTURE_PICKER_NAME )
		{
			LLScrollListCtrl* ctrl = view->getChild<LLScrollListCtrl>
									( LOCAL_TEXTURE_PICKER_LIST_NAME, 
									  LOCAL_TEXTURE_PICKER_RECURSE, 
									  LOCAL_TEXTURE_PICKER_CREATEIFMISSING );

			if ( ctrl ) { UpdateTextureCtrlList(ctrl); }
		}
	}

	/* poking timer to see if it's still needed/still not needed */
	PingTimer();

}
Beispiel #2
0
void LLSideTrayListener::getTabs(const LLSD& event) const
{
    LLSD reply;

    LLSideTray* tray = mGetter();
    LLSD::Integer ord(0);
    for (LLSideTray::child_list_const_iter_t chi(tray->beginChild()), chend(tray->endChild());
         chi != chend; ++chi, ++ord)
    {
        LLView* child = *chi;
        // How much info is important? Toss in as much as seems reasonable for
        // each tab. But to me, at least for the moment, the most important
        // item is the tab name.
        LLSD info;
        // I like the idea of returning a map keyed by tab name. But as
        // compared to an array of maps, that loses sequence information.
        // Address that by indicating the original order in each map entry.
        info["ord"] = ord;
        info["visible"] = bool(child->getVisible());
        info["enabled"] = bool(child->getEnabled());
        info["available"] = child->isAvailable();
        reply[child->getName()] = info;
    }

    sendReply(reply, event);
}
Beispiel #3
0
void LLChicletBar::log(LLView* panel, const std::string& descr)
{
	if (NULL == panel) return;
	LLView* layout = panel->getParent();
	LL_DEBUGS("Chiclet Bar Rects") << descr << ": "
		<< "panel: " << panel->getName()
		<< ", rect: " << panel->getRect()
		<< " layout: " << layout->getName()
		<< ", rect: " << layout->getRect()
		<< LL_ENDL;
}
LLView*	LLAccordionCtrlTab::findContainerView()
{
	for(child_list_const_iter_t it = getChildList()->begin(); 
		getChildList()->end() != it; ++it)
	{
		LLView* child = *it;
		if(DD_HEADER_NAME == child->getName())
			continue;
		if(!child->getVisible())
			continue;
		return child;
	}
	return NULL;
}
Beispiel #5
0
/// Add the temporarily saved children back.
void LLPanelProfile::ChildStack::postParentReshape()
{
	mStack = mSavedStack;
	mSavedStack = stack_t();

	for (stack_t::const_iterator stack_it = mStack.begin(); stack_it != mStack.end(); ++stack_it)
	{
		const view_list_t& vlist = (*stack_it);
		for (view_list_t::const_iterator list_it = vlist.begin(); list_it != vlist.end(); ++list_it)
		{
			LLView* viewp = *list_it;
			LL_DEBUGS() << "removing " << viewp->getName() << LL_ENDL;
			mParent->removeChild(viewp);
		}
	}
}
// bit of a hack to make sure the inventory is open.
void LLInventoryPanel::openStartFolderOrMyInventory()
{
	if (mStartFolderString != "")
	{
		mFolderRoot->openFolder(mStartFolderString);
	}
	else
	{
		// Find My Inventory folder and open it up by name
		for (LLView *child = mFolderRoot->getFirstChild(); child; child = mFolderRoot->findNextSibling(child))
		{
			LLFolderViewFolder *fchild = dynamic_cast<LLFolderViewFolder*>(child);
			if (fchild && fchild->getListener() &&
				(fchild->getListener()->getUUID() == gInventory.getRootFolderID()))
			{
				const std::string& child_name = child->getName();
				mFolderRoot->openFolder(child_name);
				break;
			}
		}
	}
}
Beispiel #7
0
void LLGroupNotifyBox::moveToBack()
{
	// Move this dialog to the back.
	gNotifyBoxView->removeChild(this);
	gNotifyBoxView->addChildAtEnd(this);
	mNextBtn->setVisible(FALSE);

	// And enable the next button on the frontmost one, if there is one
	if (sGroupNotifyBoxCount > 1)
	{
		LLView* view = gNotifyBoxView->getFirstChild();
		
		if(view && "groupnotify" == view->getName())
		{
			LLGroupNotifyBox* front = (LLGroupNotifyBox*)view;
		
			if(front->mNextBtn)
			{
				front->mNextBtn->setVisible(TRUE);
			}
		}
	}
}
void LLAvatarListItem::updateChildren()
{
    LL_DEBUGS("AvatarItemReshape") << LL_ENDL;
    LL_DEBUGS("AvatarItemReshape") << "Updating for: " << getAvatarName() << LL_ENDL;

    S32 name_new_width = getRect().getWidth();
    S32 ctrl_new_left = name_new_width;
    S32 name_new_left = sLeftPadding;

    // iterate through all children and set them into correct position depend on each child visibility
    // assume that child indexes are in back order: the first in Enum is the last (right) in the item
    // iterate & set child views starting from right to left
    for (S32 i = 0; i < ALIC_COUNT; ++i)
    {
        // skip "name" textbox, it will be processed out of loop later
        if (ALIC_NAME == i) continue;

        LLView* control = getItemChildView((EAvatarListItemChildIndex)i);

        LL_DEBUGS("AvatarItemReshape") << "Processing control: " << control->getName() << LL_ENDL;
        // skip invisible views
        if (!control->getVisible()) continue;

        S32 ctrl_width = sChildrenWidths[i]; // including space between current & left controls
        // This one changes, so we can't cache it.
        if(ALIC_EXTRA_INFORMATION == i)
        {
            ctrl_width += mExtraInformation->getRect().getWidth();
        }

        // decrease available for
        name_new_width -= ctrl_width;
        LL_DEBUGS("AvatarItemReshape") << "width: " << ctrl_width << ", name_new_width: " << name_new_width << LL_ENDL;

        LLRect control_rect = control->getRect();
        LL_DEBUGS("AvatarItemReshape") << "rect before: " << control_rect << LL_ENDL;

        if (ALIC_ICON == i)
        {
            // assume that this is the last iteration,
            // so it is not necessary to save "ctrl_new_left" value calculated on previous iterations
            ctrl_new_left = sLeftPadding;
            name_new_left = ctrl_new_left + ctrl_width;
        }
        else
        {
            ctrl_new_left -= ctrl_width;
        }

        LL_DEBUGS("AvatarItemReshape") << "ctrl_new_left: " << ctrl_new_left << LL_ENDL;

        control_rect.setLeftTopAndSize(
            ctrl_new_left,
            control_rect.mTop,
            control_rect.getWidth(),
            control_rect.getHeight());

        LL_DEBUGS("AvatarItemReshape") << "rect after: " << control_rect << LL_ENDL;
        control->setShape(control_rect);
    }

    // set size and position of the "name" child
    LLView* name_view = getItemChildView(ALIC_NAME);
    LLRect name_view_rect = name_view->getRect();
    LL_DEBUGS("AvatarItemReshape") << "name rect before: " << name_view_rect << LL_ENDL;

    // apply paddings
    name_new_width -= sLeftPadding;
    name_new_width -= sNameRightPadding;

    name_view_rect.setLeftTopAndSize(
        name_new_left,
        name_view_rect.mTop,
        name_new_width,
        name_view_rect.getHeight());

    name_view->setShape(name_view_rect);

    LL_DEBUGS("AvatarItemReshape") << "name rect after: " << name_view_rect << LL_ENDL;
}