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


C++ LLHandle::isDead方法代码示例

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


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

示例1: onCheck

	static bool onCheck(LLHandle<LLView> flat_list_handle,
						LLHandle<LLPanel> inventory_panel_handle,
						LLSD::String sort_order_str)
	{
		if (flat_list_handle.isDead() || inventory_panel_handle.isDead()) return false;

		LLWearableItemsList* flat_list = dynamic_cast<LLWearableItemsList*>(flat_list_handle.get());
		LLInventoryPanel* inventory_panel = dynamic_cast<LLInventoryPanel*>(inventory_panel_handle.get());

		if (!inventory_panel || !flat_list) return false;

		// Inventory panel uses its own sort order independent from
		// flat list view so this flag is used to distinguish between
		// currently visible "tree" or "flat" representation of inventory.
		bool inventory_tree_visible = inventory_panel->getVisible();

		if (inventory_tree_visible)
		{
			U32 sort_order = inventory_panel->getSortOrder();

			if ("by_most_recent" == sort_order_str)
			{
				return LLWearableItemsList::E_SORT_BY_MOST_RECENT & sort_order;
			}
			else if ("by_name" == sort_order_str)
			{
				// If inventory panel is not sorted by date then it is sorted by name.
				return LLWearableItemsList::E_SORT_BY_MOST_RECENT & ~sort_order;
			}
			llwarns << "Unrecognized inventory panel sort order" << llendl;
		}
		else
		{
			LLWearableItemsList::ESortOrder	sort_order = flat_list->getSortOrder();

			if ("by_most_recent" == sort_order_str)
			{
				return LLWearableItemsList::E_SORT_BY_MOST_RECENT == sort_order;
			}
			else if ("by_name" == sort_order_str)
			{
				return LLWearableItemsList::E_SORT_BY_NAME == sort_order;
			}
			else if ("by_type" == sort_order_str)
			{
				return LLWearableItemsList::E_SORT_BY_TYPE_NAME == sort_order;
			}
			llwarns << "Unrecognized wearable list sort order" << llendl;
		}
		return false;
	}
开发者ID:NickyPerian,项目名称:viewer-development,代码行数:51,代码来源:llpaneloutfitedit.cpp

示例2: onVisible

	static bool onVisible(LLHandle<LLPanel> inventory_panel_handle,
						  LLSD::String sort_order_str)
	{
		if (inventory_panel_handle.isDead()) return false;

		LLInventoryPanel* inventory_panel = dynamic_cast<LLInventoryPanel*>(inventory_panel_handle.get());

		// Enable sorting by type only for the flat list of items
		// because inventory panel doesn't support this kind of sorting.
		return ( "by_type" == sort_order_str )
				&&	( !inventory_panel || !inventory_panel->getVisible() );
	}
开发者ID:NickyPerian,项目名称:viewer-development,代码行数:12,代码来源:llpaneloutfitedit.cpp

示例3: onSort

	static void onSort(LLHandle<LLView> flat_list_handle,
					   LLHandle<LLPanel> inventory_panel_handle,
					   LLSD::String sort_order_str)
	{
		if (flat_list_handle.isDead() || inventory_panel_handle.isDead()) return;

		LLWearableItemsList* flat_list = dynamic_cast<LLWearableItemsList*>(flat_list_handle.get());
		LLInventoryPanel* inventory_panel = dynamic_cast<LLInventoryPanel*>(inventory_panel_handle.get());

		if (!flat_list || !inventory_panel) return;

		LLWearableItemsList::ESortOrder	sort_order;

		if ("by_most_recent" == sort_order_str)
		{
			sort_order = LLWearableItemsList::E_SORT_BY_MOST_RECENT;
		}
		else if ("by_name" == sort_order_str)
		{
			sort_order = LLWearableItemsList::E_SORT_BY_NAME;
		}
		else if ("by_type" == sort_order_str)
		{
			sort_order = LLWearableItemsList::E_SORT_BY_TYPE_NAME;
		}
		else
		{
			llwarns << "Unrecognized sort order action" << llendl;
			return;
		}

		if (inventory_panel->getVisible())
		{
			inventory_panel->setSortOrder(sort_order);
		}
		else
		{
			flat_list->setSortOrder(sort_order);
		}
	}
开发者ID:NickyPerian,项目名称:viewer-development,代码行数:40,代码来源:llpaneloutfitedit.cpp

示例4:

	/*virtual*/ void httpSuccess()
	{
		if (mHandle.isDead())
		{
			return;
		}

		LLPanelGroupExperiences* panel = mHandle.get();
		if (panel)
		{
			panel->setExperienceList(getContent().get("experience_ids"));
		}
	}
开发者ID:Belxjander,项目名称:Kirito,代码行数:13,代码来源:llpanelgroupexperiences.cpp


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