pub struct Turtle { /* private fields */ }

Implementations§

source§

impl Turtle

source

pub fn update_width_max(&mut self, pos: f64, dx: f64)

source

pub fn update_height_max(&mut self, pos: f64, dy: f64)

source

pub fn update_width_min(&mut self, pos: f64, dx: f64)

source

pub fn update_height_min(&mut self, pos: f64, dy: f64)

source

pub fn set_shift(&mut self, shift: DVec2)

source

pub fn layout(&self) -> &Layout

source

pub fn used(&self) -> DVec2

source

pub fn set_used(&mut self, width_used: f64, height_used: f64)

source

pub fn set_pos(&mut self, pos: DVec2)

source

pub fn rect_is_visible(&self, geom: Rect) -> bool

source

pub fn origin(&self) -> DVec2

source

pub fn rel_pos(&self) -> DVec2

source

pub fn pos(&self) -> DVec2

source

pub fn scroll(&self) -> DVec2

source

pub fn eval_width(&self, width: Size, margin: Margin, flow: Flow) -> f64

source

pub fn eval_height(&self, height: Size, margin: Margin, flow: Flow) -> f64

source

pub fn rect(&self) -> Rect

source

pub fn unscrolled_rect(&self) -> Rect

source

pub fn padded_rect_used(&self) -> Rect

source

pub fn rect_left(&self) -> Rect

source

pub fn padded_rect(&self) -> Rect

source

pub fn size(&self) -> DVec2

source

pub fn width_left(&self) -> f64

source

pub fn height_left(&self) -> f64

source

pub fn padded_height_or_used(&self) -> f64

source

pub fn padded_width_or_used(&self) -> f64

Trait Implementations§

source§

impl Clone for Turtle

source§

fn clone(&self) -> Turtle

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Turtle

source§

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

Formats the value using the given formatter. Read more
source§

impl Default for Turtle

source§

fn default() -> Turtle

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.
source§

impl<T> WidgetAction for Twhere T: 'static + Clone + ?Sized,