Donner 0.5.1
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
donner::editor::UndoSnapshot Struct Reference

Captured state of an element at a point in time. More...

#include "donner/editor/UndoTimeline.h"

Collaboration diagram for donner::editor::UndoSnapshot:
[legend]

Public Attributes

svg::SVGElement element
 The element this snapshot applies to.
Transform2d transform
 The captured transform.
std::optional< AttributeWritebackTargetwritebackTarget
 Stable locator for the element, used to resolve a live handle after a self-initiated ReplaceDocument swaps the document identity.
std::optional< RcStringsourceTransformAttributeValue
 Exact transform= attribute bytes from the source pane, when undo should restore the user's original text verbatim instead of the canonical serializer output. std::nullopt means the attribute was absent in the captured source.
bool restoreSourceTransformAttributeValue = false
 Whether sourceTransformAttributeValue should be restored verbatim. When false, source writeback falls back to canonical serialization of transform.

Detailed Description

Captured state of an element at a point in time.

In M2 the editor only supports transform-level snapshots — PathSpline and element create/delete snapshots return when path tools land. See docs/design_docs/editor.md "Non-Goals" for the scoping decision.

Member Data Documentation

◆ element

svg::SVGElement donner::editor::UndoSnapshot::element

The element this snapshot applies to.

◆ restoreSourceTransformAttributeValue

bool donner::editor::UndoSnapshot::restoreSourceTransformAttributeValue = false

Whether sourceTransformAttributeValue should be restored verbatim. When false, source writeback falls back to canonical serialization of transform.

◆ sourceTransformAttributeValue

std::optional<RcString> donner::editor::UndoSnapshot::sourceTransformAttributeValue

Exact transform= attribute bytes from the source pane, when undo should restore the user's original text verbatim instead of the canonical serializer output. std::nullopt means the attribute was absent in the captured source.

◆ transform

Transform2d donner::editor::UndoSnapshot::transform

The captured transform.

◆ writebackTarget

std::optional<AttributeWritebackTarget> donner::editor::UndoSnapshot::writebackTarget

Stable locator for the element, used to resolve a live handle after a self-initiated ReplaceDocument swaps the document identity.


The documentation for this struct was generated from the following file: