pub struct PageFan { /* private fields */ }Expand description
Pages of rendered reports spread like a hand of cards. They open as the fan
scrolls into view; the page under the pointer (or keyboard focus) comes to the front
and lifts with an accent ring while the others step back, and a click opens its
address through ravenrs_widgets::Links. Each page is painted once at its size and
reused, so scrolling and hovering repaint nothing but positions.
use ravenrs_report::{ReportEngine, samples};
use ravenrs_report_viewer::PageFan;
let invoice = ReportEngine::new().render(&samples::invoice(), &samples::invoice_data());
let fan = PageFan::new().page(&invoice, 0, "Invoice", "designer/");Implementations§
Source§impl PageFan
impl PageFan
Sourcepub fn page(
self,
document: &Document,
index: usize,
label: impl Into<String>,
url: impl Into<String>,
) -> Self
pub fn page( self, document: &Document, index: usize, label: impl Into<String>, url: impl Into<String>, ) -> Self
Adds page index of document, called label, opening url. A page that does
not exist is skipped. Pages are stacked back to front in the order added.
Trait Implementations§
Auto Trait Implementations§
impl !Send for PageFan
impl !Sync for PageFan
impl Freeze for PageFan
impl RefUnwindSafe for PageFan
impl Unpin for PageFan
impl UnsafeUnpin for PageFan
impl UnwindSafe for PageFan
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
impl<T> ErasedDestructor for Twhere
T: 'static,
§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> ⓘ
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T, U> ToSample<U> for Twhere
U: FromSample<T>,
impl<T, U> ToSample<U> for Twhere
U: FromSample<T>,
fn to_sample_(self) -> U
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.