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


C++ LLPanel::getHandle方法代码示例

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


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

示例1: reparent

void LLPanelStandStopFlying::reparent(LLFloaterMove* move_view)
{
	LLPanel* parent = dynamic_cast<LLPanel*>(getParent());
	if (!parent)
	{
		llwarns << "Stand/stop flying panel parent is unset, already attached?: " << mAttached << ", new parent: " << (move_view == NULL ? "NULL" : "Move Floater") << llendl;
		return;
	}

	if (move_view != NULL)
	{
		llassert(move_view != parent); // sanity check
	
		// Save our original container.
		if (!mOriginalParent.get())
			mOriginalParent = parent->getHandle();

		// Attach to movement controls.
		parent->removeChild(this);
		move_view->addChild(this);
		// Origin must be set by movement controls.
		mAttached = true;
	}
	else
	{
		if (!mOriginalParent.get())
		{
			llwarns << "Original parent of the stand / stop flying panel not found" << llendl;
			return;
		}

		// Detach from movement controls. 
		parent->removeChild(this);
		mOriginalParent.get()->addChild(this);
		// update parent with self visibility (it is changed in setVisible()). EXT-4743
		mOriginalParent.get()->setVisible(getVisible());

		mAttached = false;
		updatePosition(); // don't defer until next draw() to avoid flicker
	}

	// <FS:Zi> Make sure to resize the panel to fit the new parent. Important for
	//         proper layouting of the buttons. Skins should adapt the parent container.
	if(getParent())
		reshape(getParent()->getRect().getWidth(),getParent()->getRect().getHeight(),FALSE);
	// </FS:Zi>
}
开发者ID:wish-ds,项目名称:firestorm-ds,代码行数:47,代码来源:llmoveview.cpp

示例2: reparent

void LLPanelStandStopFlying::reparent(LLFloaterMove* move_view)
{
	LLPanel* parent = dynamic_cast<LLPanel*>(getParent());
	if (!parent)
	{
		llwarns << "Stand/stop flying panel parent is unset, already attached?: " << mAttached << ", new parent: " << (move_view == NULL ? "NULL" : "Move Floater") << llendl;
		return;
	}

	if (move_view != NULL)
	{
		llassert(move_view != parent); // sanity check
	
		// Save our original container.
		if (!mOriginalParent.get())
			mOriginalParent = parent->getHandle();

		// Attach to movement controls.
		parent->removeChild(this);
		move_view->addChild(this);
		// Origin must be set by movement controls.
		mAttached = true;
	}
	else
	{
		if (!mOriginalParent.get())
		{
			llwarns << "Original parent of the stand / stop flying panel not found" << llendl;
			return;
		}

		// Detach from movement controls. 
		parent->removeChild(this);
		mOriginalParent.get()->addChild(this);
		// update parent with self visibility (it is changed in setVisible()). EXT-4743
		mOriginalParent.get()->setVisible(getVisible());

		mAttached = false;
		updatePosition(); // don't defer until next draw() to avoid flicker
	}
}
开发者ID:Xara,项目名称:Opensource-V2-SL-Viewer,代码行数:41,代码来源:llmoveview.cpp


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