Area

Struct Area 

Source
pub struct Area { /* private fields */ }

Trait Implementations§

Source§

impl Clone for Area

Source§

fn clone(&self) -> Area

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
Source§

impl PartialEq for Area

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl RawArea for Area

Source§

type Cache = PrintInfo

Something to be kept between app instances/reloads Read more
Source§

type PrintInfo = PrintInfo

Information about what parts of a Text should be printed Read more
Source§

fn push( &self, _: CoreAccess, specs: PushSpecs, on_files: bool, cache: PrintInfo, ) -> Option<(Area, Option<Area>)>

Creates an RawArea around this one Read more
Source§

fn delete(&self, _: CoreAccess) -> (bool, Vec<Self>)

Deletes this RawArea, signaling the closing of a Widget Read more
Source§

fn swap(&self, _: CoreAccess, rhs: &Self) -> bool

Swaps this RawArea with another one Read more
Source§

fn spawn( &self, _: CoreAccess, spawn_id: SpawnId, specs: DynSpawnSpecs, cache: Self::Cache, ) -> Option<Self>

Spawns a floating area on this RawArea Read more
Source§

fn set_width(&self, _: CoreAccess, width: f32) -> Result<(), Text>

Sets a width for the RawArea
Source§

fn set_height(&self, _: CoreAccess, height: f32) -> Result<(), Text>

Sets a height for the RawArea
Source§

fn hide(&self, _: CoreAccess) -> Result<(), Text>

Hides the RawArea
Source§

fn reveal(&self, _: CoreAccess) -> Result<(), Text>

Reveals the RawArea
Source§

fn width_of_text( &self, _: CoreAccess, opts: PrintOpts, text: &Text, ) -> Result<f32, Text>

What width the given Text would occupy, if unwrapped
Source§

fn scroll_ver(&self, _: CoreAccess, text: &Text, by: i32, opts: PrintOpts)

Scrolls the Text veritcally by an amount Read more
Source§

fn scroll_around_points( &self, _: CoreAccess, text: &Text, points: TwoPoints, opts: PrintOpts, )

Scrolls the Text on all four directions until the given TwoPoints is within the ScrollOff range Read more
Source§

fn scroll_to_points( &self, _: CoreAccess, text: &Text, points: TwoPoints, opts: PrintOpts, )

Scrolls the Text to the visual line of a TwoPoints Read more
Source§

fn set_as_active(&self, _: CoreAccess)

Tells the RawUi that this RawArea is the one that is currently focused. Read more
Source§

fn print(&self, _: CoreAccess, text: &Text, opts: PrintOpts, painter: Painter)

Prints the Text
Source§

fn print_with<'a>( &self, _: CoreAccess, text: &Text, opts: PrintOpts, painter: Painter, f: impl FnMut(&Caret, &Item) + 'a, )

Prints the Text with a callback function
Source§

fn set_print_info(&self, _: CoreAccess, info: Self::PrintInfo)

Sets a previously acquired PrintInfo to the area
Source§

fn print_iter<'a>( &self, ca: CoreAccess, text: &'a Text, points: TwoPoints, opts: PrintOpts, ) -> impl Iterator<Item = (Caret, Item)> + 'a

Returns a printing iterator Read more
Source§

fn rev_print_iter<'a>( &self, ca: CoreAccess, text: &'a Text, points: TwoPoints, opts: PrintOpts, ) -> impl Iterator<Item = (Caret, Item)> + 'a

Returns a reversed printing iterator Read more
Source§

fn has_changed(&self, _: CoreAccess) -> bool

Whether or not self has changed Read more
Source§

fn is_master_of(&self, _: CoreAccess, other: &Self) -> bool

Whether or not self is the “master” of other Read more
Source§

fn get_cluster_master(&self, _: CoreAccess) -> Option<Self>

Returns the clustered master of self, if there is one Read more
Source§

fn cache(&self, _: CoreAccess) -> Option<Self::Cache>

Returns the statics from self
Source§

fn top_left(&self, _: CoreAccess) -> Coord

The top left Coord of this Area
Source§

fn bottom_right(&self, _: CoreAccess) -> Coord

The bottom right Coord of this Area
Source§

fn coord_at_points( &self, _: CoreAccess, text: &Text, points: TwoPoints, opts: PrintOpts, ) -> Option<Coord>

The Coord where the given TwoPoints would be printed Read more
Source§

fn points_at_coord( &self, _: CoreAccess, text: &Text, coord: Coord, opts: PrintOpts, ) -> Option<TwoPointsPlace>

The TwoPoints where a Coord is found Read more
Source§

fn start_points(&self, _: CoreAccess, text: &Text, opts: PrintOpts) -> TwoPoints

The start points that should be printed
Source§

fn end_points(&self, _: CoreAccess, text: &Text, opts: PrintOpts) -> TwoPoints

The TwoPoints immediately after the last printed one
Source§

fn get_print_info(&self, _: CoreAccess) -> Self::PrintInfo

The current printing information of the area
Source§

fn is_active(&self, _: CoreAccess) -> bool

Returns true if this is the currently active RawArea Read more

Auto Trait Implementations§

§

impl Freeze for Area

§

impl !RefUnwindSafe for Area

§

impl !Send for Area

§

impl !Sync 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§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert 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>

Convert 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)

Convert &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)

Convert &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> 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,

Source§

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>,

Source§

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>,

Source§

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.