本文整理汇总了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();
}
}
}
}
}
示例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 );
}