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
impl Recorder
Sourcepub fn new(root: impl View + 'static, theme: Theme, size: Size) -> Self
pub fn new(root: impl View + 'static, theme: Theme, size: Size) -> Self
Films root in a window of size.
Sourcepub fn narration(self, narration: Narration) -> Self
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.
Sourcepub fn intro(&mut self, title: &str, text: &str) -> &mut Self
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.
Sourcepub fn explain(
&mut self,
name: &str,
title: &str,
text: &str,
) -> Result<&mut Self, RecordError>
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.
Sourcepub fn move_to(&mut self, name: &str) -> Result<&mut Self, RecordError>
pub fn move_to(&mut self, name: &str) -> Result<&mut Self, RecordError>
Slides the pointer to the middle of what is called name.
Sourcepub fn click(&mut self, name: &str) -> Result<&mut Self, RecordError>
pub fn click(&mut self, name: &str) -> Result<&mut Self, RecordError>
Slides the pointer to what is called name and clicks it.
Sourcepub fn type_into(
&mut self,
name: &str,
text: &str,
) -> Result<&mut Self, RecordError>
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.
Sourcepub fn scroll(&mut self, pixels: f32) -> &mut Self
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.
Sourcepub fn note(
&mut self,
name: &str,
title: &str,
text: &str,
seconds: f64,
) -> Result<&mut Self, RecordError>
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.
Sourcepub fn guide(
&mut self,
name: &str,
title: &str,
text: &str,
) -> Result<&mut Self, RecordError>
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.
Sourcepub fn finish(self) -> Result<Movie, RecordError>
pub fn finish(self) -> Result<Movie, RecordError>
Ends the recording.