pub struct Flow<'a> {
pub document: &'a Document,
pub pictures: &'a mut Pictures,
pub zoom: f32,
pub palette: Palette,
pub scroll_to_heading: Option<usize>,
/* private fields */
}Expand description
The state a run of blocks is drawn with.
Fields§
§document: &'a DocumentThe document, for its styles and its pictures.
pictures: &'a mut PicturesPictures decoded so far.
zoom: f32Screen points per ODF point.
palette: PaletteThe colours to draw in where the document names none.
scroll_to_heading: Option<usize>The heading, counted from zero in document order, to bring into view.
Set by a panel that lists a document’s headings. It is answered while the body is drawn, because the only moment a heading’s position is known is the moment it is laid out.
Implementations§
Source§impl Flow<'_>
impl Flow<'_>
Sourcepub fn blocks(&mut self, ui: &mut Ui, parent: &Element, width: f32)
pub fn blocks(&mut self, ui: &mut Ui, parent: &Element, width: f32)
Draw every block under an element, in order.
width is the space available in screen points, and is what a paragraph
wraps to.
Sourcepub fn frame(&mut self, ui: &mut Ui, frame: &Element, width: f32)
pub fn frame(&mut self, ui: &mut Ui, frame: &Element, width: f32)
A frame: a box with a picture, a text box or an object in it.
Public because a slide reaches it directly. Everywhere else a frame is
found among a parent’s children by Self::blocks, but a shape on a
slide is the frame, and asking blocks to draw it would look inside it
for blocks and find a draw:image, which is not one.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Flow<'a>
impl<'a> !Send for Flow<'a>
impl<'a> !Sync for Flow<'a>
impl<'a> !UnwindSafe for Flow<'a>
impl<'a> Freeze for Flow<'a>
impl<'a> Unpin for Flow<'a>
impl<'a> UnsafeUnpin for Flow<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
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> ⓘ
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