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


C++ TSharedRef::GetDetailsView方法代码示例

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


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

示例1: NAME_PropertyEditor

FDetailPropertyRow::FDetailPropertyRow(TSharedPtr<FPropertyNode> InPropertyNode, TSharedRef<FDetailCategoryImpl> InParentCategory, TSharedPtr<FPropertyNode> InExternalRootNode )
	: CustomIsEnabledAttrib( true )
	, PropertyNode( InPropertyNode )
	, ParentCategory( InParentCategory )
	, ExternalRootNode( InExternalRootNode )
	, bShowPropertyButtons( true )
	, bShowCustomPropertyChildren( true )
	, bForceAutoExpansion( false )
{
	if( InPropertyNode.IsValid() )
	{
		TSharedRef<FPropertyNode> PropertyNodeRef = PropertyNode.ToSharedRef();

		UProperty* Property = PropertyNodeRef->GetProperty();

		PropertyHandle = InParentCategory->GetParentLayoutImpl().GetPropertyHandle(PropertyNodeRef);
		const TSharedRef<IPropertyUtilities> Utilities = InParentCategory->GetParentLayoutImpl().GetPropertyUtilities();

		if (PropertyNode->AsCategoryNode() == NULL)
		{
			MakePropertyEditor(PropertyNodeRef, Utilities, PropertyEditor);
		}

		if (PropertyNode->GetPropertyKeyNode().IsValid())
		{
			MakePropertyEditor(PropertyNode->GetPropertyKeyNode().ToSharedRef(), Utilities, PropertyKeyEditor);
		}

		// Check if the property is valid for type customization.  Note: Static arrays of types will be a UProperty with array elements as children
		if (!PropertyEditorHelpers::IsStaticArray(*PropertyNodeRef))
		{
			static FName NAME_PropertyEditor("PropertyEditor");
			FPropertyEditorModule& PropertyEditorModule = FModuleManager::GetModuleChecked<FPropertyEditorModule>(NAME_PropertyEditor);
			
			IDetailsViewPrivate& DetailsView = InParentCategory->GetDetailsView();
			
			TSharedRef<IDetailsView> DetailsViewPtr = StaticCastSharedRef<IDetailsView>( DetailsView.AsShared() );
			
			FPropertyTypeLayoutCallback LayoutCallback = PropertyEditorModule.GetPropertyTypeCustomization(Property,*PropertyHandle, DetailsViewPtr );
			if (LayoutCallback.IsValid())
			{
				if (PropertyHandle->IsValidHandle())
				{
					CustomTypeInterface = LayoutCallback.GetCustomizationInstance();
				}
			}
		}
	}
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:49,代码来源:DetailPropertyRow.cpp

示例2: DetailLayoutBuilder

FDetailCategoryImpl::FDetailCategoryImpl( FName InCategoryName, TSharedRef<FDetailLayoutBuilderImpl> InDetailLayout )
	: DetailLayoutBuilder( InDetailLayout )
	, CategoryName( InCategoryName )
	, HeaderContentWidget( NULL )
	, SortOrder( 0 )
	, bRestoreExpansionState( true )
	, bShouldBeInitiallyCollapsed( false )
	, bUserShowAdvanced( false )
	, bForceAdvanced( false )
	, bHasFilterStrings( false )
	, bHasVisibleDetails( true )
{
	const UClass* BaseClass = InDetailLayout->GetDetailsView().GetBaseClass();
	// Use the base class name if there is one otherwise this is a generic category not specific to a class
	FName BaseClassName = BaseClass ? BaseClass->GetFName() : FName("Generic");

	CategoryPathName = BaseClassName.ToString() + TEXT(".") + CategoryName.ToString();

	GConfig->GetBool( TEXT("DetailCategoriesAdvanced"), *CategoryPathName, bUserShowAdvanced, GEditorUserSettingsIni );

}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:21,代码来源:DetailCategoryBuilderImpl.cpp


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