class

AWidget

Module
Arc
Header
#include "Arc/Framework/AWidget.h"
Namespace
Arcf

Constructors

SignatureNameDescription
AWidget() = defaultAWidget
virtual ~AWidget() = default~AWidget
AWidget(const AWidget&) = deleteAWidget

Public functions

ReturnsNameDescription
AWidget&operator=
ArcVec2ComputeDesiredSize
voidCacheDesiredSizeRecomputes the desired size only when something can have changed: this widget or a descendant was invalidated, the layout scale moved, or a global invalidation epoch fired.
boolCanCacheDesiredSizeOpt-in for the desired-size cache.
boolDesiredSizeDependsOnChildrenFalse when ComputeDesiredSize never reads a child size — a scroll box, a list, a tree, a viewport: their measure is a constant and the widgets under them are measured by their own arrange body instead.
uint32_tGetLayoutRevisionBumped every time this widget's own inputs are invalidated.
uint32_tGetLayoutEpochThe global invalidation epoch.
uint64_tGetMeasureCountHow many ComputeDesiredSize calls CacheDesiredSize has let through.
voidResetMeasureCount
ArcVec2GetDesiredSize
voidArrangeChildren
boolCanSkipArrangeOpt-in for the arrange skip.
uint64_tGetArrangeCountHow many arrange bodies ran, and how many were skipped.
uint64_tGetArrangeSkipCount
voidResetArrangeCounts
voidSetArrangeSkipEnabledKill switch for the arrange skip, so a suspected stale-layout bug can be confirmed or cleared in one process instead of across two builds.
boolIsArrangeSkipEnabled
int32_tOnPaint
boolCanRetainPaintOpt-in for the retained-paint cache.
voidInvalidatePaintDrops this widget's retained paint and every ancestor slice that contains it, without touching layout.
voidInvalidateAllPaintDrops every retained slice in the process without walking any tree.
uint32_tGetPaintEpoch
uint64_tGetInvalidationSerialTicks on every invalidation of any kind anywhere — a layout or paint walk, a slice dropped, a global drop.
uint64_tGetInPaintInvalidationSerial
voidSetPaintPassActive
voidSetInvalidationCensusCounts, by widget type, the invalidations raised outside a paint pass while on: the answer to "what keeps this window from skipping".
voidTakeInvalidationCensus
voidNoteLivePaintA paint that changes with the clock rather than with any write — a blinking caret, a scroll bar waiting out its hide delay — calls this, so the window it paints in keeps painting while it lasts.
uint64_tGetLivePaintCount
voidNoteRepaintInFor a paint that changes with the clock but only at a known moment — a caret's next blink, the end of a scroll bar's hide delay — instead of NoteLivePaint: the window may skip its paints until then, rather than painting every frame of the wait.
voidResetRepaintDeadline
doubleTakeRepaintDeadlineThe earliest NoteRepaintIn of the paint since the reset, on the SteadyNowSeconds clock; negative when none asked.
doubleSteadyNowSeconds
voidBeginObservedCollectThe observed widgets a window's paint marked on screen, gathered so a frame that skips that paint can keep them on the poll list: otherwise every bound value in the window stops being polled the first frame nothing repaints it, and nothing would wake it again.
voidEndObservedCollect
voidKeepObservedOnScreen
uint64_tGetPaintCountHow many OnPaint bodies ran, and how many were answered from a retained slice instead.
uint64_tGetPaintReplayCount
voidResetPaintCounts
voidSetRetainedPaintEnabledKill switch, so a suspected stale-pixel bug can be confirmed or cleared in one process instead of across two builds.
boolIsRetainedPaintEnabled
voidCensusRetainedPaint
boolPollAttributesRe-evaluates every bound attribute this widget paints or measures from and invalidates on the ones that moved.
boolAreBoundAttributesObservedTrue once this widget is on the poll list.
uint32_tPollObservedAttributesRuns PollAttributes on every observed widget that was on screen last frame and drops the rest off the list.
uint32_tGetObservedWidgetCount
voidStopObservingTreeTakes root and everything under it out of the next poll, as if it had not painted last frame.
boolIsAttributePollDueWhether the next PollObservedAttributes would run this widget's getters.
voidObserveAttributesPuts this widget on the poll list.
voidNoteObservedPaintAn observed widget's OnPaint calls this before anything else: it marks the widget on screen for the next poll and, when a slice is being recorded around it, writes it into that slice so the replay can keep marking it.
CReplyOnMouseButtonDown
CReplyOnMouseButtonDoubleClickFired instead of a second OnMouseButtonDown when the same button lands twice within the double-click window on the same widget (U1).
boolOnContextMenuContext-menu contract (U1): the first widget up the hit path that fills the builder wins; the input processor opens the framework menu at the cursor.
CReplyOnMouseButtonUp
CReplyOnMouseMove
CReplyOnMouseWheel
CReplyOnKeyDownKey events start at the focused widget and, while unhandled, are offered to each ancestor in turn until one returns Handled — the same leaf-to-root walk pointer events already take.
CReplyOnKeyUp
CReplyOnKeyChar
CReplyOnTextComposition
voidOnMouseEnter
voidOnMouseLeave
boolOnDragEnterDrop-target contract.
boolOnDragOver
voidOnDragLeave
boolOnDrop
boolWantsTextInputA widget that edits text says so here (and whether it hides it), so a host can raise a platform on-screen keyboard over it.
voidOnFocusReceived
voidOnFocusLost
voidOnMouseCaptureLost
EArcCursorTypeOnCursorQuery
EHitTestResultOnHitTest
boolClaimsPointerExclusively
int32_tGetNumChildren
TSharedPtr<AWidget>GetChildAt
voidSetCachedGeometry
const CGeometry&GetCachedGeometry
voidSetVisibility
EVisibilityGetVisibility
boolIsVisible
voidSetEnabledEnabled, hovered and focused are painted, not measured: they must drop the paint cache without throwing away a measure and an arrange that are still correct.
boolIsEnabled
boolIsHovered
voidSetHovered
boolHasKeyboardFocus
boolIsFocusVisibleFocus that arrived from the keyboard (Tab, arrows) rather than a click — the :focus-visible rule.
voidSetPreviewStatePins a pointer or keyboard state for display.
EArcPreviewStateGetPreviewState
boolIsPreviewPressed
voidSetCursorAlso applies to system cursor
EArcCursorTypeGetCursor
voidSetTag
const CName&GetTag
voidSetToolTipText
voidSetToolTipRich tooltip (U1): an arbitrary widget hosted in the tooltip popup window instead of plain text lines — icons, keycap chips, asset thumbnails.
const TSharedPtr<AWidget>&GetToolTip
const CText&GetToolTipText
voidSetAccessibleLabel
const CText&GetAccessibleLabel
EAccessibleRoleGetAccessibleRoleWhat a screen reader calls this control.
std::stringGetAccessibleValue
std::stringGetAccessibleNameThe accessible label when one was set; otherwise the first text found under the widget (an icon glyph is not text); otherwise the tooltip — which is what names an icon-only toolbar button.
voidSetParentWidgetParent tracking (weak reference to avoid cycles)
TSharedPtr<AWidget>GetParentWidget
voidSetRenderTransformA transform on how this widget paints and is hit, not on its layout, applied about the pivot (a fraction of its size, the centre by default).
const CArcRenderTransform&GetRenderTransform
voidSetRenderTransformPivot
const ArcVec2&GetRenderTransformPivot
boolHasRenderTransform
ArcMat3ComputeRenderTransformThe render transform in absolute space for the given layout geometry: about the pivot point of its rect.
voidArrangeChildWidgetArranges a child into childGeometry with the child's own render transform folded into the geometry it caches, so the transform reaches its hit test and every geometry built below it.
int32_tPaintChildWidgetPaints a child from its cached geometry under its render transform.
voidSetRenderOpacityThe opacity multiplies into every vertex colour the widget emits, so a slice recorded at one value paints the wrong alpha at another.
floatGetRenderOpacity
const char*GetTypeName
boolIsTextInputTrue for widgets that consume plain keystrokes as text while focused (editable text boxes and their kin).
boolConsumesTabTrue only for a widget that types Tab as a character (the multi-line box).
EFocusVisualGetFocusVisualHow this widget's keyboard focus is drawn by CArcFocusRing.
boolPaintsOwnFocusTrue for a widget whose own paint shows keyboard focus where the framework's ring would be wrong (the ring round a slider's thumb, a tree's or list's keyboard row): it answers None above and still shows focus, which the keyboard audit has to know.
boolOwnsKeyboardTrue while a self-drawn overlay (a command palette) holds the keyboard the way a modal does: Tab is its own key there, so the keyboard audit closes it with Escape before tabbing the window.
floatGetFocusRadiusThe corner radius of the control's own outline.
boolAllowsKeyBubblingWhether a key this widget declined may be offered to its ancestors.
boolIsFocusableFocusability predicate for directional (gamepad/keyboard) navigation — the FNavigationConfig seam.
boolOnActivateA gamepad/keyboard accept aimed at this widget.
voidInvalidateMarks this widget's desired size dirty, then walks up the parent chain flagging ancestors.
boolNeedsLayout
voidClearLayoutFlag
boolNeedsSubtreeLayoutTrue when this widget or anything below it needs a fresh measure.
voidInvalidateAllWidgetsDrops every cached desired size in the process, without walking any tree.
voidSetFocusScopeIdThe focus scope this widget roots, None on everything else.
const CName&GetFocusScopeId
boolIsFocusScopeRoot

