Struct unsegen::base::window::ExtentEstimationWindow[][src]

pub struct ExtentEstimationWindow { /* fields omitted */ }
Expand description

A dummy window that does not safe any of the content written to it, but records the maximal coordinates used.

This is therefore suitable for determining the required space demand of a widget if nothing or not enough is known about the content of a widget.

Implementations

impl ExtentEstimationWindow[src]

pub fn with_width(width: Width) -> Self[src]

Create an ExtentEstimationWindow with a fixed width

pub fn unbounded() -> Self[src]

Create an ExtentEstimationWindow with an unbounded width

pub fn extent_x(&self) -> Width[src]

Get the width of the window required to display the contents written to the window.

pub fn extent_y(&self) -> Height[src]

Get the height of the window required to display the contents written to the window.

Trait Implementations

impl CursorTarget for ExtentEstimationWindow[src]

fn get_width(&self) -> Width[src]

Return the actual width of the window. Writing to a column outside of this range is not possible. Read more

fn get_height(&self) -> Height[src]

Return the maximum height of the target. Writing to a row outside of this range is not possible. Read more

fn get_cell_mut(
    &mut self,
    x: ColIndex,
    y: RowIndex
) -> Option<&mut StyledGraphemeCluster>
[src]

Get the (mutable) cell at the specified position. The implementor must ensure that in the range for x \in [0, Width) and y \in [0, Height) a valid cluster is returned. Read more

fn get_cell(&self, x: ColIndex, _: RowIndex) -> Option<&StyledGraphemeCluster>[src]

Get the cell at the specified position. The implementor must ensure that in the range for x \in [0, Width) and y \in [0, Height) a valid cluster is returned. Read more

fn get_default_style(&self) -> Style[src]

Return the default style that characters of this target should be printed as. This serves as the base for further style modifications while writing to the target. Read more

fn get_soft_width(&self) -> Width[src]

Return the soft or “desired” width of the target. In most cases this is equal to the width. An example where this is not the case would be a terminal with builtin wrapping of lines where it is some cases desirable for the cursor to wrap at the width of the terminal, even though there is no (conceptual) limit of line length. Read more

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.