pub struct View(_);
Implementations
sourceimpl View
impl View
pub fn new(state: &mut dyn State, parent: View, prev: Option<View>) -> View
pub fn drop_view(self, state: &mut dyn State)
pub fn move_z(self, state: &mut dyn State, prev: Option<View>)
pub fn set_tag<Tag: ComponentId>(self, state: &mut dyn State, tag: Tag)
pub fn reset_tag(self, state: &mut dyn State)
pub fn tag<Tag: ComponentId>(self, tree: &ViewTree) -> Option<Tag>
pub fn build(
self,
state: &mut dyn dyn_context_State,
f: impl for<'builder_lt> FnOnce(Builder<'builder_lt, Self>) -> Builder<'builder_lt, Self>
) -> Self
pub fn focus(self, state: &mut dyn State) -> View
pub fn set_decorator<D: Decorator>(self, state: &mut dyn State, decorator: D)
pub fn set_layout<L: Layout>(self, state: &mut dyn State, layout: L)
pub fn set_panel<P: Panel>(self, state: &mut dyn State, panel: P)
pub fn decorator_bindings(self, tree: &ViewTree) -> &dyn DecoratorBindings
pub fn layout_bindings(self, tree: &ViewTree) -> &dyn LayoutBindings
pub fn panel_bindings(self, tree: &ViewTree) -> &dyn PanelBindings
pub fn first_child(self, tree: &ViewTree) -> Option<View>
pub fn last_child(self, tree: &ViewTree) -> Option<View>
pub fn prev(self, tree: &ViewTree) -> View
pub fn next(self, tree: &ViewTree) -> View
pub fn parent(self, tree: &ViewTree) -> Option<View>
pub fn desired_size(self, tree: &ViewTree) -> Vector
pub fn render_bounds(self, tree: &ViewTree) -> Rect
pub fn bind_decorator_to_base<D: Decorator, T: Convenient, U: Convenient>(
self,
state: &mut dyn State,
decorator_prop: DepProp<D, U>,
view_base_prop: DepProp<ViewBase, T>,
map: fn(_: T) -> U
)
pub fn invalidate_rect(self, state: &mut dyn State, rect: Rect)
pub fn invalidate_render(self, state: &mut dyn State)
pub fn invalidate_parent_measure(self, state: &mut dyn State)
pub fn invalidate_measure_and_render(self, state: &mut dyn State)
pub fn invalidate_measure(self, state: &mut dyn State)
pub fn invalidate_parent_arrange(self, state: &mut dyn State)
pub fn invalidate_arrange(self, state: &mut dyn State)
pub fn measure(self, state: &mut dyn State, size: (Option<i16>, Option<i16>))
pub fn arrange(self, state: &mut dyn State, rect: Rect)
Trait Implementations
sourceimpl<DepObjType: Decorator + DepType<Id = Self>> DepObj<DecoratorKey, DepObjType> for View
impl<DepObjType: Decorator + DepType<Id = Self>> DepObj<DecoratorKey, DepObjType> for View
const STATE_PART: std_any_TypeId = ::dep_obj::std_any_TypeId::of::()
fn get_raw<'state_part_lifetime>(
state_part: &'state_part_lifetime dyn std_any_Any,
this: components_arena_RawId
) -> &'state_part_lifetime DepObjType
fn get_raw_mut<'state_part_lifetime>(
state_part: &'state_part_lifetime mut dyn std_any_Any,
this: components_arena_RawId
) -> &'state_part_lifetime mut DepObjType
fn get(
state: &(dyn State + 'static),
id: (usize, NonZeroUsize)
) -> DepObjRef<'_, Type>
fn get_mut(
state: &mut (dyn State + 'static),
id: (usize, NonZeroUsize)
) -> DepObjMut<'_, Type>
sourceimpl<DepObjType: Layout + DepType<Id = Self>> DepObj<LayoutKey, DepObjType> for View
impl<DepObjType: Layout + DepType<Id = Self>> DepObj<LayoutKey, DepObjType> for View
const STATE_PART: std_any_TypeId = ::dep_obj::std_any_TypeId::of::()
fn get_raw<'state_part_lifetime>(
state_part: &'state_part_lifetime dyn std_any_Any,
this: components_arena_RawId
) -> &'state_part_lifetime DepObjType
fn get_raw_mut<'state_part_lifetime>(
state_part: &'state_part_lifetime mut dyn std_any_Any,
this: components_arena_RawId
) -> &'state_part_lifetime mut DepObjType
fn get(
state: &(dyn State + 'static),
id: (usize, NonZeroUsize)
) -> DepObjRef<'_, Type>
fn get_mut(
state: &mut (dyn State + 'static),
id: (usize, NonZeroUsize)
) -> DepObjMut<'_, Type>
sourceimpl<DepObjType: Panel + DepType<Id = Self>> DepObj<PanelKey, DepObjType> for View
impl<DepObjType: Panel + DepType<Id = Self>> DepObj<PanelKey, DepObjType> for View
const STATE_PART: std_any_TypeId = ::dep_obj::std_any_TypeId::of::()
fn get_raw<'state_part_lifetime>(
state_part: &'state_part_lifetime dyn std_any_Any,
this: components_arena_RawId
) -> &'state_part_lifetime DepObjType
fn get_raw_mut<'state_part_lifetime>(
state_part: &'state_part_lifetime mut dyn std_any_Any,
this: components_arena_RawId
) -> &'state_part_lifetime mut DepObjType
fn get(
state: &(dyn State + 'static),
id: (usize, NonZeroUsize)
) -> DepObjRef<'_, Type>
fn get_mut(
state: &mut (dyn State + 'static),
id: (usize, NonZeroUsize)
) -> DepObjMut<'_, Type>
sourceimpl DepObj<ViewAlign, ViewAlign> for View
impl DepObj<ViewAlign, ViewAlign> for View
const STATE_PART: std_any_TypeId = ::dep_obj::std_any_TypeId::of::()
fn get_raw<'state_part_lifetime>(
state_part: &'state_part_lifetime dyn std_any_Any,
this: components_arena_RawId
) -> &'state_part_lifetime ViewAlign
fn get_raw_mut<'state_part_lifetime>(
state_part: &'state_part_lifetime mut dyn std_any_Any,
this: components_arena_RawId
) -> &'state_part_lifetime mut ViewAlign
fn get(
state: &(dyn State + 'static),
id: (usize, NonZeroUsize)
) -> DepObjRef<'_, Type>
fn get_mut(
state: &mut (dyn State + 'static),
id: (usize, NonZeroUsize)
) -> DepObjMut<'_, Type>
sourceimpl DepObj<ViewBase, ViewBase> for View
impl DepObj<ViewBase, ViewBase> for View
const STATE_PART: std_any_TypeId = ::dep_obj::std_any_TypeId::of::()
fn get_raw<'state_part_lifetime>(
state_part: &'state_part_lifetime dyn std_any_Any,
this: components_arena_RawId
) -> &'state_part_lifetime ViewBase
fn get_raw_mut<'state_part_lifetime>(
state_part: &'state_part_lifetime mut dyn std_any_Any,
this: components_arena_RawId
) -> &'state_part_lifetime mut ViewBase
fn get(
state: &(dyn State + 'static),
id: (usize, NonZeroUsize)
) -> DepObjRef<'_, Type>
fn get_mut(
state: &mut (dyn State + 'static),
id: (usize, NonZeroUsize)
) -> DepObjMut<'_, Type>
sourceimpl DepObjId for View
impl DepObjId for View
fn parent(self, state: &dyn State) -> Option<Self>
fn next(self, state: &dyn State) -> Self
fn first_child(self, state: &dyn State) -> Option<Self>
fn add_binding_raw<Owner, T>(
self,
state: &mut (dyn State + 'static),
binding: BindingBase<T>
) where
Owner: DepType<Id = Self> + 'static,
T: Convenient,
<Owner as DepType>::Id: DepObj<<Owner as DepType>::DepObjKey, Owner>,
fn add_binding<Owner, T>(
self,
state: &mut (dyn State + 'static),
binding: impl Into<BindingBase<T>>
) where
Owner: DepType<Id = Self> + 'static,
T: Convenient,
<Owner as DepType>::Id: DepObj<<Owner as DepType>::DepObjKey, Owner>,
fn apply_style<Owner>(
self,
state: &mut (dyn State + 'static),
style: Option<Style<Owner>>
) -> Option<Style<Owner>> where
Owner: DepType<Id = Self>,
<Owner as DepType>::Id: DepObj<<Owner as DepType>::DepObjKey, Owner>,
sourceimpl Ord for View
impl Ord for View
sourceimpl PartialOrd<View> for View
impl PartialOrd<View> for View
sourcefn partial_cmp(&self, other: &View) -> Option<Ordering>
fn partial_cmp(&self, other: &View) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
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 · sourcefn 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 more
sourceimpl ViewWidgetExt for View
impl ViewWidgetExt for View
fn bind_base_to_widget_option<O: WidgetObj, T: Convenient, U: Convenient>(
self,
state: &mut dyn State,
view_base_prop: DepProp<ViewBase, U>,
widget: Widget,
widget_prop: DepProp<O, Option<T>>,
map: fn(_: T) -> U
)
fn bind_base_to_widget<O: WidgetObj, T: Convenient, U: Convenient>(
self,
state: &mut dyn State,
view_base_prop: DepProp<ViewBase, U>,
widget: Widget,
widget_prop: DepProp<O, T>,
map: fn(_: T) -> U
)
fn bind_align_to_widget<O: WidgetObj, T: Convenient, U: Convenient>(
self,
state: &mut dyn State,
view_align_prop: DepProp<ViewAlign, U>,
widget: Widget,
widget_prop: DepProp<O, T>,
map: fn(_: T) -> U
)
fn bind_layout_to_widget<O: WidgetObj, L: Layout, T: Convenient, U: Convenient>(
self,
state: &mut dyn State,
layout_prop: DepProp<L, U>,
widget: Widget,
widget_prop: DepProp<O, T>,
map: fn(_: T) -> U
)
fn bind_decorator_to_widget<O: WidgetObj, D: Decorator, T: Convenient, U: Convenient>(
self,
state: &mut dyn State,
decorator_prop: DepProp<D, U>,
widget: Widget,
widget_prop: DepProp<O, T>,
map: fn(_: T) -> U
)
impl Copy for View
impl Eq for View
impl StructuralEq for View
impl StructuralPartialEq for View
Auto Trait Implementations
impl !RefUnwindSafe for View
impl Send for View
impl Sync for View
impl Unpin for View
impl !UnwindSafe for View
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
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
. Read more
sourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
sourcefn 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. Read more
sourcefn 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. Read more
sourceimpl<T> DowncastSync for T where
T: Any + Send + Sync,
impl<T> DowncastSync for T where
T: Any + Send + Sync,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more