Function details

AWidget

C++
AWidget() = default

~AWidget

C++
virtual ~AWidget() = default

AWidget

C++
AWidget(const AWidget&) = delete

operator=

C++
AWidget& operator=(const AWidget&) = delete

ComputeDesiredSize

C++
virtual ArcVec2 ComputeDesiredSize(float layoutScaleMultiplier) const = 0

CacheDesiredSize

C++
void CacheDesiredSize(float layoutScaleMultiplier)

Recomputes the desired size only when something can have changed: this widget or a descendant was invalidated, the layout scale moved, or a global invalidation epoch fired. Also repairs the parent links of every enumerable child so Invalidate() has a chain to walk.

CanCacheDesiredSize

C++
virtual bool CanCacheDesiredSize() const

Opt-in for the desired-size cache. A widget may only return true when every input to its ComputeDesiredSize is either constant or routed through Invalidate(): bound attributes, measure-reads-arrange feedback, children generated during arrange, and children that are not reported by GetChildAt all disqualify it. Default is false, so a widget nobody audited keeps the previous always-recompute behaviour.

DesiredSizeDependsOnChildren

C++
virtual bool DesiredSizeDependsOnChildren() const

False when ComputeDesiredSize never reads a child size — a scroll box, a list, a tree, a viewport: their measure is a constant and the widgets under them are measured by their own arrange body instead. The measure pass then stops here, where before it walked the whole panel below to hash sizes that could not move this widget.

GetLayoutRevision

C++
uint32_t GetLayoutRevision() const

Bumped every time this widget's own inputs are invalidated. Anything that memoizes a per-widget derived result (a text block's shaped layout) keys on it instead of re-deriving the key from the inputs.

GetLayoutEpoch

C++
static uint32_t GetLayoutEpoch()

The global invalidation epoch. A memo built from process-wide state (the active style set, the font manager) is only valid while this still matches, because InvalidateAllWidgets is what a style or font swap announces itself with.

GetMeasureCount

C++
static uint64_t GetMeasureCount()

How many ComputeDesiredSize calls CacheDesiredSize has let through. The layout tests assert that a second pass over an unchanged tree computes nothing at all; without a counter the only available evidence would be a wall-clock delta, which proves nothing on a loaded machine.

ResetMeasureCount

C++
static void ResetMeasureCount()

GetDesiredSize

C++
ArcVec2 GetDesiredSize() const

ArrangeChildren

C++
virtual void ArrangeChildren(const CGeometry& allottedGeometry)

CanSkipArrange

C++
virtual bool CanSkipArrange() const

Opt-in for the arrange skip. A widget may only return true when ArrangeChildren is a pure function of the allotted geometry, its own attributes and its children's cached desired sizes — and every input that can move announces itself through Invalidate(). A body that clamps a scroll offset, recycles rows, re-elides text against the width it just handed out, or reads a clock disqualifies the widget: skipping it would freeze the very thing the body exists to update. The default answer is "yes" for a widget that reports no children, because the base ArrangeChildren is empty and there is nothing to freeze. Every widget that OVERRIDES ArrangeChildren therefore has to state its own answer; one that stays silent reports children and is refused by this default.

GetArrangeCount

C++
static uint64_t GetArrangeCount()

How many arrange bodies ran, and how many were skipped. The layout tests pin that a second pass over an unchanged tree arranges nothing; a wall-clock delta would prove nothing on a loaded machine.

GetArrangeSkipCount

C++
static uint64_t GetArrangeSkipCount()

ResetArrangeCounts

C++
static void ResetArrangeCounts()

SetArrangeSkipEnabled

C++
static void SetArrangeSkipEnabled(bool enabled)

Kill switch for the arrange skip, so a suspected stale-layout bug can be confirmed or cleared in one process instead of across two builds.

IsArrangeSkipEnabled

C++
static bool IsArrangeSkipEnabled()

OnPaint

C++
virtual int32_t OnPaint(const CArcPaintArgs& args, const CGeometry& allottedGeometry, CArcUIRenderer& renderer, int32_t layerId) const = 0

CanRetainPaint

C++
virtual bool CanRetainPaint() const

Opt-in for the retained-paint cache. A widget may only return true when its OnPaint output is a pure function of the arranged geometry, its own attributes and its children — and every input that can move announces itself through InvalidatePaint() (or Invalidate(), which implies it). A bound attribute the body paints from, a running animation, a blinking caret, a selection highlight, rows a view recycles per frame, or a surface re-rendered every frame all disqualify it: replaying would freeze exactly what the body exists to update. The default is false, so a widget nobody audited keeps painting.

InvalidatePaint

C++
void InvalidatePaint()

Drops this widget's retained paint and every ancestor slice that contains it, without touching layout. This is the lighter sibling of Invalidate(): hover, press, focus, a swatch colour — anything that changes only what is drawn — belongs here, because invalidating the layout for it would throw away a measure and an arrange that are still correct. The walk runs to the root rather than stopping at the first flagged ancestor: only the OUTERMOST opted-in widget in a nesting run owns a slice, so the widgets in between hold nothing to stop at and the stale slice above them would survive.

InvalidateAllPaint

C++
static void InvalidateAllPaint()

Drops every retained slice in the process without walking any tree. The hammer for changes no widget can observe locally: a style set swap, reloaded fonts, a font atlas rebuilt under already-baked glyph UVs, a device pixel density change.

GetPaintEpoch

C++
static uint32_t GetPaintEpoch()

GetInvalidationSerial

C++
static uint64_t GetInvalidationSerial()

Ticks on every invalidation of any kind anywhere — a layout or paint walk, a slice dropped, a global drop. The window manager skips a window's paint only while this has not moved since the window last painted. Invalidations raised while a paint pass runs count apart: a widget re-flagging itself mid-paint is judged by what it then draws, and counting it here would let one window's paint keep every other window from ever skipping.

GetInPaintInvalidationSerial

C++
static uint64_t GetInPaintInvalidationSerial()

SetPaintPassActive

C++
static void SetPaintPassActive(bool active)

SetInvalidationCensus

C++
static void SetInvalidationCensus(bool enabled)

Counts, by widget type, the invalidations raised outside a paint pass while on: the answer to "what keeps this window from skipping".

TakeInvalidationCensus

C++
static void TakeInvalidationCensus(std::vector<std::pair<std::string, uint64_t>>& outSortedDesc)

NoteLivePaint

C++
static void NoteLivePaint()

A paint that changes with the clock rather than with any write — a blinking caret, a scroll bar waiting out its hide delay — calls this, so the window it paints in keeps painting while it lasts.

GetLivePaintCount

C++
static uint64_t GetLivePaintCount()

NoteRepaintIn

C++
static void NoteRepaintIn(double seconds)

For a paint that changes with the clock but only at a known moment — a caret's next blink, the end of a scroll bar's hide delay — instead of NoteLivePaint: the window may skip its paints until then, rather than painting every frame of the wait. The window keeps the earliest request its paint made.

ResetRepaintDeadline

C++
static void ResetRepaintDeadline()

TakeRepaintDeadline

C++
static double TakeRepaintDeadline()

The earliest NoteRepaintIn of the paint since the reset, on the SteadyNowSeconds clock; negative when none asked.

SteadyNowSeconds

C++
static double SteadyNowSeconds()

BeginObservedCollect

C++
static void BeginObservedCollect(std::vector<std::weak_ptr<const AWidget>>* collector)

The observed widgets a window's paint marked on screen, gathered so a frame that skips that paint can keep them on the poll list: otherwise every bound value in the window stops being polled the first frame nothing repaints it, and nothing would wake it again.

EndObservedCollect

C++
static void EndObservedCollect()

KeepObservedOnScreen

C++
static void KeepObservedOnScreen(const std::vector<std::weak_ptr<const AWidget>>& widgets)

GetPaintCount

C++
static uint64_t GetPaintCount()

How many OnPaint bodies ran, and how many were answered from a retained slice instead. The tests assert that a second pass over an unchanged tree replays rather than repaints; a wall-clock delta would prove nothing on a loaded machine.

GetPaintReplayCount

C++
static uint64_t GetPaintReplayCount()

ResetPaintCounts

C++
static void ResetPaintCounts()

SetRetainedPaintEnabled

C++
static void SetRetainedPaintEnabled(bool enabled)

Kill switch, so a suspected stale-pixel bug can be confirmed or cleared in one process instead of across two builds.

IsRetainedPaintEnabled

C++
static bool IsRetainedPaintEnabled()

CensusRetainedPaint

C++
static void CensusRetainedPaint(const TSharedPtr<AWidget>& root, std::vector<std::pair<std::string, FRetainedPaintCensus>>& outByType)

PollAttributes

C++
virtual bool PollAttributes()

Re-evaluates every bound attribute this widget paints or measures from and invalidates on the ones that moved. Returns whether any is still bound — false takes the widget off the poll list. A widget that overrides this may treat its bound attributes as plain values in CanCacheDesiredSize / CanSkipArrange / CanRetainPaint while AreBoundAttributesObserved() holds.

AreBoundAttributesObserved

C++
bool AreBoundAttributesObserved() const

True once this widget is on the poll list. Registration needs a shared owner, so a widget built on the stack never observes and keeps the conservative answers.

PollObservedAttributes

C++
static uint32_t PollObservedAttributes()

Runs PollAttributes on every observed widget that was on screen last frame and drops the rest off the list. Once a frame, before layout, from the window manager. Returns how many were polled. Only the ones on screen: a getter belongs to the widget's own frame, and the shell keeps whole hidden panels and parked popups alive with their bindings — six hundred of them against no polls at all was the shape this list had before it pruned itself.

GetObservedWidgetCount

C++
static uint32_t GetObservedWidgetCount()

StopObservingTree

C++
static void StopObservingTree(const TSharedPtr<AWidget>& root)

Takes root and everything under it out of the next poll, as if it had not painted last frame. A window that is closing or loses its root still has holders (the input processor's hovered path, a caller's reference) keeping the tree alive for a frame, and its getters may point into an owner that is already gone — the Project Settings crash was exactly that poll.

IsAttributePollDue

C++
bool IsAttributePollDue() const

Whether the next PollObservedAttributes would run this widget's getters.

ObserveAttributes

C++
void ObserveAttributes()

Puts this widget on the poll list. Called by TAttribute::SetOwner / Bind through CArcAttributeOwner; a widget that binds its own attributes without an owner can call it directly.

NoteObservedPaint

C++
void NoteObservedPaint(CArcUIRenderer& renderer) const

An observed widget's OnPaint calls this before anything else: it marks the widget on screen for the next poll and, when a slice is being recorded around it, writes it into that slice so the replay can keep marking it. Before every return, or an empty text block would drop off the poll and its slice would never learn it filled.

OnMouseButtonDown

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

OnMouseButtonDoubleClick

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

Fired instead of a second OnMouseButtonDown when the same button lands twice within the double-click window on the same widget (U1). Unhandled falls back to the plain button-down path, so widgets that roll their own timers keep working until migrated.

OnContextMenu

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

Context-menu contract (U1): the first widget up the hit path that fills the builder wins; the input processor opens the framework menu at the cursor. Runs only when no OnMouseButtonUp handler consumed the right-button release, so widgets with bespoke menus keep them.

OnMouseButtonUp

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

OnMouseMove

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

OnMouseWheel

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

OnKeyDown

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

Key events start at the focused widget and, while unhandled, are offered to each ancestor in turn until one returns Handled — the same leaf-to-root walk pointer events already take. A handler that wants a declined key to die where it is returns CReply::Unhandled().StopBubbling().

OnKeyUp

C++
virtual CReply OnKeyUp(const CGeometry& geo, const CKeyEvent& event)

OnKeyChar

C++
virtual CReply OnKeyChar(const CGeometry& geo, const CCharacterEvent& event)

OnTextComposition

C++
virtual CReply OnTextComposition(const CGeometry& geo, const CCompositionEvent& event)

OnMouseEnter

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

OnMouseLeave

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

OnDragEnter

C++
virtual bool OnDragEnter(const CGeometry& geo, const CDragDropEvent& event)

Drop-target contract. While a drag operation is live the drag-drop manager resolves the widget under the cursor on every move — the widget holding mouse capture (the drag source) and its subtree are skipped — and walks that path leaf to root offering the drag. OnDragEnter is the offer: return true to become the target, false to pass it up the path. A widget that declines must leave no state behind, because it never receives OnDragLeave. The target then gets OnDragOver on every move (return false to show the rejected cursor without giving the target up) and exactly one OnDragLeave when the cursor moves off it or the drag ends. OnDrop lands before that final leave; returning true reports the drop as consumed.

OnDragOver

C++
virtual bool OnDragOver(const CGeometry& geo, const CDragDropEvent& event)

OnDragLeave

C++
virtual void OnDragLeave(const CDragDropEvent& event)

OnDrop

C++
virtual bool OnDrop(const CGeometry& geo, const CDragDropEvent& event)

WantsTextInput

C++
virtual bool WantsTextInput(bool& outPassword) const

A widget that edits text says so here (and whether it hides it), so a host can raise a platform on-screen keyboard over it. The default follows IsTextInput(), so a custom widget that types (a console line, a palette query) gets the IME without opting in.

OnFocusReceived

C++
virtual void OnFocusReceived(const CFocusEvent& event)

OnFocusLost

C++
virtual void OnFocusLost(const CFocusEvent& event)

OnMouseCaptureLost

C++
virtual void OnMouseCaptureLost()

OnCursorQuery

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

OnHitTest

C++
virtual EHitTestResult OnHitTest(const CGeometry& geo, const ArcVec2& absolutePosition) const

ClaimsPointerExclusively

C++
virtual bool ClaimsPointerExclusively(const CGeometry& geo, const ArcVec2& absolutePosition) const

GetNumChildren

C++
virtual int32_t GetNumChildren() const

GetChildAt

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

SetCachedGeometry

C++
void SetCachedGeometry(const CGeometry& geo)

GetCachedGeometry

C++
const CGeometry& GetCachedGeometry() const

SetVisibility

C++
void SetVisibility(EVisibility vis)

GetVisibility

C++
EVisibility GetVisibility() const

IsVisible

C++
bool IsVisible() const

SetEnabled

C++
void SetEnabled(bool enabled)

Enabled, hovered and focused are painted, not measured: they must drop the paint cache without throwing away a measure and an arrange that are still correct.

IsEnabled

C++
bool IsEnabled() const

IsHovered

C++
bool IsHovered() const

SetHovered

C++
void SetHovered(bool hovered)

HasKeyboardFocus

C++
bool HasKeyboardFocus() const

IsFocusVisible

C++
bool IsFocusVisible() const

Focus that arrived from the keyboard (Tab, arrows) rather than a click — the :focus-visible rule. A ring on every clicked button is noise; no ring on a tabbed-to button leaves a keyboard user lost.

SetPreviewState

C++
void SetPreviewState(EArcPreviewState state)

Pins a pointer or keyboard state for display. Hover and Focused set the flags the widget already reads; Pressed is reported by IsPreviewPressed, which the spec-driven widgets OR into their own press. The pin holds until the widget is hovered, focused or left for real, so a gallery shows it on a hit-test-invisible row.

GetPreviewState

C++
EArcPreviewState GetPreviewState() const

IsPreviewPressed

C++
bool IsPreviewPressed() const

SetCursor

C++
inline void SetCursor(EArcCursorType cursor)

Also applies to system cursor

GetCursor

C++
EArcCursorType GetCursor() const

SetTag

C++
void SetTag(const CName& tag)

GetTag

C++
const CName& GetTag() const

SetToolTipText

C++
void SetToolTipText(const CText& text)

SetToolTip

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

Rich tooltip (U1): an arbitrary widget hosted in the tooltip popup window instead of plain text lines — icons, keycap chips, asset thumbnails. Takes precedence over SetToolTipText when set.

GetToolTip

C++
const TSharedPtr<AWidget>& GetToolTip() const

GetToolTipText

C++
const CText& GetToolTipText() const

SetAccessibleLabel

C++
void SetAccessibleLabel(const CText& label)

GetAccessibleLabel

C++
const CText& GetAccessibleLabel() const

GetAccessibleRole

C++
virtual EAccessibleRole GetAccessibleRole() const

What a screen reader calls this control. Widgets override the role and value; deriving them from the type name broke for every subclass and left numeric, radio and multi-line fields unnamed.

GetAccessibleValue

C++
virtual std::string GetAccessibleValue() const

GetAccessibleName

C++
virtual std::string GetAccessibleName() const

The accessible label when one was set; otherwise the first text found under the widget (an icon glyph is not text); otherwise the tooltip — which is what names an icon-only toolbar button.

SetParentWidget

C++
void SetParentWidget(TSharedPtr<AWidget> parent)

Parent tracking (weak reference to avoid cycles)

GetParentWidget

C++
TSharedPtr<AWidget> GetParentWidget() const

SetRenderTransform

C++
void SetRenderTransform(const CArcRenderTransform& transform)

A transform on how this widget paints and is hit, not on its layout, applied about the pivot (a fraction of its size, the centre by default). Its parent applies it — containers arrange and paint their children through ArrangeChildWidget / PaintChildWidget — so the whole subtree turns with it and hit testing follows. A layout invalidation, because the transform lives in the arranged geometry the hit test reads.

GetRenderTransform

C++
const CArcRenderTransform& GetRenderTransform() const

SetRenderTransformPivot

C++
void SetRenderTransformPivot(const ArcVec2& pivot)

GetRenderTransformPivot

C++
const ArcVec2& GetRenderTransformPivot() const

HasRenderTransform

C++
bool HasRenderTransform() const

ComputeRenderTransform

C++
ArcMat3 ComputeRenderTransform(const CGeometry& geo) const

The render transform in absolute space for the given layout geometry: about the pivot point of its rect.

ArrangeChildWidget

C++
static void ArrangeChildWidget(AWidget& child, const CGeometry& childGeometry)

Arranges a child into childGeometry with the child's own render transform folded into the geometry it caches, so the transform reaches its hit test and every geometry built below it.

PaintChildWidget

C++
static int32_t PaintChildWidget(const AWidget& child, const CArcPaintArgs& args, CArcUIRenderer& renderer, int32_t layerId)

Paints a child from its cached geometry under its render transform.

SetRenderOpacity

C++
void SetRenderOpacity(float opacity)

The opacity multiplies into every vertex colour the widget emits, so a slice recorded at one value paints the wrong alpha at another.

GetRenderOpacity

C++
float GetRenderOpacity() const

GetTypeName

C++
virtual const char* GetTypeName() const

IsTextInput

C++
virtual bool IsTextInput() const

True for widgets that consume plain keystrokes as text while focused (editable text boxes and their kin). The input processor suppresses modifier-less command chords when such a widget has focus.

ConsumesTab

C++
virtual bool ConsumesTab() const

True only for a widget that types Tab as a character (the multi-line box). Every other text input lets Tab move focus, which is the only way out of a single-line field from the keyboard.

GetFocusVisual

C++
virtual EFocusVisual GetFocusVisual() const

How this widget's keyboard focus is drawn by CArcFocusRing. Text inputs answer None (their focused border says it); a row-like widget answers InsetBorder.

PaintsOwnFocus

C++
virtual bool PaintsOwnFocus() const

True for a widget whose own paint shows keyboard focus where the framework's ring would be wrong (the ring round a slider's thumb, a tree's or list's keyboard row): it answers None above and still shows focus, which the keyboard audit has to know.

OwnsKeyboard

C++
virtual bool OwnsKeyboard() const

True while a self-drawn overlay (a command palette) holds the keyboard the way a modal does: Tab is its own key there, so the keyboard audit closes it with Escape before tabbing the window.

GetFocusRadius

C++
virtual float GetFocusRadius() const

The corner radius of the control's own outline. The focus ring is drawn concentric with it (this plus the gap and stroke), so a pill toggle gets a pill ring and a 2 px checkbox a near-square one; one fixed radius made every ring a 4 px rounded box whatever it circled.

AllowsKeyBubbling

C++
virtual bool AllowsKeyBubbling() const

Whether a key this widget declined may be offered to its ancestors. Overriding to false restores the pre-bubbling behaviour for this widget and everything under it — the opt-out for a widget tree (a game HUD arbitrating its own input, say) that must not have its leftover keys reinterpreted by whatever it happens to be parented to. The framework fallbacks still run; only the walk stops.

IsFocusable

C++
virtual bool IsFocusable() const

Focusability predicate for directional (gamepad/keyboard) navigation — the FNavigationConfig seam. Interactive widgets override to true; navigation additionally requires the widget to be visible and enabled.

OnActivate

C++
virtual bool OnActivate()

A gamepad/keyboard accept aimed at this widget. Widgets translate the activation internally (fire the click delegate, toggle, open) instead of receiving a synthesized mouse click. Returns true when the activation was consumed.

Invalidate

C++
void Invalidate()

Marks this widget's desired size dirty, then walks up the parent chain flagging ancestors. The walk stops at the first ancestor already flagged — everything above it was flagged when it was.

NeedsLayout

C++
bool NeedsLayout() const

ClearLayoutFlag

C++
void ClearLayoutFlag()

NeedsSubtreeLayout

C++
bool NeedsSubtreeLayout() const

True when this widget or anything below it needs a fresh measure.

InvalidateAllWidgets

C++
static void InvalidateAllWidgets()

Drops every cached desired size in the process, without walking any tree. This is the hammer for changes no widget can observe locally: active style set swapped, fonts reloaded, application scale changed.

SetFocusScopeId

C++
void SetFocusScopeId(const CName& id)

The focus scope this widget roots, None on everything else. The command system walks from the focused widget to the root, collects the scopes named along the way and offers a chord to them innermost first, before the pushed lists and the global keymap. That is what makes a shortcut follow the panel the user is in; the editor used to scope by pointer hover, which retargeted the chord the moment the mouse drifted off the panel mid-edit. Focus itself is unchanged — OnFocusReceived/OnFocusLost and CReply::SetUserFocus still own it, and a scope is only read off the path they produce.

GetFocusScopeId

C++
const CName& GetFocusScopeId() const

IsFocusScopeRoot

C++
bool IsFocusScopeRoot() const
Generated from Arc/Framework/AWidget.h via arc.json · Nov 5, 2026Version 1.0.0