Struct tuifw_window::Window

source ·
pub struct Window(/* private fields */);

Implementations§

source§

impl Window

source

pub fn new( tree: &mut WindowTree<'_>, widget: Box<dyn Widget>, parent: Option<Self>, prev: Option<Self> ) -> Result<Self, Error>

source

pub fn new_template( tree: &mut WindowTree<'_>, widget: Box<dyn Widget> ) -> Result<Self, Error>

source

pub fn is_template(self, tree: &WindowTree<'_>) -> bool

source

pub fn new_instance( self, tree: &mut WindowTree<'_>, parent: Option<Self>, prev: Option<Self> ) -> Result<Self, Error>

source

pub fn widget_extension<DynInterface>( self, tree: &WindowTree<'_> ) -> Option<Box<DynInterface>>
where DynInterface: Pointee<Metadata = DynMetadata<DynInterface>> + ?Sized + 'static,

source

pub fn source_index(self, tree: &WindowTree<'_>) -> Option<usize>

source

pub fn set_source_index(self, tree: &mut WindowTree<'_>, value: Option<usize>)

source

pub fn set_clip(self, tree: &mut WindowTree<'_>, value: Option<Rect>)

source

pub fn invalidate_measure(self, tree: &mut WindowTree<'_>)

source

pub fn invalidate_arrange(self, tree: &mut WindowTree<'_>)

source

pub fn measure( self, tree: &mut WindowTree<'_>, available_width: Option<i16>, available_height: Option<i16>, app: &mut dyn App )

source

pub fn arrange( self, tree: &mut WindowTree<'_>, final_bounds: Rect, app: &mut dyn App )

source

pub fn set_event_handler( self, tree: &mut WindowTree<'_>, handler: Option<Box<dyn EventHandler>> )

source

pub fn desired_size(self, tree: &WindowTree<'_>) -> Vector

source

pub fn render_bounds(self, tree: &WindowTree<'_>) -> Rect

source

pub fn inner_bounds(self, tree: &WindowTree<'_>) -> Rect

source

pub fn data<'a, T: WidgetData + 'static>( self, tree: &'a WindowTree<'_> ) -> &'a T

source

pub fn data_mut<'a, T: WidgetData + 'static>( self, tree: &'a mut WindowTree<'_> ) -> &'a mut T

source

pub fn layout_raw<'a>( self, tree: &'a WindowTree<'_> ) -> &'a Option<Box<dyn Layout>>

source

pub fn layout<'a, T: Layout + 'static>( self, tree: &'a WindowTree<'_> ) -> Option<&'a T>

source

pub fn layout_mut<R>( self, tree: &mut WindowTree<'_>, f: impl FnOnce(&mut Option<Box<dyn Layout>>) -> R ) -> R

source

pub fn set_layout( self, tree: &mut WindowTree<'_>, value: Option<Box<dyn Layout>> )

source

pub fn focus_tab(self, tree: &WindowTree<'_>) -> Self

source

pub fn set_focus_tab(self, tree: &mut WindowTree<'_>, value: Self)

source

pub fn focus_right(self, tree: &WindowTree<'_>) -> Self

source

pub fn set_focus_right(self, tree: &mut WindowTree<'_>, value: Self)

source

pub fn focus_left(self, tree: &WindowTree<'_>) -> Self

source

pub fn set_focus_left(self, tree: &mut WindowTree<'_>, value: Self)

source

pub fn focus_up(self, tree: &WindowTree<'_>) -> Self

source

pub fn set_focus_up(self, tree: &mut WindowTree<'_>, value: Self)

source

pub fn focus_down(self, tree: &WindowTree<'_>) -> Self

source

pub fn set_focus_down(self, tree: &mut WindowTree<'_>, value: Self)

source

pub fn is_primary_focused(self, tree: &WindowTree<'_>) -> bool

source

pub fn is_secondary_focused(self, tree: &WindowTree<'_>) -> bool

source

pub fn is_focused(self, tree: &WindowTree<'_>) -> bool

source

pub fn set_focused_primary(self, tree: &mut WindowTree<'_>, value: bool)

source

pub fn set_focused_secondary(self, tree: &mut WindowTree<'_>, value: bool)

source

pub fn palette<'a>(self, tree: &'a WindowTree<'_>) -> &'a Palette

source

pub fn palette_mut<T>( self, tree: &mut WindowTree<'_>, f: impl FnOnce(&mut Palette) -> T ) -> T

source

pub fn set_palette(self, tree: &mut WindowTree<'_>, value: Palette)

source

pub fn color(self, tree: &WindowTree<'_>, i: u8) -> (Fg, Bg)

source

pub fn is_enabled(self, tree: &WindowTree<'_>) -> bool

source

pub fn set_is_enabled(self, tree: &mut WindowTree<'_>, value: bool)

source

pub fn actual_is_enabled(self, tree: &WindowTree<'_>) -> bool

source

pub fn visibility(self, tree: &WindowTree<'_>) -> Visibility

source

pub fn set_visibility(self, tree: &mut WindowTree<'_>, value: Visibility)

source

pub fn parent(self, tree: &WindowTree<'_>) -> Option<Self>

source

pub fn first_child(self, tree: &WindowTree<'_>) -> Option<Self>

source

pub fn prev(self, tree: &WindowTree<'_>) -> Self

source

pub fn next(self, tree: &WindowTree<'_>) -> Self

source

pub fn raise( self, tree: &mut WindowTree<'_>, event: Event, app: &mut dyn App ) -> bool

source

pub fn h_align(self, tree: &WindowTree<'_>) -> Option<HAlign>

source

pub fn set_h_align(self, tree: &mut WindowTree<'_>, value: Option<HAlign>)

source

pub fn v_align(self, tree: &WindowTree<'_>) -> Option<VAlign>

source

pub fn set_v_align(self, tree: &mut WindowTree<'_>, value: Option<VAlign>)

source

pub fn margin(self, tree: &WindowTree<'_>) -> Thickness

source

pub fn set_margin(self, tree: &mut WindowTree<'_>, value: Thickness)

source

pub fn min_width(self, tree: &WindowTree<'_>) -> i16

source

pub fn set_min_width(self, tree: &mut WindowTree<'_>, value: i16)

source

pub fn min_height(self, tree: &WindowTree<'_>) -> i16

source

pub fn set_min_height(self, tree: &mut WindowTree<'_>, value: i16)

source

pub fn max_width(self, tree: &WindowTree<'_>) -> i16

source

pub fn set_max_width(self, tree: &mut WindowTree<'_>, value: i16)

source

pub fn max_height(self, tree: &WindowTree<'_>) -> i16

source

pub fn set_max_height(self, tree: &mut WindowTree<'_>, value: i16)

source

pub fn width(self, tree: &WindowTree<'_>) -> Option<i16>

source

pub fn set_width(self, tree: &mut WindowTree<'_>, value: Option<i16>)

source

pub fn height(self, tree: &WindowTree<'_>) -> Option<i16>

source

pub fn set_height(self, tree: &mut WindowTree<'_>, value: Option<i16>)

source

pub fn move_z(self, tree: &mut WindowTree<'_>, prev: Option<Self>)

source

pub fn name<'a>(self, tree: &'a WindowTree<'_>) -> &'a String

source

pub fn name_mut<T>( self, tree: &mut WindowTree<'_>, f: impl FnOnce(&mut String) -> T ) -> T

source

pub fn set_name<'a>( self, tree: &mut WindowTree<'_>, value: impl Into<Cow<'a, str>> )

source

pub fn drop_window(self, tree: &mut WindowTree<'_>, app: &mut dyn App)

source

pub fn invalidate_rect(self, tree: &mut WindowTree<'_>, rect: Rect)

source

pub fn invalidate_render(self, tree: &mut WindowTree<'_>)

source

pub fn bring_into_view(self, tree: &mut WindowTree<'_>)

Trait Implementations§

source§

impl Clone for Window

source§

fn clone(&self) -> Window

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 ComponentId for Window

source§

fn from_raw(raw: RawId) -> Self

Forms an id from the into_raw function result.
source§

fn into_raw(self) -> RawId

Transforms the id to primitive-typed parts, which can be easily passed through FFI and stored in non-generic context. Read more
source§

impl Debug for Window

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Hash for Window

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for Window

source§

fn cmp(&self, other: &Window) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Window

source§

fn eq(&self, other: &Window) -> 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 PartialOrd for Window

source§

fn partial_cmp(&self, other: &Window) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Copy for Window

source§

impl Eq for Window

source§

impl StructuralPartialEq for Window

Auto Trait Implementations§

§

impl Freeze for Window

§

impl !RefUnwindSafe for Window

§

impl Send for Window

§

impl Sync for Window

§

impl Unpin for Window

§

impl !UnwindSafe for Window

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> 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> DowncastSync for T
where T: Any + Send + Sync,

source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

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

source§

fn __clone_box(&self, _: Private) -> *mut ()

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.