class

ATableView

Module
Arc
Header
#include "Arc/Widgets/ATableView.h"
Namespace
Arcf

Type aliases

AliasDescription
using COnGenerateCell = std::function<TSharedPtr<AWidget>(int32_t , int32_t )>

Properties

TypeNameDescription
static constexpr floatSCROLLBAR_GUTTERDefault 12.0f.
static constexpr int32_tOVERSCAN_ROWSOne row above and below the viewport: a scroll of less than a row must not have to generate a widget before it can paint. Default 1.
ArcDelegate<void(const FTableCellRef&)>OnSelectionChanged
ArcDelegate<void(const FTableCellRef&)>OnCellActivated

Public functions

ReturnsNameDescription
ARC_WIDGET_ARGS
voidSetColumns
const std::vector<FTableColumn>&GetColumns
int32_tGetColumnCount
voidSetRowCount
int32_tGetRowCount
voidSetOnGenerateCell
voidSetFrozenColumnsColumns [0, count) never move under a horizontal scroll.
int32_tGetFrozenColumns
voidSetRowHeight
floatGetRowHeight
voidSetStripedRowsA plain list of records reads cleaner without the zebra a dense spreadsheet needs, and without a cursor frame while it is not the focused widget.
voidSetCursorOnlyWhenFocused
const TSharedPtr<ATableHeader>&GetHeader
voidRefreshCellsThe rows changed identity under an unchanged shape — a sort, a filter, a re-source.
voidScrollTo
floatGetScrollX
floatGetScrollY
voidEnsureCellVisible
voidSetCursorCellMoving the cursor with extend keeps the anchor where it is, which is what turns two cells into a rectangle.
FTableCellRefGetCursorCell
FTableCellRefGetAnchorCell
boolIsCellSelected
voidClearSelection
voidGetSelectionBoundsThe selection is a RECTANGLE, not a free set: that is what lets a consumer describe a bulk edit as "this column, these rows" instead of replaying an arbitrary cell list.
FTableViewRangeComputeVisibleRangeThe virtualization decision, pure and static so the suite can pin it without a device, a font or a widget tree.
floatColumnOffsetSum of the widths left of column; column == size() gives the total.
floatComputeContentWidthColumns fill the viewport until they hit their minimums; past that the table scrolls sideways rather than crushing them to nothing.
const FTableViewRange&GetVisibleRange
int32_tGetInstantiatedCellCount
TSharedPtr<AWidget>GetCellWidget
ArcVec2ComputeDesiredSize
voidArrangeChildren
int32_tOnPaint
CReplyOnMouseButtonDown
CReplyOnMouseButtonUp
CReplyOnMouseMove
CReplyOnMouseWheel
CReplyOnMouseButtonDoubleClick
CReplyOnKeyDown
voidOnMouseLeave
boolIsFocusable
int32_tGetNumChildren
TSharedPtr<AWidget>GetChildAt
boolCanCacheDesiredSizeA constant: it takes what its slot gives it and scrolls the rest.
boolDesiredSizeDependsOnChildren
const char*GetTypeName

Function details

ARC_WIDGET_ARGS

C++
ARC_WIDGET_ARGS(ATableView) ARC_ARG(float, RowHeight) ARC_ARG(int32_t, FrozenColumns) ARC_WIDGET_ARGS_END() void Construct(const CArguments& args)

SetColumns

C++
void SetColumns(std::vector<FTableColumn> columns)

GetColumns

C++
const std::vector<FTableColumn>& GetColumns() const

GetColumnCount

C++
int32_t GetColumnCount() const

SetRowCount

C++
void SetRowCount(int32_t rows)

GetRowCount

C++
int32_t GetRowCount() const

SetOnGenerateCell

C++
void SetOnGenerateCell(COnGenerateCell generator)

SetFrozenColumns

C++
void SetFrozenColumns(int32_t count)

Columns [0, count) never move under a horizontal scroll.

GetFrozenColumns

C++
int32_t GetFrozenColumns() const

SetRowHeight

C++
void SetRowHeight(float height)

GetRowHeight

C++
float GetRowHeight() const

SetStripedRows

C++
void SetStripedRows(bool striped)

A plain list of records reads cleaner without the zebra a dense spreadsheet needs, and without a cursor frame while it is not the focused widget.

SetCursorOnlyWhenFocused

C++
void SetCursorOnlyWhenFocused(bool onlyWhenFocused)

GetHeader

