Struct tuifw_window::Window
source · pub struct Window(/* private fields */);
Implementations§
source§impl Window
impl Window
pub fn new( tree: &mut WindowTree<'_>, widget: Box<dyn Widget>, parent: Option<Self>, prev: Option<Self> ) -> Result<Self, Error>
pub fn new_template( tree: &mut WindowTree<'_>, widget: Box<dyn Widget> ) -> Result<Self, Error>
pub fn is_template(self, tree: &WindowTree<'_>) -> bool
pub fn new_instance( self, tree: &mut WindowTree<'_>, parent: Option<Self>, prev: Option<Self> ) -> Result<Self, Error>
pub fn widget_extension<DynInterface>( self, tree: &WindowTree<'_> ) -> Option<Box<DynInterface>>
pub fn source_index(self, tree: &WindowTree<'_>) -> Option<usize>
pub fn set_source_index(self, tree: &mut WindowTree<'_>, value: Option<usize>)
pub fn set_clip(self, tree: &mut WindowTree<'_>, value: Option<Rect>)
pub fn invalidate_measure(self, tree: &mut WindowTree<'_>)
pub fn invalidate_arrange(self, tree: &mut WindowTree<'_>)
pub fn measure( self, tree: &mut WindowTree<'_>, available_width: Option<i16>, available_height: Option<i16>, app: &mut dyn App )
pub fn arrange( self, tree: &mut WindowTree<'_>, final_bounds: Rect, app: &mut dyn App )
pub fn set_event_handler( self, tree: &mut WindowTree<'_>, handler: Option<Box<dyn EventHandler>> )
pub fn desired_size(self, tree: &WindowTree<'_>) -> Vector
pub fn render_bounds(self, tree: &WindowTree<'_>) -> Rect
pub fn inner_bounds(self, tree: &WindowTree<'_>) -> Rect
pub fn data<'a, T: WidgetData + 'static>( self, tree: &'a WindowTree<'_> ) -> &'a T
pub fn data_mut<'a, T: WidgetData + 'static>( self, tree: &'a mut WindowTree<'_> ) -> &'a mut T
pub fn layout_raw<'a>( self, tree: &'a WindowTree<'_> ) -> &'a Option<Box<dyn Layout>>
pub fn layout<'a, T: Layout + 'static>( self, tree: &'a WindowTree<'_> ) -> Option<&'a T>
pub fn layout_mut<R>( self, tree: &mut WindowTree<'_>, f: impl FnOnce(&mut Option<Box<dyn Layout>>) -> R ) -> R
pub fn set_layout( self, tree: &mut WindowTree<'_>, value: Option<Box<dyn Layout>> )
pub fn focus_tab(self, tree: &WindowTree<'_>) -> Self
pub fn set_focus_tab(self, tree: &mut WindowTree<'_>, value: Self)
pub fn focus_right(self, tree: &WindowTree<'_>) -> Self
pub fn set_focus_right(self, tree: &mut WindowTree<'_>, value: Self)
pub fn focus_left(self, tree: &WindowTree<'_>) -> Self
pub fn set_focus_left(self, tree: &mut WindowTree<'_>, value: Self)
pub fn focus_up(self, tree: &WindowTree<'_>) -> Self
pub fn set_focus_up(self, tree: &mut WindowTree<'_>, value: Self)
pub fn focus_down(self, tree: &WindowTree<'_>) -> Self
pub fn set_focus_down(self, tree: &mut WindowTree<'_>, value: Self)
pub fn is_primary_focused(self, tree: &WindowTree<'_>) -> bool
pub fn is_secondary_focused(self, tree: &WindowTree<'_>) -> bool
pub fn is_focused(self, tree: &WindowTree<'_>) -> bool
pub fn set_focused_primary(self, tree: &mut WindowTree<'_>, value: bool)
pub fn set_focused_secondary(self, tree: &mut WindowTree<'_>, value: bool)
pub fn palette<'a>(self, tree: &'a WindowTree<'_>) -> &'a Palette
pub fn palette_mut<T>( self, tree: &mut WindowTree<'_>, f: impl FnOnce(&mut Palette) -> T ) -> T
pub fn set_palette(self, tree: &mut WindowTree<'_>, value: Palette)
pub fn color(self, tree: &WindowTree<'_>, i: u8) -> (Fg, Bg)
pub fn is_enabled(self, tree: &WindowTree<'_>) -> bool
pub fn set_is_enabled(self, tree: &mut WindowTree<'_>, value: bool)
pub fn actual_is_enabled(self, tree: &WindowTree<'_>) -> bool
pub fn visibility(self, tree: &WindowTree<'_>) -> Visibility
pub fn set_visibility(self, tree: &mut WindowTree<'_>, value: Visibility)
pub fn parent(self, tree: &WindowTree<'_>) -> Option<Self>
pub fn first_child(self, tree: &WindowTree<'_>) -> Option<Self>
pub fn prev(self, tree: &WindowTree<'_>) -> Self
pub fn next(self, tree: &WindowTree<'_>) -> Self
pub fn raise( self, tree: &mut WindowTree<'_>, event: Event, app: &mut dyn App ) -> bool
pub fn h_align(self, tree: &WindowTree<'_>) -> Option<HAlign>
pub fn set_h_align(self, tree: &mut WindowTree<'_>, value: Option<HAlign>)
pub fn v_align(self, tree: &WindowTree<'_>) -> Option<VAlign>
pub fn set_v_align(self, tree: &mut WindowTree<'_>, value: Option<VAlign>)
pub fn margin(self, tree: &WindowTree<'_>) -> Thickness
pub fn set_margin(self, tree: &mut WindowTree<'_>, value: Thickness)
pub fn min_width(self, tree: &WindowTree<'_>) -> i16
pub fn set_min_width(self, tree: &mut WindowTree<'_>, value: i16)
pub fn min_height(self, tree: &WindowTree<'_>) -> i16
pub fn set_min_height(self, tree: &mut WindowTree<'_>, value: i16)
pub fn max_width(self, tree: &WindowTree<'_>) -> i16
pub fn set_max_width(self, tree: &mut WindowTree<'_>, value: i16)
pub fn max_height(self, tree: &WindowTree<'_>) -> i16
pub fn set_max_height(self, tree: &mut WindowTree<'_>, value: i16)
pub fn width(self, tree: &WindowTree<'_>) -> Option<i16>
pub fn set_width(self, tree: &mut WindowTree<'_>, value: Option<i16>)
pub fn height(self, tree: &WindowTree<'_>) -> Option<i16>
pub fn set_height(self, tree: &mut WindowTree<'_>, value: Option<i16>)
pub fn move_z(self, tree: &mut WindowTree<'_>, prev: Option<Self>)
pub fn name<'a>(self, tree: &'a WindowTree<'_>) -> &'a String
pub fn name_mut<T>( self, tree: &mut WindowTree<'_>, f: impl FnOnce(&mut String) -> T ) -> T
pub fn set_name<'a>( self, tree: &mut WindowTree<'_>, value: impl Into<Cow<'a, str>> )
pub fn drop_window(self, tree: &mut WindowTree<'_>, app: &mut dyn App)
pub fn invalidate_rect(self, tree: &mut WindowTree<'_>, rect: Rect)
pub fn invalidate_render(self, tree: &mut WindowTree<'_>)
pub fn bring_into_view(self, tree: &mut WindowTree<'_>)
Trait Implementations§
source§impl ComponentId for Window
impl ComponentId for Window
source§impl Ord for Window
impl Ord for Window
source§impl PartialEq for Window
impl PartialEq for Window
source§impl PartialOrd for Window
impl PartialOrd for Window
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
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 moreimpl Copy for Window
impl Eq for Window
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
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>
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)
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)
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.