pub struct MovieEditor { /* private fields */ }Expand description
An editor for a film, in the style of screen-recording editors.
Tools are on the left, with what each offers; the canvas in the middle; what is selected on the right; and the tracks along the bottom. Clips are cut at the playhead, trimmed at their edges and deleted, closing the gap. Effects sit on tracks over them, where they slide and stretch, and regions are dragged on the canvas. Nothing changes the film, every edit can be undone, and the film can be tried at any time with the same player people will watch it in.
use ravenrs_movie::{EditorState, Movie, MovieEditor};
let film = Movie::from_bytes(&std::fs::read("manual.ravenmovie").unwrap_or_default())?;
let state = EditorState::new(film);
let editor = MovieEditor::new(state).title("Getting started").on_save(|film: &Movie| {
let _ = std::fs::write("manual.ravenmovie", film.to_bytes());
});Implementations§
Source§impl MovieEditor
impl MovieEditor
Sourcepub fn new(state: EditorState) -> Self
pub fn new(state: EditorState) -> Self
An editor over state.
Sourcepub fn labels(self, labels: EditorLabels) -> Self
pub fn labels(self, labels: EditorLabels) -> Self
The words it shows.
Sourcepub fn player_labels(self, labels: MovieLabels) -> Self
pub fn player_labels(self, labels: MovieLabels) -> Self
The words of the player it tries the film in.
Trait Implementations§
Source§impl Debug for MovieEditor
impl Debug for MovieEditor
Auto Trait Implementations§
impl !RefUnwindSafe for MovieEditor
impl !Send for MovieEditor
impl !Sync for MovieEditor
impl !UnwindSafe for MovieEditor
impl Freeze for MovieEditor
impl Unpin for MovieEditor
impl UnsafeUnpin for MovieEditor
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<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<V> ViewExt for Vwhere
V: View,
impl<V> ViewExt for Vwhere
V: View,
Source§fn padding(self, padding: impl Into<Insets>) -> Styled<Self>
fn padding(self, padding: impl Into<Insets>) -> Styled<Self>
Adds padding inside the box, in logical pixels.
Source§fn background(self, fill: impl Into<Fill>) -> Styled<Self>
fn background(self, fill: impl Into<Fill>) -> Styled<Self>
Paints a background behind the content.
Source§fn frame(self, width: Option<f32>, height: Option<f32>) -> Styled<Self>
fn frame(self, width: Option<f32>, height: Option<f32>) -> Styled<Self>
Fixes the width and/or height in logical pixels;
None keeps the content size.