engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Protected 成员函数 | Protected 属性 | 所有成员列表
SListView< ItemType > 模板类 参考

A ListView widget observes an array of data items and creates visual representations of these items. 更多...

#include <SListView.h>

+ 类 SListView< ItemType > 继承关系图:

Public 成员函数

virtual void AddReferencedObjects (FReferenceCollector &Collector)
 Lists and Trees serialize items that they observe because they rely on the property that holding a reference means it will not be garbage collected. 更多...
 
virtual TSharedRef< SWidget > AsWidget () override
 
void CancelScrollIntoView ()
 Cancels a previous request to scroll an item into view (cancels navigation requests as well).
 
void ClearHighlightedItems ()
 Empty the highlighted item set.
 
void ClearSelection ()
 Empty the selection set.
 
void Construct (const typename SListView< ItemType >::FArguments &InArgs)
 Callback delegate to have first chance handling of the OnKeyDown event 更多...
 
virtual TSharedRef< ITableRow > GenerateNewWidget (ItemType InItem)
 Given an data item, generate a widget corresponding to it. 更多...
 
FVector2D GetMaxRowSizeForColumn (const FName &ColumnId, EOrientation ColumnOrientation)
 Will determine the max row size for the specified column id 更多...
 
virtual int32 GetNumItemsBeingObserved () const override
 
int32 GetNumItemsSelected () const
 Gets the number of selected items. 更多...
 
virtual TArray< ItemType > GetSelectedItems () const override
 Returns a list of selected item indices, or an empty array if nothing is selected 更多...
 
virtual ETableViewMode::Type GetTableViewMode () const override
 
bool IsItemSelected (const ItemType &InItem) const
 Test if the current item is selected. 更多...
 
bool IsItemVisible (ItemType Item) const
 Checks whether the specified item is currently visible in the list view. 更多...
 
const ItemType * ItemFromWidget (const ITableRow *WidgetToFind) const
 Given a Widget, find the corresponding data item. 更多...
 
virtual FReply OnKeyDown (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent) override
 Called after a key is pressed when this widget has focus (this event bubbles if not handled) 更多...
 
virtual FReply OnMouseButtonDown (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent) override
 The system calls this method to notify the widget that a mouse button was pressed within it. 更多...
 
virtual FReply OnMouseButtonUp (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent) override
 The system calls this method to notify the widget that a mouse button was release within it. 更多...
 
virtual FNavigationReply OnNavigation (const FGeometry &MyGeometry, const FNavigationEvent &InNavigationEvent) override
 Called when navigation is requested e.g. 更多...
 
virtual void Private_ClearHighlightedItems ()
 Empty the set of highlighted items.
 
virtual void Private_ClearSelection () override
 Empty the selection set.
 
virtual bool Private_DoesItemHaveChildren (int32 ItemIndexInList) const override
 
virtual int32 Private_GetNestingDepth (int32 ItemIndexInList) const override
 
virtual int32 Private_GetNumSelectedItems () const override
 
virtual EOrientation Private_GetOrientation () const override
 
virtual ESelectionMode::Type Private_GetSelectionMode () const override
 
virtual const TBitArray & Private_GetWiresNeededByDepth (int32 ItemIndexInList) const override
 
virtual bool Private_HasSelectorFocus (const ItemType &TheItem) const override
 Test if the item passed in has selector focus. 更多...
 
virtual bool Private_IsItemExpanded (const ItemType &TheItem) const override
 
virtual bool Private_IsItemHighlighted (const ItemType &TheItem) const override
 Test if the current item should be highlighted. 更多...
 
virtual bool Private_IsItemSelectableOrNavigable (const ItemType &TheItem) const override
 Test if the current item can be selected or navigated to. 更多...
 
virtual bool Private_IsItemSelected (const ItemType &TheItem) const override
 Test if the current item is selected. 更多...
 
virtual bool Private_IsLastChild (int32 ItemIndexInList) const override
 
virtual bool Private_IsPendingRefresh () const override
 Is the list pending a refresh?
 
virtual const ItemType * Private_ItemFromWidget (const ITableRow *TheWidget) const override
 Given a Widget, find the corresponding data item. 更多...
 
virtual void Private_OnExpanderArrowShiftClicked (ItemType TheItem, bool bShouldBeExpanded) override
 Called when the expander arrow for the given item is shift+clicked. 更多...
 
virtual bool Private_OnItemClicked (ItemType TheItem) override
 Called when the item is clicked, and returns whether or not the event was handled
 
virtual bool Private_OnItemDoubleClicked (ItemType TheItem) override
 Called when the item is double-clicked, and returns whether or not the event was handled
 
virtual void Private_OnItemRightClicked (ItemType TheItem, const FPointerEvent &MouseEvent) override
 Called when the item is right-clicked when not right mouse scrolling
 
virtual void Private_SelectRangeFromCurrentTo (ItemType InRangeSelectionEnd) override
 Select a range of items from the current RangeSelectionStart to the SelectorItem Does not cause an OnSelectionChanged()! 更多...
 
virtual void Private_SetItemExpansion (ItemType TheItem, bool bShouldBeExpanded) override
 Set whether some data item is expanded or not. 更多...
 
virtual void Private_SetItemHighlighted (ItemType TheItem, bool bShouldBeHighlighted)
 Enable a soft highlight on the element. 更多...
 
virtual void Private_SetItemSelection (ItemType TheItem, bool bShouldBeSelected, bool bWasUserDirected=false) override
 Set the selection state of an item. 更多...
 
virtual void Private_SignalSelectionChanged (ESelectInfo::Type SelectInfo) override
 Notify the ItemsWidget that we changed its selection. 更多...
 
virtual bool Private_UsesSelectorFocus () const override
 Returns whether the table view uses selector focus. 更多...
 
virtual void RebuildList () override
 Completely wipe existing widgets and fully regenerate them on next tick.
 
virtual FReGenerateResults ReGenerateItems (const FGeometry &MyGeometry) override
 Update generate Widgets for Items as needed and clean up any Widgets that are no longer needed. 更多...
 
void RequestNavigateToItem (ItemType Item, const uint32 UserIndex=0)
 Navigate to a specific item, scrolling it into view if needed. 更多...
 
void RequestScrollIntoView (ItemType ItemToView, const uint32 UserIndex=0)
 Scroll an item into view. 更多...
 
void SetItemHighlighted (const ItemType &TheItem, bool bHighlighted)
 Set the highlighted state of an item. 更多...
 
void SetItemSelection (const ItemType &InItem, bool bSelected, ESelectInfo::Type SelectInfo=ESelectInfo::Direct)
 Set the selection state of an item. 更多...
 
void SetItemSelection (const TArray< ItemType > &InItems, bool bSelected, ESelectInfo::Type SelectInfo=ESelectInfo::Direct)
 Set the selection state of multiple items. 更多...
 
void SetListItemsSource (const TArray< ItemType > &InListItemsSource)
 Establishes a wholly new list of items being observed by the list. 更多...
 
void SetOnEntryInitialized (const FOnEntryInitialized &Delegate)
 Sets the OnEntryInitializer delegate. 更多...
 
void SetSelection (ItemType SoleSelectedItem, ESelectInfo::Type SelectInfo=ESelectInfo::Direct)
 Set the currently selected Item. 更多...
 
void SetSelectionMode (const TAttribute< ESelectionMode::Type > &NewSelectionMode)
 Set the current selection mode of the list. 更多...
 
 SLATE_EVENT (FOnTableViewBadState, OnEnteredBadState)
 Assign this to get more diagnostics from the list view.
 
virtual bool SupportsKeyboardFocus () const override
 Checks to see if this widget supports keyboard focus. 更多...
 
virtual void UpdateSelectionSet () override
 Remove any items that are no longer in the list from the selection set.
 
virtual TSharedPtr< ITableRow > WidgetFromItem (const ItemType &InItem) const override
 Find a widget for this item if it has already been constructed. 更多...
 
- Public 成员函数 继承自 STableViewBase
void AddScrollOffset (const float InScrollOffsetDelta, bool RefreshList=false)
 Add the scroll offset of this view (in items)
 
void ConstructChildren (const TAttribute< float > &InItemWidth, const TAttribute< float > &InItemHeight, const TAttribute< EListItemAlignment > &InItemAlignment, const TSharedPtr< SHeaderRow > &InHeaderRow, const TSharedPtr< SScrollBar > &InScrollBar, EOrientation InScrollOrientation, const FOnTableViewScrolled &InOnTableViewScrolled)
 Create the child widgets that comprise the list
 
void EndInertialScrolling ()
 Reset the inertial scroll velocity accumulated in the InertialScrollManager
 
int32 GetNumGeneratedChildren () const
 
virtual FVector2D GetScrollDistance () override
 Gets the distance that user has scrolled into the control in normalized coordinates (0 - 1)
 
