STableRow

The ListView is populated by Selectable widgets.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Slate

Header

/Engine/Source/Runtime/Slate/Public/Widgets/Views/STableRow.h

Include

#include "Widgets/Views/STableRow.h"

Syntax

template<typename ItemType>
class STableRow :
    public ITableRow ,
    public SBorder

Remarks

The ListView is populated by Selectable widgets. A Selectable widget is a way of the ListView containing it (OwnerTable) and holds arbitrary Content (Content). A Selectable works with its corresponding ListView to provide selection functionality.

Variables

Name Description

Protected variable

bool

 

bChangedSelectionOnMouseDown

Protected variable

bool

 

bDragWasDetected

Protected variable

bool

 

bProcessingSelectionTouch

Did the current a touch interaction start in this item?

Protected variable

bool

 

bShowSelection

Whether or not to visually show that this row is selected

Protected variable

TWeakPtr < SWidg ...

 

Content

The widget in the content slot for this row

Protected variable

const ISlateSty ...

 

ExpanderStyleSet

The slate style to use with the expander

Protected variable

int32

 

IndexInList

Index of the corresponding data item in the list

Protected variable

FSlotBase *

 

InnerContentSlot

The slot that contains the inner content for this row.

Protected variable

TOptional < EIte ...

 

ItemDropZone

Are we currently dragging/dropping over this item?

Protected variable

FOnAcceptDrop

 

OnAcceptDrop

Protected variable

FOnCanAcceptDro ...

 

OnCanAcceptDrop

Protected variable

FOnDragDetected

 

OnDragDetected_Handler

Delegate triggered when a user starts to drag a list item

Protected variable

FOnTableRowDrag ...

 

OnDragEnter_Handler

Delegate triggered when a user's drag enters the bounds of this list item

Protected variable

FOnTableRowDrag ...

 

OnDragLeave_Handler

Delegate triggered when a user's drag leaves the bounds of this list item

Protected variable

FOnTableRowDrop

 

OnDrop_Handler

Delegate triggered when a user's drag is dropped in the bounds of this list item

Protected variable

TWeakPtr < IType ...

 

OwnerTablePtr

The list that owns this Selectable

Protected variable

ETableRowSignal ...

 

SignalSelectionMode

When should we signal that selection changed for a left click

Protected variable

const FTableRow ...

 

Style

Style used to draw this table row

Constructors

Name Description

Public function

STableRow()

Protected constructor; SWidgets should only be instantiated via declarative syntax.

Functions

Name Description

Public function

void

 

Construct

(
    const typename STableRow < ItemType ...,
    const TSharedRef < STableViewBase > ...
)

Construct this widget

Public function Virtual

void

 

ConstructChildren

(
    ETableViewMode::Type InOwnerTableMo...,
    const TAttribute < FMargin >& InPad...,
    const TSharedRef < SWidget >& InCon...
)

Protected function

void

 

ConstructInternal

(
    FArguments const& InArgs,
    TSharedRef < STableViewBase > const ...
)

An internal method to construct and setup this row widget (purposely avoids child construction).

Public function Virtual Const

const FSlate ...

 

GetBorder()

Protected function Const

FSlateColor

 

GetForegroundBasedOnSelection()

Protected function Const

const ItemTy...

 

GetItemForThis

(
    const TSharedRef < ITypedTableView < ...
)

Public function Const

bool

 

IsSelected()

Callback to determine if the row is selected or not

Public function Const

bool

 

IsSelectedExclusively()

Callback to determine if the row is selected singularly and has keyboard focus or not

Public function Virtual

void

 

OnDragEnter

(
    FGeometry const& MyGeometry,
    FDragDropEvent const& DragDropEven...
)

Public function Virtual

void

 

OnDragLeave

(
    FDragDropEvent const& DragDropEven...
)

Protected function

void

 

SetOwnerTableView

(
    TSharedPtr < STableViewBase > OwnerT...
)

Public function Virtual

void

 

SetRowContent

(
    TSharedRef < SWidget > InContent
)

Set the entire content of this row, replacing any extra UI (such as the expander arrows for tree views) that was added by ConstructChildren

Public function

EItemDropZon ...

 

ZoneFromPointerPosition

(
    FVector2D LocalPointerPos,
    FVector2D LocalSize,
    EOrientation Orientation
)

