Struct duat_term::Area

source ·
pub struct Area {
    pub layout: RwData<Layout>,
    pub id: AreaId,
    /* private fields */
}

Fields§

§layout: RwData<Layout>§id: AreaId

Implementations§

source§

impl Area

source

pub fn new(index: AreaId, layout: RwData<Layout>) -> Self

Trait Implementations§

source§

impl Area for Area

§

type ConstraintChangeErr = ConstraintChangeErr

source§

fn width(&self) -> usize

Gets the width of the area.
source§

fn height(&self) -> usize

Gets the height of the area.
source§

fn scroll_around_point(&self, text: &Text, point: Point, cfg: &PrintCfg)

Scrolls the Text (up or down) until the main cursor is within the ScrollOff range.
source§

fn top_left(&self) -> (Point, Option<Point>)

source§

fn set_as_active(&self)

Tells the Ui that this Area is the one that is currently focused. Read more
source§

fn is_active(&self) -> bool

Returns true if this is the currently active Area. Read more
source§

fn print(&self, text: &Text, cfg: &PrintCfg, painter: Painter)

Prints the Text via an Iterator.
source§

fn print_with<'a>( &self, text: &Text, cfg: &PrintCfg, painter: Painter, f: impl FnMut(&Caret, &Item) + 'a, )

source§

fn change_constraint( &self, constraint: Constraint, axis: Axis, ) -> Result<(), ConstraintChangeErr>

source§

fn request_width_to_fit( &self, _text: &str, ) -> Result<(), Self::ConstraintChangeErr>

Requests that the width be enough to fit a certain piece of text.
source§

fn has_changed(&self) -> bool

Wether or not self has changed. Read more
source§

fn is_senior_of(&self, other: &Self) -> bool

Wether or not self has seniority over other Read more
source§

fn bisect(&self, specs: PushSpecs, is_glued: bool) -> (Area, Option<Area>)

Bisects the Area with the given index into two. Read more
source§

fn print_iter<'a>( &self, iter: Iter<'a>, cfg: IterCfg<'a>, ) -> impl Iterator<Item = (Caret, Item)> + Clone + 'a

Returns a printing iterator. Read more
source§

fn print_iter_from_top<'a>( &self, text: &'a Text, cfg: IterCfg<'a>, ) -> impl Iterator<Item = (Caret, Item)> + Clone + 'a

source§

fn rev_print_iter<'a>( &self, iter: RevIter<'a>, cfg: IterCfg<'a>, ) -> impl Iterator<Item = (Caret, Item)> + Clone + 'a

Returns a reverse printing iterator. Read more
source§

impl Clone for Area

source§

fn clone(&self) -> Area

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 PartialEq for Area

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Send for Area

source§

impl Sync for Area

Auto Trait Implementations§

§

impl !Freeze for Area

§

impl !RefUnwindSafe for Area

§

impl Unpin for Area

§

impl !UnwindSafe for Area

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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 T
where 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 T
where 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 T
where 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 T
where 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.