UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SObjectTableRow.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
14#include "Slate/UMGDragDropOp.h"
15
16
18{
19public:
20 virtual UListViewBase* GetOwningListView() const = 0;
21 virtual UUserWidget* GetUserWidget() const = 0;
22
32
33protected:
34 // Intentionally being a bit nontraditional here - we track associations between UserWidget rows and their underlying IObjectTableRow.
35 // This allows us to mirror the ITableRow API very easily on IUserListEntry without requiring rote setting/getting of row states on every UMG subclass.
37};
38
46
47class UListViewBase;
48
59template <typename ItemType>
61{
62public:
67 SLATE_ARGUMENT(bool, bAllowDragging)
68 SLATE_ARGUMENT(bool, bAllowDragDrop)
69 SLATE_ARGUMENT(bool, bAllowKeepPreselectedItems)
70 SLATE_DEFAULT_SLOT(FArguments, Content)
73 // Drag and Drop functionality
80 // End Drag and Drop
82
83public:
85 {
86 TSharedPtr<SWidget> ContentWidget;
87
88 if (ensureMsgf(InWidgetObject.Implements<UUserListEntry>(), TEXT("Any UserWidget generated as a table row must implement the IUserListEntry interface")))
89 {
91
94
95 bAllowDragging = InArgs._bAllowDragging;
96 bAllowDragDrop = InArgs._bAllowDragDrop;
97 bAllowKeepPreselectedItems = InArgs._bAllowKeepPreselectedItems;
98 OnHovered = InArgs._OnHovered;
99 OnUnhovered = InArgs._OnUnhovered;
100 OnRowCanAcceptDrop = InArgs._OnRowCanAcceptDrop;
101 OnRowAcceptDrop = InArgs._OnRowAcceptDrop;
102 OnRowDragDetected = InArgs._OnRowDragDetected;
103 OnRowDragLeave = InArgs._OnRowDragLeave;
104 OnRowDragEnter = InArgs._OnRowDragEnter;
105 OnRowDragCancelled = InArgs._OnRowDragCancelled;
106 ContentWidget = InArgs._Content.Widget;
107 }
108 else
109 {
110 ContentWidget = SNew(STextBlock)
111 .Text(NSLOCTEXT("SObjectTableRow", "InvalidWidgetClass", "Any UserWidget generated as a table row must implement the IUserListEntry interface"));
112 }
113
114 SObjectWidget::Construct(
115 SObjectWidget::FArguments()
116 .Content()
117 [
118 ContentWidget.ToSharedRef()
119 ], &InWidgetObject);
120
121 // Register an active timer, not an OnTick to determine if item selection changed.
122 // If we use OnTick, it will be potentially stomped by DisableNativeTick, when the
123 // SObjectTableRow is used to wrap the UUserWidget construction.
124 RegisterActiveTimer(0.f, FWidgetActiveTimerDelegate::CreateSP(this, &SObjectTableRow::DetectItemSelectionChanged));
125 }
126
128 {
129 // Remove the association between this widget and its user widget
131 }
132
133 virtual UUserWidget* GetUserWidget() const
134 {
135 return WidgetObject;
136 }
137
139 {
141 {
142 return OwnerListView.Get();
143 }
144 return nullptr;
145 }
146
152
153 virtual void NotifyItemExpansionChanged(bool bIsExpanded)
154 {
155 if (WidgetObject)
156 {
158 }
159 }
160
161 //~ ITableRow interface
162 virtual void InitializeRow() override final
163 {
164 // ObjectRows can be generated in the widget designer with dummy data, which we want to ignore
166 {
168 }
169 }
170
171 virtual void ResetRow() override final
172 {
174 {
176 }
177 }
178
179 virtual TSharedRef<SWidget> AsWidget() override
180 {
181 return SharedThis(this);
182 }
183 virtual void SetIndexInList(int32 InIndexInList) override
184 {
185 IndexInList = InIndexInList;
186 }
187 virtual int32 GetIndexInList() override
188 {
189 return IndexInList;
190 }
192 {
193 return ChildSlot.GetChildAt(0);
194 }
195 virtual int32 GetIndentLevel() const override
196 {
198 return OwnerTable ? OwnerTable->Private_GetNestingDepth(IndexInList) : 0;
199 }
200 virtual int32 DoesItemHaveChildren() const override
201 {
203 return OwnerTable ? OwnerTable->Private_DoesItemHaveChildren(IndexInList) : 0;
204 }
206 {
207 /* Intentionally blank - far too specific to be a valid game UI interaction */
208 }
209 virtual ESelectionMode::Type GetSelectionMode() const override
210 {
212 return OwnerTable ? OwnerTable->Private_GetSelectionMode() : ESelectionMode::None;
213 }
214 virtual FVector2D GetRowSizeForColumn(const FName& InColumnName) const override
215 {
217 }
218
219 virtual bool IsItemExpanded() const override
220 {
222 const TObjectPtrWrapTypeOf<ItemType>* MyItemPtr = OwnerTable ? GetItemForThis(OwnerTable.ToSharedRef()) : nullptr;
223 if (MyItemPtr)
224 {
225 return OwnerTable->Private_IsItemExpanded(*MyItemPtr);
226 }
227
228 return false;
229 }
230
231 virtual void ToggleExpansion() override
232 {
234 if (OwnerTable && OwnerTable->Private_DoesItemHaveChildren(IndexInList))
235 {
237 {
238 OwnerTable->Private_SetItemExpansion(*MyItemPtr, !OwnerTable->Private_IsItemExpanded(*MyItemPtr));
239 }
240 }
241 }
242
243 virtual bool IsItemSelected() const override
244 {
246 const TObjectPtrWrapTypeOf<ItemType>* MyItemPtr = OwnerTable ? GetItemForThis(OwnerTable.ToSharedRef()) : nullptr;
247 if (MyItemPtr)
248 {
249 return OwnerTable->Private_IsItemSelected(*MyItemPtr);
250 }
251
252 return false;
253 }
254
255 virtual TBitArray<> GetWiresNeededByDepth() const override
256 {
258 return OwnerTable ? OwnerTable->Private_GetWiresNeededByDepth(IndexInList) : TBitArray<>();
259 }
260
261 virtual bool IsLastChild() const override
262 {
264 return OwnerTable ? OwnerTable->Private_IsLastChild(IndexInList) : true;
265 }
266
267 //~ ITableRow interface
268
269 //~ SWidget interface
270 virtual bool SupportsKeyboardFocus() const override
271 {
272 return true;
273 }
274
275 virtual void OnMouseEnter(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) override
276 {
277 SObjectWidget::OnMouseEnter(MyGeometry, MouseEvent);
278 if (WidgetObject && OnHovered.IsBound())
279 {
280 OnHovered.ExecuteIfBound(*WidgetObject);
281 }
282 }
283
284 virtual void OnMouseLeave(const FPointerEvent& MouseEvent) override
285 {
286 SObjectWidget::OnMouseLeave(MouseEvent);
287 if (WidgetObject && OnUnhovered.IsBound())
288 {
289 OnUnhovered.ExecuteIfBound(*WidgetObject);
290 }
291 }
292
294 {
295 if (InMouseEvent.GetEffectingButton() == EKeys::LeftMouseButton)
296 {
298 const TObjectPtrWrapTypeOf<ItemType>* MyItemPtr = OwnerTable ? GetItemForThis(OwnerTable.ToSharedRef()) : nullptr;
299 if (MyItemPtr)
300 {
301 OwnerTable->Private_OnItemDoubleClicked(*MyItemPtr);
302 return FReply::Handled();
303 }
304 }
305 return FReply::Unhandled();
306 }
307
309 {
310 //TODO: FReply Reply = SObjectWidget::OnTouchStarted(MyGeometry, InTouchEvent);
311 bProcessingSelectionTouch = true;
312
313 return FReply::Handled()
315 }
316
318 {
319 FReply Reply = SObjectWidget::OnTouchEnded(MyGeometry, InTouchEvent);
320
321 if (bProcessingSelectionTouch)
322 {
323 bProcessingSelectionTouch = false;
325 const TObjectPtrWrapTypeOf<ItemType>* MyItemPtr = OwnerTable ? GetItemForThis(OwnerTable.ToSharedRef()) : nullptr;
326 if (MyItemPtr)
327 {
328 if (IsItemSelectable())
329 {
330 ESelectionMode::Type SelectionMode = GetSelectionMode();
331 if (SelectionMode != ESelectionMode::None)
332 {
333 const bool bIsSelected = OwnerTable->Private_IsItemSelected(*MyItemPtr);
334 if (!bIsSelected)
335 {
336 if (SelectionMode != ESelectionMode::Multi)
337 {
338 OwnerTable->Private_ClearSelection();
339 }
340 OwnerTable->Private_SetItemSelection(*MyItemPtr, true, true);
341 OwnerTable->Private_SignalSelectionChanged(ESelectInfo::OnMouseClick);
342
343 Reply = FReply::Handled();
344 }
345 else if (SelectionMode == ESelectionMode::SingleToggle || SelectionMode == ESelectionMode::Multi)
346 {
347 OwnerTable->Private_SetItemSelection(*MyItemPtr, true, true);
348 OwnerTable->Private_SignalSelectionChanged(ESelectInfo::OnMouseClick);
349
350 Reply = FReply::Handled();
351 }
352 }
353 }
354
355 if (OwnerTable->Private_OnItemClicked(*MyItemPtr))
356 {
357 Reply = FReply::Handled();
358 }
359 }
360 }
361
362 return Reply;
363 }
364
366 {
367 FReply Reply = FReply::Unhandled();
368
369 if (bAllowDragging || bAllowDragDrop)
370 {
372
373 if (bProcessingSelectionTouch)
374 {
375 bProcessingSelectionTouch = false;
376 return OwnerTable ? FReply::Handled().CaptureMouse(OwnerTable->AsWidget()) : FReply::Unhandled();
377 }
378 //@todo DanH TableRow: does this potentially trigger twice? If not, why does an unhandled drag detection result in not calling mouse up?
379 else if (HasMouseCapture() && bChangedSelectionOnMouseDown)
380 {
381 // Do not change the selection on mouse up if we are dragging
382 bDragWasDetected = true;
383
384 if (OwnerTable)
385 {
386 OwnerTable->Private_SignalSelectionChanged(ESelectInfo::OnMouseClick);
387 }
388 }
389
390 Reply = SObjectWidget::OnDragDetected(MyGeometry, MouseEvent);
391 if (!Reply.IsEventHandled() && bAllowDragDrop)
392 {
393 if (OnRowDragDetected.IsBound() && WidgetObject)
394 {
395 // Allow the view to create and pass back a UMG drag drop operation using config data
397 if (Operation)
398 {
399 // Only update the entry drag over state if a valid operation was created
401
402 FVector2D ScreenCursorPos = MouseEvent.GetScreenSpacePosition();
403 FVector2D ScreenDragPosition = MyGeometry.GetAbsolutePosition();
405 uint32 PointerIndex = MouseEvent.GetPointerIndex();
406
408
409 // Set the item value of the row to the drag drop visual.
410 // If the drag visual is not a UUserWidget this will have to be done manually by binding to the list OnDragDetected delegate.
411 UUserWidget* DragVisualWidget = Cast<UUserWidget>(Operation->DefaultDragVisual.Get());
412 if (DragVisualWidget && DragVisualWidget->Implements<UUserObjectListEntry>())
413 {
414 IUserObjectListEntry::SetListItemObject(*DragVisualWidget, Operation->Payload);
415 }
416
418 }
419 return FReply::Unhandled();
420 }
421 }
422 }
423 bProcessingSelectionTouch = false;
424 return Reply;
425 }
426
427 virtual void OnDragEnter(const FGeometry& MyGeometry, const FDragDropEvent& DragDropEvent) override
428 {
429 SObjectWidget::OnDragEnter(MyGeometry, DragDropEvent);
430
431 if (WidgetObject && OnRowDragEnter.IsBound())
432 {
435 }
436 }
437
438 virtual void OnDragLeave(FDragDropEvent const& DragDropEvent) override
439 {
440 SObjectWidget::OnDragLeave(DragDropEvent);
441
442 // Clear out the current drop zone when we leave the drag area
443 ItemDropZone = NullOpt;
444
445 if (WidgetObject && OnRowDragLeave.IsBound())
446 {
449 }
450 }
451
454 {
455 const float PointerPos = Orientation == EOrientation::Orient_Horizontal ? LocalPointerPos.X : LocalPointerPos.Y;
456 const float Size = Orientation == EOrientation::Orient_Horizontal ? LocalSize.X : LocalSize.Y;
457
458 const float ZoneBoundarySu = FMath::Clamp(Size * 0.25f, 3.0f, 10.0f);
460 {
462 }
463 else if (PointerPos > Size - ZoneBoundarySu)
464 {
466 }
467 else
468 {
470 }
471 }
472
474 {
475 FReply Reply = SObjectWidget::OnDragOver(MyGeometry, DragDropEvent);
476
477 if (OnRowCanAcceptDrop.IsBound() && !Reply.IsEventHandled())
478 {
479 const TSharedRef< ITypedTableView<ItemType> > OwnerTable = OwnerTablePtr.Pin().ToSharedRef();
480 const FVector2f LocalPointerPos = MyGeometry.AbsoluteToLocal(DragDropEvent.GetScreenSpacePosition());
481 const EItemDropZone ItemHoverZone = ZoneFromPointerPosition(LocalPointerPos, MyGeometry.GetLocalSize(), OwnerTable->Private_GetOrientation());
482
483 ItemDropZone = [ItemHoverZone, DragDropEvent, this]()
484 {
485 if (WidgetObject)
486 {
488 }
490 }();
491
492 if (WidgetObject)
493 {
495 }
496 }
497
498 return Reply;
499 }
500
502 {
503 if (!bAllowDragDrop)
504 {
505 return FReply::Unhandled();
506 }
507
508 FReply Reply = SObjectWidget::OnDrop(MyGeometry, DragDropEvent);
509
510 if (OnRowAcceptDrop.IsBound() && !Reply.IsEventHandled())
511 {
512 const TSharedRef< ITypedTableView<ItemType> > OwnerTable = OwnerTablePtr.Pin().ToSharedRef();
513
514 // A drop finishes the drag/drop operation, so we are no longer providing any feedback.
515 ItemDropZone = TOptional<EItemDropZone>();
516
517 // Find item associated with this widget.
519 {
520 // Which physical drop zone is the drop about to be performed onto?
521 const FVector2f LocalPointerPos = MyGeometry.AbsoluteToLocal(DragDropEvent.GetScreenSpacePosition());
522 EItemDropZone HoveredZone = ZoneFromPointerPosition(LocalPointerPos, MyGeometry.GetLocalSize(), OwnerTable->Private_GetOrientation());
523
524 // The row gets final say over which zone to drop onto regardless of physical location.
526 if (WidgetObject && OnRowCanAcceptDrop.IsBound())
527 {
529 }
530 else
531 {
533 }
534
535 if (ReportedZone.IsSet())
536 {
537 Reply = FReply::Unhandled();
538 if (WidgetObject)
539 {
540 Reply = OnRowAcceptDrop.Execute(DragDropEvent, ReportedZone.GetValue(), *WidgetObject);
541 bool DropReplyHandled = false;
542 if (Reply.IsEventHandled())
543 {
544 DropReplyHandled = true;
545 }
547 }
548
549 if (Reply.IsEventHandled() && ReportedZone.GetValue() == EItemDropZone::OntoItem)
550 {
551 // Expand the drop target just in case, so that what we dropped is visible.
552 OwnerTable->Private_SetItemExpansion(*MyItemPtr, true);
553 }
554
555 return Reply;
556 }
557 else
558 {
559 // If CanAcceptDrop returned a negative result, handle and cancel the drop event.
561 return FReply::Handled().EndDragDrop();
562 }
563 }
564 // If there is not an item associated with this widget, the drop is unhandled
565 return FReply::Unhandled();
566 }
567 // If there is no listener bound|dragging disabled|reply already handled - return the reply
568 return Reply;
569 }
570
572 {
573 SObjectWidget::OnDragCancelled(DragDropEvent, Operation);
574
575 if (WidgetObject && OnRowDragCancelled.IsBound())
576 {
579 }
580 }
581
582 virtual void HandleEntryDropped(UDragDropOperation* Operation)
583 {
584 if (WidgetObject)
585 {
587 }
588 }
589
590 virtual void HandleEntryDragged(UDragDropOperation* Operation)
591 {
592 if (WidgetObject)
593 {
595 }
596 }
597
599 {
600 bChangedSelectionOnMouseDown = false;
601 bDragWasDetected = false;
602
603 FReply Reply = SObjectWidget::OnMouseButtonDown(MyGeometry, MouseEvent);
604 if (!Reply.IsEventHandled())
605 {
607 if (OwnerTable)
608 {
609 const ESelectionMode::Type SelectionMode = GetSelectionMode();
610 if (MouseEvent.GetEffectingButton() == EKeys::LeftMouseButton && SelectionMode != ESelectionMode::None)
611 {
612 if (IsItemSelectable())
613 {
615 // New selections are handled on mouse down, deselection is handled on mouse up
616 if (MyItemPtr)
617 {
618 const ItemType& MyItem = *MyItemPtr;
619 const bool bIsSelected = OwnerTable->Private_IsItemSelected(MyItem);
620
621 if (SelectionMode == ESelectionMode::Multi)
622 {
623 if (MouseEvent.IsShiftDown())
624 {
625 OwnerTable->Private_SelectRangeFromCurrentTo(MyItem);
626 bChangedSelectionOnMouseDown = true;
627
628 }
629 else if (MouseEvent.IsControlDown())
630 {
631 OwnerTable->Private_SetItemSelection(MyItem, !bIsSelected, true);
632 bChangedSelectionOnMouseDown = true;
633 }
634 }
635
636 if (!bIsSelected && !bChangedSelectionOnMouseDown)
637 {
638 if (SelectionMode != ESelectionMode::Multi || !bAllowKeepPreselectedItems)
639 {
640 OwnerTable->Private_ClearSelection();
641 }
642 OwnerTable->Private_SetItemSelection(MyItem, true, true);
643 bChangedSelectionOnMouseDown = true;
644 }
645 }
646
647 Reply = FReply::Handled()
649 .CaptureMouse(SharedThis(this));
650
651 // Set focus back to the owning widget if the item is invalid somehow or its not selectable or can be navigated to
652 if (!MyItemPtr || !OwnerTable->Private_IsItemSelectableOrNavigable(*MyItemPtr))
653 {
654 Reply.SetUserFocus(OwnerTable->AsWidget(), EFocusCause::Mouse);
655 }
656 }
657 }
658 }
659 }
660
661 return Reply;
662 }
663
665 {
666 FReply Reply = SObjectWidget::OnMouseButtonUp(MyGeometry, MouseEvent);
667
668 if (!Reply.IsEventHandled())
669 {
671 const TObjectPtrWrapTypeOf<ItemType>* MyItemPtr = OwnerTable ? GetItemForThis(OwnerTable.ToSharedRef()) : nullptr;
672 if (MyItemPtr)
673 {
674 const ESelectionMode::Type SelectionMode = GetSelectionMode();
675
676 if (MouseEvent.GetEffectingButton() == EKeys::LeftMouseButton && HasMouseCapture())
677 {
678 bool bSignalSelectionChanged = bChangedSelectionOnMouseDown;
679
680 // Don't change selection on mouse up if it already changed on mouse down. Don't change the selection if we are dragging.
681 if (!bChangedSelectionOnMouseDown && IsItemSelectable() && MyGeometry.IsUnderLocation(MouseEvent.GetScreenSpacePosition()) && !bDragWasDetected)
682 {
683 if (SelectionMode == ESelectionMode::SingleToggle)
684 {
685 OwnerTable->Private_ClearSelection();
687 }
688 else if (SelectionMode == ESelectionMode::Multi &&
689 OwnerTable->Private_GetNumSelectedItems() > 1 &&
690 OwnerTable->Private_IsItemSelected(*MyItemPtr))
691 {
692 if (!MouseEvent.IsControlDown() && !MouseEvent.IsShiftDown())
693 {
694 // Releasing mouse over one of the multiple selected items - leave this one as the sole selected item
695 OwnerTable->Private_ClearSelection();
696 OwnerTable->Private_SetItemSelection(*MyItemPtr, true, true);
698 }
699 }
700 }
701
703 {
704 OwnerTable->Private_SignalSelectionChanged(ESelectInfo::OnMouseClick);
705 Reply = FReply::Handled();
706 }
707
708 if (OwnerTable->Private_OnItemClicked(*MyItemPtr))
709 {
710 Reply = FReply::Handled();
711 }
712
713 Reply = Reply.ReleaseMouseCapture();
714 }
715 else if (SelectionMode != ESelectionMode::None && MouseEvent.GetEffectingButton() == EKeys::RightMouseButton)
716 {
717 // Ignore the right click release if it was being used for scrolling
719 if (!OwnerTableViewBase->IsRightClickScrolling())
720 {
721 if (IsItemSelectable() && !OwnerTable->Private_IsItemSelected(*MyItemPtr))
722 {
723 // If this item isn't selected, it becomes the sole selected item. Otherwise we leave selection untouched.
724 OwnerTable->Private_ClearSelection();
725 OwnerTable->Private_SetItemSelection(*MyItemPtr, true, true);
726 OwnerTable->Private_SignalSelectionChanged(ESelectInfo::OnMouseClick);
727 }
728
729 OwnerTable->Private_OnItemRightClicked(*MyItemPtr, MouseEvent);
730
731 Reply = FReply::Handled();
732 }
733 }
734 }
735 }
736 return Reply;
737 }
738 // ~SWidget interface
739
740 bool GetAllowDragDrop() const
741 {
742 return bAllowDragDrop;
743 }
744
745protected:
746 virtual void InitializeObjectRow()
747 {
749 const TObjectPtrWrapTypeOf<ItemType>* MyItemPtr = OwnerTable ? GetItemForThis(OwnerTable.ToSharedRef()) : nullptr;
750 if (MyItemPtr)
751 {
752 InitObjectRowInternal(*WidgetObject, *MyItemPtr);
753
754 // Unselectable items should never be selected
755 if (!ensure(!OwnerTable->Private_IsItemSelected(*MyItemPtr) || IsItemSelectable()))
756 {
757 OwnerTable->Private_SetItemSelection(*MyItemPtr, false, false);
758 }
759 }
760 }
761
762 virtual void ResetObjectRow()
763 {
764 bIsAppearingSelected = false;
765 if (WidgetObject)
766 {
768 }
769 }
770
772 {
773 // List views were built assuming the use of attributes on rows to check on selection status, so there is no
774 // clean way to inform individual rows of changes to the selection state of their current items.
775 // Since event-based selection changes are only really needed in a game scenario, we (crudely) monitor it here to generate events.
776 // If desired, per-item selection events could be added as a longer-term todo
778 const TObjectPtrWrapTypeOf<ItemType>* MyItemPtr = OwnerTable ? GetItemForThis(OwnerTable.ToSharedRef()) : nullptr;
779 if (MyItemPtr)
780 {
781 if (bIsAppearingSelected != OwnerTable->Private_IsItemSelected(*MyItemPtr))
782 {
783 bIsAppearingSelected = !bIsAppearingSelected;
784 OnItemSelectionChanged(bIsAppearingSelected);
785 }
786 }
787 }
788
796
797 bool IsItemSelectable() const
798 {
800 return NativeListEntryImpl ? NativeListEntryImpl->IsListItemSelectable() : true;
801 }
802
804 {
805 const TObjectPtrWrapTypeOf<ItemType>* MyItemPtr = OwnerTable->Private_ItemFromWidget(this);
806 if (MyItemPtr)
807 {
808 return MyItemPtr;
809 }
810 else
811 {
812 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. %s"), *FReflectionMetaData::GetWidgetPath(this, false, false));
813 }
814
815 return nullptr;
816 }
817
826
829
830private:
831 void InitObjectRowInternal(UUserWidget& ListEntryWidget, ItemType ListItemObject) {}
832
833 int32 IndexInList = INDEX_NONE;
834 bool bChangedSelectionOnMouseDown = false;
835 bool bIsAppearingSelected = false;
836
837 bool bProcessingSelectionTouch = false;
838
840 bool bAllowKeepPreselectedItems = true;
841
843 bool bAllowDragging;
844
846 bool bAllowDragDrop;
847
849 bool bDragWasDetected = false;
850
852 TOptional<EItemDropZone> ItemDropZone;
853};
854
855template <>
857{
858 if (ListEntryWidget.Implements<UUserObjectListEntry>())
859 {
860 IUserObjectListEntry::SetListItemObject(*WidgetObject, ListItemObject);
861 }
862}
#define ensureMsgf( InExpression, InFormat,...)
Definition AssertionMacros.h:465
#define ensure( InExpression)
Definition AssertionMacros.h:464
#define checkf(expr, format,...)
Definition AssertionMacros.h:315
@ INDEX_NONE
Definition CoreMiscDefines.h:150
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
constexpr FNullOpt NullOpt
Definition Optional.h:15
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define SNew(WidgetType,...)
Definition DeclarativeSyntaxSupport.h:37
#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_TwoParams(DelegateName, Param1Type, Param2Type)
Definition DelegateCombinations.h:57
#define DECLARE_DELEGATE_OneParam(DelegateName, Param1Type)
Definition DelegateCombinations.h:48
#define DECLARE_DELEGATE_RetVal_ThreeParams(ReturnValueType, DelegateName, Param1Type, Param2Type, Param3Type)
Definition DelegateCombinations.h:72
return true
Definition ExternalRpcRegistry.cpp:601
#define NSLOCTEXT(InNamespace, InKey, InTextLiteral)
Definition Internationalization.h:300
typename UE::Core::Private::TObjectPtrWrapTypeOf< T >::Type TObjectPtrWrapTypeOf
Definition ObjectPtr.h:1761
EItemDropZone
Definition STableRow.h:59
EActiveTimerReturnType
Definition SlateEnums.h:329
EOrientation
Definition SlateEnums.h:261
uint32 Size
Definition VulkanMemory.cpp:4034
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition DragAndDrop.h:141
Definition NameTypes.h:617
static SLATECORE_API FString GetWidgetPath(const SWidget *InWidget, bool bShort=true, bool bNativePathOnly=false)
Definition ReflectionMetadata.cpp:6
bool IsEventHandled() const
Definition ReplyBase.h:19
Definition Reply.h:24
FReply & BeginDragDrop(TSharedRef< FDragDropOperation > InDragDropContent)
Definition Reply.h:143
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
FReply & EndDragDrop()
Definition Reply.h:150
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 UMG_API TSharedRef< FUMGDragDropOp > New(UDragDropOperation *Operation, const int32 PointerIndex, const FVector2D &CursorPosition, const FVector2D &ScreenPositionOfNode, float DPIScale, TSharedPtr< SObjectWidget > SourceUserWidget)
Definition UMGDragDropOp.cpp:170
Definition SObjectTableRow.h:18
virtual UUserWidget * GetUserWidget() const =0
static TSharedPtr< const IObjectTableRow > ObjectRowFromUserWidget(const UUserWidget *RowUserWidget)
Definition SObjectTableRow.h:23
virtual UListViewBase * GetOwningListView() const =0
static UMG_API TMap< TWeakObjectPtr< const UUserWidget >, TWeakPtr< const IObjectTableRow > > ObjectRowsByUserWidget
Definition SObjectTableRow.h:36
Definition ITableRow.h:15
Definition ITypedTableView.h:48
Definition IUserListEntry.h:28
static UMG_API void UpdateEntryDragOverState(UUserWidget &ListEntryWidget, bool bIsDraggingOver)
Definition IUserListEntry.cpp:62
static UMG_API void HandleEntryDropped(UUserWidget &ListEntryWidget, UDragDropOperation *Operation)
Definition IUserListEntry.cpp:86
static UMG_API void UpdateItemSelection(UUserWidget &ListEntryWidget, bool bIsSelected)
Definition IUserListEntry.cpp:30
static UMG_API void UpdateItemExpansion(UUserWidget &ListEntryWidget, bool bIsExpanded)
Definition IUserListEntry.cpp:42
static UMG_API void EndEntryDropOperation(UUserWidget &ListEntryWidget, bool bSuccess)
Definition IUserListEntry.cpp:70
static UMG_API void ReleaseEntry(UUserWidget &ListEntryWidget)
Definition IUserListEntry.cpp:18
static UMG_API void HandleEntryDragged(UUserWidget &ListEntryWidget, UDragDropOperation *Operation)
Definition IUserListEntry.cpp:78
static UMG_API void UpdateEntryDropIndicator(UUserWidget &ListEntryWidget, TOptional< EItemDropZone > DropZone)
Definition IUserListEntry.cpp:54
FCompoundWidgetOneChildSlot ChildSlot
Definition SCompoundWidget.h:113
Definition SObjectTableRow.h:61
bool GetAllowDragDrop() const
Definition SObjectTableRow.h:740
virtual bool IsItemSelected() const override
Definition SObjectTableRow.h:243
bool IsItemSelectable() const
Definition SObjectTableRow.h:797
virtual void Private_OnExpanderArrowShiftClicked() override
Definition SObjectTableRow.h:205
virtual FReply OnTouchStarted(const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent) override
Definition SObjectTableRow.h:308
virtual void OnMouseEnter(const FGeometry &MyGeometry, const FPointerEvent &MouseEvent) override
Definition SObjectTableRow.h:275
FOnObjectRowAcceptDrop OnRowAcceptDrop
Definition SObjectTableRow.h:821
FOnObjectRowCanAcceptDrop OnRowCanAcceptDrop
Definition SObjectTableRow.h:820
FOnObjectRowDragLeave OnRowDragLeave
Definition SObjectTableRow.h:824
virtual ESelectionMode::Type GetSelectionMode() const override
Definition SObjectTableRow.h:209
const TObjectPtrWrapTypeOf< ItemType > * GetItemForThis(const TSharedRef< ITypedTableView< ItemType > > &OwnerTable) const
Definition SObjectTableRow.h:803
virtual void HandleEntryDragged(UDragDropOperation *Operation)
Definition SObjectTableRow.h:590
virtual int32 GetIndexInList() override
Definition SObjectTableRow.h:187
virtual void OnMouseLeave(const FPointerEvent &MouseEvent) override
Definition SObjectTableRow.h:284
virtual FReply OnTouchEnded(const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent) override
Definition SObjectTableRow.h:317
void OnDragCancelled(const FDragDropEvent &DragDropEvent, UDragDropOperation *Operation) override
Definition SObjectTableRow.h:571
void Construct(const FArguments &InArgs, const TSharedRef< STableViewBase > &InOwnerTableView, UUserWidget &InWidgetObject, UListViewBase *InOwnerListView=nullptr)
Definition SObjectTableRow.h:84
virtual FReply OnMouseButtonUp(const FGeometry &MyGeometry, const FPointerEvent &MouseEvent) override
Definition SObjectTableRow.h:664
virtual UListViewBase * GetOwningListView() const
Definition SObjectTableRow.h:138
TWeakObjectPtr< UListViewBase > OwnerListView
Definition SObjectTableRow.h:827
TWeakPtr< ITypedTableView< ItemType > > OwnerTablePtr
Definition SObjectTableRow.h:828
virtual void OnDragEnter(const FGeometry &MyGeometry, const FDragDropEvent &DragDropEvent) override
Definition SObjectTableRow.h:427
FOnRowHovered OnUnhovered
Definition SObjectTableRow.h:819
virtual void ToggleExpansion() override
Definition SObjectTableRow.h:231
virtual void ResetRow() override final
Definition SObjectTableRow.h:171
virtual FReply OnDragOver(const FGeometry &MyGeometry, const FDragDropEvent &DragDropEvent) override
Definition SObjectTableRow.h:473
virtual FReply OnDragDetected(const FGeometry &MyGeometry, const FPointerEvent &MouseEvent) override
Definition SObjectTableRow.h:365
SLATE_BEGIN_ARGS(SObjectTableRow< ItemType >)
Definition SObjectTableRow.h:63
virtual TSharedRef< SWidget > AsWidget() override
Definition SObjectTableRow.h:179
virtual void ResetObjectRow()
Definition SObjectTableRow.h:762
FOnRowHovered OnHovered
Definition SObjectTableRow.h:818
FOnObjectRowDragEnter OnRowDragEnter
Definition SObjectTableRow.h:823
virtual FReply OnMouseButtonDown(const FGeometry &MyGeometry, const FPointerEvent &MouseEvent) override
Definition SObjectTableRow.h:598
FOnObjectRowDragDetected OnRowDragDetected
Definition SObjectTableRow.h:822
virtual ~SObjectTableRow()
Definition SObjectTableRow.h:127
virtual void HandleEntryDropped(UDragDropOperation *Operation)
Definition SObjectTableRow.h:582
virtual int32 GetIndentLevel() const override
Definition SObjectTableRow.h:195
EActiveTimerReturnType DetectItemSelectionChanged(double InCurrentTime, float InDeltaTime)
Definition SObjectTableRow.h:147
FOnObjectRowDragCancelled OnRowDragCancelled
Definition SObjectTableRow.h:825
virtual bool IsLastChild() const override
Definition SObjectTableRow.h:261
virtual bool IsItemExpanded() const override
Definition SObjectTableRow.h:219
virtual void OnItemSelectionChanged(bool bIsItemSelected)
Definition SObjectTableRow.h:789
EItemDropZone ZoneFromPointerPosition(UE::Slate::FDeprecateVector2DParameter LocalPointerPos, UE::Slate::FDeprecateVector2DParameter LocalSize, EOrientation Orientation)
Definition SObjectTableRow.h:453
virtual FVector2D GetRowSizeForColumn(const FName &InColumnName) const override
Definition SObjectTableRow.h:214
virtual TBitArray GetWiresNeededByDepth() const override
Definition SObjectTableRow.h:255
virtual TSharedPtr< SWidget > GetContent() override
Definition SObjectTableRow.h:191
virtual void OnDragLeave(FDragDropEvent const &DragDropEvent) override
Definition SObjectTableRow.h:438
virtual void SetIndexInList(int32 InIndexInList) override
Definition SObjectTableRow.h:183
virtual void NotifyItemExpansionChanged(bool bIsExpanded)
Definition SObjectTableRow.h:153
virtual bool SupportsKeyboardFocus() const override
Definition SObjectTableRow.h:270
virtual void DetectItemSelectionChanged()
Definition SObjectTableRow.h:771
virtual FReply OnDrop(const FGeometry &MyGeometry, const FDragDropEvent &DragDropEvent) override
Definition SObjectTableRow.h:501
virtual void InitializeRow() override final
Definition SObjectTableRow.h:162
virtual FReply OnMouseButtonDoubleClick(const FGeometry &InMyGeometry, const FPointerEvent &InMouseEvent) override
Definition SObjectTableRow.h:293
virtual int32 DoesItemHaveChildren() const override
Definition SObjectTableRow.h:200
virtual UUserWidget * GetUserWidget() const
Definition SObjectTableRow.h:133
virtual void InitializeObjectRow()
Definition SObjectTableRow.h:746
Definition SObjectWidget.h:31
TObjectPtr< UUserWidget > WidgetObject
Definition SObjectWidget.h:109
Definition STableViewBase.h:110
Definition STextBlock.h:45
SLATECORE_API TSharedRef< FActiveTimerHandle > RegisterActiveTimer(float TickPeriod, FWidgetActiveTimerDelegate TickFunction)
Definition SWidget.cpp:1821
SLATECORE_API bool HasMouseCapture() const
Definition SWidget.cpp:994
Definition UnrealString.h.inl:34
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
Definition SharedPointer.h:153
virtual TSharedRef< SWidget > GetChildAt(int32 ChildIndex) override
Definition Children.h:321
Definition SharedPointer.h:1295
UE_FORCEINLINE_HINT TSharedPtr< ObjectType, Mode > Pin() const &
Definition SharedPointer.h:1512
Definition DragDropOperation.h:55
TObjectPtr< class UWidget > DefaultDragVisual
Definition DragDropOperation.h:78
TObjectPtr< UObject > Payload
Definition DragDropOperation.h:71
Definition ListViewBase.h:546
Definition Object.h:95
bool Implements() const
Definition Class.h:5202
Definition IUserListEntry.h:23
Definition IUserObjectListEntry.h:14
Definition UserWidget.h:284
static UMG_API float GetViewportScale(const UObject *WorldContextObject)
Definition WidgetLayoutLibrary.cpp:85
bool IsDesignTime() const
Definition Widget.h:991
@ OnMouseClick
Definition SlateEnums.h:317
Type
Definition ITypedTableView.h:16
@ None
Definition ITypedTableView.h:18
@ Multi
Definition ITypedTableView.h:27
@ SingleToggle
Definition ITypedTableView.h:24
@ 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 Geometry.h:40
static constexpr UE_FORCEINLINE_HINT T Clamp(const T X, const T MinValue, const T MaxValue)
Definition UnrealMathUtility.h:592
Definition Events.h:695
FORCEINLINE T * Get() const
Definition ObjectPtr.h:664
Definition Optional.h:131
Definition WeakObjectPtrTemplates.h:25
FORCEINLINE T * Get(bool bEvenIfPendingKill) const
Definition WeakObjectPtrTemplates.h:132
FORCEINLINE bool IsValid(bool bEvenIfPendingKill, bool bThreadsafeTest=false) const
Definition WeakObjectPtrTemplates.h:232
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