SmartTableTypes.h

The structs and enums the table's fields and nodes are made of.

Source/SmartTables/Public/SmartTableTypes.h

Nothing here is a class you subclass. These are the shapes the panel and the nodes use: what a column is, how it sizes, which way a sort runs, how a menu is set up. Come here when a field name tells you less than its list of options would.

Types
18
Of which
9 enum, 9 struct
Members
100
Panel fields
39

FSmartTableColumn struct

One column, named once, so no row can differ from it.

This struct is step two of three: drop the widget, add columns, call SetItems. Every field it holds has a default that leaves the common case empty.

Public functions 3

GetLabel
FText GetLabel() const

Header when it says something, otherwise the id read as text. Every place that draws a column's name asks this, so a column cannot be called one thing in the header and another in a menu.

GetSortBinding
FName GetSortBinding() const

The binding used for ordering: SortBindingName when set, and the value binding when it is not.

GetValueBinding
FName GetValueBinding() const

BindingName when set, otherwise ColumnId.

Public variables 21

Smart Tables 15

Column IdColumnIdpanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables" ) FName ColumnId

The name of this column, and it must not move. Every model call is keyed by it, and a column number stops meaning anything as soon as a column is hidden or moved.

HeaderHeaderpanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables", meta = ( ToolTip = "The label drawn in the header. Falls back to the column id." ) ) FText Header

The label drawn in the header. Falls back to the column id.

Binding NameBindingNamepanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables", meta = ( ToolTip = "What this column reads on the item: a property, or a pure function that takes no input. Falls back to the column id.", GetOptions = "GetBindableNames" ) ) FName BindingName
Options from
GetBindableNames

What this column reads on the item: a property, or a BlueprintPure function that needs no input. It falls back to ColumnId, so a column named DisplayName binds itself.

A pure function is how a worked out column gets by with no model of its own. Distance is a property on nothing. GetDistance is a plain node on the item, and the type it gives back is a typed sort key.

With ColumnSource on Item Class or Data Table, this field is a dropdown of what that source can bind. File mode fills no dropdown, since a csv or a json carries headings and not a struct.

Sort Binding NameSortBindingNamepanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, AdvancedDisplay, Category = "Smart Tables", meta = ( ToolTip = "For a column whose text and whose order come from different places, such as a cell reading unknown over a column that still sorts by number. Falls back to the value binding." ) ) FName SortBindingName
AdvancedDisplay
The panel hides it under the arrow.

For a column whose text and whose order come from different places, such as a cell reading unknown over a column that still sorts by number.

Free text and no dropdown. The Details panel builds one dropdown per GetOptions property per column, and on a wide table that cost lands on the click that opens it. This field is rarely set, and it falls back to the value binding.

SizingSizingpanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables" ) ESmartTableColumnSizing Sizing = ESmartTableColumnSizing::Fill

Whether Width below is a share of the leftover space or a count of pixels.

WidthWidthpanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables", meta = ( ClampMin = "0.0" ) ) float Width = 1.0f
Minimum
0.0

A weight in Fill, pixels in Fixed. A resize or a stored layout wins over it.

H AlignHAlignpanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables", meta = ( ToolTip = "Where the value sits in its cell. The header label has its own alignment field below." ) ) TEnumAsByte< EHorizontalAlignment > HAlign = HAlign_Left

Where the value sits in its cell. The header label has its own alignment field below.

Cell PaddingCellPaddingpanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables" ) FMargin CellPadding = FMargin( 8.0f, 2.0f )

Room around the value in every cell of this column, and in its header.

Max Fractional DigitsMaxFractionalDigitspanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables", meta = ( ToolTip = "The most digits after the point a number binding draws. Zero rounds to a whole number.", ClampMin = "0", ClampMax = "8" ) ) int32 MaxFractionalDigits = 2
Range
0 to 8

The most digits after the point a number binding draws.

Per column, and not per table. A plain float draws as 1234.567890, and the only way round that without this is a whole function giving back FText for one field.

SortablebSortablepanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables" ) bool bSortable = true

Whether a header click and the header menu can sort by this column. Off, both go, and the Sort By Column node still works.

ResizablebResizablepanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables" ) bool bResizable = true