virtual FVector2D GetScrollDistanceRemaining () override
 Gets the distance that user has left to scroll in the control before reaching the end in normalized coordinates (0 - 1)
 
float GetScrollOffset () const
 Gets the scroll offset of this view (in items)
 
virtual TSharedRef< class SWidget > GetScrollWidget () override
 Returns the typed SWidget that implements this interface
 
bool IsPendingRefresh () const
 Return true if there is currently a refresh pending, false otherwise
 
bool IsRightClickScrolling () const
 
bool IsUserScrolling () const
 
virtual FCursorReply OnCursorQuery (const FGeometry &MyGeometry, const FPointerEvent &CursorEvent) const override
 The system asks each widget under the mouse to provide a cursor. 更多...
 
virtual void OnFocusLost (const FFocusEvent &InFocusEvent) override
 Called when this widget loses focus. 更多...
 
virtual FReply OnKeyDown (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent) override
 Called after a key is pressed when this widget has focus (this event bubbles if not handled) 更多...
 
virtual FReply OnMouseButtonDoubleClick (const FGeometry &InMyGeometry, const FPointerEvent &InMouseEvent) override
 Called when a mouse button is double clicked. 更多...
 
virtual FReply OnMouseButtonDown (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent) override
 The system calls this method to notify the widget that a mouse button was pressed within it. 更多...
 
virtual FReply OnMouseButtonUp (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent) override
 The system calls this method to notify the widget that a mouse button was release within it. 更多...
 
virtual void OnMouseCaptureLost (const FCaptureLostEvent &CaptureLostEvent) override
 Called when this widget had captured the mouse, but that capture has been revoked for some reason.
 
virtual void OnMouseEnter (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent) override
 The system will use this event to notify a widget that the cursor has entered it. 更多...
 
virtual void OnMouseLeave (const FPointerEvent &MouseEvent) override
 The system will use this event to notify a widget that the cursor has left it. 更多...
 
virtual FReply OnMouseMove (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent) override
 The system calls this method to notify the widget that a mouse moved within it. 更多...
 
virtual FReply OnMouseWheel (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent) override
 Called when the mouse wheel is spun. 更多...
 
virtual int32 OnPaint (const FPaintArgs &Args, const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) const override
 The widget should respond by populating the OutDrawElements array with FDrawElements that represent it and any of its children. 更多...
 
virtual FReply OnPreviewMouseButtonDown (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent) override
 Just like OnMouseButtonDown, but tunnels instead of bubbling. 更多...
 
virtual FReply OnTouchEnded (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent) override
 Called when a touchpad touch is ended (finger lifted) 更多...
 
virtual FReply OnTouchMoved (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent) override
 Called when a touchpad touch is moved (finger moved) 更多...
 
virtual FReply OnTouchStarted (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent) override
 Called when a touchpad touch is started (finger down) 更多...
 
virtual void RebuildList ()=0
 Completely wipe existing widgets and fully regenerate them on next tick.
 
virtual void RequestListRefresh ()
 Mark the list as dirty so that it will refresh its widgets on next tick. 更多...
 
void ScrollBar_OnUserScrolled (float InScrollOffsetFraction)
 Invoked by the scrollbar when the user scrolls. 更多...
 
void ScrollToBottom ()
 Scrolls the view to the bottom
 
void ScrollToTop ()
 Scrolls the view to the top
 
void SetFixedLineScrollOffset (TOptional< double > InFixedLineScrollOffset)
 Sets the fixed offset in items to always apply to the top/left (depending on orientation) of the list.
 
void SetIsScrollAnimationEnabled (bool bInEnableScrollAnimation)
 Sets whether the list should lerp between scroll offsets or jump instantly between them.
 
void SetItemHeight (TAttribute< float > Height)
 Sets the item height
 
void SetItemWidth (TAttribute< float > Width)
 Sets the item width
 
void SetScrollOffset (const float InScrollOffset)
 Set the scroll offset of this view (in items)
 
void SetWheelScrollMultiplier (float NewWheelScrollMultiplier)
 Sets the multiplier applied when wheel scrolling. 更多...
 
virtual bool SupportsKeyboardFocus () const override
 Checks to see if this widget supports keyboard focus. 更多...
 
virtual void Tick (const FGeometry &AllottedGeometry, const double InCurrentTime, const float InDeltaTime) override
 Ticks this widget with Geometry. 更多...
 
- Public 成员函数 继承自 SCompoundWidget
virtual FChildren * GetChildren () override
 Every widget that has children must implement this method. 更多...
 
FLinearColor GetColorAndOpacity () const
 Gets the widget's color.
 
const FVector2D GetContentScale () const
 Returns the size scaling factor for this widget. 更多...
 
virtual FSlateColor GetForegroundColor () const override
 
virtual void OnArrangeChildren (const FGeometry &AllottedGeometry, FArrangedChildren &ArrangedChildren) const override
 Compute the Geometry of all the children and add populate the ArrangedChildren list with their values. 更多...
 
virtual int32 OnPaint (const FPaintArgs &Args, const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) const override
 The widget should respond by populating the OutDrawElements array with FDrawElements that represent it and any of its children. 更多...
 
void SetColorAndOpacity (const TAttribute< FLinearColor > &InColorAndOpacity)
 Sets the widget's color. 更多...
 
void SetContentScale (const TAttribute< FVector2D > &InContentScale)
 Sets the content scale for this widget. 更多...
 
void SetForegroundColor (const TAttribute< FSlateColor > &InForegroundColor)
 Sets the widget's foreground color. 更多...
 
virtual void SetVisibility (TAttribute< EVisibility > InVisibility) override final
 
- Public 成员函数 继承自 SWidget
template<typename MetaDataType >
void AddMetadata (const TSharedRef< MetaDataType > &AddMe)
 Add metadata to this widget. 更多...
 
virtual bool Advanced_IsWindow () const
 Is this widget derivative of SWindow
 
void ArrangeChildren (const FGeometry &AllottedGeometry, FArrangedChildren &ArrangedChildren) const
 Non-virtual entry point for arrange children. 更多...
 
FORCEINLINE void CacheVolatility ()
 Recalculates volatility of the widget and caches the result. 更多...
 
FSlateRect CalculateCullingAndClippingRules (const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, bool &bClipToBounds, bool &bAlwaysClip, bool &bIntersectClipBounds) const
 Calculates what if any clipping state changes need to happen when drawing this widget. 更多...
 
void Construct (const TAttribute< FText > &InToolTipText, const TSharedPtr< IToolTip > &InToolTip, const TAttribute< TOptional< EMouseCursor::Type > > &InCursor, const TAttribute< bool > &InEnabledState, const TAttribute< EVisibility > &InVisibility, const float InRenderOpacity, const TAttribute< TOptional< FSlateRenderTransform > > &InTransform, const TAttribute< FVector2D > &InTransformPivot, const FName &InTag, const bool InForceVolatile, const EWidgetClipping InClipping, const EFlowDirectionPreference InFlowPreference, const TOptional< FAccessibleWidgetData > &InAccessibleData, const TArray< TSharedRef< ISlateMetaData > > &InMetaData)
 Construct a SWidget based on initial parameters.
 
void EnableToolTipForceField (const bool bEnableForceField)
 Sets whether this widget is a "tool tip force field". 更多...
 
FORCEINLINE void ForceVolatile (bool bForce)
 Should this widget always appear as volatile for any layout caching host widget. 更多...
 
template<typename MetaDataType >
TArray< TSharedRef< MetaDataType > > GetAllMetaData () const
 Get all metadata of the type provided. 更多...
 
virtual FChildren * GetChildren ()=0
 Every widget that has children must implement this method. 更多...
 
FORCEINLINE EWidgetClipping GetClipping () const
 
FName GetCreatedInLocation () const
 
FORCEINLINE FMargin GetCullingBoundsExtension () const
 
const TOptional< FSlateClippingState > & GetCurrentClippingState () const
 Returns the clipping state to clip this widget against its parent
 
FVector2D GetDesiredSize () const
 
EFlowDirectionPreference GetFlowDirectionPreference () const
 Gets the desired flow direction for the layout.
 
virtual FSlateColor GetForegroundColor () const
 
template<typename MetaDataType >
TSharedPtr< MetaDataType > GetMetaData () const
 Get the metadata of the type provided. 更多...
 
const FGeometry & GetPaintSpaceGeometry () const
 Gets the last geometry used to Tick the widget. 更多...
 
virtual FString GetReadableLocation () const
 
virtual float GetRelativeLayoutScale (const int32 ChildIndex, float LayoutScaleMultiplier) const
 What is the Child's scale relative to this widget.
 
FORCEINLINE float GetRenderOpacity () const
 
FORCEINLINE const TOptional< FSlateRenderTransform > & GetRenderTransform () const
 
FORCEINLINE FVector2D GetRenderTransformPivot () const
 
