Skip to main content

Flowable

Trait Flowable 

Source
pub trait Flowable:
    FlowableClone
    + Send
    + Sync {
    // Required methods
    fn wrap(&self, avail_width: Pt, avail_height: Pt) -> Size;
    fn split(
        &self,
        avail_width: Pt,
        avail_height: Pt,
    ) -> Option<(Box<dyn Flowable>, Box<dyn Flowable>)>;
    fn draw(
        &self,
        canvas: &mut Canvas,
        x: Pt,
        y: Pt,
        avail_width: Pt,
        avail_height: Pt,
    );

    // Provided methods
    fn intrinsic_width(&self) -> Option<Pt> { ... }
    fn out_of_flow(&self) -> bool { ... }
    fn z_index(&self) -> i32 { ... }
    fn pagination(&self) -> Pagination { ... }
    fn debug_name(&self) -> &'static str { ... }
}

Required Methods§

Source

fn wrap(&self, avail_width: Pt, avail_height: Pt) -> Size

Source

fn split( &self, avail_width: Pt, avail_height: Pt, ) -> Option<(Box<dyn Flowable>, Box<dyn Flowable>)>

Source

fn draw( &self, canvas: &mut Canvas, x: Pt, y: Pt, avail_width: Pt, avail_height: Pt, )

Provided Methods§

Source

fn intrinsic_width(&self) -> Option<Pt>

Source

fn out_of_flow(&self) -> bool

Source

fn z_index(&self) -> i32

Source

fn pagination(&self) -> Pagination

Source

fn debug_name(&self) -> &'static str

Trait Implementations§

Source§

impl Clone for Box<dyn Flowable>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementors§