当前位置: 首页>>代码示例>>C++>>正文


C++ LLPanel类代码示例

本文整理汇总了C++中LLPanel的典型用法代码示例。如果您正苦于以下问题:C++ LLPanel类的具体用法?C++ LLPanel怎么用?C++ LLPanel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了LLPanel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: childSetAction

BOOL LLFloaterLuaConsole::postBuild()
{
	childSetAction("Send", onClickSend, this);
	childSetAction("Clear", onClickClear, this);
	childSetAction("Abort", onClickAbort, this);
	childSetAction("Reset", onClickReset, this);

	//childDisable("Send");
	LLButton * sendp = getChild<LLButton>("Send");
	LLPanel * luap = getChild<LLPanel>("lua_panel");
	if(sendp && luap)
	{
		luap->setDefaultBtn(sendp);
	}

	LLLineEditor * editorp = getChild<LLLineEditor>("Lua Editor", TRUE);
	if(editorp)
	{
		editorp->setCommitOnFocusLost(FALSE);
		editorp->setRevertOnEsc(FALSE);
		editorp->setEnableLineHistory(TRUE);
		editorp->setFocusReceivedCallback( &onInputEditorGainFocus, this );
	}
	getChild<LLViewerTextEditor>("Lua Output Editor",TRUE);
	return TRUE;
}
开发者ID:djdevil1989,项目名称:Luna-Viewer,代码行数:26,代码来源:lunaconsole.cpp

示例2: childSetEnabled

void LLFloaterAvatarPicker::draw()
{
	LLFloater::draw();

// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-1.0.0e
	// TODO-RLVa: this code needs revisiting
	if (rlv_handler_t::isEnabled())
	{
		LLPanel* pNearMePanel = getChild<LLPanel>("NearMePanel");
		if ( (pNearMePanel) && (childGetVisibleTab("ResidentChooserTabs") == pNearMePanel) )
		{
			if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
			{
				if (mNearMeListComplete)
				{
					getChild<LLScrollListCtrl>("NearMe")->deleteAllItems();
					childSetEnabled("Select", false);
				}
				mNearMeListComplete = FALSE;
				pNearMePanel->setCtrlsEnabled(FALSE);
				return;
			}
			pNearMePanel->setCtrlsEnabled(TRUE);
		}
	}
// [/RLVa:KB]

	if (!mNearMeListComplete && childGetVisibleTab("ResidentChooserTabs") == getChild<LLPanel>("NearMePanel"))
	{
		populateNearMe();
	}
}
开发者ID:Xara,项目名称:Luna-Viewer,代码行数:32,代码来源:llfloateravatarpicker.cpp

示例3: getCurrentVoiceFloater

//static 
LLFloater* LLFloaterChatterBox::getCurrentVoiceFloater()
{
	if (!LLVoiceClient::getInstance()->voiceEnabled())
	{
		return NULL;
	}
	if (LLVoiceChannelProximal::getInstance() == LLVoiceChannel::getCurrentVoiceChannel())
	{
		// show near me tab if in proximal channel
		return LLFloaterChat::getInstance(LLSD());
	}
	else
	{
		LLFloaterChatterBox* floater = LLFloaterChatterBox::getInstance(LLSD());
		// iterator over all IM tabs (skip friends and near me)
		for (S32 i = 0; i < floater->getFloaterCount(); i++)
		{
			LLPanel* panelp = floater->mTabContainer->getPanelByIndex(i);
			if (panelp->getName() == "im_floater")
			{
				// only LLFloaterIMPanels are called "im_floater"
				LLFloaterIMPanel* im_floaterp = (LLFloaterIMPanel*)panelp;
				if (im_floaterp->getVoiceChannel()  == LLVoiceChannel::getCurrentVoiceChannel())
				{
					return im_floaterp;
				}
			}
		}
	}
	return NULL;
}
开发者ID:OS-Development,项目名称:VW.Singularity,代码行数:32,代码来源:llfloaterchatterbox.cpp

示例4: getChildView

//virtual
LLView* LLTabContainer::getChildView(const std::string& name, BOOL recurse, BOOL create_if_missing) const
{
	tuple_list_t::const_iterator itor;
	for (itor = mTabList.begin(); itor != mTabList.end(); ++itor)
	{
		LLPanel *panel = (*itor)->mTabPanel;
		if (panel->getName() == name)
		{
			return panel;
		}
	}

	if (recurse)
	{
		for (itor = mTabList.begin(); itor != mTabList.end(); ++itor)
		{
			LLPanel *panel = (*itor)->mTabPanel;
			LLView *child = panel->getChildView(name, recurse, FALSE);
			if (child)
			{
				return child;
			}
		}
	}
	return LLView::getChildView(name, recurse, create_if_missing);
}
开发者ID:Logear,项目名称:PartyHatViewer,代码行数:27,代码来源:lltabcontainer.cpp

示例5: findChildView

LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_name, const LLSD& params)
{
    LLView* view = findChildView(panel_name, true);
    if (!view) return NULL;

    if (!getVisible())
    {
        openFloater();
    }

    LLPanel* panel = NULL;

    LLSideTrayPanelContainer* container = dynamic_cast<LLSideTrayPanelContainer*>(view->getParent());
    if (container)
    {
        LLSD new_params = params;
        new_params[LLSideTrayPanelContainer::PARAM_SUB_PANEL_NAME] = panel_name;
        container->onOpen(new_params);

        panel = container->getCurrentPanel();
    }
    else if ((panel = dynamic_cast<LLPanel*>(view)) != NULL)
    {
        panel->onOpen(params);
    }

    return panel;
}
开发者ID:OS-Development,项目名称:VW.Dolphin_v3,代码行数:28,代码来源:llfloatersidepanelcontainer.cpp

示例6: name

LLView* LLPanel::fromXML(LLXMLNodePtr node, LLView* parent, LLUICtrlFactory *factory)
{
	std::string name("panel");
	node->getAttributeString("name", name);

	LLPanel* panelp = factory->createFactoryPanel(name);
	// Fall back on a default panel, if there was no special factory.
	if (!panelp)
	{
		LLRect rect;
		createRect(node, rect, parent, LLRect());
		// create a new panel without a border, by default
		panelp = new LLPanel(name, rect, FALSE);
		panelp->initPanelXML(node, parent, factory);
		// preserve panel's width and height, but override the location
		const LLRect& panelrect = panelp->getRect();
		S32 w = panelrect.getWidth();
		S32 h = panelrect.getHeight();
		rect.setLeftTopAndSize(rect.mLeft, rect.mTop, w, h);
		panelp->setRect(rect);
	}
	else
	{
		panelp->initPanelXML(node, parent, factory);
	}

	return panelp;
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:28,代码来源:llpanel.cpp

示例7: expandSideBar

/**
 * Activate tab with "panel_name" panel
 * if no such tab - return false, otherwise true.
 * TODO* In some cases a pointer to a panel of
 * a specific class may be needed so this method
 * would need to use templates.
 */
LLPanel*	LLSideTray::showPanel		(const std::string& panel_name, const LLSD& params)
{
	//arrange tabs
	child_vector_const_iter_t child_it;
	for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it)
	{
		LLView* view = (*child_it)->findChildView(panel_name,true);
		if(view)
		{
			selectTabByName	((*child_it)->getName());
			if(mCollapsed)
				expandSideBar();

			LLSideTrayPanelContainer* container = dynamic_cast<LLSideTrayPanelContainer*>(view->getParent());
			if(container)
			{
				LLSD new_params = params;
				new_params[LLSideTrayPanelContainer::PARAM_SUB_PANEL_NAME] = panel_name;
				container->onOpen(new_params);

				return container->getCurrentPanel();
			}

			LLPanel* panel = dynamic_cast<LLPanel*>(view);
			if(panel)
			{
				panel->onOpen(params);
			}
			return panel;
		}
	}
	return NULL;
}
开发者ID:Xara,项目名称:Opensource-V2-SL-Viewer,代码行数:40,代码来源:llsidetray.cpp

示例8: childShowTab

void LLFloaterGodTools::showPanel(const LLString& panel_name)
{
	childShowTab("GodTools Tabs", panel_name);
	open();	/*Flawfinder: ignore*/
	LLPanel *panel = childGetVisibleTab("GodTools Tabs");
	if (panel) panel->setFocus(TRUE);
}
开发者ID:Boy,项目名称:netbook,代码行数:7,代码来源:llfloatergodtools.cpp

示例9:

static LLPanel *childGetVisiblePanelWithHelp(LLView *parent)
{
	LLView *child;

	// look through immediate children first for an active panel with help
	for (child = parent->getFirstChild(); child; child = parent->findNextSibling(child))
	{
		// do we have a panel with a help topic?
		LLPanel *panel = dynamic_cast<LLPanel *>(child);
		if (panel && panel->getVisible() && !panel->getHelpTopic().empty())
		{
			return panel;
		}
	}

	// then try a bit harder and recurse through all children
	for (child = parent->getFirstChild(); child; child = parent->findNextSibling(child))
	{
		if (child->getVisible())
		{
			LLPanel* panel = ::childGetVisiblePanelWithHelp(child);
			if (panel)
			{
				return panel;
			}
		}
	}

	// couldn't find any active panels with a help topic string
	return NULL;
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:31,代码来源:llpanel.cpp

示例10: selectAll

bool LLFlatListView::selectAll()
{
	if (!mAllowSelection)
		return false;

	mSelectedItemPairs.clear();

	for (pairs_const_iterator_t it= mItemPairs.begin(); it != mItemPairs.end(); ++it)
	{
		item_pair_t* item_pair = *it;
		mSelectedItemPairs.push_back(item_pair);
		//a way of notifying panel of selection state changes
		LLPanel* item = item_pair->first;
		item->setValue(SELECTED_EVENT);
	}

	if (mCommitOnSelectionChange)
	{
		onCommit();
	}

	// Stretch selected item rect to ensure it won't be clipped
	mSelectedItemsBorder->setRect(getLastSelectedItemRect().stretch(-1));

	return true;
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:26,代码来源:llflatlistview.cpp

示例11: llassert

bool LLFlatListView::selectItemPair(item_pair_t* item_pair, bool select)
{
	llassert(item_pair);

	if (!mAllowSelection && select) return false;

	if (isSelected(item_pair) == select) return true; //already in specified selection state
	if (select)
	{
		mSelectedItemPairs.push_back(item_pair);
	}
	else
	{
		mSelectedItemPairs.remove(item_pair);
	}

	//a way of notifying panel of selection state changes
	LLPanel* item = item_pair->first;
	item->setValue(select ? SELECTED_EVENT : UNSELECTED_EVENT);

	if (mCommitOnSelectionChange)
	{
		onCommit();
	}

	// Stretch selected item rect to ensure it won't be clipped
	mSelectedItemsBorder->setRect(getLastSelectedItemRect().stretch(-1));

	return true;
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:30,代码来源:llflatlistview.cpp

示例12: onTabChange

void LLPanelMarketplaceListings::onTabChange()
{
	// Find active panel
	LLInventoryPanel* panel = (LLInventoryPanel*)getChild<LLTabContainer>("marketplace_filter_tabs")->getCurrentPanel();
	if (panel)
	{
		// If the panel doesn't allow drop on root, it doesn't allow the creation of new folder on root either
		LLButton* add_btn = getChild<LLButton>("add_btn");
		add_btn->setEnabled(panel->getAllowDropOnRoot());

		// Set filter string on active panel
		panel->setFilterSubString(mFilterSubString);

		// Show/hide the drop zone and resize the inventory tabs panel accordingly
		LLPanel* drop_zone = (LLPanel*)getChild<LLPanel>("marketplace_drop_zone");
		bool drop_zone_visible = drop_zone->getVisible();
		bool allow_drop_on_root = panel->getAllowDropOnRoot() && gSavedSettings.getBOOL("LiruEnableWIPUI");
		if (drop_zone_visible != allow_drop_on_root)
		{
			LLPanel* tabs = (LLPanel*)getChild<LLPanel>("tab_container_panel");
			S32 delta_height = drop_zone->getRect().getHeight();
			delta_height = (drop_zone_visible ? delta_height : -delta_height);
			tabs->reshape(tabs->getRect().getWidth(),tabs->getRect().getHeight() + delta_height);
			tabs->translate(0,-delta_height);
		}
		drop_zone->setVisible(allow_drop_on_root);
	}
}
开发者ID:HanHeld,项目名称:SingularityViewerFeb2016,代码行数:28,代码来源:llfloatermarketplacelistings.cpp

示例13: onTabChanged

// static
void LLFloaterGodTools::onTabChanged(void* data, bool from_click)
{
	LLPanel* panel = (LLPanel*)data;
	if (panel)
	{
		panel->setFocus(TRUE);
	}
}
开发者ID:Boy,项目名称:netbook,代码行数:9,代码来源:llfloatergodtools.cpp

示例14: openFloater

void LLFloaterGodTools::showPanel(const std::string& panel_name)
{
	getChild<LLTabContainer>("GodTools Tabs")->selectTabByName(panel_name);
	openFloater();
	LLPanel *panel = getChild<LLTabContainer>("GodTools Tabs")->getCurrentPanel();
	if (panel)
		panel->setFocus(TRUE);
}
开发者ID:Belxjander,项目名称:Kirito,代码行数:8,代码来源:llfloatergodtools.cpp

示例15: childShowTab

void LLFloaterGodTools::showPanel(const std::string& panel_name)
{
	childShowTab("GodTools Tabs", panel_name);
	openFloater();
	LLPanel *panel = childGetVisibleTab("GodTools Tabs");
	if (panel)
		panel->setFocus(TRUE);
}
开发者ID:Xara,项目名称:Opensource-V2-SL-Viewer,代码行数:8,代码来源:llfloatergodtools.cpp


注:本文中的LLPanel类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。