virtual FName GetTag () const
 
const FGeometry & GetTickSpaceGeometry () const
 Gets the last geometry used to Tick the widget. 更多...
 
virtual TSharedPtr< IToolTip > GetToolTip ()
 
FName GetType () const
 
FString GetTypeAsString () const
 
FORCEINLINE EVisibility GetVisibility () const
 
virtual EWindowZone::Type GetWindowZoneOverride () const
 Called when the mouse is moved over the widget's window, to determine if we should report whether OS-specific features should be active at this location (such as a title bar grip, system menu, etc.) Usually you should not need to override this function. 更多...
 
bool HasActiveTimers () const
 Does this widget have any active timers?
 
TOptional< EFocusCause > HasAnyUserFocus () const
 Gets whether or not any users have this widget focused, and if so the type of focus (first one found). 更多...
 
bool HasAnyUserFocusOrFocusedDescendants () const
 
bool HasFocusedDescendants () const
 
virtual bool HasKeyboardFocus () const
 Checks to see if this widget currently has the keyboard focus 更多...
 
bool HasMouseCapture () const
 Checks to see if this widget is the current mouse captor 更多...
 
bool HasMouseCaptureByUser (int32 UserIndex, TOptional< int32 > PointerIndex=TOptional< int32 >()) const
 Checks to see if this widget has mouse capture from the provided user. 更多...
 
bool HasToolTipForceField () const
 
TOptional< EFocusCause > HasUserFocus (int32 UserIndex) const
 Gets whether or not the specified users has this widget focused, and if so the type of focus. 更多...
 
bool HasUserFocusedDescendants (int32 UserIndex) const
 Gets whether or not the specified users has this widget or any descendant focused. 更多...
 
void Invalidate (EInvalidateWidgetReason InvalidateReason)
 Invalidates the widget from the view of a layout caching widget that may own this widget. 更多...
 
virtual bool IsDirectlyHovered () const
 
FORCEINLINE bool IsEnabled () const
 
virtual bool IsHovered () const
 
virtual bool IsInteractable () const
 
FORCEINLINE bool IsVolatile () const
 Whether or not a widget is volatile and will update every frame without being invalidated
 
FORCEINLINE bool IsVolatileIndirectly () const
 This widget is volatile because its parent or some ancestor is volatile
 
virtual FReply OnAnalogValueChanged (const FGeometry &MyGeometry, const FAnalogInputEvent &InAnalogInputEvent)
 Called when an analog value changes on a button that supports analog 更多...
 
virtual FCursorReply OnCursorQuery (const FGeometry &MyGeometry, const FPointerEvent &CursorEvent) const
 The system asks each widget under the mouse to provide a cursor. 更多...
 
