class

ASpreadsheetCell

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

Properties

TypeNameDescription
ArcDelegate<void(const std::string&)>OnCommitted
ArcDelegate<void()>OnEditRequested
ArcDelegate<void()>OnEditCancelled
ArcDelegate<void(int32_t, int32_t)>OnNavigateAfter a commit by Enter (0, +1) or Tab (+1, 0): the host moves the active cell by (columns, rows).
ArcDelegate<void(bool)>OnClickedA click on the cell; true when Shift extends the block.
ArcDelegate<void()>OnCopyRequested
ArcDelegate<void()>OnPasteRequested
ArcDelegate<void(int32_t, int32_t)>OnFillDraggedA finished fill drag: rows down and columns right (negative is up or left), never both.
std::function<bool(const CKeyEvent&)>OnKeyHost hooks run before the cell's own keys and menu; true claims.
std::function<bool(CMenuBuilder&)>OnBuildMenu
TSharedPtr<AWidget>FocusTargetWhere a click parks keyboard focus (the grid's focusable body); the cell itself when unset.

Public functions

ReturnsNameDescription
ARC_WIDGET_ARGS
voidConstruct
voidSetText
std::stringGetText
voidSetTextSourceA live text source read at paint (the cell's model value).
voidSetValueWidgetA typed editor shown in place of the painted text.
voidSetSelected
boolIsSelected
voidSetActiveThe active cell of the grid: the 2 px frame and the fill handle, whether or not the grid itself holds keyboard focus.
boolIsActive
voidSetHasError
voidSetReadOnly
boolIsEditing
boolBeginEditOpens the inline field (text cells) or asks the host to focus its editor (OnEditRequested).
voidCommitEditCommits the inline field's text through OnCommitted.
voidCancelEditCloses the inline field and restores the text it opened with.
std::stringGetEditTextThe text the inline field holds while editing.
voidSetEditText
ArcRectFillHandleRectThe bottom-right drag-fill handle of a cell rect.
voidFillRangeWhole cells a fill drag of delta covers: the dominant axis only, as a spreadsheet does, counted in this cell's size.
ArcVec2ComputeDesiredSize
voidArrangeChildren
int32_tOnPaint
CReplyOnMouseButtonDown
CReplyOnMouseButtonDoubleClick
CReplyOnMouseMove
CReplyOnMouseButtonUp
CReplyOnKeyDown
boolOnContextMenu
voidOnMouseEnter
voidOnMouseCaptureLost
EArcCursorTypeOnCursorQuery
voidSetFocusableA grid that keeps one keyboard stop for all its cells (the Data Table: the arrows move the active cell) takes the cells out of the Tab order; the inline field still takes focus while editing.
boolIsFocusable
voidSetAlignRightRight-aligned text, the way a table column of figures reads.
EFocusVisualGetFocusVisual
boolPaintsOwnFocusThe spec's focused state is the 2 px inset FocusRing frame the cell paints itself; a ring outside it would sit over the neighbours.
boolOnActivate
int32_tGetFillRowsThe fill drag in progress, in cells (for the preview outline).
int32_tGetFillColumns
const char*GetTypeName

Function details

ARC_WIDGET_ARGS

C++
ARC_WIDGET_ARGS(ASpreadsheetCell) ARC_ARG(std::string, Text) ARC_ARG(bool, Numeric) ARC_ARG(bool, ReadOnly) ARC_WIDGET_ARGS_END() static constexpr float kFillHandleSize = 6.0f

Construct

C++
void Construct(const CArguments& args)

SetText

C++
void SetText(const std::string& text)

GetText

C++
std::string GetText() const

SetTextSource

C++
void SetTextSource(std::function<std::string()> source)

A live text source read at paint (the cell's model value).

SetValueWidget

C++
void SetValueWidget(TSharedPtr<AWidget> widget)

A typed editor shown in place of the painted text.

SetSelected

C++
void SetSelected(bool selected)

IsSelected

C++
bool IsSelected() const

SetActive

C++
void SetActive(bool active)

The active cell of the grid: the 2 px frame and the fill handle, whether or not the grid itself holds keyboard focus.

IsActive

C++
bool IsActive() const

SetHasError

C++
void SetHasError(bool hasError)

SetReadOnly

C++
void SetReadOnly(bool readOnly)

IsEditing

C++
bool IsEditing() const

BeginEdit

C++
bool BeginEdit()

Opens the inline field (text cells) or asks the host to focus its editor (OnEditRequested). False for a read-only or disabled cell.

CommitEdit

C++
void CommitEdit()

Commits the inline field's text through OnCommitted.

CancelEdit

C++
void CancelEdit()

Closes the inline field and restores the text it opened with.

GetEditText

C++
std::string GetEditText() const

The text the inline field holds while editing.

SetEditText

C++
void SetEditText(const std::string& text)

FillHandleRect

C++
static ArcRect FillHandleRect(const ArcRect& cell)

The bottom-right drag-fill handle of a cell rect.

FillRange

C++
static void FillRange(const ArcVec2& delta, const ArcVec2& cellSize, int32_t& outRows, int32_t& outColumns)

Whole cells a fill drag of delta covers: the dominant axis only, as a spreadsheet does, counted in this cell's size.

ComputeDesiredSize

C++
ArcVec2 ComputeDesiredSize(float scale) const override

ArrangeChildren

C++
void ArrangeChildren(const CGeometry& geo) 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

OnMouseButtonDoubleClick

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

OnMouseMove

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

OnMouseButtonUp

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

OnKeyDown

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

OnContextMenu

C++
bool OnContextMenu(const CGeometry& geo, const CPointerEvent& event, CMenuBuilder& builder) override

OnMouseEnter

C++
void OnMouseEnter(const CGeometry& geo, const CPointerEvent& event) override

OnMouseCaptureLost

C++
void OnMouseCaptureLost() override

OnCursorQuery

C++
EArcCursorType OnCursorQuery(const CGeometry& geo, const CPointerEvent& event) const override

SetFocusable

C++
void SetFocusable(bool focusable)

A grid that keeps one keyboard stop for all its cells (the Data Table: the arrows move the active cell) takes the cells out of the Tab order; the inline field still takes focus while editing.

IsFocusable

C++
bool IsFocusable() const override

SetAlignRight

C++
void SetAlignRight(bool alignRight)

Right-aligned text, the way a table column of figures reads.

GetFocusVisual

C++
EFocusVisual GetFocusVisual() const override

PaintsOwnFocus

C++
bool PaintsOwnFocus() const override

The spec's focused state is the 2 px inset FocusRing frame the cell paints itself; a ring outside it would sit over the neighbours.

OnActivate

C++
bool OnActivate() override

GetFillRows

C++
int32_t GetFillRows() const

The fill drag in progress, in cells (for the preview outline).

GetFillColumns

C++
int32_t GetFillColumns() const

GetTypeName

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