SmartTableRowWidget.h
A widget wrapped around a whole row, so the row can animate in Sequencer.
A widget wrapped around the cells of one row, so a row can be animated. Empty is the default.
Without one a row is plain Slate. SMultiColumnTableRow is no UObject and carries no animation list, so no UWidgetAnimation can bind to it and Sequencer has nothing to see. A cell needs none of this.
The cells go into a named slot of this wrapper, and HostColumns says which one. A wrapper with no named slot is dropped and its row draws unwrapped, with one warning per wrapper class.
ArrivalAnimation names an entrance and no code goes with it. Recycled like cells, so OnRowAssigned runs many times on one object and sets again everything it set last time.
- Class
- USmartTableRowWidget
- Extends
- UUserWidget
- Members
- 27
- Blueprint nodes
- 4
- Panel fields
- 1
Public functions 10
Row 4
One animation of this Widget Blueprint, by name.
UMG has no such function of its own. An animation is a reflected property of the class UMG builds, which is also why the Details panel can not offer them as a dropdown.
Why this wrapper was last given a row. The same answer OnRowAssigned gets, kept here so a C++ subclass can read it from NativeOnRowAssigned, which takes no arguments.
The table this wrapper is drawing in.
The row this wrapper draws right now, in natural space.
C++ only 6
Puts the cells of the row into the named slot of this wrapper.
A slot called Columns wins. Failing that, the only named slot is used whatever it is called, since a wrapper with one slot can mean nothing else by it.
False when there is no named slot, or several and none called Columns. It says so with a return and not a log, because the answer is the same once per table while this runs once per row.
Points this wrapper at a row. Recycled, so it runs many times on one object.
Hidden and held: this row has arrived and nothing has seen it yet. A wrapper naming no animation is left alone.
Armed here and played later. A list that virtualises builds the widgets of a row the moment any part of it crosses the view. While the table is still scrolling toward a new row that is two pixels at the bottom edge, and an entrance started there is over before the row can be seen.
The row is on screen, so the entrance plays from its first frame. False when nothing was armed, which is how a caller knows not to mark the entrance as used.
The entrance is not going to happen. The wrapper stops waiting and shows.
Given back to the pool. The wrapper goes on existing and will draw another row.
It also runs during teardown, once the table is already gone, so nothing here may read back to it.
Protected functions 4
Fires every time this wrapper is given a row, one it has drawn before too.
Reason is what sets the cases apart. A wrapper that plays its entrance whatever the reason plays it on every scroll, since scrolling is what hands a pooled wrapper its next row.
An entrance played from here needs a FlushAnimations straight after PlayAnimation. A row is built while the list draws, so this widget's tick for that frame has gone. Without the flush the wrapper draws once at rest and the animation reads only on the next tick, which draws as a row that shows, jumps, and then slides in.
Fires as the wrapper goes back to the pool, while the row it drew can still be read. Anything held is dropped here.
Private functions 2
Which named slot the cells go in, worked out once, since the widget tree of a wrapper never moves.
The held pair above, brought up to date. Both callers need it, and neither is const.
Public variables 2
The slot name that wins when a wrapper has more than one. A wrapper with a single named slot does not need it.
See HostColumns
An animation played when this wrapper is given a row that is new, and at no other time.
Built in Sequencer and named here, with no code beside it. Empty for a wrapper that is only layout.
PlayArrivalNow flushes the first frame before anything draws, so an entrance never shows the row at rest for a frame and then jumps into its first key.
Private variables 9
Weak, like the one on a cell. The table owns the pool that owns this wrapper, so a strong pointer back would be a ring.
- Transient
- Never saved.
Built once and pointed somewhere new on every reuse. UNativeWidgetHost::SetContent writes straight through to the live SBox, so a scrolling table builds none of these after the first screenful.
Starts at the case that has to stay quiet, so a wrapper read before it drew is not taken for new.
Worked out on first use and kept. NAME_None both before that and for a wrapper with no slot at all, which is why the flag below is what says whether it has been worked out.
Set while the wrapper is hidden, waiting for the table to say the row can be seen.
- Transient
- Never saved.
The animation named above, found once and held.
FindWidgetAnimation walks the class's property chain, and arming asks for this one on every row the table still owes an entrance.
The name is the whole key. A widget's class never changes under it, and a graph built again in the editor gives new widgets instead of changing these.
NAME_None in the pair here means the name has never been asked. That is also the answer for a widget naming no animation, and both want the same nothing back.
Next: SmartTableStyle.h