SmartTableStyle.h
One asset carrying every brush and text style a table wears.
What a table looks like, in one asset.
Every field here sits on USmartTable as well, which is fine for one table and wrong for twenty. An asset set on a table covers the table's own values while it is set, and clearing the asset puts them back. A table with no asset carries on with what its Details panel says.
The class defaults are also the look a table opens with. The constructor builds most fields from the palette in Project Settings, and USmartTable copies the lot. A default FSlateBrush is a solid white box and not an empty one, so a field the constructor skipped would draw white over whatever is under it.
- Class
- USmartTableStyle
- Extends
- UDataAsset
- Members
- 29
- Panel fields
- 27
Default constructor 1
Public functions 1
Builds the whole look out of the palette in Project Settings. The constructor is one call to this.
Public so a palette edit can run it again on the class defaults, which is what puts a colour change on screen without opening the editor again. Nothing runs it on an asset: that would throw away every field the asset was authored with.
Public variables 18
Surfaces 4
Behind the rows, under everything else the table draws.
Every row surface: the banded backgrounds, hovered, selected, and selected while the table has no focus. The text colours of a row live on it too.
The header row: its background, the rule under it, the column splitter, and the sort arrows.
EditAnywhere and never BlueprintReadWrite. FHeaderRowStyle carries no BlueprintType, so UHT refuses a reflected read write on it. The table's own copy is declared the same way.
Both scrollbars: the one down the side and the one along the bottom. The engine bar is near white, which on a dark table draws lighter than anything else, so this one starts grey.
Drag and Drop 2
Drawn over the cell a drag started on, and never instead of it.
The cell goes on drawing itself underneath, so a cell class this plugin has never seen is marked the same as a stock one. A dark tint by default: what that cell holds is already under the cursor.
Drawn over the cell a release would drop on. An outline and no tint by default, so what is in that cell stays readable while the drop is being decided.
Text 4
The column labels, smaller and dimmer and upper case by default. The sort arrow beside a label takes its colour from here as well.
The text in every built-in text cell. A cell class of its own is free to read it or leave it.
The text in the pinned row number column. Dimmer than the cell text by default: a row number points at a row instead of being one of its values.
The line drawn where a table has no rows, and the line for a filter that matched none.
Details 6
The bar that says where a dragged column will end up.
The bar that says where dragged rows will land, drawn across the edge between two rows.
Its own brush, never shared with the column marker. The height here is read off the brush and is what the bar draws at, where the column marker takes its width from a constant.
The line between two columns. The header cell draws it over itself, so no column gives up width for it and no row draws it at all.
The bar under the label of the column input is aimed at.
Apart from the dragged column marker, and warm where that one is cold by default. Both can be on screen at the same moment, and one colour across the two would read as the drag landing here.
Drawn over the whole table while it holds keyboard focus. It sits in a slot of its own and hit tests nothing, so it takes no room and eats no click.
Drawn over the rows while the model is busy, with a spinner in the middle of it. See through by default, which keeps the rows readable underneath.
Menu 1
What the header menu and the row menu both draw with. The style set built from it is thrown away and rebuilt whenever a new style is copied in.
Metrics 1
- Minimum
- 0.0
How tall the header row draws, in pixels. It sets the height of every header cell, the pinned row number column with them.
FSmartTableMenuStyle struct
What the header menu looks like, and the row menu with it.
A menu draws in a window of its own, over whatever is under it, the table included. Its background has to be solid, or what is behind shows through. One step off the table's own too, so the two read as two surfaces and not as one with a seam down it.
Only the parts a skin has a view about are here. Every other Menu key falls through to the engine's own style, so a key a later engine adds goes on drawing instead of turning into a missing texture box.
Public variables 7
Behind the whole menu, under the entries and the group titles. Anything see through here lets the game show through the menu.
One entry, in its normal, hovered and pressed states.
The text of one menu entry. The group titles take the heading style instead.
How a menu marks the letters that match its search. Greyed out on a table where a right click opens no menu, on the header or on a row.
The group titles, such as Sort and Columns.
The line between two groups.
The tick beside a toggled entry. The Show Columns flyout is nothing but these.
FSmartTableSearchHighlight struct
How a menu marks the letters of an entry that match its search.
The mark is a fill and an outline, each switched on its own. Both take the colour of the label text and draw see through. That colour already reads against the menu. The background shows through the mark, a hovered entry included. Each part draws lighter while the other is on.
A label colour set to Inherit has no colour of its own to take. The HighlightShape of the label style draws then instead.
Public variables 2
Fill the letters that match a search, in the label colour and see through. With Outline also off, nothing marks a match.
Draw a thin line around the letters that match a search, in the label colour. With Fill also off, nothing marks a match.
Next: SmartTableSettings.h