enum Act {
Add(NodeKind, f32, f32),
Delete(u64),
Move(u64, f32, f32),
SetParam(u64, usize, f64),
SetText(u64, String),
SetKind(u64, NodeKind),
SetEnabled(u64, bool),
Connect(u64, u64, usize),
Disconnect(u64, usize),
AddMask(u64),
SetPath(u64, u64),
Paste(Vec<Node>, Vec<Edge>),
}Expand description
One buffered mutation. The UI pass only reads the graph, so the undo snapshot can be taken between collecting these and applying them.
Variants§
Add(NodeKind, f32, f32)
Delete(u64)
Move(u64, f32, f32)
SetParam(u64, usize, f64)
SetText(u64, String)
SetKind(u64, NodeKind)
Replace what a node is (its value, or its whole kind): the properties panel, the Replace menu and a dropped asset all land here. Wires the new kind still has a port for survive.
SetEnabled(u64, bool)
Connect(u64, u64, usize)
Disconnect(u64, usize)
AddMask(u64)
SetPath(u64, u64)
Drive a mask node’s centre along a saved project path (node, path).
Paste(Vec<Node>, Vec<Edge>)
Re-create copied nodes with fresh ids, offset, plus the edges between them.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Act
impl RefUnwindSafe for Act
impl Send for Act
impl Sync for Act
impl Unpin for Act
impl UnwindSafe for Act
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more