Struct duat_core::ui::Window

source ·
pub struct Window<U>
where U: Ui,
{ /* private fields */ }
Expand description

A container for a master Area in Parsec.

Implementations§

source§

impl<U> Window<U>
where U: Ui + 'static,

source

pub fn new( ui: &mut U, widget: Widget<U>, checker: impl Fn() -> bool + 'static, ) -> (Self, U::Area)

Returns a new instance of Window<U>.

source

pub fn push( &mut self, widget: Widget<U>, area: &U::Area, checker: impl Fn() -> bool + 'static, specs: PushSpecs, cluster: bool, ) -> (U::Area, Option<U::Area>)

Pushes a Widget<U> onto an existing one.

source

pub fn push_file( &mut self, widget: Widget<U>, checker: impl Fn() -> bool + 'static, specs: PushSpecs, ) -> (U::Area, Option<U::Area>)

Pushes a File to the file’s parent.

This function will push to the edge of self.files_parent. This is an area, usually in the center, that contains all Files, and their associated Widget<U>s, with others being at the perifery of this area.

source

pub fn push_to_master<Checker>( &mut self, widget: Widget<U>, checker: Checker, specs: PushSpecs, ) -> (U::Area, Option<U::Area>)
where Checker: Fn() -> bool + 'static,

Pushes a Widget<U> to the master node of the current window.

source

pub fn widgets( &self, ) -> impl DoubleEndedIterator<Item = (&Widget<U>, &U::Area)> + Clone + '_

Returns an Iterator over the Widget<U>s of self.

source

pub fn nodes(&self) -> impl Iterator<Item = &Node<U>>

source

pub fn file_names(&self) -> impl Iterator<Item = (usize, String)> + Clone + '_

Returns an Iterator over the names of Files and their respective [ActionableWidget] indices.

source

pub fn send_key(&self, key: KeyEvent, globals: Context<U>)

source

pub fn len_widgets(&self) -> usize

Auto Trait Implementations§

§

impl<U> Freeze for Window<U>
where <U as Ui>::Area: Freeze,

§

impl<U> !RefUnwindSafe for Window<U>

§

impl<U> Send for Window<U>

§

impl<U> Sync for Window<U>

§

impl<U> Unpin for Window<U>
where <U as Ui>::Area: Unpin,

§

impl<U> !UnwindSafe for Window<U>

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