Exemple #1
0
void LLColorSwatchCtrl::showPicker(BOOL take_focus)
{
	LLFloaterColorPicker* pickerp = (LLFloaterColorPicker*)mPickerHandle.get();
	if (!pickerp)
	{
		pickerp = new LLFloaterColorPicker(this, mCanApplyImmediately);
		LLFloater* parent = gFloaterView->getParentFloater(this);
		if (parent)
		{
			parent->addDependentFloater(pickerp);
		}
		mPickerHandle = pickerp->getHandle();
	}

	// initialize picker with current color
	pickerp->initUI ( mColor.mV [ VRED ], mColor.mV [ VGREEN ], mColor.mV [ VBLUE ] );

	// display it
	pickerp->showUI ();

	if (take_focus)
	{
		pickerp->setFocus(TRUE);
	}
}
//static
void LLPanelGroupInvite::impl::callbackClickAdd(void* userdata)
{
	LLPanelGroupInvite* panelp = (LLPanelGroupInvite*) userdata;

	if ( panelp )
	{
		//Right now this is hard coded with some knowledge that it is part
		//of a floater since the avatar picker needs to be added as a dependent
		//floater to the parent floater.
		//Soon the avatar picker will be embedded into this panel
		//instead of being it's own separate floater.  But that is next week.
		//This will do for now. -jwolk May 10, 2006
		LLFloater* parentp;

		parentp = gFloaterView->getParentFloater(panelp);
		parentp->addDependentFloater(LLFloaterAvatarPicker::show(callbackAddUsers,
																 panelp->mImplementation,
																 TRUE));
	}
}
LLFloaterGotoLine::LLFloaterGotoLine(LLScriptEdCore* editor_core)
:       LLFloater(LLSD()),
        mGotoBox(NULL),
        mEditorCore(editor_core)
{
        buildFromFile("floater_goto_line.xml");

        sInstance = this;
        
        // find floater in which script panel is embedded
        LLView* viewp = (LLView*)editor_core;
        while(viewp)
        {
                LLFloater* floaterp = dynamic_cast<LLFloater*>(viewp);
                if (floaterp)
                {
                        floaterp->addDependentFloater(this);
                        break;
                }
                viewp = viewp->getParent();
        }
}