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
| Returns | Name | Description |
|---|---|---|
FPaintScope | ||
~FPaintScope | ||
FPaintScope | ||
FPaintScope& | operator= | |
bool | CanReplay | |
int32_t | GetLayer | The layer the replayed slice reported when it was recorded. |
int32_t | Record | Hands the scope the layer the body ended on and returns it, so the value survives into the next replay. |
Function details
FPaintScope
FPaintScope(const AWidget& widget, const CGeometry& allottedGeometry, CArcUIRenderer& renderer, int32_t layerId)~FPaintScope
~FPaintScope()FPaintScope
FPaintScope(const FPaintScope&) = deleteoperator=
FPaintScope& operator=(const FPaintScope&) = deleteCanReplay
bool CanReplay() constGetLayer
int32_t GetLayer() constThe layer the replayed slice reported when it was recorded.
Record
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.