本文整理汇总了C++中TSharedRef::GetChildren方法的典型用法代码示例。如果您正苦于以下问题:C++ TSharedRef::GetChildren方法的具体用法?C++ TSharedRef::GetChildren怎么用?C++ TSharedRef::GetChildren使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TSharedRef
的用法示例。
在下文中一共展示了TSharedRef::GetChildren方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetNodeExpansionState
void SDetailsViewBase::SetNodeExpansionState(TSharedRef<IDetailTreeNode> InTreeNode, bool bIsItemExpanded, bool bRecursive)
{
TArray< TSharedRef<IDetailTreeNode> > Children;
InTreeNode->GetChildren(Children);
if (Children.Num())
{
RequestItemExpanded(InTreeNode, bIsItemExpanded);
InTreeNode->OnItemExpansionChanged(bIsItemExpanded);
if (bRecursive)
{
for (int32 ChildIndex = 0; ChildIndex < Children.Num(); ++ChildIndex)
{
TSharedRef<IDetailTreeNode> Child = Children[ChildIndex];
SetNodeExpansionState(Child, bIsItemExpanded, bRecursive);
}
}
}
}
示例2: AggregateChildren
void FSlateTextLayout::AggregateChildren()
{
Children.Empty();
const TArray< FLineModel >& LineModels = GetLineModels();
for (int32 LineModelIndex = 0; LineModelIndex < LineModels.Num(); LineModelIndex++)
{
const FLineModel& LineModel = LineModels[ LineModelIndex ];
for (int32 RunIndex = 0; RunIndex < LineModel.Runs.Num(); RunIndex++)
{
const FRunModel& LineRun = LineModel.Runs[ RunIndex ];
const TSharedRef< ISlateRun > SlateRun = StaticCastSharedRef< ISlateRun >( LineRun.GetRun() );
const TArray< TSharedRef<SWidget> >& RunChildren = SlateRun->GetChildren();
for (int32 ChildIndex = 0; ChildIndex < RunChildren.Num(); ChildIndex++)
{
const TSharedRef< SWidget >& Child = RunChildren[ ChildIndex ];
Children.Add( Child );
}
}
}
}
示例3: OnGetChildrenForDetailTree
void SDetailsViewBase::OnGetChildrenForDetailTree(TSharedRef<IDetailTreeNode> InTreeNode, TArray< TSharedRef<IDetailTreeNode> >& OutChildren)
{
InTreeNode->GetChildren(OutChildren);
}