Overridden from ITableRow

Name Description

Public function Virtual

TSharedRef < ...

 

AsWidget()

Public function Virtual Const

int32

 

DoesItemHaveChildren()

Public function Virtual

TSharedPtr < ...

 

GetContent()

Get the inner content of this row

Public function Virtual Const

int32

 

GetIndentLevel()

Public function Virtual Const

FVector2D

 

GetRowSizeForColumn

(
    const FName & InColumnName
)

By default, this function does nothing, it should be implemented by derived class

Protected function Virtual Const

ESelectionMo ...

 

GetSelectionMode()

Called to query the selection mode for the row

Public function Virtual Const

TBitArray

 

GetWiresNeededByDepth()

Public function Virtual

void

 

InitializeRow()

Called when the row has been generated and associated with an item in the owning table.

Public function Virtual Const

bool

 

IsItemExpanded()

Public function Virtual Const

bool

 

IsItemSelected()

Public function Virtual Const

bool

 

IsLastChild()

Public function Virtual

void

 

Private_OnExpanderArrowShiftClicked()

Called when the expander arrow for this row is shift+clicked

Public function Virtual

void

 

ResetRow()

Called when the row has been released from the owning table and is no longer associated with any items therein.

Public function Virtual

void

 

SetIndexInList

(
    int32 InIndexInList
)

Public function Virtual

void

 

ToggleExpansion()

Toggle the expansion of the item associated with this row

Overridden from SBorder

Name Description

Public function Virtual

void

 

SetContent

(
    TSharedRef < SWidget > InContent
)

Set the inner content of this row, preserving any extra UI (such as the expander arrows for tree views) that was added by ConstructChildren

Overridden from SWidget

Name Description

Public function Virtual

TSharedRef < ...

 

CreateAccessibleWidget()

Public function Virtual

FReply

 

OnDragDetected

(
    const FGeometry & MyGeometry,
    const FPointerEvent & MouseEvent
)

Called when Slate detects that a widget started to be dragged.

Public function Virtual

FReply

 

OnDragOver

(
    const FGeometry & MyGeometry,
    const FDragDropEvent & DragDropEven...
)

Called during drag and drop when the the mouse is being dragged over a widget.

Public function Virtual

FReply

 

OnDrop

(
    const FGeometry & MyGeometry,
    const FDragDropEvent & DragDropEven...
)

Called when the user is dropping something onto a widget; terminates drag and drop.

Public function Virtual

FReply

 

OnMouseButtonDoubleClick

(
    const FGeometry & InMyGeometry,
    const FPointerEvent & InMouseEvent
)

Called when a mouse button is double clicked. Override this in derived classes.

Public function Virtual

FReply

 

OnMouseButtonDown

(
    const FGeometry & MyGeometry,
    const FPointerEvent & MouseEvent
)

See SWidget::OnMouseButtonDown

Public function Virtual

FReply

 

OnMouseButtonUp

(
    const FGeometry & MyGeometry,
    const FPointerEvent & MouseEvent
)

See SWidget::OnMouseButtonUp

Public function Virtual Const

int32

 

OnPaint

(
    const FPaintArgs & Args,
    const FGeometry & AllottedGeometry,
    const FSlateRect & MyCullingRect,
    FSlateWindowElementList & OutDrawEl...,
    int32 LayerId,
    const FWidgetStyle & InWidgetStyle,
    bool bParentEnabled
)

The widget should respond by populating the OutDrawElements array with FDrawElements that represent it and any of its children.

Public function Virtual

FReply

 

OnTouchEnded

(
    const FGeometry & MyGeometry,
    const FPointerEvent & InTouchEvent
)

Called when a touchpad touch is ended (finger lifted)

Public function Virtual

FReply

 

OnTouchStarted

(
    const FGeometry & MyGeometry,
    const FPointerEvent & InTouchEvent
)

Called when a touchpad touch is started (finger down)

Classes

Name

Description

Public struct

FArguments

Protected class

FSlateAccessibleTableRow

An accessible implementation of STableRow exposed to platform accessibility APIs.

Typedefs

Name

Description

FOnAcceptDrop

Delegate signature for handling the drop of FDragDropEvent onto target of type ItemType

FOnCanAcceptDrop

Delegate signature for querying whether this FDragDropEvent will be handled by the drop target of type ItemType.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback