Skip to main content

Recorder

Struct Recorder 

Source
pub struct Recorder { /* private fields */ }
Expand description

Runs an app from a script and films it: the steps are the ones a person would take, found by the names screen readers see. See the crate documentation.

Implementations§

Source§

impl Recorder

Source

pub fn new(root: impl View + 'static, theme: Theme, size: Size) -> Self

Films root in a window of size.

Source

pub fn narration(self, narration: Narration) -> Self

The recordings the player will say the boxes with. Each box then lasts as long as its recording, and a little more, so that the voice and the box end together and the film never ends while the voice is still speaking. A box with no recording lasts as long as reading it takes.

Source

pub fn wait(&mut self, seconds: f64) -> &mut Self

Lets the film run with nothing happening.

Source

pub fn chapter(&mut self, title: &str, text: &str) -> &mut Self

Starts a chapter here.

Source

pub fn intro(&mut self, title: &str, text: &str) -> &mut Self

Starts a chapter here and explains it in a box in the middle of the film, for as long as it takes to read or hear.

Source

pub fn explain( &mut self, name: &str, title: &str, text: &str, ) -> Result<&mut Self, RecordError>

A Self::note that lasts as long as text takes to hear, or to read when it has no recording.

Source

pub fn move_to(&mut self, name: &str) -> Result<&mut Self, RecordError>

Slides the pointer to the middle of what is called name.

Source

pub fn click(&mut self, name: &str) -> Result<&mut Self, RecordError>

Slides the pointer to what is called name and clicks it.

Source

pub fn type_into( &mut self, name: &str, text: &str, ) -> Result<&mut Self, RecordError>

Clicks the field called name and types text into it, letter by letter.

Source

pub fn press(&mut self, key: Key) -> &mut Self

Presses a key.

Source

pub fn scroll(&mut self, pixels: f32) -> &mut Self

Rolls the wheel over what is under the pointer, pixels in all; positive goes down the page.

Source

pub fn note( &mut self, name: &str, title: &str, text: &str, seconds: f64, ) -> Result<&mut Self, RecordError>

Marks what is called name and says text about it for seconds, in which the film goes on. Clicking the mark in the player brings the text back.

Source

pub fn guide( &mut self, name: &str, title: &str, text: &str, ) -> Result<&mut Self, RecordError>

The film stops here, with what is called name marked and text saying what to do, until someone clicks the mark. Follow it with the step itself, such as Self::click, which is what the film shows next. When the player is not stopping at steps, the box stays for as long as it takes to read or hear; when it is, that time is skipped.

Source

pub fn ui_mut(&mut self) -> &mut Ui

The UI being filmed, for what a script cannot say by name.

Source

pub fn finish(self) -> Result<Movie, RecordError>

Ends the recording.

Trait Implementations§

Source§

impl Debug for Recorder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more