Smart Tables
The table widget UMG never shipped. Virtualised rows, columns that line up, and none of it needs code.
Home
- Every feature - Everything it does, and the one thing you set to get it
Start here
- Your first table - 4 things, none of them C++, and you have a sorting table of your own data
- Rows - Three ways to fill a table. Two of them need no model of your own, only a call
- Columns - Declared once, in the Details panel, and every row lays out against them
- Cells are Widget Blueprints - Any Widget Blueprint you parent to Smart Table Cell can be a column
- Events - 10 of them, and 2 cover most tables
Going further
- Sorting and filtering - Natural order, two levels, and a filter that reads every column
- Selection and input - Mouse, keyboard, pad. Every gesture is also a node
- Reordering rows - Off by default, and it needs a model that owns its own order
- Layout and skin - What the player rearranged comes back, and the whole thing reskins from one asset
- When it draws nothing - A blank column has one cause and the table has already named it. Where it says so
When you need more
- A model in Blueprint - 3 functions, still no C++, for when your rows aren't objects and aren't a DataTable
- The two row spaces - The idea to have straight before you write anything larger
- Dropping to C++ - The same surface, in C++, for when the data already lives there
Demos
- Items - A UObject Blueprint with variables on it, and no model of your own
- DataTable - Rows out of a DataTable asset, with the row struct deciding the cell types
- CSV file - The first demo with a model built straight on Smart Table Model
- JSON file - The same model, the other reader
- One million rows - Virtualised rows, and a sort that runs off the game thread
- Server browser - Everything on the header at once, in a screen that has to share the space
- Pairs - A memory game where every column is a position and every cell is a card
- Keys without Enhanced Input - The Items demo driven from raw Slate key events
- Items with MVVM - The Items demo again, with a viewmodel for each row and no graph in the cells that bind to it
Reference
- SmartTable.h - The widget itself. Every node, every panel field, and the C++ behind them
- SmartTableTypes.h - The structs and enums the table's fields and nodes are made of
- SmartTableSorting.h - The ordering maths, kept away from the widget so it can be tested without one
- SmartTableDeadSecondaries.h - The columns a second sort level can't move a row with, worked out only when something asks
- SmartTableColumnLayout.h - The column sums with no widget in them: where each edge lands, and where a moved column ends up
- SmartTableBinding.h - How a column name becomes a read of a property or a call to a function
- SmartTableColumnSchema.h - Building a column set from the shape of your data instead of typing twenty out
- SmartTableDispatcher.h - Where a model's ordering work runs
- SmartTableColour.h - One function, because an sRGB colour and a linear one are not the same number
- SmartTableModel.h - Where the rows come from, and the one class to subclass when they come from you
- SmartTableObjectModel.h - The model behind Set Items. It holds the objects and reads them by name
- SmartTableDataTableModel.h - The model behind Set Data Table, and the stand-in a cell class is given for a row
- SmartTableKeptRow.h - A row held by its id, so code that acts a frame later still finds it
- SmartTableRowSetDiff.h - Which rows a model says arrived and which left, as one value
- SmartTableCell.h - The class a cell Widget Blueprint sits on, and the two stock cells
- SmartTableRowWidget.h - A widget wrapped around a whole row, so the row can animate in Sequencer
- SmartTableStyle.h - One asset carrying every brush and text style a table wears
- SmartTableSettings.h - Project Settings: the palette and the sizes every table starts from
- SmartTableLayoutStore.h - Where a rearranged header is kept between sessions, and how it comes back
- SmartTableSortKey.h - What a column hands the sort. A number sorts as a number, not as its text
- SmartTableCellDragDropOp.h - What travels between two cells during a drag
- SmartTableCellDrag.h - The one cell drag a table has going: the cell it started on, and the cell it's over
- SmartTableColumnSelection.h - The column a pad or a keyboard is aiming at, kept apart from the row selection
- SmartTableResizeGesture.h - One column resize, from the press or the button that starts it to whatever ends it
- SmartTableScrollMove.h - The scroll a table drives itself: one smooth move to a row, and where the view goes when rows arrive or leave
- SmartTableArrivals.h - The new rows a table still owes an entrance to, and what counts as having seen one
- SmartTableOpenMenu.h - The one open menu and the style it paints from, kept together so neither outlives the other
- SmartTableLog.h - 5 categories, split by the question a reader is asking
Start at Every feature.