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


C++ LLAccordionCtrlTab::getDisplayChildren方法代码示例

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


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

示例1: handleDragAndDrop

BOOL LLAccordionCtrlTab::LLAccordionCtrlTabHeader::handleDragAndDrop(S32 x, S32 y, MASK mask,
																	 BOOL drop,
																	 EDragAndDropType cargo_type,
																	 void* cargo_data,
																	 EAcceptance* accept,
																	 std::string& tooltip_msg)
{
	LLAccordionCtrlTab* parent = dynamic_cast<LLAccordionCtrlTab*>(getParent());

	if ( parent && !parent->getDisplayChildren() && parent->getCollapsible() && parent->canOpenClose() )
	{
		if (mAutoOpenTimer.getStarted())
		{
			if (mAutoOpenTimer.getElapsedTimeF32() > AUTO_OPEN_TIME)
			{
				parent->changeOpenClose(false);
				mAutoOpenTimer.stop();
				return TRUE;
			}
		}
		else
			mAutoOpenTimer.start();
	}

	return LLUICtrl::handleDragAndDrop(x, y, mask, drop, cargo_type,
									   cargo_data, accept, tooltip_msg);
}
开发者ID:Katharine,项目名称:kittyviewer,代码行数:27,代码来源:llaccordionctrltab.cpp

示例2: getRect

void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::draw()
{
	S32 width = getRect().getWidth();
	S32 height = getRect().getHeight();

	F32 alpha = getCurrentTransparency();
	gl_rect_2d(0,0,width - 1 ,height - 1,mHeaderBGColor.get() % alpha,true);

	LLAccordionCtrlTab* parent = dynamic_cast<LLAccordionCtrlTab*>(getParent());
	bool collapsible = (parent && parent->getCollapsible());
	bool expanded = (parent && parent->getDisplayChildren());

	// Handle overlay images, if needed
	// Only show green "focus" background image if the accordion is open,
	// because the user's mental model of focus is that it goes away after
	// the accordion is closed.
	if (getParent()->hasFocus() || mIsSelected
		/*&& !(collapsible && !expanded)*/ // WHY??
		)
	{
		mImageHeaderFocused->draw(0,0,width,height);
	}
	else
	{
		mImageHeader->draw(0,0,width,height);
	}

	if(mNeedsHighlight)
	{
		mImageHeaderOver->draw(0,0,width,height);
	}
	

	if(collapsible)
	{
		LLPointer<LLUIImage> overlay_image;
		if(expanded)
		{
			overlay_image = mImageExpanded;
		}
		else
		{
			overlay_image = mImageCollapsed;
		}
		overlay_image->draw(HEADER_IMAGE_LEFT_OFFSET,
							(height - overlay_image->getHeight()) / 2);
	}
	
	LLUICtrl::draw();
}
开发者ID:Krazy-Bish-Margie,项目名称:Thunderstorm,代码行数:50,代码来源:llaccordionctrltab.cpp

示例3: expandDefaultTab

void LLAccordionCtrl::expandDefaultTab()
{
	if (mAccordionTabs.size() > 0)
	{
		LLAccordionCtrlTab* tab = mAccordionTabs.front();

		if (!tab->getDisplayChildren())
		{
			tab->setDisplayChildren(true);
		}

		for (size_t i = 1; i < mAccordionTabs.size(); ++i)
		{
			tab = mAccordionTabs[i];

			if (tab->getDisplayChildren())
			{
				tab->setDisplayChildren(false);
			}
		}

		arrange();
	}
}
开发者ID:Katharine,项目名称:kittyviewer,代码行数:24,代码来源:llaccordionctrl.cpp

示例4:

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

	// look through immediate children first for an active tab with help
	for (child = parent->getFirstChild(); child; child = parent->findNextSibling(child))
	{
		LLPanel *curTabPanel = NULL;

		// do we have a tab container?
		LLTabContainer *tab = dynamic_cast<LLTabContainer *>(child);
		if (tab && tab->getVisible())
		{
			curTabPanel = tab->getCurrentPanel();
		}

		// do we have an accordion tab?
		LLAccordionCtrlTab* accordion = dynamic_cast<LLAccordionCtrlTab *>(child);
		if (accordion && accordion->getDisplayChildren())
		{
			curTabPanel = dynamic_cast<LLPanel *>(accordion->getAccordionView());
		}

		// if we found a valid tab, does it have a help topic?
		if (curTabPanel && !curTabPanel->getHelpTopic().empty())
		{
			return curTabPanel;
		}
	}

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

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

示例5: isActionEnabled

bool LLTeleportHistoryPanel::isActionEnabled(const LLSD& userdata) const
{
	S32 tabs_cnt = mItemContainers.size();

	bool has_expanded_tabs = false;
	bool has_collapsed_tabs = false;

	for (S32 n = 0; n < tabs_cnt; n++)
	{
		LLAccordionCtrlTab* tab = mItemContainers.get(n);
		if (!tab->getVisible())
			continue;

		if (tab->getDisplayChildren())
		{
			has_expanded_tabs = true;
		}
		else
		{
			has_collapsed_tabs = true;
		}

		if (has_expanded_tabs && has_collapsed_tabs)
		{
			break;
		}
	}

	std::string command_name = userdata.asString();

	if (has_expanded_tabs && command_name == "collapse_all")
	{
		return true;
	}

	if (has_collapsed_tabs && command_name ==  "expand_all")
	{
		return true;
	}

	return false;
}
开发者ID:,项目名称:,代码行数:42,代码来源:

示例6: childGetVisibleTabWithHelp

LLPanel* LLPanel::childGetVisibleTabWithHelp()
{
	LLView *child;

	bfs_tree_iterator_t it = beginTreeBFS();
	// skip ourselves
	++it;
	for (; it != endTreeBFS(); ++it)
	{
		child = *it;
		LLPanel *curTabPanel = NULL;

		// do we have a tab container?
		LLTabContainer *tab = dynamic_cast<LLTabContainer *>(child);
		if (tab && tab->getVisible())
		{
			curTabPanel = tab->getCurrentPanel();
		}

		// do we have an accordion tab?
		LLAccordionCtrlTab* accordion = dynamic_cast<LLAccordionCtrlTab *>(child);
		if (accordion && accordion->getDisplayChildren())
		{
			curTabPanel = dynamic_cast<LLPanel *>(accordion->getAccordionView());
		}

		// if we found a valid tab, does it have a help topic?
		if (curTabPanel && !curTabPanel->getHelpTopic().empty())
		{
			return curTabPanel;
		}
	}

	// couldn't find any active tabs with a help topic string
	return NULL;
}
开发者ID:otwstephanie,项目名称:hpa2oar,代码行数:36,代码来源:llpanel.cpp


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