UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
STableRow.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "InputCoreTypes.h"
7#include "ITableRow.h"
10#include "Input/DragAndDrop.h"
11#include "Input/Events.h"
12#include "Input/Reply.h"
13#include "Layout/Geometry.h"
14#include "Layout/Margin.h"
15#include "Misc/Attribute.h"
17#include "Styling/CoreStyle.h"
18#include "Styling/SlateColor.h"
19#include "Styling/SlateTypes.h"
20#include "Types/SlateStructs.h"
23#include "Widgets/Layout/SBox.h"
24#include "Widgets/SBoxPanel.h"
25#include "Widgets/SNullWidget.h"
26#include "Widgets/SWidget.h"
30#if WITH_ACCESSIBILITY
35#endif
36
37template <typename ItemType> class SListView;
38
54
58enum class EItemDropZone
59{
63};
64
65template <typename ItemType> class SListView;
66
70
71template<typename ItemType>
72class STableRow;
73
74template <typename ItemType>
76{
77 static constexpr bool SupportsInvalidation() { return true; }
78};
79
85template<typename ItemType>
86class STableRow : public ITableRow, public SBorder
87{
88 static_assert(TIsValidListItem<ItemType>::Value, "Item type T must be UObjectBase*, TObjectPtr<>, TWeakObjectPtr<>, TSharedRef<>, or TSharedPtr<>.");
89
90public:
97public:
98
100 : _Style( &FCoreStyle::Get().GetWidgetStyle<FTableRowStyle>("TableView.Row") )
101 , _ExpanderStyleSet( &FCoreStyle::Get() )
102 , _Padding( FMargin(0) )
104 , _ShowWires( false )
107 , _Content()
108 {}
109
112
113 // High Level DragAndDrop
114
115
123
124
131
132
136
137 // Low level DragAndDrop
142
144
148
149
156
158
160
161
166 void Construct(const typename STableRow<ItemType>::FArguments& InArgs, const TSharedRef<STableViewBase>& InOwnerTableView)
167 {
171
173 InOwnerTableView->TableViewMode,
174 InArgs._Padding,
175 InArgs._Content.Widget
176 );
177 }
178
180 {
181 this->Content = InContent;
182 InnerContentSlot = nullptr;
183
184 if ( InOwnerTableMode == ETableViewMode::List || InOwnerTableMode == ETableViewMode::Tile )
185 {
186 // We just need to hold on to this row's content.
187 this->ChildSlot
188 .Padding( InPadding )
189 [
191 ];
192
194 }
195 else
196 {
197 // -- Row is for TreeView --
199
200 // Rows in a TreeView need an expander button and some indentation
201 this->ChildSlot
202 [
204
206 .AutoWidth()
207 .HAlign(HAlign_Right)
208 .VAlign(VAlign_Fill)
209 [
211 .StyleSet(ExpanderStyleSet)
212 .ShouldDrawWires(bShowWires)
213 ]
214
216 .FillWidth(1)
218 .Padding( InPadding )
219 [
221 ]
222 ];
223
225 }
226 }
227
228#if WITH_ACCESSIBILITY
229 protected:
230 friend class FSlateAccessibleTableRow;
238 , public IAccessibleTableRow
239 {
240 public:
243 {}
244
245 // IAccessibleWidget
247 {
248 return this;
249 }
250 // ~
251 // IAccessibleTableRow
252 virtual void Select() override
253 {
254 if (Widget.IsValid())
255 {
257 if(TableRow->OwnerTablePtr.IsValid())
258 {
259 TSharedRef< ITypedTableView<ItemType> > OwnerTable = TableRow->OwnerTablePtr.Pin().ToSharedRef();
260 const bool bIsActive = OwnerTable->AsWidget()->HasKeyboardFocus();
261
262 if (const TObjectPtrWrapTypeOf<ItemType>* MyItemPtr = TableRow->GetItemForThis(OwnerTable))
263 {
264 const ItemType& MyItem = *MyItemPtr;
265 const bool bIsSelected = OwnerTable->Private_IsItemSelected(MyItem);
266 OwnerTable->Private_ClearSelection();
267 OwnerTable->Private_SetItemSelection(MyItem, true, true);
268 // @TODOAccessibility: Not sure if irnoring the signal selection mode will affect anything
269 OwnerTable->Private_SignalSelectionChanged(ESelectInfo::Direct);
270 }
271 }
272 }
273 }
274
275 virtual void AddToSelection() override
276 {
277 // @TODOAccessibility: When multiselection is supported
278 }
279
280 virtual void RemoveFromSelection() override
281 {
282 // @TODOAccessibility: When multiselection is supported
283 }
284
285 virtual bool IsSelected() const override
286 {
287 if (Widget.IsValid())
288 {
290 return TableRow->IsItemSelected();
291 }
292 return false;
293 }
294
295 virtual TSharedPtr<IAccessibleWidget> GetOwningTable() const override
296 {
297 if (Widget.IsValid())
298 {
300 if (TableRow->OwnerTablePtr.IsValid())
301 {
302 TSharedRef<SWidget> OwningTableWidget = TableRow->OwnerTablePtr.Pin()->AsWidget();
303 return FSlateAccessibleWidgetCache::GetAccessibleWidgetChecked(OwningTableWidget);
304 }
305 }
306 return nullptr;
307 }
308 // ~
309 };
310 public:
312 {
313 // @TODOAccessibility: Add support for tile table rows and tree table rows etc
314 // The widget type passed in should be based on the table type of the owning tabel
315 EAccessibleWidgetType WidgetType = EAccessibleWidgetType::ListItem;
317 }
318#endif
319
322 {
323 switch (InItemDropZone)
324 {
326 default:
329 };
330 }
331
332 int32 PaintSelection( const FPaintArgs& Args, const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle, bool bParentEnabled ) const
333 {
334 TSharedRef< ITypedTableView<ItemType> > OwnerTable = OwnerTablePtr.Pin().ToSharedRef();
335 const bool bIsActive = OwnerTable->AsWidget()->HasKeyboardFocus();
336
338 {
339 if (bIsActive && OwnerTable->Private_UsesSelectorFocus() && OwnerTable->Private_HasSelectorFocus(*MyItemPtr))
340 {
342 OutDrawElements,
343 LayerId++,
344 AllottedGeometry.ToPaintGeometry(),
347 Style->SelectorFocusedBrush.GetTint(InWidgetStyle) * InWidgetStyle.GetColorAndOpacityTint()
348 );
349 }
350 }
351 return LayerId;
352 }
353 int32 PaintBorder( const FPaintArgs& Args, const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle, bool bParentEnabled ) const
354 {
355 return SBorder::OnPaint(Args, AllottedGeometry, MyCullingRect, OutDrawElements, LayerId, InWidgetStyle, bParentEnabled);
356 }
357 int32 PaintDropIndicator( const FPaintArgs& Args, const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle, bool bParentEnabled ) const
358 {
359 if (ItemDropZone.IsSet())
360 {
361 if (PaintDropIndicatorEvent.IsBound())
362 {
363 return PaintDropIndicatorEvent.Execute(ItemDropZone.GetValue(), Args, AllottedGeometry, MyCullingRect, OutDrawElements, LayerId, InWidgetStyle, bParentEnabled);
364 }
365 else
366 {
367 return OnPaintDropIndicator(ItemDropZone.GetValue(), Args, AllottedGeometry, MyCullingRect, OutDrawElements, LayerId, InWidgetStyle, bParentEnabled);
368 }
369 }
370
371 return LayerId;
372 }
373
374
375 virtual int32 OnPaint( const FPaintArgs& Args, const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle, bool bParentEnabled ) const override
376 {
377 LayerId = PaintSelection(Args, AllottedGeometry, MyCullingRect, OutDrawElements, LayerId, InWidgetStyle, bParentEnabled);
378 LayerId = PaintBorder(Args, AllottedGeometry, MyCullingRect, OutDrawElements, LayerId, InWidgetStyle, bParentEnabled);
379 LayerId = PaintDropIndicator(Args, AllottedGeometry, MyCullingRect, OutDrawElements, LayerId, InWidgetStyle, bParentEnabled);
380
381 return LayerId;
382 }
383
384 virtual int32 OnPaintDropIndicator( EItemDropZone InItemDropZone, const FPaintArgs& Args, const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle, bool bParentEnabled ) const
385 {
386 TSharedRef< ITypedTableView<ItemType> > OwnerTable = OwnerTablePtr.Pin().ToSharedRef();
387
388 // Draw feedback for user dropping an item above, below, or onto a row.
390
391 if (OwnerTable->Private_GetOrientation() == Orient_Vertical)
392 {
394 (
395 OutDrawElements,
396 LayerId++,
397 AllottedGeometry.ToPaintGeometry(),
400 DropIndicatorBrush->GetTint(InWidgetStyle) * InWidgetStyle.GetColorAndOpacityTint()
401 );
402 }
403 else
404 {
405 // Reuse the drop indicator asset for horizontal, by rotating the drawn box 90 degrees.
406 const FVector2f LocalSize(AllottedGeometry.GetLocalSize());
407 const FVector2f Pivot(LocalSize * 0.5f);
408 const FVector2f RotatedLocalSize(LocalSize.Y, LocalSize.X);
409 FSlateLayoutTransform RotatedTransform(Pivot - RotatedLocalSize * 0.5f); // Make the box centered to the alloted geometry, so that it can be rotated around the center.
410
412 OutDrawElements,
413 LayerId++,
417 -UE_HALF_PI, // 90 deg CCW
418 RotatedLocalSize * 0.5f, // Relative center to the flipped
420 DropIndicatorBrush->GetTint(InWidgetStyle) * InWidgetStyle.GetColorAndOpacityTint()
421 );
422 }
423
424 return LayerId;
425 }
426
435 {
436 if (InMouseEvent.GetEffectingButton() == EKeys::LeftMouseButton)
437 {
438 TSharedRef< ITypedTableView<ItemType> > OwnerTable = OwnerTablePtr.Pin().ToSharedRef();
439
440 // Only one item can be double-clicked
442 {
443 // If we're configured to route double-click messages to the owner of the table, then
444 // do that here. Otherwise, we'll toggle expansion.
445 const bool bWasHandled = OwnerTable->Private_OnItemDoubleClicked(*MyItemPtr);
446 if (!bWasHandled)
447 {
449 }
450
451 return FReply::Handled();
452 }
453 }
454
455 return FReply::Unhandled();
456 }
457
466 {
467 TSharedRef< ITypedTableView<ItemType> > OwnerTable = OwnerTablePtr.Pin().ToSharedRef();
469 bDragWasDetected = false;
470
471 if ( MouseEvent.GetEffectingButton() == EKeys::LeftMouseButton )
472 {
473 const ESelectionMode::Type SelectionMode = GetSelectionMode();
474 if (SelectionMode != ESelectionMode::None)
475 {
477 {
478 const ItemType& MyItem = *MyItemPtr;
479 const bool bIsSelected = OwnerTable->Private_IsItemSelected(MyItem);
480
481 if (SelectionMode == ESelectionMode::Multi)
482 {
483 if (MouseEvent.IsShiftDown())
484 {
485 OwnerTable->Private_SelectRangeFromCurrentTo(MyItem);
488 {
489 OwnerTable->Private_SignalSelectionChanged(ESelectInfo::OnMouseClick);
490 }
491 }
492 else if (MouseEvent.IsControlDown())
493 {
494 OwnerTable->Private_SetItemSelection(MyItem, !bIsSelected, true);
497 {
498 OwnerTable->Private_SignalSelectionChanged(ESelectInfo::OnMouseClick);
499 }
500 }
501 }
502
504 {
505 OwnerTable->Private_ClearSelection();
506 OwnerTable->Private_SetItemSelection(MyItem, true, true);
509 {
510 OwnerTable->Private_SignalSelectionChanged(ESelectInfo::OnMouseClick);
511 }
512 }
513
514 return FReply::Handled()
516 .SetUserFocus(OwnerTable->AsWidget(), EFocusCause::Mouse)
517 .CaptureMouse(SharedThis(this));
518 }
519 }
520 }
521
522 return FReply::Unhandled();
523 }
524
533 {
534 TSharedRef< ITypedTableView<ItemType> > OwnerTable = OwnerTablePtr.Pin().ToSharedRef();
535
536 // Requires #include "Widgets/Views/SListView.h" in your header (not done in STableRow.h to avoid circular reference).
538
539 if ( MouseEvent.GetEffectingButton() == EKeys::LeftMouseButton )
540 {
542
544 {
546 }
547
548 const bool bIsUnderMouse = MyGeometry.IsUnderLocation(MouseEvent.GetScreenSpacePosition());
549 if ( HasMouseCapture() )
550 {
552 {
553 switch( GetSelectionMode() )
554 {
556 {
558 {
559 OwnerTable->Private_ClearSelection();
560 OwnerTable->Private_SignalSelectionChanged(ESelectInfo::OnMouseClick);
561 }
562
564 }
565 break;
566
568 {
569 if ( !bChangedSelectionOnMouseDown && !MouseEvent.IsControlDown() && !MouseEvent.IsShiftDown() )
570 {
572 {
573 const bool bIsSelected = OwnerTable->Private_IsItemSelected(*MyItemPtr);
574 if (bIsSelected && OwnerTable->Private_GetNumSelectedItems() > 1)
575 {
576 // We are mousing up on a previous selected item;
577 // deselect everything but this item.
578
579 OwnerTable->Private_ClearSelection();
580 OwnerTable->Private_SetItemSelection(*MyItemPtr, true, true);
581 OwnerTable->Private_SignalSelectionChanged(ESelectInfo::OnMouseClick);
582
584 }
585 }
586 }
587 }
588 break;
589 }
590 }
591
593 {
594 if (OwnerTable->Private_OnItemClicked(*MyItemPtr))
595 {
597 }
598 }
599
601 {
602 OwnerTable->Private_SignalSelectionChanged(ESelectInfo::OnMouseClick);
603 }
604
605 return Reply;
606 }
607 }
608 else if ( MouseEvent.GetEffectingButton() == EKeys::RightMouseButton && !OwnerTableViewBase->IsRightClickScrolling() )
609 {
610 // Handle selection of items when releasing the right mouse button, but only if the user isn't actively
611 // scrolling the view by holding down the right mouse button.
612
613 switch( GetSelectionMode() )
614 {
618 {
619 // Only one item can be selected at a time
621 {
622 const bool bIsSelected = OwnerTable->Private_IsItemSelected(*MyItemPtr);
623
624 // Select the item under the cursor
625 if (!bIsSelected)
626 {
627 OwnerTable->Private_ClearSelection();
628 OwnerTable->Private_SetItemSelection(*MyItemPtr, true, true);
629 OwnerTable->Private_SignalSelectionChanged(ESelectInfo::OnMouseClick);
630 }
631
632 OwnerTable->Private_OnItemRightClicked(*MyItemPtr, MouseEvent);
633
634 return FReply::Handled();
635 }
636 }
637 break;
638 }
639 }
640
641 return FReply::Unhandled();
642 }
643
645 {
647
648 return
650 // Drag detect because if this tap turns into a drag, we stop processing
651 // the selection touch.
653 }
654
656 {
657 FReply Reply = FReply::Unhandled();
658
660 {
662 const TSharedRef<ITypedTableView<ItemType>> OwnerTable = OwnerTablePtr.Pin().ToSharedRef();
664 {
665 ESelectionMode::Type SelectionMode = GetSelectionMode();
666 if (SelectionMode != ESelectionMode::None)
667 {
668 const bool bIsSelected = OwnerTable->Private_IsItemSelected(*MyItemPtr);
669 if (!bIsSelected)
670 {
671 if (SelectionMode != ESelectionMode::Multi)
672 {
673 OwnerTable->Private_ClearSelection();
674 }
675 OwnerTable->Private_SetItemSelection(*MyItemPtr, true, true);
676 OwnerTable->Private_SignalSelectionChanged(ESelectInfo::OnMouseClick);
677
678 Reply = FReply::Handled();
679 }
680 else if (SelectionMode == ESelectionMode::SingleToggle || SelectionMode == ESelectionMode::Multi)
681 {
682 OwnerTable->Private_SetItemSelection(*MyItemPtr, true, true);
683 OwnerTable->Private_SignalSelectionChanged(ESelectInfo::OnMouseClick);
684
685 Reply = FReply::Handled();
686 }
687 }
688
689 if (OwnerTable->Private_OnItemClicked(*MyItemPtr))
690 {
691 Reply = FReply::Handled();
692 }
693 }
694 }
695
696 return Reply;
697 }
698
700 {
702 {
703 // With touch input, dragging scrolls the list while selection requires a tap.
704 // If we are processing a touch and it turned into a drag; pass it on to the
706 return FReply::Handled().CaptureMouse( OwnerTablePtr.Pin()->AsWidget() );
707 }
708 else if ( HasMouseCapture() )
709 {
710 // Avoid changing the selection on the mouse up if there was a drag
711 bDragWasDetected = true;
712
714 {
716 OwnerTable->Private_SignalSelectionChanged(ESelectInfo::OnMouseClick);
717 }
718 }
719
720 if (OnDragDetected_Handler.IsBound())
721 {
723 }
724 else
725 {
726 return FReply::Unhandled();
727 }
728 }
729
730 virtual void OnDragEnter(FGeometry const& MyGeometry, FDragDropEvent const& DragDropEvent) override
731 {
732 if (OnDragEnter_Handler.IsBound())
733 {
735 }
736 }
737
738 virtual void OnDragLeave(FDragDropEvent const& DragDropEvent) override
739 {
741
742 if (OnDragLeave_Handler.IsBound())
743 {
745 }
746 }
747
750 {
751 const float PointerPos = Orientation == EOrientation::Orient_Horizontal ? LocalPointerPos.X : LocalPointerPos.Y;
752 const float Size = Orientation == EOrientation::Orient_Horizontal ? LocalSize.X : LocalSize.Y;
753
754 const float ZoneBoundarySu = FMath::Clamp(Size * 0.25f, 3.0f, 10.0f);
756 {
758 }
759 else if (PointerPos > Size - ZoneBoundarySu)
760 {
762 }
763 else
764 {
766 }
767 }
768
770 {
771 if ( OnCanAcceptDrop.IsBound() )
772 {
773 const TSharedRef< ITypedTableView<ItemType> > OwnerTable = OwnerTablePtr.Pin().ToSharedRef();
774 const FVector2f LocalPointerPos = MyGeometry.AbsoluteToLocal(DragDropEvent.GetScreenSpacePosition());
775 const EItemDropZone ItemHoverZone = ZoneFromPointerPosition(LocalPointerPos, MyGeometry.GetLocalSize(), OwnerTable->Private_GetOrientation());
776
778 {
779 TSharedRef< ITypedTableView<ItemType> > OwnerTable = OwnerTablePtr.Pin().ToSharedRef();
781 {
783 }
784
786 }();
787
788 return FReply::Handled();
789 }
790 else
791 {
792 return FReply::Unhandled();
793 }
794
795 }
796
798 {
799 const FReply Reply = [&]()
800 {
801 if (OnAcceptDrop.IsBound())
802 {
803 const TSharedRef< ITypedTableView<ItemType> > OwnerTable = OwnerTablePtr.Pin().ToSharedRef();
804
805 // A drop finishes the drag/drop operation, so we are no longer providing any feedback.
807
808 // Find item associated with this widget.
810 {
811 // Which physical drop zone is the drop about to be performed onto?
812 const FVector2f LocalPointerPos = MyGeometry.AbsoluteToLocal(DragDropEvent.GetScreenSpacePosition());
813 const EItemDropZone HoveredZone = ZoneFromPointerPosition(LocalPointerPos, MyGeometry.GetLocalSize(), OwnerTable->Private_GetOrientation());
814
815 // The row gets final say over which zone to drop onto regardless of physical location.
818 : HoveredZone;
819
820 if (ReportedZone.IsSet())
821 {
823 if (DropReply.IsEventHandled() && ReportedZone.GetValue() == EItemDropZone::OntoItem)
824 {
825 // Expand the drop target just in case, so that what we dropped is visible.
826 OwnerTable->Private_SetItemExpansion(*MyItemPtr, true);
827 }
828
829 return DropReply;
830 }
831 }
832 }
833
834 return FReply::Unhandled();
835 }();
836
837 // @todo slate : Made obsolete by OnAcceptDrop. Get rid of this.
838 if ( !Reply.IsEventHandled() && OnDrop_Handler.IsBound() )
839 {
840 return OnDrop_Handler.Execute(DragDropEvent);
841 }
842
843 return Reply;
844 }
845
846 virtual void InitializeRow() override {}
847 virtual void ResetRow() override {}
848
849 virtual void SetIndexInList( int32 InIndexInList ) override
850 {
852 }
853
854 virtual int32 GetIndexInList() override
855 {
856 return IndexInList;
857 }
858
859 virtual bool IsItemExpanded() const override
860 {
861 TSharedRef< ITypedTableView<ItemType> > OwnerTable = OwnerTablePtr.Pin().ToSharedRef();
863 {
864 return OwnerTable->Private_IsItemExpanded(*MyItemPtr);
865 }
866
867 return false;
868 }
869
870 virtual void ToggleExpansion() override
871 {
872 TSharedRef< ITypedTableView<ItemType> > OwnerTable = OwnerTablePtr.Pin().ToSharedRef();
873
874 const bool bItemHasChildren = OwnerTable->Private_DoesItemHaveChildren( IndexInList );
875 // Nothing to expand if row being clicked on doesn't have children
876 if( bItemHasChildren )
877 {
879 {
880 const bool bIsItemExpanded = bItemHasChildren && OwnerTable->Private_IsItemExpanded(*MyItemPtr);
881 OwnerTable->Private_SetItemExpansion(*MyItemPtr, !bIsItemExpanded);
882 }
883 }
884 }
885
886 virtual bool IsItemSelected() const override
887 {
888 TSharedRef<ITypedTableView<ItemType>> OwnerTable = OwnerTablePtr.Pin().ToSharedRef();
890 {
891 return OwnerTable->Private_IsItemSelected(*MyItemPtr);
892 }
893
894 return false;
895 }
896
897 virtual int32 GetIndentLevel() const override
898 {
899 return OwnerTablePtr.Pin()->Private_GetNestingDepth( IndexInList );
900 }
901
902 virtual int32 DoesItemHaveChildren() const override
903 {
904 return OwnerTablePtr.Pin()->Private_DoesItemHaveChildren( IndexInList );
905 }
906
907 virtual TBitArray<> GetWiresNeededByDepth() const override
908 {
909 return OwnerTablePtr.Pin()->Private_GetWiresNeededByDepth(IndexInList);
910 }
911
912 virtual bool IsLastChild() const override
913 {
914 return OwnerTablePtr.Pin()->Private_IsLastChild(IndexInList);
915 }
916
917 virtual TSharedRef<SWidget> AsWidget() override
918 {
919 return SharedThis(this);
920 }
921
924 {
925 this->Content = InContent;
926 InnerContentSlot = nullptr;
927 SBorder::SetContent(InContent);
928 }
929
932 {
933 this->Content = InContent;
934
936 {
937 InnerContentSlot->AttachWidget(InContent);
938 }
939 else
940 {
942 }
943 }
944
947 {
948 if ( this->Content.IsValid() )
949 {
950 return this->Content.Pin();
951 }
952 else
953 {
954 return TSharedPtr<SWidget>();
955 }
956 }
957
959 {
960 TSharedRef< ITypedTableView<ItemType> > OwnerTable = OwnerTablePtr.Pin().ToSharedRef();
961
962 const bool bItemHasChildren = OwnerTable->Private_DoesItemHaveChildren( IndexInList );
963 // Nothing to expand if row being clicked on doesn't have children
964 if( bItemHasChildren )
965 {
967 {
968 const bool IsItemExpanded = bItemHasChildren && OwnerTable->Private_IsItemExpanded(*MyItemPtr);
969 OwnerTable->Private_OnExpanderArrowShiftClicked(*MyItemPtr, !IsItemExpanded);
970 }
971 }
972 }
973
975 virtual const FSlateBrush* GetBorder() const
976 {
977 TSharedRef< ITypedTableView<ItemType> > OwnerTable = OwnerTablePtr.Pin().ToSharedRef();
978
979 const bool bIsActive = OwnerTable->AsWidget()->HasKeyboardFocus();
980
981 const bool bItemHasChildren = OwnerTable->Private_DoesItemHaveChildren( IndexInList );
982
983 static FName GenericWhiteBoxBrush("GenericWhiteBox");
984
985 // @todo: Slate Style - make this part of the widget style
987
989 {
990 const bool bIsSelected = OwnerTable->Private_IsItemSelected(*MyItemPtr);
991 const bool bIsHighlighted = OwnerTable->Private_IsItemHighlighted(*MyItemPtr);
992
994 const bool bEvenEntryIndex = (IndexInList % 2 == 0);
995
996 if (bIsSelected && bShowSelection)
997 {
998 if (bIsActive)
999 {
1000 return IsHovered()
1002 : &Style->ActiveBrush;
1003 }
1004 else
1005 {
1006 return IsHovered()
1008 : &Style->InactiveBrush;
1009 }
1010 }
1011 else if (!bIsSelected && bIsHighlighted)
1012 {
1013 if (bIsActive)
1014 {
1015 return IsHovered()
1018 }
1019 else
1020 {
1021 return IsHovered()
1024 }
1025 }
1027 {
1028 return IsHovered()
1031 }
1032 else
1033 {
1034 // Add a slightly lighter background for even rows
1035 if (bEvenEntryIndex)
1036 {
1037 return (IsHovered() && bAllowSelection)
1040
1041 }
1042 else
1043 {
1044 return (IsHovered() && bAllowSelection)
1047
1048 }
1049 }
1050 }
1051
1052 return nullptr;
1053 }
1054
1061 {
1062 TSharedRef< ITypedTableView< ItemType > > OwnerTable = OwnerTablePtr.Pin().ToSharedRef();
1063
1064 if (!OwnerTable->AsWidget()->HasKeyboardFocus() || OwnerTable->Private_GetNumSelectedItems() > 1)
1065 {
1066 return false;
1067 }
1068
1070 {
1071 return OwnerTable->Private_IsItemSelected(*MyItemPtr);
1072 }
1073
1074 return false;
1075 }
1076
1082 bool IsSelected() const
1083 {
1084 TSharedRef< ITypedTableView< ItemType > > OwnerTable = OwnerTablePtr.Pin().ToSharedRef();
1085
1087 {
1088 return OwnerTable->Private_IsItemSelected(*MyItemPtr);
1089 }
1090
1091 return false;
1092 }
1093
1099 bool IsHighlighted() const
1100 {
1101 TSharedRef< ITypedTableView< ItemType > > OwnerTable = OwnerTablePtr.Pin().ToSharedRef();
1102
1104 {
1105 return OwnerTable->Private_IsItemHighlighted(*MyItemPtr);
1106 }
1107
1108 return false;
1109 }
1110
1112 virtual FVector2D GetRowSizeForColumn(const FName& InColumnName) const override
1113 {
1114 return FVector2D::ZeroVector;
1115 }
1116
1124
1127 : IndexInList(0)
1130 {
1131#if WITH_ACCESSIBILITY
1132 // As the contents of table rows could be anything,
1133 // Ideally, somebody would assign a custom label to each table row with non-accessible content.
1134 // However, that's not always feasible so we want the screen reader to read out the concatenated contents of children.
1135 // E.g If ItemType == FString, then the screen reader can just read out the contents of the text box.
1136 AccessibleBehavior = EAccessibleBehavior::Summary;
1137 bCanChildrenBeAccessible = true;
1138#endif
1139 }
1140
1141protected:
1142
1152 {
1154
1155 check(InArgs._Style);
1156 Style = InArgs._Style;
1157
1158 check(InArgs._ExpanderStyleSet);
1159 ExpanderStyleSet = InArgs._ExpanderStyleSet;
1160
1162
1164
1165 this->OnCanAcceptDrop = InArgs._OnCanAcceptDrop;
1166 this->OnAcceptDrop = InArgs._OnAcceptDrop;
1167
1168 this->OnDragDetected_Handler = InArgs._OnDragDetected;
1169 this->OnDragEnter_Handler = InArgs._OnDragEnter;
1170 this->OnDragLeave_Handler = InArgs._OnDragLeave;
1171 this->OnDrop_Handler = InArgs._OnDrop;
1172
1173 this->SetOwnerTableView( InOwnerTableView );
1174
1175 this->bShowSelection = InArgs._ShowSelection;
1176
1177 this->SignalSelectionMode = InArgs._SignalSelectionMode;
1178
1179 this->bShowWires = InArgs._ShowWires;
1180
1181 this->bAllowPreselectedItemActivation = InArgs._bAllowPreselectedItemActivation;
1182 }
1183
1185 {
1186 // We want to cast to a ITypedTableView.
1187 // We cast to a SListView<ItemType> because C++ doesn't know that
1188 // being a STableView implies being a ITypedTableView.
1189 // See SListView.
1191 }
1192
1194 {
1198
1199 if ( !bShowSelection || !OwnerTable.IsValid() )
1200 {
1201 return NonSelectedForeground;
1202 }
1203
1205 {
1206 const bool bIsSelected = OwnerTable->Private_IsItemSelected(*MyItemPtr);
1207
1208 return bIsSelected
1211 }
1212
1213 return NonSelectedForeground;
1214 }
1215
1217 {
1219 return OwnerTable->Private_GetSelectionMode();
1220 }
1221
1223 {
1224 const TObjectPtrWrapTypeOf<ItemType>* MyItemPtr = OwnerTable->Private_ItemFromWidget(this);
1225 if (MyItemPtr)
1226 {
1227 return MyItemPtr;
1228 }
1229 else
1230 {
1231 checkf(OwnerTable->Private_IsPendingRefresh(), TEXT("We were unable to find the item for this widget. If it was removed from the source collection, the list should be pending a refresh."));
1232 }
1233
1234 return nullptr;
1235 }
1236
1237protected:
1238
1241
1244
1247
1250
1253
1256
1259
1262
1265
1268
1271
1274
1277
1280
1283
1286
1289
1291
1293
1296
1299
1300private:
1301 bool bShowWires;
1302};
1303
1304
1305template<typename ItemType>
1307
1308template <typename ItemType>
1310{
1311 static constexpr bool SupportsInvalidation() { return true; }
1312};
1313
1314template<typename ItemType>
1315class SMultiColumnTableRow : public STableRow<ItemType>
1316{
1317public:
1318
1329
1332
1335
1336protected:
1337 void Construct(const FTableRowArgs& InArgs, const TSharedRef<STableViewBase>& OwnerTableView)
1338 {
1341 .Style(InArgs._Style)
1342 .ExpanderStyleSet(InArgs._ExpanderStyleSet)
1343 .Padding(InArgs._Padding)
1344 .ShowSelection(InArgs._ShowSelection)
1345 .OnCanAcceptDrop(InArgs._OnCanAcceptDrop)
1346 .OnAcceptDrop(InArgs._OnAcceptDrop)
1347 .OnDragDetected(InArgs._OnDragDetected)
1348 .OnDragEnter(InArgs._OnDragEnter)
1349 .OnDragLeave(InArgs._OnDragLeave)
1350 .OnDrop(InArgs._OnDrop)
1351 .Content()
1352 [
1354 ]
1355
1356 , OwnerTableView );
1357
1358 // Sign up for notifications about changes to the HeaderRow
1359 TSharedPtr< SHeaderRow > HeaderRow = OwnerTableView->GetHeaderRow();
1360 check( HeaderRow.IsValid() );
1362
1363 // Populate the row with user-generated content
1364 this->GenerateColumns( HeaderRow.ToSharedRef() );
1365 }
1366
1368 {
1370
1371 // MultiColumnRows let the user decide which column should contain the expander/indenter item.
1372 this->ChildSlot
1373 .Padding( InPadding )
1374 [
1375 InContent
1376 ];
1377 }
1378
1380 {
1381 Box->ClearChildren();
1382 const TIndirectArray<SHeaderRow::FColumn>& Columns = InColumnHeaders->GetColumns();
1383 const int32 NumColumns = Columns.Num();
1385
1386 for( int32 ColumnIndex = 0; ColumnIndex < NumColumns; ++ColumnIndex )
1387 {
1388 const SHeaderRow::FColumn& Column = Columns[ColumnIndex];
1389 if ( InColumnHeaders->ShouldGeneratedColumn(Column.ColumnId) )
1390 {
1391 TSharedRef< SWidget >* ExistingWidget = ColumnIdToSlotContents.Find(Column.ColumnId);
1393 if (ExistingWidget != nullptr)
1394 {
1396 }
1397 else
1398 {
1400 }
1401
1402 bool bAddAlignedColumnCell = true;
1404 {
1405 CellContents->SetClipping(EWidgetClipping::OnDemand);
1406 }
1407 else if ( !InColumnHeaders->ShouldGenerateEmptyColumnForSpacing(Column.ColumnId) )
1408 {
1409 bAddAlignedColumnCell = false;
1410 }
1411
1413 {
1414 switch (Column.SizeRule)
1415 {
1417 {
1420
1421 Box->AddSlot()
1422 .HAlign(Column.CellHAlignment)
1423 .VAlign(Column.CellVAlignment)
1424 .FillWidth(WidthBinding)
1425 [
1427 ];
1428 }
1429 break;
1430
1432 {
1433 Box->AddSlot()
1434 .AutoWidth()
1435 [
1436 SNew(SBox)
1437 .WidthOverride(Column.Width.Get())
1438 .HAlign(Column.CellHAlignment)
1439 .VAlign(Column.CellVAlignment)
1440 .Clipping(EWidgetClipping::OnDemand)
1441 [
1443 ]
1444 ];
1445 }
1446 break;
1447
1450 {
1451 auto GetColumnWidthAsOptionalSize = [&Column]() -> FOptionalSize
1452 {
1453 const float DesiredWidth = Column.GetWidth();
1454 return FOptionalSize(DesiredWidth);
1455 };
1456
1459
1460 Box->AddSlot()
1461 .AutoWidth()
1462 [
1463 SNew(SBox)
1464 .WidthOverride(WidthBinding)
1465 .HAlign(Column.CellHAlignment)
1466 .VAlign(Column.CellVAlignment)
1467 .Clipping(EWidgetClipping::OnDemand)
1468 [
1470 ]
1471 ];
1472 }
1473 break;
1474
1475 default:
1476 ensure(false);
1477 break;
1478 }
1479 }
1480
1482 }
1483 }
1484
1485 ColumnIdToSlotContents = NewColumnIdToSlotContents;
1486 }
1487
1489 {
1490 ColumnIdToSlotContents.Empty();
1491 }
1492
1494 {
1495 return ColumnIdToSlotContents.Find(ColumnId);
1496 }
1497
1498private:
1499
1501 TMap< FName, TSharedRef< SWidget > > ColumnIdToSlotContents;
1502};
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
#define check(expr)
Definition AssertionMacros.h:314
#define ensure( InExpression)
Definition AssertionMacros.h:464
#define checkf(expr, format,...)
Definition AssertionMacros.h:315
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define SLATE_STYLE_ARGUMENT(ArgType, ArgName)
Definition DeclarativeSyntaxSupport.h:280
#define SAssignNew(ExposeAs, WidgetType,...)
Definition DeclarativeSyntaxSupport.h:41
#define SNew(WidgetType,...)
Definition DeclarativeSyntaxSupport.h:37
#define SLATE_ATTRIBUTE(AttrType, AttrName)
Definition DeclarativeSyntaxSupport.h:192
#define SLATE_EVENT(DelegateName, EventName)
Definition DeclarativeSyntaxSupport.h:458
#define SLATE_END_ARGS()
Definition DeclarativeSyntaxSupport.h:116
#define SLATE_DEFAULT_SLOT(DeclarationType, SlotName)
Definition DeclarativeSyntaxSupport.h:444
#define SLATE_ARGUMENT(ArgType, ArgName)
Definition DeclarativeSyntaxSupport.h:208
#define DECLARE_DELEGATE_RetVal_OneParam(ReturnValueType, DelegateName, Param1Type)
Definition DelegateCombinations.h:54
#define DECLARE_DELEGATE_OneParam(DelegateName, Param1Type)
Definition DelegateCombinations.h:48
return true
Definition ExternalRpcRegistry.cpp:601
typename UE::Core::Private::TObjectPtrWrapTypeOf< T >::Type TObjectPtrWrapTypeOf
Definition ObjectPtr.h:1761
ETableRowSignalSelectionMode
Definition STableRow.h:44
EItemDropZone
Definition STableRow.h:59
FOnDragDetected
Definition SlateDelegates.h:24
EOrientation
Definition SlateEnums.h:261
#define UE_HALF_PI
Definition UnrealMathUtility.h:151
uint32 Size
Definition VulkanMemory.cpp:4034
Definition CoreStyle.h:15
static const ISlateStyle & Get()
Definition CoreStyle.h:33
Definition DragAndDrop.h:141
Definition NameTypes.h:617
Definition PaintArgs.h:23
bool IsEventHandled() const
Definition ReplyBase.h:19
Definition Reply.h:24
FReply & ReleaseMouseCapture()
Definition Reply.h:114
FReply & DetectDrag(const TSharedRef< SWidget > &DetectDragInMe, FKey MouseButton)
Definition Reply.h:129
static FReply Unhandled()
Definition Reply.h:241
SLATECORE_API FReply & SetUserFocus(TSharedRef< SWidget > GiveMeFocus, EFocusCause ReasonFocusIsChanging=EFocusCause::SetDirectly, bool bInAllUsers=false)
Definition Reply.cpp:40
FReply & CaptureMouse(TSharedRef< SWidget > InMouseCaptor)
Definition Reply.h:28
static FReply Handled()
Definition Reply.h:233
static SLATECORE_API void MakeBox(FSlateWindowElementList &ElementList, uint32 InLayer, const FPaintGeometry &PaintGeometry, const FSlateBrush *InBrush, ESlateDrawEffect InDrawEffects=ESlateDrawEffect::None, const FLinearColor &InTint=FLinearColor::White)
Definition DrawElementTypes.cpp:333
static SLATECORE_API void MakeRotatedBox(FSlateWindowElementList &ElementList, uint32 InLayer, const FPaintGeometry &PaintGeometry, const FSlateBrush *InBrush, ESlateDrawEffect, float Angle, UE::Slate::FDeprecateOptionalVector2DParameter InRotationPoint=TOptional< FVector2f >(), ERotationSpace RotationSpace=RelativeToElement, const FLinearColor &InTint=FLinearColor::White)
Definition DrawElementTypes.cpp:351
@ RelativeToElement
Definition DrawElementTypes.h:53
Definition SlateLayoutTransform.h:20
Definition SlateRect.h:26
Definition DrawElements.h:220
Definition SlotBase.h:14
void AttachWidget(TSharedRef< SWidget > &&InWidget)
Definition SlotBase.h:47
Definition WidgetStyle.h:15
const FLinearColor & GetColorAndOpacityTint() const
Definition WidgetStyle.h:87
Definition ISlateStyle.h:18
virtual const FSlateBrush * GetBrush(const FName PropertyName, const ANSICHAR *Specifier=nullptr, const ISlateStyle *RequestingStyle=nullptr) const =0
Definition ITableRow.h:15
Definition ITypedTableView.h:48
Definition SBorder.h:31
virtual SLATE_API void SetContent(TSharedRef< SWidget > InContent)
Definition SBorder.cpp:77
virtual SLATE_API int32 OnPaint(const FPaintArgs &Args, const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) const override
Definition SBorder.cpp:95
SLATE_API void SetBorderImage(TAttribute< const FSlateBrush * > InBorderImage)
Definition SBorder.cpp:169
SLATECORE_API void ClearChildren()
Definition SBoxPanel.cpp:216
Definition SBox.h:29
virtual SLATECORE_API void SetVisibility(TAttribute< EVisibility > InVisibility) override final
Definition SCompoundWidget.cpp:91
FCompoundWidgetOneChildSlot ChildSlot
Definition SCompoundWidget.h:113
void SetForegroundColor(TAttribute< FSlateColor > InForegroundColor)
Definition SCompoundWidget.h:70
Definition SExpanderArrow.h:28
Definition SHeaderRow.h:107
EColumnSizeMode::Type SizeRule
Definition SHeaderRow.h:277
float GetWidth() const
Definition SHeaderRow.h:249
FName ColumnId
Definition SHeaderRow.h:255
EHorizontalAlignment CellHAlignment
Definition SHeaderRow.h:290
EVerticalAlignment CellVAlignment
Definition SHeaderRow.h:291
TAttribute< float > Width
Definition SHeaderRow.h:267
FColumnsChanged * OnColumnsChanged()
Definition SHeaderRow.h:316
Definition SBoxPanel.h:175
Definition SBoxPanel.h:171
FScopedWidgetSlotArguments AddSlot()
Definition SBoxPanel.h:285
static FSlot::FSlotArguments Slot()
Definition SBoxPanel.h:272
Definition SListView.h:66
Definition STableRow.h:1316
void Construct(const FTableRowArgs &InArgs, const TSharedRef< STableViewBase > &OwnerTableView)
Definition STableRow.h:1337
void GenerateColumns(const TSharedRef< SHeaderRow > &InColumnHeaders)
Definition STableRow.h:1379
virtual void ConstructChildren(ETableViewMode::Type InOwnerTableMode, const TAttribute< FMargin > &InPadding, const TSharedRef< SWidget > &InContent) override
Definition STableRow.h:1367
const TSharedRef< SWidget > * GetWidgetFromColumnId(const FName &ColumnId) const
Definition STableRow.h:1493
void ClearCellCache()
Definition STableRow.h:1488
STableRow< ItemType >::FArguments FTableRowArgs
Definition STableRow.h:1334
SMultiColumnTableRow< ItemType > FSuperRowType
Definition STableRow.h:1331
virtual TSharedRef< SWidget > GenerateWidgetForColumn(const FName &InColumnName)=0
static SLATECORE_API TSharedRef< class SWidget > NullWidget
Definition SNullWidget.h:22
Definition STableRow.h:87
virtual FReply OnDragOver(const FGeometry &MyGeometry, const FDragDropEvent &DragDropEvent) override
Definition STableRow.h:769
DECLARE_DELEGATE_RetVal_EightParams(int32, FOnPaintDropIndicator, EItemDropZone, const FPaintArgs &, const FGeometry &, const FSlateRect &, FSlateWindowElementList &, int32, const FWidgetStyle &, bool)
int32 IndexInList
Definition STableRow.h:1243
FOnTableRowDragEnter OnDragEnter_Handler
Definition STableRow.h:1276
DECLARE_DELEGATE_RetVal_ThreeParams(FReply, FOnAcceptDrop, const FDragDropEvent &, EItemDropZone, ItemType)
virtual int32 DoesItemHaveChildren() const override
Definition STableRow.h:902
virtual FReply OnMouseButtonDoubleClick(const FGeometry &InMyGeometry, const FPointerEvent &InMouseEvent) override
Definition STableRow.h:434
SLATE_BEGIN_ARGS(STableRow< ItemType >)
Definition STableRow.h:99
int32 PaintBorder(const FPaintArgs &Args, const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) const
Definition STableRow.h:353
void ConstructInternal(FArguments const &InArgs, TSharedRef< STableViewBase > const &InOwnerTableView)
Definition STableRow.h:1151
virtual void ResetRow() override
Definition STableRow.h:847
FOnAcceptDrop OnAcceptDrop
Definition STableRow.h:1264
virtual bool IsLastChild() const override
Definition STableRow.h:912
const FTableRowStyle * Style
Definition STableRow.h:1252
virtual void ToggleExpansion() override
Definition STableRow.h:870
virtual int32 GetIndexInList() override
Definition STableRow.h:854
virtual void OnDragLeave(FDragDropEvent const &DragDropEvent) override
Definition STableRow.h:738
bool bAllowPreselectedItemActivation
Definition STableRow.h:1298
FSlotBase * InnerContentSlot
Definition STableRow.h:1285
virtual FReply OnDragDetected(const FGeometry &MyGeometry, const FPointerEvent &MouseEvent) override
Definition STableRow.h:699
virtual void InitializeRow() override
Definition STableRow.h:846
virtual void OnDragEnter(FGeometry const &MyGeometry, FDragDropEvent const &DragDropEvent) override
Definition STableRow.h:730
void Construct(const typename STableRow< ItemType >::FArguments &InArgs, const TSharedRef< STableViewBase > &InOwnerTableView)
Definition STableRow.h:166
FOnCanAcceptDrop OnCanAcceptDrop
Definition STableRow.h:1261
virtual ESelectionMode::Type GetSelectionMode() const override
Definition STableRow.h:1216
virtual FReply OnDrop(const FGeometry &MyGeometry, const FDragDropEvent &DragDropEvent) override
Definition STableRow.h:797
FOnDragDetected OnDragDetected_Handler
Definition STableRow.h:1273
bool bProcessingSelectionTouch
Definition STableRow.h:1295
virtual FReply OnTouchStarted(const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent) override
Definition STableRow.h:644
int32 PaintDropIndicator(const FPaintArgs &Args, const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) const
Definition STableRow.h:357
ETableRowSignalSelectionMode SignalSelectionMode
Definition STableRow.h:1249
virtual int32 OnPaint(const FPaintArgs &Args, const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) const override
Definition STableRow.h:375
FOnPaintDropIndicator PaintDropIndicatorEvent
Definition STableRow.h:1267
bool bShowSelection
Definition STableRow.h:1246
virtual FReply OnTouchEnded(const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent) override
Definition STableRow.h:655
virtual TSharedPtr< SWidget > GetContent() override
Definition STableRow.h:946
virtual FReply OnMouseButtonUp(const FGeometry &MyGeometry, const FPointerEvent &MouseEvent) override
Definition STableRow.h:532
virtual TSharedRef< SWidget > AsWidget() override
Definition STableRow.h:917
virtual void Private_OnExpanderArrowShiftClicked() override
Definition STableRow.h:958
virtual FReply OnMouseButtonDown(const FGeometry &MyGeometry, const FPointerEvent &MouseEvent) override
Definition STableRow.h:465
bool bDragWasDetected
Definition STableRow.h:1292
virtual const FSlateBrush * GetBorder() const
Definition STableRow.h:975
void SetExpanderArrowVisibility(const EVisibility InExpanderArrowVisibility)
Definition STableRow.h:1117
virtual void SetRowContent(TSharedRef< SWidget > InContent)
Definition STableRow.h:923
virtual bool IsItemExpanded() const override
Definition STableRow.h:859
const ISlateStyle * ExpanderStyleSet
Definition STableRow.h:1255
void SetOwnerTableView(TSharedPtr< STableViewBase > OwnerTableView)
Definition STableRow.h:1184
FOnTableRowDrop OnDrop_Handler
Definition STableRow.h:1282
int32 PaintSelection(const FPaintArgs &Args, const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) const
Definition STableRow.h:332
virtual TBitArray GetWiresNeededByDepth() const override
Definition STableRow.h:907
TWeakPtr< ITypedTableView< ItemType > > OwnerTablePtr
Definition STableRow.h:1240
EItemDropZone ZoneFromPointerPosition(UE::Slate::FDeprecateVector2DParameter LocalPointerPos, UE::Slate::FDeprecateVector2DParameter LocalSize, EOrientation Orientation)
Definition STableRow.h:749
TWeakPtr< SWidget > Content
Definition STableRow.h:1288
TSharedPtr< SExpanderArrow > ExpanderArrowWidget
Definition STableRow.h:1258
bool bChangedSelectionOnMouseDown
Definition STableRow.h:1290
DECLARE_DELEGATE_RetVal_ThreeParams(TOptional< EItemDropZone >, FOnCanAcceptDrop, const FDragDropEvent &, EItemDropZone, ItemType)
FSlateColor GetForegroundBasedOnSelection() const
Definition STableRow.h:1193
TOptional< EItemDropZone > ItemDropZone
Definition STableRow.h:1270
virtual void ConstructChildren(ETableViewMode::Type InOwnerTableMode, const TAttribute< FMargin > &InPadding, const TSharedRef< SWidget > &InContent)
Definition STableRow.h:179
STableRow()
Definition STableRow.h:1126
virtual bool IsItemSelected() const override
Definition STableRow.h:886
const TObjectPtrWrapTypeOf< ItemType > * GetItemForThis(const TSharedRef< ITypedTableView< ItemType > > &OwnerTable) const
Definition STableRow.h:1222
virtual int32 GetIndentLevel() const override
Definition STableRow.h:897
virtual void SetIndexInList(int32 InIndexInList) override
Definition STableRow.h:849
bool IsHighlighted() const
Definition STableRow.h:1099
virtual FVector2D GetRowSizeForColumn(const FName &InColumnName) const override
Definition STableRow.h:1112
bool IsSelected() const
Definition STableRow.h:1082
FOnTableRowDragLeave OnDragLeave_Handler
Definition STableRow.h:1279
virtual int32 OnPaintDropIndicator(EItemDropZone InItemDropZone, const FPaintArgs &Args, const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) const
Definition STableRow.h:384
bool IsSelectedExclusively() const
Definition STableRow.h:1060
virtual void SetContent(TSharedRef< SWidget > InContent) override
Definition STableRow.h:931
const FSlateBrush * GetDropIndicatorBrush(EItemDropZone InItemDropZone) const
Definition STableRow.h:321
Definition STableViewBase.h:110
bool IsHovered() const
Definition SWidget.h:983
SLATECORE_API bool HasMouseCapture() const
Definition SWidget.cpp:994
Definition Attribute.h:17
const ObjectType & Get() const
Definition Attribute.h:241
void BindRaw(SourceType *InUserObject, typename FGetter::template TConstMethodPtr< SourceType, std::decay_t< VarTypes >... > InMethodPtr, VarTypes &&... Vars)
Definition Attribute.h:317
void Bind(const FGetter &InGetter)
Definition Attribute.h:274
Definition IndirectArray.h:20
UE_FORCEINLINE_HINT int32 Num() const
Definition IndirectArray.h:94
Definition UnrealString.h.inl:34
MixedIntoType & Padding(TAttribute< FMargin > InPadding)
Definition BasicLayoutWidgetSlot.h:337
static UE_FORCEINLINE_HINT TSharedRef< OtherType, Mode > SharedThis(OtherType *ThisPtr)
Definition SharedPointer.h:1780
Definition SharedPointer.h:692
TSharedRef< ObjectType, Mode > ToSharedRef() const &
Definition SharedPointer.h:1028
UE_FORCEINLINE_HINT const bool IsValid() const
Definition SharedPointer.h:1085
Definition SharedPointer.h:153
TSlotBase< SlotType > & AsSlot()
Definition Children.h:356
Definition SharedPointer.h:1295
UE_FORCEINLINE_HINT TSharedPtr< ObjectType, Mode > Pin() const &
Definition SharedPointer.h:1512
UE_FORCEINLINE_HINT bool IsValid() const
Definition SharedPointer.h:1535
@ FillSized
Definition SHeaderRow.h:63
@ Fill
Definition SHeaderRow.h:54
@ Fixed
Definition SHeaderRow.h:57
@ Manual
Definition SHeaderRow.h:60
@ OnMouseClick
Definition SlateEnums.h:317
@ Direct
Definition SlateEnums.h:319
Type
Definition ITypedTableView.h:16
@ None
Definition ITypedTableView.h:18
@ Single
Definition ITypedTableView.h:21
@ Multi
Definition ITypedTableView.h:27
@ SingleToggle
Definition ITypedTableView.h:24
Type
Definition ITypedTableView.h:37
@ List
Definition ITypedTableView.h:38
@ Tile
Definition ITypedTableView.h:39
@ false
Definition radaudio_common.h:23
static INPUTCORE_API const FKey RightMouseButton
Definition InputCoreTypes.h:301
static INPUTCORE_API const FKey LeftMouseButton
Definition InputCoreTypes.h:300
Definition Visibility.h:12
Definition Geometry.h:40
FORCEINLINE_DEBUGGABLE FPaintGeometry ToPaintGeometry() const
Definition Geometry.h:315
UE::Slate::FDeprecateVector2DResult GetLocalSize() const
Definition Geometry.h:510
Definition Margin.h:17
static constexpr UE_FORCEINLINE_HINT T Clamp(const T X, const T MinValue, const T MaxValue)
Definition UnrealMathUtility.h:592
Definition SlateStructs.h:13
Definition Events.h:695
Definition SlateBrush.h:239
FLinearColor GetTint(const FWidgetStyle &InWidgetStyle) const
Definition SlateBrush.h:339
Definition SlateColor.h:42
Definition SlateTypes.h:1641
FSlateBrush ActiveBrush
Definition SlateTypes.h:1667
FSlateBrush DropIndicator_Above
Definition SlateTypes.h:1727
FSlateBrush OddRowBackgroundHoveredBrush
Definition SlateTypes.h:1707
FSlateBrush InactiveBrush
Definition SlateTypes.h:1677
FSlateBrush EvenRowBackgroundHoveredBrush
Definition SlateTypes.h:1697
FSlateBrush OddRowBackgroundBrush
Definition SlateTypes.h:1712
FSlateBrush ParentRowBackgroundBrush
Definition SlateTypes.h:1687
FSlateColor SelectedTextColor
Definition SlateTypes.h:1722
FSlateBrush DropIndicator_Below
Definition SlateTypes.h:1737
FSlateBrush ParentRowBackgroundHoveredBrush
Definition SlateTypes.h:1692
FSlateBrush DropIndicator_Onto
Definition SlateTypes.h:1732
FSlateBrush EvenRowBackgroundBrush
Definition SlateTypes.h:1702
FSlateBrush ActiveHighlightedBrush
Definition SlateTypes.h:1742
FSlateColor TextColor
Definition SlateTypes.h:1717
FSlateBrush InactiveHighlightedBrush
Definition SlateTypes.h:1747
FSlateBrush SelectorFocusedBrush
Definition SlateTypes.h:1657
FSlateBrush InactiveHoveredBrush
Definition SlateTypes.h:1672
FSlateBrush ActiveHoveredBrush
Definition SlateTypes.h:1662
bool bUseParentRowBrush
Definition SlateTypes.h:1682
Definition TableViewTypeTraits.h:19
Definition Optional.h:131
constexpr OptionalType & GetValue()
Definition Optional.h:443
constexpr bool IsSet() const
Definition Optional.h:69
static constexpr bool SupportsInvalidation()
Definition STableRow.h:1311
static constexpr bool SupportsInvalidation()
Definition STableRow.h:77
Definition SWidget.h:69
T Y
Definition Vector2D.h:52
T X
Definition Vector2D.h:49
static CORE_API const TVector2< double > ZeroVector
Definition Vector2D.h:63
Definition SlateVector2.h:485