Whether the right edge of this column is a drag grip. Off, no resize cursor shows there and a drag on the edge does nothing.

HideablebHideablepanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables" ) bool bHideable = true

Whether the header menu offers to hide this column. It gates the menu entries and nothing else, so Hidden By Default, a stored layout and Set Column Visible all still hide the column.

Hidden By DefaultbHiddenByDefaultpanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables" ) bool bHiddenByDefault = false

Starts hidden, and the Show Columns menu brings it back. A stored layout wins over it.

Cell ClassCellClasspanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables" ) TSubclassOf< USmartTableCell > CellClass

The widget every cell of this column is. Unset draws the built-in text cell, and a plain text column needs nothing else.

Drag Visual ClassDragVisualClasspanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, AdvancedDisplay, Category = "Smart Tables", meta = ( ToolTip = "The cell class that follows the cursor while a cell in this column is dragged. Unset copies Cell Class." ) ) TSubclassOf< USmartTableCell > DragVisualClass
AdvancedDisplay
The panel hides it under the arrow.

What follows the cursor when a cell in this column is dragged. Unset copies CellClass.

A cell class and never a plain widget. What follows the pointer has to stand for a row. A cell is handed the same table, model, row and column the real one is, so it reads its own text and colour through the API it already has.

Three routes, least work first. Unset, the drag draws the field it started on. Named here, it draws whatever this points at, with no code. An override of MakeCellDragVisual on the cell draws any widget at all, or none. All three want bAllowCellDragDrop on the table.

Header 6

Show Header IconbShowHeaderIconpanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, AdvancedDisplay, Category = "Smart Tables|Header", meta = ( ToolTip = "Draw an icon to the left of the header label. The icon itself is the field below." ) ) bool bShowHeaderIcon = false
AdvancedDisplay
The panel hides it under the arrow.

Draw an icon to the left of the label.

A flag of its own, and not a test of whether HeaderIcon is set. A brush counts as set in several ways that all look right: a texture, a tint, a rounded box with neither of those.

Header IconHeaderIconpanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, AdvancedDisplay, Category = "Smart Tables|Header", meta = ( ToolTip = "The icon drawn to the left of the header label. It draws nothing at all while the switch above is off.", EditCondition = "bShowHeaderIcon" ) ) FSlateBrush HeaderIcon
Editable when
bShowHeaderIcon
AdvancedDisplay
The panel hides it under the arrow.

The icon drawn to the left of the label. The slot is collapsed while bShowHeaderIcon is off: an unset FSlateBrush asks for 32 by 32, and measuring one would push the label along.

Header Icon SpacingHeaderIconSpacingpanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, AdvancedDisplay, Category = "Smart Tables|Header", meta = ( EditCondition = "bShowHeaderIcon", ClampMin = "0.0" ) ) float HeaderIconSpacing = 6.0f
Minimum
0.0
Editable when
bShowHeaderIcon
AdvancedDisplay
The panel hides it under the arrow.

Pixels between the icon and the header label. Zero puts them side by side, and the room is only taken while the icon is shown.

Override Header Text StylebOverrideHeaderTextStylepanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, AdvancedDisplay, Category = "Smart Tables|Header", meta = ( ToolTip = "Give this column its own header text style, in the field below. Without it the whole header uses the style set on the table." ) ) bool bOverrideHeaderTextStyle = false
AdvancedDisplay
The panel hides it under the arrow.

Give this column its own header text style, in the field below. Without it the whole header uses the style set on the table.

Header Text StyleHeaderTextStylepanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, AdvancedDisplay, Category = "Smart Tables|Header", meta = ( EditCondition = "bOverrideHeaderTextStyle" ) ) FTextBlockStyle HeaderTextStyle
Editable when
bOverrideHeaderTextStyle
AdvancedDisplay
The panel hides it under the arrow.

The header text style this column alone uses, while the switch above is on. The rest of the header keeps the style set on the table.

Header H AlignHeaderHAlignpanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, AdvancedDisplay, Category = "Smart Tables|Header" ) TEnumAsByte< EHorizontalAlignment > HeaderHAlign = HAlign_Left
AdvancedDisplay
The panel hides it under the arrow.

Where the header label sits, apart from where the values of the column sit. A number column aligned right usually wants its heading aligned right too.

FSmartTablePresentationChange struct

What moved in the presentation of a model, as separate facts.

Flags and not a scale. Every visible cell being stale and the row set having moved are two pieces of work, and Add ORs them so neither is ever dropped while a rebuild is out.

A live data sweep arriving while a dispatched sort still holds an older presentation has to keep both halves. One number could carry only the wider of the two, and rows that did not move would go on drawing values that did.

Not a USTRUCT: it goes through a plain C++ delegate, and nothing authors or saves it.

Public functions 9

IsAnything
bool IsAnything() const

Whether this says anything at all. Read by Scope and by Add, and no broadcast is gated on it.

Scope

How much this reaches, worked out from every field at once.

The one place the fields become an answer. A row number or a column id beside a moved order counts for nothing, since the whole screen is stale either way.

Add
void Add( const FSmartTablePresentationChange & Other )

Folds Other in, losing nothing.

Every flag either side set stays set. Changes add up while a rebuild is out, and they go out together no matter how many arrive.

A row number lives on only while it is the only one in play. Two different rows, or a row beside anything wider, is no longer about one row, and saying otherwise would refresh one and skip the rest.

The column is nested inside that rule and never folded beside it. One column in two rows is two rows, so the column goes wherever the row number goes.

OneRowsValuesstatic
static FSmartTablePresentationChange OneRowsValues( int32 InNaturalRow )

The values of one row moved. The cheap one, and what a live feed sends several times a second.

OneCellsValuestatic
static FSmartTablePresentationChange OneCellsValue( int32 InNaturalRow, FName InColumnId )

One value of one row moved, and the table reads that cell alone.

Narrower than OneRowsValues, and only for a model whose columns do not read each other. A bound pure function in another column can read the property just written, a total off a price being the usual case, and this change leaves that column drawing the old number.

EveryRowsValuesstatic
static FSmartTablePresentationChange EveryRowsValues()

The values of every row moved, and the order in use was put back over them.

Both parts, because RebuildPresentation sorts again: the rows may have moved and every cell is stale.

Orderstatic

A different order and nothing else. What RebuildPresentation lands on by default, and what a model resets its held change to as a sort lands.

A text filter says this too, even one that drops rows, which is more than the name covers.

RowSetstatic

Rows arrived or left, which reorders whatever is still there. Diff says which ones they are, when the model knows them.

Everythingstatic
static FSmartTablePresentationChange Everything()

A different set of data: every row is a different row and every cell is stale.

Answered the same way as a row set change. Identity is mapped again and the selection is matched back up by row id, so a row id that also exists in the new data keeps the selection it had.

Public variables 6

bCellsStale
bool bCellsStale = false

Every visible cell has to read again. The values behind them moved, and where the rows sit may well not have moved at all.

bOrderMoved
bool bOrderMoved = false

The presented to natural map moved, so the row handles have to be rebuilt. A sort, or a filter.

bRowSetMoved
bool bRowSetMoved = false

Rows arrived or left. Identity is mapped again and the selection is matched back up by row id.

RowSetDiff

Which rows arrived and left, when the model said. Only ever set beside bRowSetMoved.

NaturalRow
int32 NaturalRow = INDEX_NONE

The one row this is about, when it is about one row. INDEX_NONE for anything wider.

ColumnId
FName ColumnId

The one column this is about, when it is about one cell of that row. NAME_None for anything wider, and only ever set beside a NaturalRow. A column with no row is a shape nothing here means.

FSmartTableHeaderMenuOptions struct

Which entries the built-in header menu offers.

All on by default. Every flag here cuts the menu down, and OnExtendHeaderMenu is what adds to it.

Public variables 6

EnabledbEnabledpanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables", meta = ( ToolTip = "Open a menu on a right click anywhere on the header. It is the only way to bring back a hidden column without code." ) ) bool bEnabled = true

Off, and no right click menu opens anywhere on the header.

With a pointer this menu is the only way back once every column is hidden. Move Left and Move Right are the only reorder a keyboard or a pad reaches with no code behind it.

SetColumnVisible, MoveColumn and ResetLayout are all still there for a table that shuts the menu.