virtual FReply OnDragDetected (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 Called when Slate detects that a widget started to be dragged. 更多...
 
virtual void OnDragEnter (const FGeometry &MyGeometry, const FDragDropEvent &DragDropEvent)
 Called during drag and drop when the drag enters a widget. 更多...
 
virtual void OnDragLeave (const FDragDropEvent &DragDropEvent)
 Called during drag and drop when the drag leaves a widget. 更多...
 
virtual FReply OnDragOver (const FGeometry &MyGeometry, const FDragDropEvent &DragDropEvent)
 Called during drag and drop when the the mouse is being dragged over a widget. 更多...
 
virtual FReply OnDrop (const FGeometry &MyGeometry, const FDragDropEvent &DragDropEvent)
 Called when the user is dropping something onto a widget; terminates drag and drop. 更多...
 
virtual void OnFinishedKeyInput ()
 All the key (keyboard, gamepay, joystick, etc.) input from this frame has been routed. 更多...
 
virtual void OnFinishedPointerInput ()
 All the pointer (mouse, touch, stylus, etc.) events from this frame have been routed. 更多...
 
virtual void OnFocusChanging (const FWeakWidgetPath &PreviousFocusPath, const FWidgetPath &NewWidgetPath)
 Called whenever a focus path is changing on all the widgets within the old and new focus paths
 
virtual void OnFocusChanging (const FWeakWidgetPath &PreviousFocusPath, const FWidgetPath &NewWidgetPath, const FFocusEvent &InFocusEvent)
 Called whenever a focus path is changing on all the widgets within the old and new focus paths
 
virtual void OnFocusLost (const FFocusEvent &InFocusEvent)
 Called when this widget loses focus. 更多...
 
virtual FReply OnFocusReceived (const FGeometry &MyGeometry, const FFocusEvent &InFocusEvent)
 Called when focus is given to this widget. 更多...
 
virtual FReply OnKeyChar (const FGeometry &MyGeometry, const FCharacterEvent &InCharacterEvent)
 Called after a character is entered while this widget has keyboard focus 更多...
 
virtual FReply OnKeyDown (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent)
 Called after a key is pressed when this widget has focus (this event bubbles if not handled) 更多...
 
virtual FReply OnKeyUp (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent)
 Called after a key is released when this widget has focus 更多...
 
virtual TOptional< TSharedRef< SWidget > > OnMapCursor (const FCursorReply &CursorReply) const
 After OnCursorQuery has specified a cursor type the system asks each widget under the mouse to map that cursor to a widget. 更多...
 
virtual FReply OnMotionDetected (const FGeometry &MyGeometry, const FMotionEvent &InMotionEvent)
 Called when motion is detected (controller or device) e.g. 更多...
 
virtual FReply OnMouseButtonDoubleClick (const FGeometry &InMyGeometry, const FPointerEvent &InMouseEvent)
 Called when a mouse button is double clicked. 更多...
 
virtual FReply OnMouseButtonDown (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 The system calls this method to notify the widget that a mouse button was pressed within it. 更多...
 
virtual FReply OnMouseButtonUp (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 The system calls this method to notify the widget that a mouse button was release within it. 更多...
 
virtual void OnMouseCaptureLost (const FCaptureLostEvent &CaptureLostEvent)
 Called when this widget had captured the mouse, but that capture has been revoked for some reason.
 
virtual void OnMouseEnter (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 The system will use this event to notify a widget that the cursor has entered it. 更多...
 
virtual void OnMouseLeave (const FPointerEvent &MouseEvent)
 The system will use this event to notify a widget that the cursor has left it. 更多...
 
virtual FReply OnMouseMove (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 The system calls this method to notify the widget that a mouse moved within it. 更多...
 
virtual FReply OnMouseWheel (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 Called when the mouse wheel is spun. 更多...
 
virtual FNavigationReply OnNavigation (const FGeometry &MyGeometry, const FNavigationEvent &InNavigationEvent)
 Called when navigation is requested e.g. 更多...
 
virtual FReply OnPreviewKeyDown (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent)
 Called after a key is pressed when this widget or a child of this widget has focus If a widget handles this event, OnKeyDown will not be passed to the focused widget. 更多...
 
virtual FReply OnPreviewMouseButtonDown (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 Just like OnMouseButtonDown, but tunnels instead of bubbling. 更多...
 
virtual FPopupMethodReply OnQueryPopupMethod () const
 Popups can manifest in a NEW OS WINDOW or via an OVERLAY in an existing window. 更多...
 
virtual TOptional< bool > OnQueryShowFocus (const EFocusCause InFocusCause) const
 Called to determine if we should render the focus brush. 更多...
 
virtual void OnToolTipClosing ()
 Called when a tooltip displayed from this widget is being closed
 
virtual FReply OnTouchEnded (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 Called when a touchpad touch is ended (finger lifted) 更多...
 
virtual FReply OnTouchFirstMove (const FGeometry &MyGeometry, const FPointerEvent &TouchEvent)
 Called when a touchpad touch first moves after TouchStarted 更多...
 
virtual FReply OnTouchForceChanged (const FGeometry &MyGeometry, const FPointerEvent &TouchEvent)
 Called when a touchpad touch force changes 更多...
 
virtual FReply OnTouchGesture (const FGeometry &MyGeometry, const FPointerEvent &GestureEvent)
 Called when the user performs a gesture on trackpad. 更多...
 
virtual FReply OnTouchMoved (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 Called when a touchpad touch is moved (finger moved) 更多...
 
virtual FReply OnTouchStarted (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 Called when a touchpad touch is started (finger down) 更多...
 
virtual TSharedPtr< FPopupLayer > OnVisualizePopup (const TSharedRef< SWidget > &PopupContent)
 Visualize a new pop-up if possible. 更多...
 
virtual bool OnVisualizeTooltip (const TSharedPtr< SWidget > &TooltipContent)
 Called when Slate wants to visualize tooltip. 更多...
 
int32 Paint (const FPaintArgs &Args, const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) const
 Called to tell a widget to paint itself (and it's children). 更多...
 
TSharedRef< FActiveTimerHandle > RegisterActiveTimer (float TickPeriod, FWidgetActiveTimerDelegate TickFunction)
 Registers an "active timer" delegate that will execute at some regular interval. 更多...
 
FORCEINLINE void SetClipping (EWidgetClipping InClipping)
 Sets the clipping to bounds rules for this widget.
 
FORCEINLINE void SetCullingBoundsExtension (const FMargin &InCullingBoundsExtension)
 Sets an additional culling padding that is added to a widget to give more leeway when culling widgets. 更多...
 
void SetCursor (const TAttribute< TOptional< EMouseCursor::Type > > &InCursor)
 Set the cursor that should appear when this widget is hovered
 
void SetDebugInfo (const ANSICHAR *InType, const ANSICHAR *InFile, int32 OnLine, size_t InAllocSize)
 Used by Slate to set the runtime debug info about this widget.
 
void SetEnabled (const TAttribute< bool > &InEnabledState)
 Sets the enabled state of this widget 更多...
 
void SetFlowDirectionPreference (EFlowDirectionPreference InFlowDirectionPreference)
 Sets how content should flow in this panel, based on the current culture. 更多...
 
void SetOnMouseButtonDown (FPointerEventHandler EventHandler)
 See OnMouseButtonDown event
 
void SetOnMouseButtonUp (FPointerEventHandler EventHandler)
 See OnMouseButtonUp event
 
void SetOnMouseDoubleClick (FPointerEventHandler EventHandler)
 See OnMouseDoubleClick event
 
void SetOnMouseEnter (FNoReplyPointerEventHandler EventHandler)
 See OnMouseEnter event
 
void SetOnMouseLeave (FSimpleNoReplyPointerEventHandler EventHandler)
 See OnMouseLeave event
 
void SetOnMouseMove (FPointerEventHandler EventHandler)
 See OnMouseMove event
 
FORCEINLINE void SetRenderOpacity (float InRenderOpacity)
 
FORCEINLINE void SetRenderTransform (TAttribute< TOptional< FSlateRenderTransform > > InTransform)
 
FORCEINLINE void SetRenderTransformPivot (TAttribute< FVector2D > InTransformPivot)
 
void SetToolTip (const TSharedPtr< IToolTip > &InToolTip)
 Set the tool tip that should appear when this widget is hovered. 更多...
 
void SetToolTipText (const TAttribute< FText > &ToolTipText)
 Set the tool tip that should appear when this widget is hovered. 更多...
 
virtual void SetVisibility (TAttribute< EVisibility > InVisibility)
 
void SlatePrepass ()
 DEPRECATED version of SlatePrepass that assumes no scaling beyond AppScale
 
void SlatePrepass (float InLayoutScaleMultiplier)
 Descends to leaf-most widgets in the hierarchy and gathers desired sizes on the way up. 更多...
 
virtual bool SupportsKeyboardFocus () const
 Checks to see if this widget supports keyboard focus. 更多...
 
virtual void Tick (const FGeometry &AllottedGeometry, const double InCurrentTime, const float InDeltaTime)
 Ticks this widget with Geometry. 更多...
 
virtual FString ToString () const
 
void UnRegisterActiveTimer (const TSharedRef< FActiveTimerHandle > &ActiveTimerHandle)
 Unregisters an active timer handle. 更多...
 
- Public 成员函数 继承自 TSharedFromThis< SWidget >
TSharedRef< SWidget, Mode > AsShared ()
 Provides access to a shared reference to this object. 更多...
 
TSharedRef< SWidget const, Mode > AsShared () const
 Provides access to a shared reference to this object (const.) Note that is only valid to call this after a shared reference (or shared pointer) to the object has already been created. 更多...
 
FORCEINLINE bool DoesSharedInstanceExist () const
 Checks whether our referenced instance is valid (ie, whether it's safe to call AsShared). 更多...
 
FORCEINLINE void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, Mode > const *InSharedPtr, OtherType *InObject) const
 INTERNAL USE ONLY – Do not call this method. 更多...
 
FORCEINLINE void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, Mode > const *InSharedRef, OtherType *InObject) const
 INTERNAL USE ONLY – Do not call this method. 更多...
 
virtual FVector2D GetScrollDistance ()=0
 Gets the distance that user has scrolled into the control in normalized coordinates (0 - 1)
 
virtual FVector2D GetScrollDistanceRemaining ()=0
 Gets the distance that user has left to scroll in the control before reaching the end in normalized coordinates (0 - 1)
 
virtual TSharedRef< class SWidget > GetScrollWidget ()=0
 Returns the typed SWidget that implements this interface
 
virtual TSharedRef< SWidget > AsWidget ()=0
 
virtual TArray< ItemType > GetSelectedItems () const =0
 
virtual ETableViewMode::Type GetTableViewMode () const =0
 
virtual void Private_ClearHighlightedItems ()=0
 Empty the set of highlighted items.
 
virtual void Private_ClearSelection ()=0
 Empty the selection set.
 
virtual bool Private_DoesItemHaveChildren (int32 ItemIndexInList) const =0
 
virtual int32 Private_GetNestingDepth (int32 ItemIndexInList) const =0
 
virtual int32 Private_GetNumSelectedItems () const =0
 
virtual EOrientation Private_GetOrientation () const =0
 
virtual ESelectionMode::Type Private_GetSelectionMode () const =0
 
virtual const TBitArray & Private_GetWiresNeededByDepth (int32 ItemIndexInList) const =0
 
virtual bool Private_HasSelectorFocus (const ItemType &TheItem) const =0
 Test if the item passed in has selector focus. 更多...
 
virtual bool Private_IsItemExpanded (const ItemType &TheItem) const =0
 
virtual bool Private_IsItemHighlighted (const ItemType &TheItem) const =0
 Test if the current item should be highlighted. 更多...
 
virtual bool Private_IsItemSelectableOrNavigable (const ItemType &TheItem) const =0
 Test if the current item can be selected or navigated to. 更多...
 
virtual bool Private_IsItemSelected (const ItemType &TheItem) const =0
 Test if the current item is selected. 更多...
 
virtual bool Private_IsLastChild (int32 ItemIndexInList) const =0
 
virtual bool Private_IsPendingRefresh () const =0
 Is the list pending a refresh?
 
virtual const ItemType * Private_ItemFromWidget (const ITableRow *TheWidget) const =0
 Given a Widget, find the corresponding data item. 更多...
 
virtual void Private_OnExpanderArrowShiftClicked (ItemType TheItem, bool bShouldBeExpanded)=0
 Called when the expander arrow for the given item is shift+clicked. 更多...
 
virtual bool Private_OnItemClicked (ItemType TheItem)=0
 Called when the item is clicked, and returns whether or not the event was handled
 
virtual bool Private_OnItemDoubleClicked (ItemType TheItem)=0
 Called when the item is double-clicked, and returns whether or not the event was handled
 
virtual void Private_OnItemRightClicked (ItemType TheItem, const FPointerEvent &MouseEvent)=0
 Called when the item is right-clicked when not right mouse scrolling
 
virtual void Private_SelectRangeFromCurrentTo (ItemType SelectorItem)=0
 Select a range of items from the current RangeSelectionStart to the SelectorItem Does not cause an OnSelectionChanged()! 更多...
 
virtual void Private_SetItemExpansion (ItemType TheItem, bool bShouldBeExpanded)=0
 Set whether some data item is expanded or not. 更多...
 
virtual void Private_SetItemHighlighted (ItemType TheItem, bool bShouldBeHighlighted)=0
 Enable a soft highlight on the element. 更多...
 
virtual void Private_SetItemSelection (ItemType TheItem, bool bShouldBeSelected, bool bWasUserDirected=false)=0
 Set the selection state of an item. 更多...
 
virtual void Private_SignalSelectionChanged (ESelectInfo::Type SelectInfo)=0
 Notify the ItemsWidget that we changed its selection. 更多...
 
virtual bool Private_UsesSelectorFocus () const =0
 Returns whether the table view uses selector focus. 更多...
 
virtual TSharedPtr< ITableRow > WidgetFromItem (const ItemType &InItem) const =0
 Find a widget for this item if it has already been constructed. 更多...
 

Protected 成员函数

virtual void NavigationSelect (const ItemType &InItemToSelect, const FInputEvent &InInputEvent)
 Selects the specified item and scrolls it into view. 更多...
 
virtual void NotifyItemScrolledIntoView () override
 Called when an item has entered the visible geometry to check to see if the ItemScrolledIntoView delegate should be fired.
 
virtual float ScrollBy (const FGeometry &MyGeometry, float ScrollByAmountInSlateUnits, EAllowOverscroll InAllowOverscroll) override
 Scroll the list view by some number of screen units. 更多...
 
virtual EScrollIntoViewResult ScrollIntoView (const FGeometry &ListViewGeometry) override
 If there is a pending request to scroll an item into view, do so. 更多...
 
- Protected 成员函数 继承自 STableViewBase
void AppendWidget (const TSharedRef< ITableRow > &WidgetToAppend)
 Add a WidgetToAppend to the bottom of the view.
 
bool CanUseInertialScroll (float ScrollAmount) const
 Check whether the current state of the table warrants inertial scroll by the specified amount
 
void ClearWidgets ()
 Remove all the widgets from the view.
 
EActiveTimerReturnType EnsureTickToRefresh (double InCurrentTime, float InDeltaTime)
 One-off active timer to refresh the contents of the table as needed
 
float GetItemHeight () const
 Get the uniform item height that is enforced by ListViews.
 
FVector2D GetItemSize () const
 Get the uniform item
 
float GetItemWidth () const
 Get the uniform item width.
 
virtual int32 GetNumItemsBeingObserved () const =0
 
virtual int32 GetNumItemsPerLine () const
 Get the number of items that can fit in the view along the line axis (orthogonal to the scroll axis) before creating a new line. 更多...
 
virtual float GetNumLiveWidgets () const
 
float GetScrollRateInItems () const
 Get the scroll rate in items that best approximates a constant physical scroll rate.
 
double GetTargetScrollOffset () const
 Returns the "true" scroll offset where the list will ultimately settle (and may already be).
 
void InsertWidget (const TSharedRef< ITableRow > &WidgetToInset)
 Insert WidgetToInsert at the top of the view.
 
void NavigateToWidget (const uint32 UserIndex, const TSharedPtr< SWidget > &NavigationDestination, ENavigationSource NavigationSource=ENavigationSource::FocusedWidget) const
 Util Function so templates classes don't need to include SlateApplication
 
virtual void NotifyItemScrolledIntoView ()=0
 Called when an item has entered the visible geometry to check to see if the ItemScrolledIntoView delegate should be fired.
 
virtual void OnClippingChanged () override
 Passing over the clipping to SListPanel
 
virtual void OnRightMouseButtonUp (const FPointerEvent &MouseEvent)
 Opens a context menu as the result of a right click if OnContextMenuOpening is bound and we are not right click scrolling.
 
virtual FReGenerateResults ReGenerateItems (const FGeometry &MyGeometry)=0
 Update generate Widgets for Items as needed and clean up any Widgets that are no longer needed. 更多...
 
void RequestLayoutRefresh ()
 Internal request for a layout update on the next tick (i.e. 更多...
 
virtual float ScrollBy (const FGeometry &MyGeometry, float ScrollByAmount, EAllowOverscroll InAllowOverscroll)
 Scroll the list view by some number of screen units. 更多...
 
virtual EScrollIntoViewResult ScrollIntoView (const FGeometry &ListViewGeometry)=0
 If there is a pending request to scroll an item into view, do so. 更多...
 
virtual float ScrollTo (float InScrollOffset)
 Scroll the view to an offset and resets the inertial scroll velocity 更多...
 
EActiveTimerReturnType UpdateInertialScroll (double InCurrentTime, float InDeltaTime)
 Active timer to update the inertial scroll
 
virtual void UpdateSelectionSet ()=0
 Remove any items that are no longer in the list from the selection set.
 
- Protected 成员函数 继承自 SCompoundWidget
virtual FVector2D ComputeDesiredSize (float) const override
 Compute the ideal size necessary to display this widget. 更多...
 
 SCompoundWidget ()
 Disallow public construction
 
- Protected 成员函数 继承自 SWidget
FORCEINLINE bool Advanced_InvalidateVolatility ()
 Recalculates and caches volatility and returns 'true' if the volatility changed.
 
virtual void CacheDesiredSize (float InLayoutScaleMultiplier)
 The system calls this method. 更多...
 
virtual FVector2D ComputeDesiredSize (float LayoutScaleMultiplier) const =0
 Compute the ideal size necessary to display this widget. 更多...
 
EFlowDirection ComputeFlowDirection () const
 Establishes a new flow direction potentially, if this widget has a particular preference for it and all its children.
 
virtual bool ComputeVolatility () const
 Recomputes the volatility of the widget. 更多...
 
bool FindChildGeometries (const FGeometry &MyGeometry, const TSet< TSharedRef< SWidget > > &WidgetsToFind, TMap< TSharedRef< SWidget >, FArrangedWidget > &OutResult) const
 Find the geometry of a descendant widget. 更多...
 
void FindChildGeometries_Helper (const FGeometry &MyGeometry, const TSet< TSharedRef< SWidget > > &WidgetsToFind, TMap< TSharedRef< SWidget >, FArrangedWidget > &OutResult) const
 Actual implementation of FindChildGeometries. 更多...
 
FGeometry FindChildGeometry (const FGeometry &MyGeometry, TSharedRef< SWidget > WidgetToFind) const
 Find the geometry of a descendant widget. 更多...
 
virtual const FSlateBrush * GetFocusBrush () const
 
void InvalidateChildRemovedFromTree (SWidget &Child)
 Called when a child is removed from the tree parent's widget tree either by removing it from a slot. 更多...
 
virtual void OnClippingChanged ()
 Called when clipping is changed. 更多...
 
void OnMouseCaptureLost ()
 Called when this widget had captured the mouse, but that capture has been revoked for some reason.
 
template<typename TargetValueType , typename SourceValueType >
bool SetAttribute (TAttribute< TargetValueType > &TargetValue, const TAttribute< SourceValueType > &SourceValue, EInvalidateWidgetReason BaseInvalidationReason)
 Performs the attribute assignment and invalidates the widget minimally based on what actually changed. 更多...
 
bool ShouldBeEnabled (bool InParentEnabled) const
 Determines if this widget should be enabled. 更多...
 
 SWidget ()
 Hidden default constructor. 更多...
 
virtual ~SWidget ()
 Dtor ensures that active timer handles are UnRegistered with the SlateApplication.
 
- Protected 成员函数 继承自 TSharedFromThis< SWidget >
FORCEINLINE TSharedFromThis & operator= (TSharedFromThis const &)
 Hidden stub assignment operator
 
 TSharedFromThis ()
 Hidden stub constructor
 
 TSharedFromThis (TSharedFromThis const &)
 Hidden stub copy constructor
 
 ~TSharedFromThis ()
 Hidden destructor
 

Protected 属性

bool bClearSelectionOnClick
 If true, the selection will be cleared if the user clicks in empty space (not on an item)
 
bool bHandleDirectionalNavigation
 Should directional nav be supported
 
bool bHandleGamepadEvents
 Should gamepad nav be supported
 
bool bNavigateOnScrollIntoView = false
 If true, the item currently slated to be scrolled into view will also be navigated to after being scrolled in
 
bool bReturnFocusToSelection
 If true, the focus will be returned to the last selected object in a list when navigated to.
 
TItemSet HighlightedItems
 A set of which items should be highlighted
 
TAttribute< bool > IsFocusable
 True when the list view supports keyboard focus
 
const TArray< ItemType > * ItemsSource
 Pointer to the array of data items that we are observing
 
NullableItemType ItemToNotifyWhenInView
 When set, the list will notify this item when it has been scrolled into view
 
NullableItemType ItemToScrollIntoView
 When not null, the list will try to scroll to this item on tick.
 
float NavigationScrollOffset = 0.5f
 The additional scroll offset (in items) to show when navigating to rows at the edge of the visible area (i.e. 更多...
 
FOnMouseButtonClick OnClick
 Called when the user clicks on an element int he list view with the left mouse button
 
FOnMouseButtonDoubleClick OnDoubleClick
 Called when the user double-clicks on an element in the list view with the left mouse button
 
FOnTableViewBadState OnEnteredBadState
 Invoked when the tree enters a bad state.
 
FOnEntryInitialized OnEntryInitialized
 Invoked after initializing an entry being generated, before it may be added to the actual widget hierarchy.
 
FOnGenerateRow OnGenerateRow
 Delegate to be invoked when the list needs to generate a new widget from a data item.
 
FIsSelectableOrNavigable OnIsSelectableOrNavigable
 Delegate to invoke to see if we can navigate or select item.
 
FOnItemScrolledIntoView OnItemScrolledIntoView
 Delegate to be invoked when an item has come into view after it was requested to come into view.
 
FOnItemToString_Debug OnItemToString_Debug
 Assign this to get more diagnostics from the list view.
 
FOnSelectionChanged OnSelectionChanged
 Delegate to invoke when selection changes.
 
NullableItemType RangeSelectionStart
 The item which was last manipulated; used as a start for shift-click selection
 
TItemSet SelectedItems
 A set of selected data items
 
NullableItemType SelectorItem
 The item to manipulate selection for
 
uint32 UserRequestingScrollIntoView
 The user index requesting the item to be scrolled into view.
 
FWidgetGenerator WidgetGenerator
 A widget generator component
 
- Protected 属性 继承自 STableViewBase
EAllowOverscroll AllowOverscroll
 Whether to permit overscroll on this list view
 
float AmountScrolledWhileRightMouseDown
 How much we scrolled while the rmb has been held
 
bool bEnableAnimatedScrolling = false
 True to lerp smoothly between offsets when the desired scroll offset changes.
 
bool bIsScrollingActiveTimerRegistered
 Whether the active timer to update the inertial scrolling is currently registered
 
bool bShowSoftwareCursor
 Whether the software cursor should be drawn in the viewport
 
bool bStartedTouchInteraction
 Did the user start an interaction in this list?
 
bool bWasAtEndOfList
 Last time we scrolled, did we end up at the end of the list.
 
EConsumeMouseWheel ConsumeMouseWheel
 How we should handle scrolling with the mouse wheel
 
double CurrentScrollOffset = 0.
 The currently displayed scroll offset from the beginning of the list in items.
 
double DesiredScrollOffset = 0.
 The raw desired scroll offset from the beginning of the list in items. 更多...
 
TOptional< double > FixedLineScrollOffset
 The fixed offset in lines to always apply to the top/left (depending on orientation) of the list. 更多...
 
TSharedPtr< SHeaderRow > HeaderRow
 Column headers that describe which columns this list shows
 
FInertialScrollManager InertialScrollManager
 Helper object to manage inertial scrolling
 
TSharedPtr< SListPanel > ItemsPanel
 The panel which holds the visible widgets in this list
 
FReGenerateResults LastGenerateResults
 Information about the widgets we generated during the last regenerate pass
 
FOnContextMenuOpening OnContextMenuOpening
 Delegate to invoke when the context menu should be opening. 更多...
 
FOnTableViewScrolled OnTableViewScrolled
 Delegate to call when the table view is scrolled
 
EOrientation Orientation = Orient_Vertical
 The layout and scroll orientation of the list
 
FGeometry PanelGeometryLastTick
 What the list's geometry was the last time a refresh occurred.
 
FVector2D PressedScreenSpacePosition
 The location in screenspace the view was pressed
 
TSharedPtr< SScrollBar > ScrollBar
 The scroll bar widget
 
TAttribute< ESelectionMode::Type > SelectionMode
 The selection mode that this tree/list is in. 更多...
 
FVector2D SoftwareCursorPosition
 The current position of the software cursor
 
float TickScrollDelta
 The amount we have scrolled this tick cycle
 
float WheelScrollMultiplier
 How much to scroll when using mouse wheel
 
- Protected 属性 继承自 SCompoundWidget
FSimpleSlot ChildSlot
 The slot that contains this widget's descendants.
 
TAttribute< FLinearColor > ColorAndOpacity
 The color and opacity to apply to this widget and all its descendants.
 
TAttribute< FVector2D > ContentScale
 The layout scale to apply to this widget's contents; useful for animation.
 
TAttribute< FSlateColor > ForegroundColor
 Optional foreground color that will be inherited by all of this widget's contents
 
- Protected 属性 继承自 SWidget
uint8 bCanHaveChildren: 1
 Can the widget ever support children? This will be false on SLeafWidgets, rather than setting this directly, you should probably inherit from SLeafWidget.
 
uint8 bCanSupportFocus: 1
 Can the widget ever support keyboard focus
 
uint8 bClippingProxy: 1
 Some widgets might be a complex hierarchy of child widgets you never see. 更多...
 
uint8 bIsHovered: 1
 Is this widget hovered?
 
uint8 bVolatilityAlwaysInvalidatesPrepass: 1
 if this widget should always invalidate the prepass step when volatile
 
EWidgetClipping Clipping
 Set to true if all content of the widget should clip to the bounds of this widget.
 
FName CreatedInLocation
 Full file path (and line) in which this widget was created
 
FMargin CullingBoundsExtension
 Can be used to enlarge the culling bounds of this widget (pre-intersection), this can be useful if you've got children that you know are using rendering transforms to render outside their standard bounds, if that happens it's possible the parent might be culled before the descendant widget is entirely off screen. 更多...
 
TAttribute< TOptional< EMouseCursor::Type > > Cursor
 The cursor to show when the mouse is hovering over this widget.
 
TAttribute< bool > EnabledState
 Whether or not this widget is enabled
 
TArray< TSharedRef< ISlateMetaData > > MetaData
 Metadata associated with this widget
 
float RenderOpacity
 The opacity of the widget. 更多...
 
TAttribute< TOptional< FSlateRenderTransform > > RenderTransform
 Render transform of this widget. 更多...
 
TAttribute< FVector2D > RenderTransformPivot
 Render transform pivot of this widget (in normalized local space)
 
FName Tag
 Tag for this widget
 
FName TypeOfWidget
 Debugging information on the type of widget we're creating for the Widget Reflector.
 
TAttribute< EVisibility > Visibility
 Is this widget visible, hidden or collapsed
 

额外继承的成员函数

- Public 属性 继承自 STableViewBase
const ETableViewMode::Type TableViewMode
 Is this list backing a tree or just a standalone list
 
- Protected 类型 继承自 STableViewBase
enum class  EScrollIntoViewResult { Success , Deferred }
 
- 静态 Protected 成员函数 继承自 SWidget
static const TAttribute< EVisibility > & AccessWidgetVisibilityAttribute (const TSharedRef< SWidget > &Widget)
 Protected static helper to allow widgets to access the visibility attribute of other widgets directly 更多...
 
static int32 FindChildUnderMouse (const FArrangedChildren &Children, const FPointerEvent &MouseEvent)
 
static int32 FindChildUnderPosition (const FArrangedChildren &Children, const FVector2D &ArrangedSpacePosition)
 
- 静态 Protected 成员函数 继承自 TSharedFromThis< SWidget >
static FORCEINLINE TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 Provides access to a shared reference to an object, given the object's 'this' pointer. 更多...
 
static FORCEINLINE TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 Provides access to a shared reference to an object, given the object's 'this' pointer. 更多...
 

详细描述

template<typename ItemType>
class SListView< ItemType >

A ListView widget observes an array of data items and creates visual representations of these items.

ListView relies on the property that holding a reference to a value ensures its existence. In other words, neither SListView<FString> nor SListView<FString*> are valid, while SListView< TSharedPtr<FString> > and SListView< UObject* > are valid.

A trivial use case appear below:

Given: TArray< TSharedPtr<FString> > Items;

SNew( SListView< TSharedPtr<FString> > ) .ItemHeight(24) .ListItemsSource( &Items ) .OnGenerateRow( SListView< TSharedPtr<FString> >::MakeOnGenerateWidget( this, &MyClass::OnGenerateRowForList ) )

In the example we make all our widgets be 24 screen units tall. The ListView will create widgets based on data items in the Items TArray. When the ListView needs to generate an item, it will do so using the OnGenerateWidgetForList method.

A sample implementation of OnGenerateWidgetForList would simply return a TextBlock with the corresponding text:

TSharedRef<ITableRow> OnGenerateWidgetForList( TSharedPtr<FString> InItem, const TSharedRef<STableViewBase>& OwnerTable ) { return SNew(STextBlock).Text( (*InItem) ) }

成员函数说明

◆ AddReferencedObjects()

template<typename ItemType >
virtual void SListView< ItemType >::AddReferencedObjects ( FReferenceCollector &  Collector)
inlinevirtual

Lists and Trees serialize items that they observe because they rely on the property that holding a reference means it will not be garbage collected.

参数
ArThe archive to serialize with

◆ AsWidget()

template<typename ItemType >
virtual TSharedRef< SWidget > SListView< ItemType >::AsWidget ( )
inlineoverridevirtual
返回
a shared reference to the widgets; required for forwarding focus.

实现了 ITypedTableView< ItemType >.

◆ Construct()

template<typename ItemType >
void SListView< ItemType >::Construct ( const typename SListView< ItemType >::FArguments &  InArgs)
inline

Callback delegate to have first chance handling of the OnKeyDown event

Construct this widget

参数
InArgsThe declaration data for this widget

◆ GenerateNewWidget()

template<typename ItemType >
virtual TSharedRef< ITableRow > SListView< ItemType >::GenerateNewWidget ( ItemType  InItem)
inlinevirtual

Given an data item, generate a widget corresponding to it.

参数
InItemThe data item which to visualize.
返回
A new Widget that represents the data item.

被 STreeView< ItemType > 重载.

◆ GetMaxRowSizeForColumn()

template<typename ItemType >
FVector2D SListView< ItemType >::GetMaxRowSizeForColumn ( const FName &  ColumnId,
EOrientation  ColumnOrientation 
)
inline

Will determine the max row size for the specified column id

参数
ColumnIdColumn Id
ColumnOrientationOrientation that is main axis you want to query
返回
The max size for a column Id.

◆ GetNumItemsBeingObserved()

template<typename ItemType >
virtual int32 SListView< ItemType >::GetNumItemsBeingObserved ( ) const
inlineoverridevirtual
返回
how many items there are in the TArray being observed

实现了 STableViewBase.

被 STileView< ItemType > , 以及 STileView< UObject * > 重载.

◆ GetNumItemsSelected()

template<typename ItemType >
int32 SListView< ItemType >::GetNumItemsSelected ( ) const
inline

Gets the number of selected items.

返回
Number of selected items.

◆ GetSelectedItems()

template<typename ItemType >
virtual TArray< ItemType > SListView< ItemType >::GetSelectedItems ( ) const
inlineoverridevirtual

Returns a list of selected item indices, or an empty array if nothing is selected

返回
List of selected item indices (in no particular order)

实现了 ITypedTableView< ItemType >.

◆ GetTableViewMode()

template<typename ItemType >
virtual ETableViewMode::Type SListView< ItemType >::GetTableViewMode ( ) const
inlineoverridevirtual
返回
Is the tableview a tree or a list?

实现了 ITypedTableView< ItemType >.

◆ IsItemSelected()

template<typename ItemType >
bool SListView< ItemType >::IsItemSelected ( const ItemType &  InItem) const
inline

Test if the current item is selected.

参数
InItemThe item to test.
返回
true if the item is selected in this list; false otherwise.

◆ IsItemVisible()

template<typename ItemType >
bool SListView< ItemType >::IsItemVisible ( ItemType  Item) const
inline

Checks whether the specified item is currently visible in the list view.

参数
Item- The item to check.
返回
true if the item is visible, false otherwise.

◆ ItemFromWidget()

template<typename ItemType >
const ItemType * SListView< ItemType >::ItemFromWidget ( const ITableRow *  WidgetToFind) const
inline

Given a Widget, find the corresponding data item.

参数
WidgetToFindAn widget generated by the list view for some data item.
返回
the data item from which the WidgetToFind was generated

◆ NavigationSelect()

template<typename ItemType >
virtual void SListView< ItemType >::NavigationSelect ( const ItemType &  InItemToSelect,
const FInputEvent &  InInputEvent 
)
inlineprotectedvirtual

Selects the specified item and scrolls it into view.

If shift is held, it will be a range select.

参数
ItemToSelectThe item that was selected by a keystroke
InInputEventThe key event that caused this selection

◆ OnKeyDown()

template<typename ItemType >
virtual FReply SListView< ItemType >::OnKeyDown ( const FGeometry &  MyGeometry,
const FKeyEvent &  InKeyEvent 
)
inlineoverridevirtual

Called after a key is pressed when this widget has focus (this event bubbles if not handled)

参数
MyGeometryThe Geometry of the widget receiving the event
InKeyEventKey event
返回
Returns whether the event was handled, along with other possible actions

重载 STableViewBase .

被 STreeView< ItemType > , 以及 STreeView< UObject * > 重载.

◆ OnMouseButtonDown()

template<typename ItemType >
virtual FReply SListView< ItemType >::OnMouseButtonDown ( const FGeometry &  MyGeometry,
const FPointerEvent &  MouseEvent 
)
inlineoverridevirtual

The system calls this method to notify the widget that a mouse button was pressed within it.

This event is bubbled.

参数
MyGeometryThe Geometry of the widget receiving the event
MouseEventInformation about the input event
返回
Whether the event was handled along with possible requests for the system to take action.

重载 STableViewBase .

◆ OnMouseButtonUp()

template<typename ItemType >
virtual FReply SListView< ItemType >::OnMouseButtonUp ( const FGeometry &  MyGeometry,
const FPointerEvent &  MouseEvent 
)
inlineoverridevirtual

The system calls this method to notify the widget that a mouse button was release within it.

This event is bubbled.

参数
MyGeometryThe Geometry of the widget receiving the event
MouseEventInformation about the input event
返回
Whether the event was handled along with possible requests for the system to take action.

重载 STableViewBase .

◆ OnNavigation()

template<typename ItemType >
virtual FNavigationReply SListView< ItemType >::OnNavigation ( const FGeometry &  MyGeometry,
const FNavigationEvent &  InNavigationEvent 
)
inlineoverridevirtual

Called when navigation is requested e.g.

Left Joystick, Direction Pad, Arrow Keys can generate navigation events.

参数
InNavigationEventThe navigation event generated

重载 SWidget .

被 STileView< ItemType > , 以及 STileView< UObject * > 重载.

◆ Private_DoesItemHaveChildren()

template<typename ItemType >
virtual bool SListView< ItemType >::Private_DoesItemHaveChildren ( int32  ItemIndexInList) const
inlineoverridevirtual
参数
ItemIndexInListThe index of the data item in the linearized array.
返回
true if the item has children

实现了 ITypedTableView< ItemType >.

◆ Private_GetNestingDepth()

template<typename ItemType >
virtual int32 SListView< ItemType >::Private_GetNestingDepth ( int32  ItemIndexInList) const
inlineoverridevirtual
参数
ItemIndexInListThe index of the data item in the linearized array.
返回
Nesting level within the tree: 0 is root-level, 1 is children of root, etc.

实现了 ITypedTableView< ItemType >.

◆ Private_GetNumSelectedItems()

template<typename ItemType >
virtual int32 SListView< ItemType >::Private_GetNumSelectedItems ( ) const
inlineoverridevirtual
返回
the number of items that are selected

实现了 ITypedTableView< ItemType >.

◆ Private_GetOrientation()

template<typename ItemType >
virtual EOrientation SListView< ItemType >::Private_GetOrientation ( ) const
inlineoverridevirtual
返回
the orientation of this TableView

实现了 ITypedTableView< ItemType >.

◆ Private_GetSelectionMode()

template<typename ItemType >
virtual ESelectionMode::Type SListView< ItemType >::Private_GetSelectionMode ( ) const
inlineoverridevirtual
返回
the selection mode of this TableView

实现了 ITypedTableView< ItemType >.

◆ Private_GetWiresNeededByDepth()

template<typename ItemType >
virtual const TBitArray & SListView< ItemType >::Private_GetWiresNeededByDepth ( int32  ItemIndexInList) const
inlineoverridevirtual
返回
a TBitArray in which each true bit indicates that a vertical wire is needed at this depth of the tree view.

实现了 ITypedTableView< ItemType >.

◆ Private_HasSelectorFocus()

template<typename ItemType >
virtual bool SListView< ItemType >::Private_HasSelectorFocus ( const ItemType &  TheItem) const
inlineoverridevirtual

Test if the item passed in has selector focus.

参数
InItemThe item to test.
返回
true if the item has selector focus in this list; false otherwise.

实现了 ITypedTableView< ItemType >.

◆ Private_IsItemExpanded()

template<typename ItemType >
virtual bool SListView< ItemType >::Private_IsItemExpanded ( const ItemType &  TheItem) const
inlineoverridevirtual
参数
InItemThe data item whose expansion state to query
返回
true if the item is expanded; false otherwise.

实现了 ITypedTableView< ItemType >.

◆ Private_IsItemHighlighted()

template<typename ItemType >
virtual bool SListView< ItemType >::Private_IsItemHighlighted ( const ItemType &  TheItem) const
inlineoverridevirtual

Test if the current item should be highlighted.

This is separate from hover highlights.

参数
TheItemThe item to test.
返回
true if the item is marked as highlighted in this list; false otherwise.

实现了 ITypedTableView< ItemType >.

◆ Private_IsItemSelectableOrNavigable()

template<typename ItemType >
virtual bool SListView< ItemType >::Private_IsItemSelectableOrNavigable ( const ItemType &  TheItem) const
inlineoverridevirtual

Test if the current item can be selected or navigated to.

参数
InItemThe item to test.
返回
true if the item is selectable or navigable; false otherwise.

实现了 ITypedTableView< ItemType >.

◆ Private_IsItemSelected()

template<typename ItemType >
virtual bool SListView< ItemType >::Private_IsItemSelected ( const ItemType &  TheItem) const
inlineoverridevirtual

Test if the current item is selected.

参数
InItemThe item to test.
返回
true if the item is selected in this list; false otherwise.

实现了 ITypedTableView< ItemType >.

◆ Private_IsLastChild()

template<typename ItemType >
virtual bool SListView< ItemType >::Private_IsLastChild ( int32  ItemIndexInList) const
inlineoverridevirtual
返回
true if this item is the last direct descendant of its parent.

实现了 ITypedTableView< ItemType >.

◆ Private_ItemFromWidget()

template<typename ItemType >
virtual const ItemType * SListView< ItemType >::Private_ItemFromWidget ( const ITableRow *  TheWidget) const
inlineoverridevirtual

Given a Widget, find the corresponding data item.

参数
TheWidgetA widget generated by the list view for some data item.
返回
The data item from which TheWidget was generated

实现了 ITypedTableView< ItemType >.

◆ Private_OnExpanderArrowShiftClicked()

template<typename ItemType >
virtual void SListView< ItemType >::Private_OnExpanderArrowShiftClicked ( ItemType  TheItem,
bool  bShouldBeExpanded 
)
inlineoverridevirtual

Called when the expander arrow for the given item is shift+clicked.

参数
InItemThe item whose expansion state to control
InExpandItemIf true the item should be expanded; otherwise collapsed

实现了 ITypedTableView< ItemType >.

◆ Private_SelectRangeFromCurrentTo()

template<typename ItemType >
virtual void SListView< ItemType >::Private_SelectRangeFromCurrentTo ( ItemType  SelectorItem)
inlineoverridevirtual

Select a range of items from the current RangeSelectionStart to the SelectorItem Does not cause an OnSelectionChanged()!

参数
SelectorItemThe endpoint item at which the selection should stop.

实现了 ITypedTableView< ItemType >.

◆ Private_SetItemExpansion()

template<typename ItemType >
virtual void SListView< ItemType >::Private_SetItemExpansion ( ItemType  TheItem,
bool  bShouldBeExpanded 
)
inlineoverridevirtual

Set whether some data item is expanded or not.

参数
InItemThe item whose expansion state to control
InExpandItemIf true the item should be expanded; otherwise collapsed

实现了 ITypedTableView< ItemType >.

◆ Private_SetItemHighlighted()

template<typename ItemType >
virtual void SListView< ItemType >::Private_SetItemHighlighted ( ItemType  TheItem,
bool  bShouldBeHighlighted 
)
inlinevirtual

Enable a soft highlight on the element.

This is useful for explaining parent/child relationships without actually modifying selection. Unrelated to any hover highlights.

参数
TheItemThe item whose highlighted state to change.
bShouldBeHighlightedEnables a highlight on this item if true, otherwise disables the highlight.

实现了 ITypedTableView< ItemType >.

◆ Private_SetItemSelection()

template<typename ItemType >
virtual void SListView< ItemType >::Private_SetItemSelection ( ItemType  TheItem,
bool  bShouldBeSelected,
bool  bWasUserDirected = false 
)
inlineoverridevirtual

Set the selection state of an item.

Does not cause an OnSelectionChanged()!

参数
InItemThe Item whose selection state to modify
bSelectedtrue to select the item; false to unselect
bWasUserDirectedtrue if the user specifically, directly selected this item; false otherwise

实现了 ITypedTableView< ItemType >.

◆ Private_SignalSelectionChanged()

template<typename ItemType >
virtual void SListView< ItemType >::Private_SignalSelectionChanged ( ESelectInfo::Type  SelectInfo)
inlineoverridevirtual

Notify the ItemsWidget that we changed its selection.

Triggers as OnSelectionChanged().

参数
SelectInfoProvides context on how the selection changed

实现了 ITypedTableView< ItemType >.

被 STreeView< ItemType > , 以及 STreeView< UObject * > 重载.

◆ Private_UsesSelectorFocus()

template<typename ItemType >
virtual bool SListView< ItemType >::Private_UsesSelectorFocus ( ) const
inlineoverridevirtual

Returns whether the table view uses selector focus.

返回
true if the table view uses selector focus; false otherwise.

实现了 ITypedTableView< ItemType >.

◆ ReGenerateItems()

template<typename ItemType >
virtual FReGenerateResults SListView< ItemType >::ReGenerateItems ( const FGeometry &  MyGeometry)
inlineoverridevirtual

Update generate Widgets for Items as needed and clean up any Widgets that are no longer needed.

Re-arrange the visible widget order as necessary.

实现了 STableViewBase.

被 STileView< ItemType > , 以及 STileView< UObject * > 重载.

◆ RequestNavigateToItem()

template<typename ItemType >
void SListView< ItemType >::RequestNavigateToItem ( ItemType  Item,
const uint32  UserIndex = 0 
)
inline

Navigate to a specific item, scrolling it into view if needed.

If the item is not found, fails silently.

参数
ItemThe item to navigate to on the next tick.

◆ RequestScrollIntoView()

template<typename ItemType >
void SListView< ItemType >::RequestScrollIntoView ( ItemType  ItemToView,
const uint32  UserIndex = 0 
)
inline

Scroll an item into view.

If the item is not found, fails silently.

参数
ItemToViewThe item to scroll into view on next tick.

◆ ScrollBy()

template<typename ItemType >
virtual float SListView< ItemType >::ScrollBy ( const FGeometry &  MyGeometry,
float  ScrollByAmount,
EAllowOverscroll  InAllowOverscroll 
)
inlineoverrideprotectedvirtual

Scroll the list view by some number of screen units.

参数
MyGeometryThe geometry of the ListView at the time
ScrollByAmountThe amount to scroll by in Slate Screen Units.
AllowOverscrollShould we allow scrolling past the beginning/end of the list?
返回
The amount actually scrolled in items

重载 STableViewBase .

被 STileView< ItemType > , 以及 STileView< UObject * > 重载.

◆ ScrollIntoView()

template<typename ItemType >
virtual EScrollIntoViewResult SListView< ItemType >::ScrollIntoView ( const FGeometry &  ListViewGeometry)
inlineoverrideprotectedvirtual

If there is a pending request to scroll an item into view, do so.

参数
ListViewGeometryThe geometry of the listView; can be useful for centering the item.

实现了 STableViewBase.

被 STileView< ItemType > , 以及 STileView< UObject * > 重载.

◆ SetItemHighlighted()

template<typename ItemType >
void SListView< ItemType >::SetItemHighlighted ( const ItemType &  TheItem,
bool  bHighlighted 
)
inline

Set the highlighted state of an item.

参数
TheItemThe Item whose highlight state you wish to modify
bHighlightedTrue to enable the soft parent highlight, false to disable it.

◆ SetItemSelection() [1/2]

template<typename ItemType >
void SListView< ItemType >::SetItemSelection ( const ItemType &  InItem,
bool  bSelected,
ESelectInfo::Type  SelectInfo = ESelectInfo::Direct 
)
inline

Set the selection state of an item.

参数
InItemThe Item whose selection state to modify
bSelectedtrue to select the item; false to unselect
SelectInfoProvides context on how the selection changed

◆ SetItemSelection() [2/2]

template<typename ItemType >
void SListView< ItemType >::SetItemSelection ( const TArray< ItemType > &  InItems,
bool  bSelected,
ESelectInfo::Type  SelectInfo = ESelectInfo::Direct 
)
inline

Set the selection state of multiple items.

参数
InItemsThe Items whose selection state to modify
bSelectedtrue to select the items; false to unselect
SelectInfoProvides context on how the selection changed

◆ SetListItemsSource()

template<typename ItemType >
void SListView< ItemType >::SetListItemsSource ( const TArray< ItemType > &  InListItemsSource)
inline

Establishes a wholly new list of items being observed by the list.

Wipes all existing state and requests and will fully rebuild on the next tick.

◆ SetOnEntryInitialized()

template<typename ItemType >
void SListView< ItemType >::SetOnEntryInitialized ( const FOnEntryInitialized &  Delegate)
inline

Sets the OnEntryInitializer delegate.

This delegate is invoked after initializing an entry being generated, before it may be added to the actual widget hierarchy.

◆ SetSelection()

template<typename ItemType >
void SListView< ItemType >::SetSelection ( ItemType  SoleSelectedItem,
ESelectInfo::Type  SelectInfo = ESelectInfo::Direct 
)
inline

Set the currently selected Item.

参数
SoleSelectedItemSole item that should be selected.
SelectInfoProvides context on how the selection changed

◆ SetSelectionMode()

template<typename ItemType >
void SListView< ItemType >::SetSelectionMode ( const TAttribute< ESelectionMode::Type > &  NewSelectionMode)
inline

Set the current selection mode of the list.

If going from multi-select to a type of single-select and one item is selected, it will be maintained (otherwise all will be cleared). If disabling selection, any current selections will be cleared.

◆ SupportsKeyboardFocus()

template<typename ItemType >
virtual bool SListView< ItemType >::SupportsKeyboardFocus ( ) const
inlineoverridevirtual

Checks to see if this widget supports keyboard focus.

Override this in derived classes.

返回
True if this widget can take keyboard focus

重载 STableViewBase .

◆ WidgetFromItem()

template<typename ItemType >
virtual TSharedPtr< ITableRow > SListView< ItemType >::WidgetFromItem ( const ItemType &  InItem) const
inlineoverridevirtual

Find a widget for this item if it has already been constructed.

参数
InItemThe item for which to find the widget.
返回
A pointer to the corresponding widget if it exists; otherwise nullptr.

实现了 ITypedTableView< ItemType >.

类成员变量说明

◆ NavigationScrollOffset

template<typename ItemType >
float SListView< ItemType >::NavigationScrollOffset = 0.5f
protected

The additional scroll offset (in items) to show when navigating to rows at the edge of the visible area (i.e.

how much of the following item(s) to show)


该类的文档由以下文件生成: