Struct Area

Source
pub struct Area {
    pub id: AreaId,
    /* private fields */
}

Fields§

§id: AreaId

Implementations§

Source§

impl Area

Source

pub fn new(id: AreaId, layouts: Arc<Mutex<Vec<Layout>>>) -> Self

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§

type Ui = Ui

The Ui this RawArea belongs to
Source§

fn bisect( area: MutArea<'_, Self>, specs: PushSpecs, cluster: bool, on_files: bool, cache: PrintInfo, ) -> (Area, Option<Area>)

Bisects the RawArea with the given index into two. Read more
Source§

fn delete(area: MutArea<'_, Self>) -> Option<Self>

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

fn swap(lhs: MutArea<'_, Self>, rhs: &Self)

Swaps this RawArea with another one Read more
Source§

fn spawn_floating( area: MutArea<'_, Self>, specs: SpawnSpecs, ) -> Result<Self, Text>

Spawns a floating area on this RawArea Read more
Source§

fn spawn_floating_at( _area: MutArea<'_, Self>, _specs: SpawnSpecs, _at: impl TwoPoints, _text: &Text, _cfg: PrintCfg, ) -> Result<Self, Text>

Spawns a floating area Read more
Source§

fn constrain_hor( &self, cons: impl IntoIterator<Item = Constraint>, ) -> Result<(), Text>

Changes the horizontal constraint of the area
Source§

fn constrain_ver( &self, cons: impl IntoIterator<Item = Constraint>, ) -> Result<(), Text>

Changes the vertical constraint of the area
Source§

fn restore_constraints(&self) -> Result<(), Text>

Restores the original constraints of the widget
Source§

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

Requests that the width be enough to fit a certain piece of text.
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 set_as_active(&self)

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

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

Prints the Text via an Iterator
Source§

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

Prints the Text with a callback function
Source§

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

Sets a previously acquired PrintInfo to the area
Source§

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

Returns a printing iterator Read more
Source§

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

Returns a reversed printing iterator Read more
Source§

fn has_changed(&self) -> bool

Whether or not self has changed Read more
Source§

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

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

fn get_cluster_master(&self) -> Option<Self>

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

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

Returns the statics from self
Source§

fn width(&self) -> u32

Gets the width of the area
Source§

fn height(&self) -> u32

Gets the height of the area
Source§

fn first_points(&self, _text: &Text, _cfg: PrintCfg) -> (Point, Option<Point>)

The first point that should be printed
Source§

fn last_points(&self, text: &Text, cfg: PrintCfg) -> (Point, Option<Point>)

The last point that should be printed
Source§

fn print_info(&self) -> Self::PrintInfo

The current printing information of the area
Source§

fn is_active(&self) -> 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> 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.