Offer SortbOfferSortpanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables", meta = ( ToolTip = "Offer the sort entries in the header menu. Separate from the header click, which has its own switch on the table." ) ) bool bOfferSort = true

Offer the sort entries in the header menu. Separate from the header click, which has its own switch on the table.

Offer Size To ContentbOfferSizeToContentpanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables" ) bool bOfferSizeToContent = true

Offer Size to Content in the header menu. It fits a column to its widest value and marks that width as chosen.

Offer MovebOfferMovepanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables", meta = ( ToolTip = "Offer Move Left and Move Right in the header menu. Separate from dragging a header, which has its own switch." ) ) bool bOfferMove = true

Move Left and Move Right. Apart from bAllowColumnReorder, which gates dragging a header: a gamepad reaches this route and never that one.

Offer VisibilitybOfferVisibilitypanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables" ) bool bOfferVisibility = true

Offer Hide This Column and the Show Columns submenu in the header menu. Both leave out a column with Hideable off.

Offer Reset LayoutbOfferResetLayoutpanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables" ) bool bOfferResetLayout = true

Offer Reset Columns in the header menu. It puts widths, hidden columns and the sort back to how the table was authored.

FSmartTableMenuEntry struct

One entry of the right click menu of a row.

Authored in the Details panel, since a row menu belongs to the game. A table cannot know what a row means, so it has no entry of its own to offer here. The header menu is the other way round: its entries are built in, and its settings struct only cuts them down.

Nothing here is acted on by the table. It draws the entries and says which Id was picked.

Public variables 6

IdIdpanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables", meta = ( ToolTip = "Sent back when this entry is picked. It names the action, and never the label a player reads." ) ) FName Id

Sent back when this entry is picked. It names the action and never the label: a label is text a player reads, and those words change.

LabelLabelpanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables" ) FText Label

The text drawn in the menu.

Tool TipToolTippanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables" ) FText ToolTip

Shown while the pointer rests on the entry. Empty for none.

EnabledbEnabledpanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables", meta = ( ToolTip = "Whether this entry can be picked. Off, it draws greyed and stays in place, which keeps the menu the same shape on every row." ) ) bool bEnabled = true

Off, the entry draws greyed and not dropped, so the menu keeps its shape between rows.

This one means not right now, such as a Remove on a locked row. bVisible means not on this kind of row at all, where a greyed entry only asks a question the menu cannot answer.

VisiblebVisiblepanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables" ) bool bVisible = true

Whether this entry is built at all. Off, it leaves no gap and no divider between its neighbours.

Separator AbovebSeparatorAbovepanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables" ) bool bSeparatorAbove = false

A divider above this entry. Ignored on the first, where it would draw a line against the border.

FSmartTableSortSpec struct

What order the rows should be in.

One value carrying every level. A two level sort cannot be said as a column plus a mode, and two calls in a row would rest on the model remembering the first.

Public functions 4

IsEmpty
bool IsEmpty() const
GetModeFor
ESmartTableSortMode GetModeFor( FName ColumnId ) const

Which way this column is sorted, or None. The header arrows read it.

GetPriorityFor
int32 GetPriorityFor( FName ColumnId ) const

Zero for the primary sort column, one for the second level, INDEX_NONE when it is not sorted by.

operator==
bool operator==( const FSmartTableSortSpec & Other ) const

Public variables 1

ColumnsColumnspanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, SaveGame, Category = "Smart Tables" ) TArray< FSmartTableSortColumn > Columns
SaveGame
Carried by SaveGame serialisation.

Empty is unsorted. The header sends at most two, and the sort helpers take any number.

FSmartTableLayout struct

Everything about a table that a store keeps: widths, hidden columns and the sort.

Public variables 5

CurrentVersionstatic
static constexpr int32 CurrentVersion = 2

Raised when what a stored layout means changes, so a restore can spot an old file.

VersionVersionpanelpure virtual
UPROPERTY( BlueprintReadWrite, SaveGame, Category = "Smart Tables" ) int32 Version = 0
SaveGame
Carried by SaveGame serialisation.

Zero on anything written before layouts had a version.

See USmartTable::LoadStoredLayout

OrderOrderpanel
UPROPERTY( BlueprintReadWrite, SaveGame, Category = "Smart Tables" ) TArray< FName > Order
SaveGame
Carried by SaveGame serialisation.

The drawn order, left to right. Empty means the order the columns were named in.

Apart from Columns, and neither array says anything about the other. An id here that names no column is dropped as this is read, and a column no id names goes back where it was named.

ColumnsColumnspanel
UPROPERTY( BlueprintReadWrite, SaveGame, Category = "Smart Tables" ) TArray< FSmartTableColumnLayout > Columns
SaveGame
Carried by SaveGame serialisation.

What a column holds that is not its place: the width, whether it is hidden, and whether the width was chosen. The order of this array carries no meaning.

Sort SpecSortSpecpanel
UPROPERTY( BlueprintReadWrite, SaveGame, Category = "Smart Tables" ) FSmartTableSortSpec SortSpec
SaveGame
Carried by SaveGame serialisation.

The sort in force when this was saved. Empty is unsorted, which a restore puts back too.

ESmartTableColumnSource enum

What shape the columns of a table were written against.

One field and never three half answers. It picks which of ExpectedItemClass, SourceTable and SourceFile the panel shows. It also picks the struct behind the binding dropdown, the struct the compile checks against, and the source the column builder reads.

None of these loads a row. Data arrives at runtime through SetModel, SetItems or SetDataTable, so this is the author time shape and nothing more. A table pointed at a json file draws nothing until a model arrives.

Values 4

NoneNone
None

Columns are written out one by one, and nothing is checked against anything.

Item ClassItemClass
ItemClass

A UObject class, whose properties and pure functions are the shape.

Data TableDataTable
DataTable

A DataTable asset, whose row struct is the shape.

FileFile
File

A .csv or .json on disk, read for its headings only.

See USmartTable::SourceFile

ESmartTableCellEditor enum

Which built-in editor a cell offers. None draws the value and takes no input.

Values 4

NoneNone
None
TextText
Text
NumberNumber
Number
ToggleToggle
Toggle

ESmartTableAssignReason enum

Why a cell or a row wrapper was just given a row.

This is what an entrance animation reads. All four arrive as the same call with the same arguments, and only the reason tells them apart. A table scrolling a million rows reassigns constantly, and an entrance played on every one of those flashes instead of animating.

Only Added is a row that has not been on screen yet.

Values 4

ScrolledScrolled
Scrolled

A recycled widget now draws a different row. The common case by far, and the one that has to stay quiet while it happens.

RefreshedRefreshed
Refreshed

The same row as before, read again for a reason that is not its data: a skin change, a column resized, a refresh of everything. Nothing about what the row says has changed.

AddedAdded
Added

A row that was not in the table the last time it drew.

Value ChangedValueChanged
ValueChanged

The values of this row moved, and it is the only row that did.

The live data case, and the one a cell flashes for. A refresh of everything stays Refreshed, since every cell on screen flashing at once says nothing.

ESmartTablePresentationScope enum

How much of the table a presentation change reaches.

Worked out from every field of the change at once, and never field by field at a call site. A change that moved the order or the row set reaches the whole screen, whatever row or column it also names.

Values 4

NothingNothing
Nothing

Says nothing, so there is nothing to do.

CellCell
Cell

One named column of one named row.

RowRow
Row

Every column of one named row.

ScreenScreen
Screen

Every row the list has built. The order or the row set moved, or the values did and nothing names a single row.

FSmartTableColumnLayout struct

What a resize or a hide left on one column, and the part of a table a store keeps past the session.

Public variables 4

Column IdColumnIdpanel
UPROPERTY( BlueprintReadWrite, SaveGame, Category = "Smart Tables" ) FName ColumnId
SaveGame
Carried by SaveGame serialisation.

Which column this entry is about.

WidthWidthpanel
UPROPERTY( BlueprintReadWrite, SaveGame, Category = "Smart Tables" ) float Width = 0.0f
SaveGame
Carried by SaveGame serialisation.

Pixels, and it means something only while bUserWidth is set. Zero and skipped otherwise.

An entry also exists for hiding a column, so an entry with no chosen width is normal.