C++
const TSharedPtr<ATableHeader>& GetHeader() const

RefreshCells

C++
void RefreshCells()

The rows changed identity under an unchanged shape — a sort, a filter, a re-source. The visible range is still right and the cells in it are not, so they have to be regenerated rather than reused.

ScrollTo

C++
void ScrollTo(float offsetX, float offsetY)

GetScrollX

C++
float GetScrollX() const

GetScrollY

C++
float GetScrollY() const

EnsureCellVisible

C++
void EnsureCellVisible(int32_t row, int32_t column)

SetCursorCell

C++
void SetCursorCell(int32_t row, int32_t column, bool extend)

Moving the cursor with extend keeps the anchor where it is, which is what turns two cells into a rectangle.

GetCursorCell

C++
FTableCellRef GetCursorCell() const

GetAnchorCell

C++
FTableCellRef GetAnchorCell() const

IsCellSelected

C++
bool IsCellSelected(int32_t row, int32_t column) const

ClearSelection

C++
void ClearSelection()

GetSelectionBounds

C++
void GetSelectionBounds(int32_t& outFirstRow, int32_t& outLastRow, int32_t& outFirstColumn, int32_t& outLastColumn) const

The selection is a RECTANGLE, not a free set: that is what lets a consumer describe a bulk edit as "this column, these rows" instead of replaying an arbitrary cell list.

ComputeVisibleRange

C++
static FTableViewRange ComputeVisibleRange(int32_t rowCount, float rowHeight, float scrollY, float viewportHeight, const std::vector<float>& columnWidths, int32_t frozenColumns, float scrollX, float viewportWidth)

The virtualization decision, pure and static so the suite can pin it without a device, a font or a widget tree. columnWidths is what ATableHeader::LayoutColumns produced for the CONTENT width, not the viewport width — the two differ exactly when the table scrolls sideways.

ColumnOffset

C++
static float ColumnOffset(const std::vector<float>& widths, int32_t column)

Sum of the widths left of column; column == size() gives the total.

ComputeContentWidth

C++
static float ComputeContentWidth(const std::vector<FTableColumn>& columns, float viewportWidth)

Columns fill the viewport until they hit their minimums; past that the table scrolls sideways rather than crushing them to nothing.

GetVisibleRange

C++
const FTableViewRange& GetVisibleRange() const

GetInstantiatedCellCount

C++
int32_t GetInstantiatedCellCount() const

GetCellWidget

C++
TSharedPtr<AWidget> GetCellWidget(int32_t row, int32_t column) const

ComputeDesiredSize

C++
ArcVec2 ComputeDesiredSize(float scale) const override

ArrangeChildren

C++
void ArrangeChildren(const CGeometry& allottedGeo) override

OnPaint

C++
int32_t OnPaint(const CArcPaintArgs& args, const CGeometry& geo, CArcUIRenderer& renderer, int32_t layerId) const override

OnMouseButtonDown

C++
CReply OnMouseButtonDown(const CGeometry& geo, const CPointerEvent& event) override

OnMouseButtonUp

C++
CReply OnMouseButtonUp(const CGeometry& geo, const CPointerEvent& event) override

OnMouseMove

C++
CReply OnMouseMove(const CGeometry& geo, const CPointerEvent& event) override

OnMouseWheel

C++
CReply OnMouseWheel(const CGeometry& geo, const CPointerEvent& event) override

OnMouseButtonDoubleClick

C++
CReply OnMouseButtonDoubleClick(const CGeometry& geo, const CPointerEvent& event) override

OnKeyDown

C++
CReply OnKeyDown(const CGeometry& geo, const CKeyEvent& event) override

OnMouseLeave

C++
void OnMouseLeave(const CPointerEvent& event) override

IsFocusable

C++
bool IsFocusable() const override

GetNumChildren

C++
int32_t GetNumChildren() const override

GetChildAt

C++
TSharedPtr<AWidget> GetChildAt(int32_t index) const override

CanCacheDesiredSize

C++
bool CanCacheDesiredSize() const override

A constant: it takes what its slot gives it and scrolls the rest. Cells are generated during arrange and never enter this widget's own measure, so neither scrolling nor regeneration can move the answer — the same reasoning AListView opts in under.

DesiredSizeDependsOnChildren

C++
bool DesiredSizeDependsOnChildren() const override

GetTypeName

C++
const char* GetTypeName() const override
Generated from Arc/Widgets/ATableView.h via arc.json · Nov 5, 2026Version 1.0.0