/*
7 * Krzysztof KosiĆski <tweenk.pl@gmail.com> (documentation)
9 * Copyright (C) 2018 Authors
10 * Released under GNU GPL v2+, read the file
'COPYING' for more information.
13#ifndef SEEN_INKSCAPE_XML_SP_REPR_ACTION_H
14#define SEEN_INKSCAPE_XML_SP_REPR_ACTION_H
17#include <glibmm/ustring.h>
A base class for objects for whom the normal new and delete operators should use the garbage-collecte...
Object representing child addition.
void _undoOne(NodeObserver &observer) const override
Node * ref
The node after which the child has been added, or NULL if it was added as first.
void _replayOne(NodeObserver &observer) const override
EventAdd(Node *repr, Node *c, Node *rr, Event *next)
Node * child
The added child node.
Event * _optimizeOne() override
Object representing attribute change.
Inkscape::Util::ptr_shared oldval
Value of the attribute before the change.
void _undoOne(NodeObserver &observer) const override
GQuark key
GQuark corresponding to the changed attribute's name.
Event * _optimizeOne() override
void _replayOne(NodeObserver &observer) const override
Inkscape::Util::ptr_shared newval
Value of the attribute after the change.
EventChgAttr(Node *repr, GQuark k, Inkscape::Util::ptr_shared ov, Inkscape::Util::ptr_shared nv, Event *next)
Object representing content change.
Inkscape::Util::ptr_shared newval
Content of the node after the change.
EventChgContent(Node *repr, Inkscape::Util::ptr_shared ov, Inkscape::Util::ptr_shared nv, Event *next)
Inkscape::Util::ptr_shared oldval
Content of the node before the change.
void _undoOne(NodeObserver &observer) const override
Event * _optimizeOne() override
void _replayOne(NodeObserver &observer) const override
Object representing element name change.
void _replayOne(NodeObserver &observer) const override
GQuark new_name
GQuark corresponding to the new element name.
void _undoOne(NodeObserver &observer) const override
EventChgElementName(Node *repr, GQuark old_name, GQuark new_name, Event *next)
Event * _optimizeOne() override
GQuark old_name
GQuark corresponding to the old element name.
Object representing child order change.
Node * oldref
The node after which the relocated node was in the sibling order before the change,...
Node * child
The node that was relocated in sibling order.
Node * newref
The node after which the relocated node is after the change, or if it's first.
EventChgOrder(Node *repr, Node *c, Node *orr, Node *nrr, Event *next)
void _replayOne(NodeObserver &observer) const override
Event * _optimizeOne() override
void _undoOne(NodeObserver &observer) const override
Object representing child removal.
void _replayOne(NodeObserver &observer) const override
Event * _optimizeOne() override
Node * child
The child node that was removed.
EventDel(Node *repr, Node *c, Node *rr, Event *next)
Node * ref
The node after which the removed node was in the sibling order, or NULL if it was first.
void _undoOne(NodeObserver &observer) const override
Enumeration of all XML event types.
Inkscape::Util::ForwardPointerIterator< Event, IteratorStrategy > Iterator
void undoOne(NodeObserver &observer) const
Undo this event to an observer.
virtual Event * _optimizeOne()=0
Inkscape::Util::ForwardPointerIterator< Event const, IteratorStrategy > ConstIterator
Event * optimizeOne()
If possible, combine this event with the next to reduce memory use.
Event * next
Pointer to the next event in the event chain.
virtual void _undoOne(NodeObserver &) const =0
virtual void _replayOne(NodeObserver &) const =0
void replayOne(NodeObserver &observer) const
Replay this event to an observer.
Node * repr
Pointer to the node that was the object of the event.
int serial
Serial number of the event, not used at the moment.
Interface for XML node observers.
Interface for refcounted XML nodes.
NodeObserver const * observer
Base class for GC-managed objects.
Helper class to stream background task notifications as a series of messages.
static Event const * next(Event const *action)