class

AWidget::FPaintScope

Guard an opted-in container's OnPaint opens with. It answers whether the subtree can be replayed and, on destruction — so early returns are covered — closes the recording and re-folds the subtree.

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

A leaf needs no scope: its parent's slice already contains it, and the fold accepts a childless widget on CanRetainPaint() alone. Only a widget that paints children has to open one, because a container that opted in without folding would veto every ancestor above it. Only the functions are exported, not the class: dllexporting a type with reference members and a by-value CGeometry buys nothing and costs a C4251 per translation unit that includes this header.

Public functions

ReturnsNameDescription
FPaintScope
~FPaintScope
FPaintScope
FPaintScope&operator=
boolCanReplay
int32_tGetLayerThe layer the replayed slice reported when it was recorded.
int32_tRecordHands the scope the layer the body ended on and returns it, so the value survives into the next replay.

Function details

FPaintScope

C++
FPaintScope(const AWidget& widget, const CGeometry& allottedGeometry, CArcUIRenderer& renderer, int32_t layerId)

~FPaintScope

C++
~FPaintScope()

FPaintScope

C++
FPaintScope(const FPaintScope&) = delete

operator=

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

CanReplay

C++
bool CanReplay() const

GetLayer

C++
int32_t GetLayer() const

The layer the replayed slice reported when it was recorded.

Record

C++
int32_t Record(int32_t topLayer)

Hands the scope the layer the body ended on and returns it, so the value survives into the next replay. A body that never grows the layer can return layerId directly.

Generated from Arc/Framework/AWidget.h via arc.json · Nov 5, 2026Version 1.0.0