Struct Handle
pub struct Handle<'a, V> { /* private fields */ }Expand description
A handle to a view which has been built into the tree.
Implementations§
§impl<V> Handle<'_, V>
impl<V> Handle<'_, V>
pub fn entity(&self) -> Entity
pub fn entity(&self) -> Entity
Returns the [Entity] id of the view.
pub fn parent(&self) -> Entity
pub fn parent(&self) -> Entity
Returns the entity id of the parent view.
pub fn lock_focus_to_within(self) -> Handle<'_, V>
pub fn lock_focus_to_within(self) -> Handle<'_, V>
Stop the user from tabbing out of a subtree, which is useful for modal dialogs.
pub fn on_build<F>(self, callback: F) -> Handle<'_, V>where
F: Fn(&mut EventContext<'_>),
pub fn on_build<F>(self, callback: F) -> Handle<'_, V>where
F: Fn(&mut EventContext<'_>),
Callback which is run when the view is built/rebuilt.
pub fn bind<R, T, F>(self, res: R, closure: F) -> Handle<'_, V>
pub fn bind<R, T, F>(self, res: R, closure: F) -> Handle<'_, V>
Creates a binding to the given lens and provides a closure which can be used to mutate the view through a handle.
pub fn needs_relayout(&mut self)
pub fn needs_relayout(&mut self)
Marks the view as needing a relayout.
pub fn needs_restyle(&mut self)
pub fn needs_restyle(&mut self)
Marks the view as needing a restyle.
pub fn needs_redraw(&mut self)
pub fn needs_redraw(&mut self)
Marks the view as needing a redraw.
pub fn bounds(&self) -> BoundingBox
pub fn bounds(&self) -> BoundingBox
Returns the bounding box of the view.
pub fn scale_factor(&self) -> f32
pub fn scale_factor(&self) -> f32
Returns the scale factor of the device.
§impl Handle<'_, Avatar>
impl Handle<'_, Avatar>
pub fn variant<U>(self, variant: impl Res<U>) -> Handle<'_, Avatar>where
U: Into<AvatarVariant>,
pub fn variant<U>(self, variant: impl Res<U>) -> Handle<'_, Avatar>where
U: Into<AvatarVariant>,
Selects the geometric variant of the Avatar. Accepts a value of, or lens to, an AvatarVariant.
Avatar::new(cx, |cx|{
Svg::new(cx, ICON_USER);
})
.variant(AvatarVariant::Rounded);§impl Handle<'_, Badge>
impl Handle<'_, Badge>
pub fn placement<U>(self, placement: impl Res<U>) -> Handle<'_, Badge>where
U: Into<BadgePlacement>,
pub fn placement<U>(self, placement: impl Res<U>) -> Handle<'_, Badge>where
U: Into<BadgePlacement>,
Sets the placement of a badge relative to its parent. Accepts a value of, or lens to, a BadgePlacement.
§impl Handle<'_, ButtonGroup>
impl Handle<'_, ButtonGroup>
pub fn vertical(self, is_vertical: impl Res<bool>) -> Handle<'_, ButtonGroup>
pub fn vertical(self, is_vertical: impl Res<bool>) -> Handle<'_, ButtonGroup>
Sets whether the button group is in vertical orientation.
§impl Handle<'_, Chip>
impl Handle<'_, Chip>
pub fn on_close(
self,
callback: impl Fn(&mut EventContext<'_>) + Send + Sync + 'static,
) -> Handle<'_, Chip>
pub fn on_close( self, callback: impl Fn(&mut EventContext<'_>) + Send + Sync + 'static, ) -> Handle<'_, Chip>
Set the callback triggered when the close button of the chip is pressed. The chip close button is not displayed by default. Setting this callback causes the close button to be displayed.
pub fn variant<U>(self, variant: impl Res<U>) -> Handle<'_, Chip>where
U: Into<ChipVariant>,
pub fn variant<U>(self, variant: impl Res<U>) -> Handle<'_, Chip>where
U: Into<ChipVariant>,
Selects the style variant to be used by the chip. Accepts a value of, or lens to, a ChipVariant.
§Example
Chip::new(cx, "Chip")
.variant(ChipVariant::Filled);§impl Handle<'_, Collapsible>
impl Handle<'_, Collapsible>
pub fn open(self, open: impl Res<bool>) -> Handle<'_, Collapsible>
pub fn open(self, open: impl Res<bool>) -> Handle<'_, Collapsible>
Set the open state of the collapsible view.
§impl Handle<'_, Datepicker>
impl Handle<'_, Datepicker>
pub fn on_select<F>(self, callback: F) -> Handle<'_, Datepicker>
pub fn on_select<F>(self, callback: F) -> Handle<'_, Datepicker>
Set the callback triggered when a date is selected from the Datepicker view.
§impl Handle<'_, Divider>
impl Handle<'_, Divider>
pub fn orientation(
self,
orientation: impl Res<Orientation>,
) -> Handle<'_, Divider>
pub fn orientation( self, orientation: impl Res<Orientation>, ) -> Handle<'_, Divider>
Set the orientation of the divider. Accepts a value or a lens to an Orientation.
§impl Handle<'_, Dropdown>
impl Handle<'_, Dropdown>
pub fn placement(self, placement: impl Res<Placement>) -> Handle<'_, Dropdown>
pub fn placement(self, placement: impl Res<Placement>) -> Handle<'_, Dropdown>
Sets the position where the tooltip should appear relative to its parent element.
Defaults to Placement::Bottom.
pub fn show_arrow(self, show_arrow: bool) -> Handle<'_, Dropdown>
pub fn show_arrow(self, show_arrow: bool) -> Handle<'_, Dropdown>
Sets whether the popup should include an arrow. Defaults to true.
pub fn arrow_size(self, size: impl Into<Length>) -> Handle<'_, Dropdown>
pub fn arrow_size(self, size: impl Into<Length>) -> Handle<'_, Dropdown>
Sets the size of the popup arrow, or gap if the arrow is hidden.
pub fn should_reposition(self, flag: bool) -> Handle<'_, Dropdown>
pub fn should_reposition(self, flag: bool) -> Handle<'_, Dropdown>
Set to whether the popup should reposition to always be visible.
§impl Handle<'_, Label>
impl Handle<'_, Label>
pub fn describing(
self,
entity_identifier: impl Into<String>,
) -> Handle<'_, Label>
pub fn describing( self, entity_identifier: impl Into<String>, ) -> Handle<'_, Label>
Which form element does this label describe.
§Examples
Checkbox::new(cx, AppData::value).on_toggle(|cx| cx.emit(AppEvent::ToggleValue)).id("checkbox_identifier");
Label::new(cx, "hello").describing("checkbox_identifier");§impl Handle<'_, List>
impl Handle<'_, List>
pub fn selected<S>(self, selected: S) -> Handle<'_, List>
pub fn selected<S>(self, selected: S) -> Handle<'_, List>
Sets the selected items of the list. Takes a lens to a list of indices.
pub fn on_select<F>(self, callback: F) -> Handle<'_, List>
pub fn on_select<F>(self, callback: F) -> Handle<'_, List>
Sets the callback triggered when a ListItem is selected.
pub fn selectable<U>(self, selectable: impl Res<U>) -> Handle<'_, List>where
U: Into<Selectable>,
pub fn selectable<U>(self, selectable: impl Res<U>) -> Handle<'_, List>where
U: Into<Selectable>,
Set the selectable state of the List.
pub fn selection_follows_focus<U>(self, flag: impl Res<U>) -> Handle<'_, List>
pub fn selection_follows_focus<U>(self, flag: impl Res<U>) -> Handle<'_, List>
Sets whether the selection should follow the focus.
pub fn orientation<U>(self, orientation: impl Res<U>) -> Handle<'_, List>where
U: Into<Orientation>,
pub fn orientation<U>(self, orientation: impl Res<U>) -> Handle<'_, List>where
U: Into<Orientation>,
Sets the orientation of the list.
pub fn scroll_to_cursor(self, flag: bool) -> Handle<'_, List>
pub fn scroll_to_cursor(self, flag: bool) -> Handle<'_, List>
Sets whether the scrollbar should move to the cursor when pressed.
pub fn on_scroll(
self,
callback: impl Fn(&mut EventContext<'_>, f32, f32) + Send + Sync + 'static,
) -> Handle<'_, List>
pub fn on_scroll( self, callback: impl Fn(&mut EventContext<'_>, f32, f32) + Send + Sync + 'static, ) -> Handle<'_, List>
Sets a callback which will be called when a scrollview is scrolled, either with the mouse wheel, touchpad, or using the scroll bars.
pub fn scroll_x(self, scrollx: impl Res<f32>) -> Handle<'_, List>
pub fn scroll_x(self, scrollx: impl Res<f32>) -> Handle<'_, List>
Set the horizontal scroll position of the ScrollView. Accepts a value or lens to an ‘f32’ between 0 and 1.
pub fn scroll_y(self, scrollx: impl Res<f32>) -> Handle<'_, List>
pub fn scroll_y(self, scrollx: impl Res<f32>) -> Handle<'_, List>
Set the vertical scroll position of the ScrollView. Accepts a value or lens to an ‘f32’ between 0 and 1.
pub fn show_horizontal_scrollbar(self, flag: impl Res<bool>) -> Handle<'_, List>
pub fn show_horizontal_scrollbar(self, flag: impl Res<bool>) -> Handle<'_, List>
Sets whether the horizontal scrollbar should be visible.
pub fn show_vertical_scrollbar(self, flag: impl Res<bool>) -> Handle<'_, List>
pub fn show_vertical_scrollbar(self, flag: impl Res<bool>) -> Handle<'_, List>
Sets whether the vertical scrollbar should be visible.
§impl Handle<'_, PickList>
impl Handle<'_, PickList>
pub fn placeholder<P>(self, placeholder: impl Res<P>) -> Handle<'_, PickList>where
P: ToStringLocalized,
pub fn placeholder<P>(self, placeholder: impl Res<P>) -> Handle<'_, PickList>where
P: ToStringLocalized,
Sets the placeholder text that appears when the textbox has no value.
§impl Handle<'_, Popup>
impl Handle<'_, Popup>
pub fn placement(self, placement: impl Res<Placement>) -> Handle<'_, Popup>
pub fn placement(self, placement: impl Res<Placement>) -> Handle<'_, Popup>
Sets the position where the popup should appear relative to its parent element.
Defaults to Placement::Bottom.
pub fn show_arrow(self, show_arrow: impl Res<bool>) -> Handle<'_, Popup>
pub fn show_arrow(self, show_arrow: impl Res<bool>) -> Handle<'_, Popup>
Sets whether the popup should include an arrow. Defaults to true.
pub fn arrow_size<U>(self, size: impl Res<U>) -> Handle<'_, Popup>
pub fn arrow_size<U>(self, size: impl Res<U>) -> Handle<'_, Popup>
Sets the size of the popup arrow, or gap if the arrow is hidden.
pub fn should_reposition(
self,
should_reposition: impl Res<bool>,
) -> Handle<'_, Popup>
pub fn should_reposition( self, should_reposition: impl Res<bool>, ) -> Handle<'_, Popup>
Set to whether the popup should reposition to always be visible.
pub fn on_blur<F>(self, f: F) -> Handle<'_, Popup>where
F: 'static + Fn(&mut EventContext<'_>),
pub fn on_blur<F>(self, f: F) -> Handle<'_, Popup>where
F: 'static + Fn(&mut EventContext<'_>),
Registers a callback for when the user clicks off of the popup, usually with the intent of closing it.
§impl Handle<'_, RadioButton>
impl Handle<'_, RadioButton>
pub fn on_select<F>(self, callback: F) -> Handle<'_, RadioButton>where
F: 'static + Fn(&mut EventContext<'_>),
pub fn on_select<F>(self, callback: F) -> Handle<'_, RadioButton>where
F: 'static + Fn(&mut EventContext<'_>),
Set the callback triggered when the radio button is selected.
§Examples
RadioButton::new(cx, AppData::value)
.on_select(|cx| cx.emit(AppEvent::ToggleValue));§impl Handle<'_, ResizableStack>
impl Handle<'_, ResizableStack>
pub fn on_reset<F>(self, on_reset: F) -> Handle<'_, ResizableStack>where
F: Fn(&mut EventContext<'_>) + 'static,
pub fn on_reset<F>(self, on_reset: F) -> Handle<'_, ResizableStack>where
F: Fn(&mut EventContext<'_>) + 'static,
Sets a callback to be called when the stack is reset, i.e. when the resize handle is double-clicked.
§impl<L1> Handle<'_, Scrollbar<L1>>
impl<L1> Handle<'_, Scrollbar<L1>>
pub fn scroll_to_cursor(
self,
scroll_to_cursor: impl Res<bool>,
) -> Handle<'_, Scrollbar<L1>>
pub fn scroll_to_cursor( self, scroll_to_cursor: impl Res<bool>, ) -> Handle<'_, Scrollbar<L1>>
Sets whether the scrollbar should move to the cursor when pressed.
§impl Handle<'_, ScrollView>
impl Handle<'_, ScrollView>
pub fn on_scroll(
self,
callback: impl Fn(&mut EventContext<'_>, f32, f32) + Send + Sync + 'static,
) -> Handle<'_, ScrollView>
pub fn on_scroll( self, callback: impl Fn(&mut EventContext<'_>, f32, f32) + Send + Sync + 'static, ) -> Handle<'_, ScrollView>
Sets a callback which will be called when a scrollview is scrolled, either with the mouse wheel, touchpad, or using the scroll bars.
pub fn scroll_to_cursor(
self,
scroll_to_cursor: impl Res<bool>,
) -> Handle<'_, ScrollView>
pub fn scroll_to_cursor( self, scroll_to_cursor: impl Res<bool>, ) -> Handle<'_, ScrollView>
Sets whether the scrollbar should move to the cursor when pressed.
pub fn scroll_x(self, scrollx: impl Res<f32>) -> Handle<'_, ScrollView>
pub fn scroll_x(self, scrollx: impl Res<f32>) -> Handle<'_, ScrollView>
Set the horizontal scroll position of the ScrollView. Accepts a value or lens to an ‘f32’ between 0 and 1.
pub fn scroll_y(self, scrollx: impl Res<f32>) -> Handle<'_, ScrollView>
pub fn scroll_y(self, scrollx: impl Res<f32>) -> Handle<'_, ScrollView>
Set the vertical scroll position of the ScrollView. Accepts a value or lens to an ‘f32’ between 0 and 1.
pub fn show_horizontal_scrollbar(
self,
flag: impl Res<bool>,
) -> Handle<'_, ScrollView>
pub fn show_horizontal_scrollbar( self, flag: impl Res<bool>, ) -> Handle<'_, ScrollView>
Sets whether the horizontal scrollbar should be visible.
pub fn show_vertical_scrollbar(
self,
flag: impl Res<bool>,
) -> Handle<'_, ScrollView>
pub fn show_vertical_scrollbar( self, flag: impl Res<bool>, ) -> Handle<'_, ScrollView>
Sets whether the vertical scrollbar should be visible.
§impl<L> Handle<'_, Slider<L>>where
L: Lens,
impl<L> Handle<'_, Slider<L>>where
L: Lens,
pub fn on_change<F>(self, callback: F) -> Handle<'_, Slider<L>>
pub fn on_change<F>(self, callback: F) -> Handle<'_, Slider<L>>
Sets the callback triggered when the slider value is changed.
Takes a closure which triggers when the slider value is changed, either by pressing the track or dragging the thumb along the track.
Slider::new(cx, AppData::value)
.on_change(|cx, value| {
debug!("Slider on_change: {}", value);
});pub fn range<U>(self, range: impl Res<U>) -> Handle<'_, Slider<L>>
pub fn range<U>(self, range: impl Res<U>) -> Handle<'_, Slider<L>>
Sets the range of the slider.
If the bound data is outside of the range then the slider will clip to min/max of the range.
Slider::new(cx, AppData::value)
.range(-20.0..50.0)
.on_change(|cx, value| {
debug!("Slider on_change: {}", value);
});pub fn orientation<U>(self, orientation: impl Res<U>) -> Handle<'_, Slider<L>>where
U: Into<Orientation>,
pub fn orientation<U>(self, orientation: impl Res<U>) -> Handle<'_, Slider<L>>where
U: Into<Orientation>,
Sets the orientation of the slider.
Slider::new(cx, AppData::value)
.orientation(Orientation::Vertical)
.on_change(|cx, value| {
debug!("Slider on_change: {}", value);
});pub fn step<U>(self, step: impl Res<U>) -> Handle<'_, Slider<L>>
pub fn step<U>(self, step: impl Res<U>) -> Handle<'_, Slider<L>>
Set the step value for the slider.
Slider::new(cx, AppData::value)
.step(0.1)
.on_change(|cx, value| {
debug!("Slider on_change: {}", value);
});pub fn keyboard_fraction<U>(
self,
keyboard_fraction: impl Res<U>,
) -> Handle<'_, Slider<L>>
pub fn keyboard_fraction<U>( self, keyboard_fraction: impl Res<U>, ) -> Handle<'_, Slider<L>>
Sets the fraction of a slider that a press of an arrow key will change.
Slider::new(cx, AppData::value)
.keyboard_fraction(0.05)
.on_change(|cx, value| {
debug!("Slider on_change: {}", value);
});§impl Handle<'_, Spinbox>
impl Handle<'_, Spinbox>
pub fn on_increment<F>(self, callback: F) -> Handle<'_, Spinbox>
pub fn on_increment<F>(self, callback: F) -> Handle<'_, Spinbox>
Sets the callback which is triggered when the Spinbox value is incremented.
pub fn on_decrement<F>(self, callback: F) -> Handle<'_, Spinbox>
pub fn on_decrement<F>(self, callback: F) -> Handle<'_, Spinbox>
Sets the callback which is triggered when the Spinbox value is decremented.
pub fn orientation(
self,
orientation: impl Res<Orientation>,
) -> Handle<'_, Spinbox>
pub fn orientation( self, orientation: impl Res<Orientation>, ) -> Handle<'_, Spinbox>
Sets the orientation of the Spinbox.
§impl<L> Handle<'_, Textbox<L>>where
L: Lens,
impl<L> Handle<'_, Textbox<L>>where
L: Lens,
pub fn on_edit<F>(self, callback: F) -> Handle<'_, Textbox<L>>
pub fn on_edit<F>(self, callback: F) -> Handle<'_, Textbox<L>>
Sets the callback triggered when a textbox is edited, i.e. text is inserted/deleted.
Callback provides the current text of the textbox.
pub fn on_submit<F>(self, callback: F) -> Handle<'_, Textbox<L>>
pub fn on_submit<F>(self, callback: F) -> Handle<'_, Textbox<L>>
Sets the callback triggered when a textbox is submitted, i.e. when the enter key is pressed with a single-line textbox or the textbox loses focus.
Callback provides the text of the textbox and a flag to indicate if the submit was due to a key press or a loss of focus.
pub fn on_blur<F>(self, callback: F) -> Handle<'_, Textbox<L>>
pub fn on_blur<F>(self, callback: F) -> Handle<'_, Textbox<L>>
Sets the callback triggered when a textbox is blurred, i.e. the mouse is pressed outside of the textbox.
pub fn on_cancel<F>(self, callback: F) -> Handle<'_, Textbox<L>>
pub fn on_cancel<F>(self, callback: F) -> Handle<'_, Textbox<L>>
Sets the callback triggered when a textbox edit is cancelled, i.e. the escape key is pressed while editing.
pub fn validate<F>(self, is_valid: F) -> Handle<'_, Textbox<L>>
pub fn validate<F>(self, is_valid: F) -> Handle<'_, Textbox<L>>
Sets a validation closure which is called when the textbox is edited and sets the validity attribute to the output of the closure.
If a textbox is modified with the validate modifier then the on_submit will not be called if the text is invalid.
pub fn placeholder<P>(self, text: impl Res<P>) -> Handle<'_, Textbox<L>>where
P: ToStringLocalized,
pub fn placeholder<P>(self, text: impl Res<P>) -> Handle<'_, Textbox<L>>where
P: ToStringLocalized,
Sets the placeholder text that appears when the textbox has no value.
§impl Handle<'_, ToggleButton>
impl Handle<'_, ToggleButton>
pub fn on_toggle(
self,
callback: impl Fn(&mut EventContext<'_>) + 'static,
) -> Handle<'_, ToggleButton>
pub fn on_toggle( self, callback: impl Fn(&mut EventContext<'_>) + 'static, ) -> Handle<'_, ToggleButton>
Sets the callback triggered when the ToggleButton is toggled.
§impl Handle<'_, Tooltip>
impl Handle<'_, Tooltip>
pub fn placement<U>(self, placement: impl Res<U>) -> Handle<'_, Tooltip>
pub fn placement<U>(self, placement: impl Res<U>) -> Handle<'_, Tooltip>
Sets the position where the tooltip should appear relative to its parent element.
Defaults to Placement::Bottom.
§impl Handle<'_, VirtualList>
impl Handle<'_, VirtualList>
pub fn selected<S>(self, selected: S) -> Handle<'_, VirtualList>
pub fn selected<S>(self, selected: S) -> Handle<'_, VirtualList>
Sets the selected items of the list. Takes a lens to a list of indices.
pub fn on_select<F>(self, callback: F) -> Handle<'_, VirtualList>
pub fn on_select<F>(self, callback: F) -> Handle<'_, VirtualList>
Sets the callback triggered when a ListItem is selected.
pub fn selectable<U>(self, selectable: impl Res<U>) -> Handle<'_, VirtualList>where
U: Into<Selectable>,
pub fn selectable<U>(self, selectable: impl Res<U>) -> Handle<'_, VirtualList>where
U: Into<Selectable>,
Set the selectable state of the List.
pub fn selection_follows_focus<U>(
self,
flag: impl Res<U>,
) -> Handle<'_, VirtualList>
pub fn selection_follows_focus<U>( self, flag: impl Res<U>, ) -> Handle<'_, VirtualList>
Sets whether the selection should follow the focus.
pub fn scroll_to_cursor(self, flag: bool) -> Handle<'_, VirtualList>
pub fn scroll_to_cursor(self, flag: bool) -> Handle<'_, VirtualList>
Sets whether the scrollbar should move to the cursor when pressed.
pub fn on_scroll(
self,
callback: impl Fn(&mut EventContext<'_>, f32, f32) + Send + Sync + 'static,
) -> Handle<'_, VirtualList>
pub fn on_scroll( self, callback: impl Fn(&mut EventContext<'_>, f32, f32) + Send + Sync + 'static, ) -> Handle<'_, VirtualList>
Sets a callback which will be called when a scrollview is scrolled, either with the mouse wheel, touchpad, or using the scroll bars.
pub fn scroll_x(self, scrollx: impl Res<f32>) -> Handle<'_, VirtualList>
pub fn scroll_x(self, scrollx: impl Res<f32>) -> Handle<'_, VirtualList>
Set the horizontal scroll position of the ScrollView. Accepts a value or lens to an ‘f32’ between 0 and 1.
pub fn scroll_y(self, scrollx: impl Res<f32>) -> Handle<'_, VirtualList>
pub fn scroll_y(self, scrollx: impl Res<f32>) -> Handle<'_, VirtualList>
Set the vertical scroll position of the ScrollView. Accepts a value or lens to an ‘f32’ between 0 and 1.
pub fn show_horizontal_scrollbar(
self,
flag: impl Res<bool>,
) -> Handle<'_, VirtualList>
pub fn show_horizontal_scrollbar( self, flag: impl Res<bool>, ) -> Handle<'_, VirtualList>
Sets whether the horizontal scrollbar should be visible.
pub fn show_vertical_scrollbar(
self,
flag: impl Res<bool>,
) -> Handle<'_, VirtualList>
pub fn show_vertical_scrollbar( self, flag: impl Res<bool>, ) -> Handle<'_, VirtualList>
Sets whether the vertical scrollbar should be visible.
Trait Implementations§
§impl<V> AbilityModifiers for Handle<'_, V>
impl<V> AbilityModifiers for Handle<'_, V>
§fn hoverable<U>(self, state: impl Res<U>) -> Self
fn hoverable<U>(self, state: impl Res<U>) -> Self
§fn focusable<U>(self, state: impl Res<U>) -> Self
fn focusable<U>(self, state: impl Res<U>) -> Self
§impl<V> AccessibilityModifiers for Handle<'_, V>where
V: View,
impl<V> AccessibilityModifiers for Handle<'_, V>where
V: View,
§fn name<U>(self, name: impl Res<U>) -> Selfwhere
U: ToStringLocalized,
fn name<U>(self, name: impl Res<U>) -> Selfwhere
U: ToStringLocalized,
§fn numeric_value<U>(self, value: impl Res<U>) -> Self
fn numeric_value<U>(self, value: impl Res<U>) -> Self
§fn text_value<U>(self, value: impl Res<U>) -> Selfwhere
U: ToStringLocalized,
fn text_value<U>(self, value: impl Res<U>) -> Selfwhere
U: ToStringLocalized,
§impl<V> ActionModifiers<V> for Handle<'_, V>where
V: View,
impl<V> ActionModifiers<V> for Handle<'_, V>where
V: View,
§fn on_press_down<F>(self, action: F) -> Handle<'_, V>
fn on_press_down<F>(self, action: F) -> Handle<'_, V>
§fn on_double_click<F>(self, action: F) -> Handle<'_, V>
fn on_double_click<F>(self, action: F) -> Handle<'_, V>
MouseDoubleClick event. Read more§fn on_hover<F>(self, action: F) -> Handle<'_, V>
fn on_hover<F>(self, action: F) -> Handle<'_, V>
§fn on_hover_out<F>(self, action: F) -> Handle<'_, V>
fn on_hover_out<F>(self, action: F) -> Handle<'_, V>
§fn on_over<F>(self, action: F) -> Handle<'_, V>
fn on_over<F>(self, action: F) -> Handle<'_, V>
§fn on_over_out<F>(self, action: F) -> Handle<'_, V>
fn on_over_out<F>(self, action: F) -> Handle<'_, V>
§fn on_mouse_move<F>(self, action: F) -> Handle<'_, V>
fn on_mouse_move<F>(self, action: F) -> Handle<'_, V>
§fn on_mouse_down<F>(self, action: F) -> Handle<'_, V>
fn on_mouse_down<F>(self, action: F) -> Handle<'_, V>
on_press callback, this callback is triggered for all mouse buttons and not for any keyboard keys. Read more§fn on_mouse_up<F>(self, action: F) -> Handle<'_, V>
fn on_mouse_up<F>(self, action: F) -> Handle<'_, V>
on_release callback, this callback is triggered for all mouse buttons and not for any keyboard keys. Read more§fn on_focus_in<F>(self, action: F) -> Handle<'_, V>
fn on_focus_in<F>(self, action: F) -> Handle<'_, V>
§fn on_focus_out<F>(self, action: F) -> Handle<'_, V>
fn on_focus_out<F>(self, action: F) -> Handle<'_, V>
§fn on_geo_changed<F>(self, action: F) -> Handle<'_, V>
fn on_geo_changed<F>(self, action: F) -> Handle<'_, V>
§impl ButtonModifiers for Handle<'_, Button>
impl ButtonModifiers for Handle<'_, Button>
§impl ButtonModifiers for Handle<'_, ButtonGroup>
impl ButtonModifiers for Handle<'_, ButtonGroup>
§fn variant<U>(self, variant: impl Res<U>) -> Handle<'_, ButtonGroup>where
U: Into<ButtonVariant>,
fn variant<U>(self, variant: impl Res<U>) -> Handle<'_, ButtonGroup>where
U: Into<ButtonVariant>,
§impl<V> DataContext for Handle<'_, V>
impl<V> DataContext for Handle<'_, V>
§fn data<T>(&self) -> Option<&T>where
T: 'static,
fn data<T>(&self) -> Option<&T>where
T: 'static,
None if the data does not exist.§fn localization_context(&self) -> Option<LocalizationContext<'_>>
fn localization_context(&self) -> Option<LocalizationContext<'_>>
§impl<V> LayoutModifiers for Handle<'_, V>where
V: View,
impl<V> LayoutModifiers for Handle<'_, V>where
V: View,
§fn layout_type<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<LayoutType>,
fn layout_type<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<LayoutType>,
§fn position_type<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<PositionType>,
fn position_type<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<PositionType>,
§fn right<U>(self, value: impl Res<U>) -> Self
fn right<U>(self, value: impl Res<U>) -> Self
§fn bottom<U>(self, value: impl Res<U>) -> Self
fn bottom<U>(self, value: impl Res<U>) -> Self
§fn padding_left<U>(self, value: impl Res<U>) -> Self
fn padding_left<U>(self, value: impl Res<U>) -> Self
§fn padding_right<U>(self, value: impl Res<U>) -> Self
fn padding_right<U>(self, value: impl Res<U>) -> Self
§fn padding_top<U>(self, value: impl Res<U>) -> Self
fn padding_top<U>(self, value: impl Res<U>) -> Self
§fn padding_bottom<U>(self, value: impl Res<U>) -> Self
fn padding_bottom<U>(self, value: impl Res<U>) -> Self
§fn padding<U>(self, value: impl Res<U>) -> Self
fn padding<U>(self, value: impl Res<U>) -> Self
§fn vertical_gap<U>(self, value: impl Res<U>) -> Self
fn vertical_gap<U>(self, value: impl Res<U>) -> Self
§fn horizontal_gap<U>(self, value: impl Res<U>) -> Self
fn horizontal_gap<U>(self, value: impl Res<U>) -> Self
§fn gap<U>(self, value: impl Res<U>) -> Self
fn gap<U>(self, value: impl Res<U>) -> Self
§fn vertical_scroll<U>(self, value: impl Res<U>) -> Self
fn vertical_scroll<U>(self, value: impl Res<U>) -> Self
§fn horizontal_scroll<U>(self, value: impl Res<U>) -> Self
fn horizontal_scroll<U>(self, value: impl Res<U>) -> Self
§fn min_height<U>(self, value: impl Res<U>) -> Self
fn min_height<U>(self, value: impl Res<U>) -> Self
§fn min_size<U>(self, value: impl Res<U>) -> Self
fn min_size<U>(self, value: impl Res<U>) -> Self
§fn max_height<U>(self, value: impl Res<U>) -> Self
fn max_height<U>(self, value: impl Res<U>) -> Self
§fn max_size<U>(self, value: impl Res<U>) -> Self
fn max_size<U>(self, value: impl Res<U>) -> Self
§fn min_horizontal_gap<U>(self, value: impl Res<U>) -> Self
fn min_horizontal_gap<U>(self, value: impl Res<U>) -> Self
§fn min_vertical_gap<U>(self, value: impl Res<U>) -> Self
fn min_vertical_gap<U>(self, value: impl Res<U>) -> Self
§fn min_gap<U>(self, value: impl Res<U>) -> Self
fn min_gap<U>(self, value: impl Res<U>) -> Self
§fn max_horizontal_gap<U>(self, value: impl Res<U>) -> Self
fn max_horizontal_gap<U>(self, value: impl Res<U>) -> Self
§fn max_vertical_gap<U>(self, value: impl Res<U>) -> Self
fn max_vertical_gap<U>(self, value: impl Res<U>) -> Self
§fn max_gap<U>(self, value: impl Res<U>) -> Self
fn max_gap<U>(self, value: impl Res<U>) -> Self
§fn grid_columns<U>(self, value: impl Res<U>) -> Self
fn grid_columns<U>(self, value: impl Res<U>) -> Self
fn column_start(self, value: impl Res<usize>) -> Self
fn column_span(self, value: impl Res<usize>) -> Self
fn row_start(self, value: impl Res<usize>) -> Self
fn row_span(self, value: impl Res<usize>) -> Self
§impl<V> StyleModifiers for Handle<'_, V>where
V: View,
impl<V> StyleModifiers for Handle<'_, V>where
V: View,
§fn toggle_class(self, name: &str, applied: impl Res<bool>) -> Self
fn toggle_class(self, name: &str, applied: impl Res<bool>) -> Self
§fn focused_with_visibility<U>(
self,
focus: impl Res<U> + Copy + 'static,
visibility: impl Res<U> + Copy + 'static,
) -> Self
fn focused_with_visibility<U>( self, focus: impl Res<U> + Copy + 'static, visibility: impl Res<U> + Copy + 'static, ) -> Self
§fn read_only<U>(self, state: impl Res<U>) -> Self
fn read_only<U>(self, state: impl Res<U>) -> Self
§fn read_write<U>(self, state: impl Res<U>) -> Self
fn read_write<U>(self, state: impl Res<U>) -> Self
§fn placeholder_shown<U>(self, state: impl Res<U>) -> Self
fn placeholder_shown<U>(self, state: impl Res<U>) -> Self
§fn display<U>(self, value: impl Res<U>) -> Self
fn display<U>(self, value: impl Res<U>) -> Self
§fn visibility<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<Visibility>,
fn visibility<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<Visibility>,
§fn overflow<U>(self, value: impl Res<U>) -> Self
fn overflow<U>(self, value: impl Res<U>) -> Self
§fn overflowx<U>(self, value: impl Res<U>) -> Self
fn overflowx<U>(self, value: impl Res<U>) -> Self
§fn overflowy<U>(self, value: impl Res<U>) -> Self
fn overflowy<U>(self, value: impl Res<U>) -> Self
§fn backdrop_filter<U>(self, value: impl Res<U>) -> Self
fn backdrop_filter<U>(self, value: impl Res<U>) -> Self
§fn background_gradient<U>(self, value: impl Res<U>) -> Self
fn background_gradient<U>(self, value: impl Res<U>) -> Self
§fn background_color<U>(self, value: impl Res<U>) -> Self
fn background_color<U>(self, value: impl Res<U>) -> Self
§fn background_image<'i, U>(self, value: impl Res<U>) -> Selfwhere
U: Into<BackgroundImage<'i>>,
fn background_image<'i, U>(self, value: impl Res<U>) -> Selfwhere
U: Into<BackgroundImage<'i>>,
fn border_width<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<LengthOrPercentage>,
§fn border_color<U>(self, value: impl Res<U>) -> Self
fn border_color<U>(self, value: impl Res<U>) -> Self
§fn border_style<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<BorderStyleKeyword>,
fn border_style<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<BorderStyleKeyword>,
§fn corner_top_left_radius<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<LengthOrPercentage>,
fn corner_top_left_radius<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<LengthOrPercentage>,
§fn corner_top_right_radius<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<LengthOrPercentage>,
fn corner_top_right_radius<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<LengthOrPercentage>,
§fn corner_bottom_left_radius<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<LengthOrPercentage>,
fn corner_bottom_left_radius<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<LengthOrPercentage>,
§fn corner_bottom_right_radius<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<LengthOrPercentage>,
fn corner_bottom_right_radius<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<LengthOrPercentage>,
§fn corner_radius<U>(self, value: impl Res<U>) -> Self
fn corner_radius<U>(self, value: impl Res<U>) -> Self
§fn corner_top_left_shape<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<CornerShape>,
fn corner_top_left_shape<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<CornerShape>,
§fn corner_top_right_shape<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<CornerShape>,
fn corner_top_right_shape<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<CornerShape>,
§fn corner_bottom_left_shape<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<CornerShape>,
fn corner_bottom_left_shape<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<CornerShape>,
§fn corner_bottom_right_shape<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<CornerShape>,
fn corner_bottom_right_shape<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<CornerShape>,
§fn corner_shape<U>(self, value: impl Res<U>) -> Self
fn corner_shape<U>(self, value: impl Res<U>) -> Self
§fn corner_top_left_smoothing<U>(self, value: impl Res<U>) -> Self
fn corner_top_left_smoothing<U>(self, value: impl Res<U>) -> Self
§fn corner_top_right_smoothing<U>(self, value: impl Res<U>) -> Self
fn corner_top_right_smoothing<U>(self, value: impl Res<U>) -> Self
§fn corner_bottom_left_smoothing<U>(self, value: impl Res<U>) -> Self
fn corner_bottom_left_smoothing<U>(self, value: impl Res<U>) -> Self
§fn corner_bottom_right_smoothing<U>(self, value: impl Res<U>) -> Self
fn corner_bottom_right_smoothing<U>(self, value: impl Res<U>) -> Self
§fn corner_smoothing<U>(self, value: impl Res<U>) -> Self
fn corner_smoothing<U>(self, value: impl Res<U>) -> Self
§fn outline_width<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<LengthOrPercentage>,
fn outline_width<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<LengthOrPercentage>,
§fn outline_color<U>(self, value: impl Res<U>) -> Self
fn outline_color<U>(self, value: impl Res<U>) -> Self
§fn outline_offset<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<LengthOrPercentage>,
fn outline_offset<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<LengthOrPercentage>,
§fn cursor<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<CursorIcon>,
fn cursor<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<CursorIcon>,
§fn pointer_events<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<PointerEvents>,
fn pointer_events<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<PointerEvents>,
§fn transform<U>(self, value: impl Res<U>) -> Self
fn transform<U>(self, value: impl Res<U>) -> Self
§fn transform_origin<U>(self, value: impl Res<U>) -> Self
fn transform_origin<U>(self, value: impl Res<U>) -> Self
§fn translate<U>(self, value: impl Res<U>) -> Self
fn translate<U>(self, value: impl Res<U>) -> Self
§impl<V> TextModifiers for Handle<'_, V>
impl<V> TextModifiers for Handle<'_, V>
§fn text<T>(self, value: impl Res<T>) -> Selfwhere
T: ToStringLocalized,
fn text<T>(self, value: impl Res<T>) -> Selfwhere
T: ToStringLocalized,
§fn font_family<U>(self, value: impl Res<U>) -> Self
fn font_family<U>(self, value: impl Res<U>) -> Self
§fn font_weight<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<FontWeight>,
fn font_weight<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<FontWeight>,
§fn font_slant<U>(self, value: impl Res<U>) -> Self
fn font_slant<U>(self, value: impl Res<U>) -> Self
§fn font_width<U>(self, value: impl Res<U>) -> Self
fn font_width<U>(self, value: impl Res<U>) -> Self
§fn font_variation_settings<U>(self, value: impl Res<U>) -> Self
fn font_variation_settings<U>(self, value: impl Res<U>) -> Self
§fn caret_color<U>(self, value: impl Res<U>) -> Self
fn caret_color<U>(self, value: impl Res<U>) -> Self
§fn selection_color<U>(self, value: impl Res<U>) -> Self
fn selection_color<U>(self, value: impl Res<U>) -> Self
§fn text_wrap<U>(self, value: impl Res<U>) -> Self
fn text_wrap<U>(self, value: impl Res<U>) -> Self
§fn text_align<U>(self, value: impl Res<U>) -> Self
fn text_align<U>(self, value: impl Res<U>) -> Self
§fn text_overflow<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<TextOverflow>,
fn text_overflow<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<TextOverflow>,
§fn line_clamp<U>(self, value: impl Res<U>) -> Self
fn line_clamp<U>(self, value: impl Res<U>) -> Self
§fn text_decoration_line<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<TextDecorationLine>,
fn text_decoration_line<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<TextDecorationLine>,
§fn text_stroke_width<U>(self, value: impl Res<U>) -> Self
fn text_stroke_width<U>(self, value: impl Res<U>) -> Self
skia_safe::textlayout::TextStyle’s foreground skia_safe::Paint to
draw a stroke on the text. Read more§fn text_stroke_style<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<TextStrokeStyle>,
fn text_stroke_style<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<TextStrokeStyle>,
§impl WindowModifiers for Handle<'_, Window>
impl WindowModifiers for Handle<'_, Window>
fn on_close( self, callback: impl Fn(&mut EventContext<'_>) + 'static, ) -> Handle<'_, Window>
fn on_create( self, callback: impl Fn(&mut EventContext<'_>) + 'static, ) -> Handle<'_, Window>
§fn title<T>(self, title: impl Res<T>) -> Handle<'_, Window>where
T: ToString,
fn title<T>(self, title: impl Res<T>) -> Handle<'_, Window>where
T: ToString,
ToString. Read more§fn inner_size<S>(self, size: impl Res<S>) -> Handle<'_, Window>where
S: Into<WindowSize>,
fn inner_size<S>(self, size: impl Res<S>) -> Handle<'_, Window>where
S: Into<WindowSize>,
WindowSize. Read more§fn min_inner_size<S>(self, size: impl Res<Option<S>>) -> Handle<'_, Window>where
S: Into<WindowSize>,
fn min_inner_size<S>(self, size: impl Res<Option<S>>) -> Handle<'_, Window>where
S: Into<WindowSize>,
WindowSize. Read more§fn max_inner_size<S>(self, size: impl Res<Option<S>>) -> Handle<'_, Window>where
S: Into<WindowSize>,
fn max_inner_size<S>(self, size: impl Res<Option<S>>) -> Handle<'_, Window>where
S: Into<WindowSize>,
WindowSize. Read more§fn position<P>(self, position: impl Res<P>) -> Handle<'_, Window>where
P: Into<WindowPosition>,
fn position<P>(self, position: impl Res<P>) -> Handle<'_, Window>where
P: Into<WindowPosition>,
Position]. Read morefn offset<P>(self, offset: impl Res<P>) -> Handle<'_, Window>where
P: Into<WindowPosition>,
fn anchor<P>(self, anchor: impl Res<P>) -> Handle<'_, Window>
fn anchor_target<P>(self, anchor_target: impl Res<P>) -> Handle<'_, Window>where
P: Into<AnchorTarget>,
fn parent_anchor<P>(self, parent_anchor: impl Res<P>) -> Handle<'_, Window>
§fn resizable(self, flag: impl Res<bool>) -> Handle<'_, Window>
fn resizable(self, flag: impl Res<bool>) -> Handle<'_, Window>
§fn minimized(self, flag: impl Res<bool>) -> Handle<'_, Window>
fn minimized(self, flag: impl Res<bool>) -> Handle<'_, Window>
§fn maximized(self, flag: impl Res<bool>) -> Handle<'_, Window>
fn maximized(self, flag: impl Res<bool>) -> Handle<'_, Window>
§fn visible(self, flag: impl Res<bool>) -> Handle<'_, Window>
fn visible(self, flag: impl Res<bool>) -> Handle<'_, Window>
§fn transparent(self, flag: bool) -> Handle<'_, Window>
fn transparent(self, flag: bool) -> Handle<'_, Window>
§fn decorations(self, flag: bool) -> Handle<'_, Window>
fn decorations(self, flag: bool) -> Handle<'_, Window>
§fn always_on_top(self, flag: bool) -> Handle<'_, Window>
fn always_on_top(self, flag: bool) -> Handle<'_, Window>
Auto Trait Implementations§
impl<'a, V> Freeze for Handle<'a, V>
impl<'a, V> !RefUnwindSafe for Handle<'a, V>
impl<'a, V> !Send for Handle<'a, V>
impl<'a, V> !Sync for Handle<'a, V>
impl<'a, V> Unpin for Handle<'a, V>where
V: Unpin,
impl<'a, V> !UnwindSafe for Handle<'a, V>
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.