void SWidgetSwitcher::ArrangeChildren( const FGeometry& AllottedGeometry, FArrangedChildren& ArrangedChildren ) const { if (AllChildren.Num() > 0) { ArrangeSingleChild(AllottedGeometry, ArrangedChildren, AllChildren[WidgetIndex.Get()], ContentScale); } }
void SMenuAnchor::OnArrangeChildren( const FGeometry& AllottedGeometry, FArrangedChildren& ArrangedChildren ) const { ArrangeSingleChild( AllottedGeometry, ArrangedChildren, Children[0], FVector2D::UnitVector ); const TSharedPtr<SWindow> PresentingWindow = PopupWindowPtr.Pin(); if (IsOpenAndReusingWindow() && PresentingWindow.IsValid()) { const FPopupPlacement LocalPlacement(AllottedGeometry, Children[1].GetWidget()->GetDesiredSize(), Placement.Get()); ArrangedChildren.AddWidget(AllottedGeometry.MakeChild(Children[1].GetWidget(), LocalPlacement.LocalPopupSize, FSlateLayoutTransform(LocalPopupPosition))); } }
void SMenuAnchor::OnArrangeChildren( const FGeometry& AllottedGeometry, FArrangedChildren& ArrangedChildren ) const { ArrangeSingleChild( AllottedGeometry, ArrangedChildren, Children[0], FVector2D::UnitVector); if ( IsOpen() ) { // @todo umg na AllottedGeometry here is in Window-Space when computed via OnPaint. // The incorrect geometry causes the popup to fail workspace-edge tests. const FGeometry PopupGeometry = ComputeMenuPlacement( AllottedGeometry, Children[1].GetWidget()->GetDesiredSize(), Placement.Get() ); ArrangedChildren.AddWidget( FArrangedWidget( Children[1].GetWidget(), PopupGeometry ) ); } }
void SWidgetSwitcher::OnArrangeChildren( const FGeometry& AllottedGeometry, FArrangedChildren& ArrangedChildren ) const { const TAttribute<FVector2D> ContentScale = FVector2D::UnitVector; if (AllChildren.Num() > 0) { const FSlot* ActiveSlotPtr = GetActiveSlot(); // Returns null if unsafe attribute WidgetIndex is out-of-bounds if (ActiveSlotPtr != nullptr) { ArrangeSingleChild(AllottedGeometry, ArrangedChildren, *ActiveSlotPtr, ContentScale); } } }
void SCompoundWidget::ArrangeChildren( const FGeometry& AllottedGeometry, FArrangedChildren& ArrangedChildren ) const { ArrangeSingleChild( AllottedGeometry, ArrangedChildren, ChildSlot, ContentScale ); }