Only a width set on purpose goes in here. Every other width is worked out again from the named sizing whenever the space changes. A worked out number filed as a choice is wrong at every window size but the one it was saved at.

User WidthbUserWidthpanel
UPROPERTY( BlueprintReadWrite, SaveGame, Category = "Smart Tables" ) bool bUserWidth = false
SaveGame
Carried by SaveGame serialisation.

Set by a drag and by SetColumnWidth, which size to content also goes through. Cleared by ResetColumnWidth and by ResetLayout, and no width pass may take a set width back while it holds.

HiddenbHiddenpanel
UPROPERTY( BlueprintReadWrite, SaveGame, Category = "Smart Tables" ) bool bHidden = false
SaveGame
Carried by SaveGame serialisation.

Whether this column is hidden right now.

ESmartTableSortMode enum

The order a column is sorted in. None is unsorted, which is a third answer and not an error.

Values 3

NoneNone
None
AscendingAscending
Ascending
DescendingDescending
Descending

ESmartTableSelectionMode enum

What a click on a row does. None also stops the caret, so no key selects anything either.

Values 3

NoneNone
None

Clicking a row does nothing to it. Right for a table of fields being edited, where the row mark is noise behind the field and there is nothing to pick.

SingleSingle
Single

One row at a time. The default, and what most tables mean by selection.

MultiMulti
Multi

Control and Shift do what they do everywhere else.

FSmartTableSortColumn struct

One level of a sort: which column, and which way.

Public functions 1

operator==
bool operator==( const FSmartTableSortColumn & Other ) const

Public variables 2

Column IdColumnIdpanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, SaveGame, Category = "Smart Tables" ) FName ColumnId
SaveGame
Carried by SaveGame serialisation.

The column this level orders by.

ModeModepanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, SaveGame, Category = "Smart Tables" ) ESmartTableSortMode Mode = ESmartTableSortMode::Ascending
SaveGame
Carried by SaveGame serialisation.

Which way this level orders. The built-in sort reads anything that is not Descending as Ascending.

ESmartTableCellDragRole enum

What a cell is to a drag going on right now.

Three states and no more. A drag has one source, and at most one cell under the pointer. The table works the role out, the cell holds on to it, and the row draws the brush for it.

Values 3

NoneNone
None

Not part of the drag, or there is no drag.

SourceSource
Source

The drag started on this cell. Drawn dimmer by default, since what it holds is on the move.

TargetTarget
Target

The pointer is over this cell right now, so this is where a release would drop it.

FSmartTableRowMenuOptions struct

Whether rows have a right click menu at all, and what it is called.

Off by default, unlike the header one. A table whose rows nothing can change has no entry to offer. Opening one with no RowMenuEntries and no OnExtendRowMenu handler warns once and draws nothing.

Public variables 3

EnabledbEnabledpanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables", meta = ( ToolTip = "Open a menu on a right click on a row. Off, the Open Row Menu node still opens one." ) ) bool bEnabled = false

Off, and a right click on a row opens nothing. OpenRowMenu still works.

HeadingHeadingpanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables" ) FText Heading

The heading drawn above the entries. Empty for none, which is right for two or three.

Select Row FirstbSelectRowFirstpanel
UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "Smart Tables", meta = ( ToolTip = "Select the row a menu opens on, before the menu is built. Off, a right click opens the menu and changes nothing." ) ) bool bSelectRowFirst = false

Selects the row a menu opens on, before the menu is built.

Off, since selection belongs to the left button. On a Multi table a right click would add the row under it to the set and never replace the set. On is for a table whose menu works on a row that nothing else marks out.

ESmartTableColumnSizing enum

How a column works out its width. Both use Width: Fill as a weight, Fixed as a count of pixels.

Values 2

FillFill
Fill

A share of the space left over, weighted by Width.

FixedFixed
Fixed

Exactly Width pixels, whatever size the table is.

ESmartTableHeight enum

How tall the table asks to be. Not how tall it is: a parent that gives it less always wins.

Values 2

FillFill
Fill

Takes whatever height it is given and scrolls the rows that do not fit.

Fit RowsFitRows
FitRows

Asks for every row it has, so a parent that can grow shows all of them and no scrollbar shows up.

Next: SmartTableSorting.h