|
|
Donner SVG 0.8.0-pre
SVG editor and embeddable C++20 engine.
|
Scoped mutation helper that runs cleanup before committing the mutation revision. More...
#include "donner/svg/SVGElement.h"
Public Member Functions | |
| ScopedMutation (const ElementAnchor &handle, InvalidateCallback invalidateOnScopeExit) | |
| Begin a mutation batch and retain the cleanup callback for scope exit. | |
| ScopedMutation (const ScopedMutation &other)=delete | |
| ScopedMutation (ScopedMutation &&other)=delete | |
| ScopedMutation & | operator= (const ScopedMutation &other)=delete |
| ScopedMutation & | operator= (ScopedMutation &&other)=delete |
| DocumentWriteAccess & | access () |
| Get the active write access for this mutation. | |
Scoped mutation helper that runs cleanup before committing the mutation revision.
This is intended for element setters that need to invalidate cached computed state after the raw SVG attribute component is changed. The callback runs while the write access from the mutation batch is still active, and before the coalesced mutation revision is committed.
|
inline |
Begin a mutation batch and retain the cleanup callback for scope exit.
| handle | Element anchor whose document owns the mutation batch. |
| invalidateOnScopeExit | Cleanup invoked before the batch commits its revision. |