pub struct Handle<'a, V> { /* private fields */ }
Expand description
A handle to a view which has been built into the tree.
Implementations§
Source§impl<V> Handle<'_, V>
impl<V> Handle<'_, V>
Sourcepub fn lock_focus_to_within(self) -> Self
pub fn lock_focus_to_within(self) -> Self
Stop the user from tabbing out of a subtree, which is useful for modal dialogs.
Sourcepub fn on_build<F>(self, callback: F) -> Selfwhere
F: Fn(&mut EventContext<'_>),
pub fn on_build<F>(self, callback: F) -> Selfwhere
F: Fn(&mut EventContext<'_>),
Callback which is run when the view is built/rebuilt.
Sourcepub fn bind<R, T, F>(self, res: R, closure: F) -> Self
pub fn bind<R, T, F>(self, res: R, closure: F) -> Self
Creates a binding to the given lens and provides a closure which can be used to mutate the view through a handle.
Sourcepub fn needs_relayout(&mut self)
pub fn needs_relayout(&mut self)
Marks the view as needing a relayout.
Sourcepub fn needs_restyle(&mut self)
pub fn needs_restyle(&mut self)
Marks the view as needing a restyle.
Sourcepub fn needs_redraw(&mut self)
pub fn needs_redraw(&mut self)
Marks the view as needing a redraw.
Sourcepub fn bounds(&self) -> BoundingBox
pub fn bounds(&self) -> BoundingBox
Returns the bounding box of the view.
Sourcepub fn scale_factor(&self) -> f32
pub fn scale_factor(&self) -> f32
Returns the scale factor of the device.
Source§impl Handle<'_, Avatar>
impl Handle<'_, Avatar>
Sourcepub fn variant<U: Into<AvatarVariant>>(self, variant: impl Res<U>) -> Self
pub fn variant<U: Into<AvatarVariant>>(self, variant: impl Res<U>) -> Self
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);
Source§impl Handle<'_, Badge>
impl Handle<'_, Badge>
Sourcepub fn placement<U: Into<BadgePlacement>>(self, placement: impl Res<U>) -> Self
pub fn placement<U: Into<BadgePlacement>>(self, placement: impl Res<U>) -> Self
Sets the placement of a badge relative to its parent. Accepts a value of, or lens to, a BadgePlacement.
Source§impl Handle<'_, ButtonGroup>
impl Handle<'_, ButtonGroup>
Source§impl Handle<'_, Checkbox>
impl Handle<'_, Checkbox>
Sourcepub fn on_toggle<F>(self, callback: F) -> Selfwhere
F: 'static + Fn(&mut EventContext<'_>),
pub fn on_toggle<F>(self, callback: F) -> Selfwhere
F: 'static + Fn(&mut EventContext<'_>),
Set the callback triggered when the checkbox is pressed.
§Examples
Checkbox::new(cx, AppData::value)
.on_toggle(|cx| cx.emit(AppEvent::ToggleValue));
Source§impl Handle<'_, Chip>
impl Handle<'_, Chip>
Sourcepub fn on_close(
self,
callback: impl 'static + Fn(&mut EventContext<'_>) + Send + Sync,
) -> Self
pub fn on_close( self, callback: impl 'static + Fn(&mut EventContext<'_>) + Send + Sync, ) -> Self
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.
Sourcepub fn variant<U: Into<ChipVariant>>(self, variant: impl Res<U>) -> Self
pub fn variant<U: Into<ChipVariant>>(self, variant: impl Res<U>) -> Self
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);
Source§impl Handle<'_, Collapsible>
impl Handle<'_, Collapsible>
Source§impl Handle<'_, Datepicker>
impl Handle<'_, Datepicker>
Sourcepub fn on_select<F: 'static + Fn(&mut EventContext<'_>, NaiveDate)>(
self,
callback: F,
) -> Self
pub fn on_select<F: 'static + Fn(&mut EventContext<'_>, NaiveDate)>( self, callback: F, ) -> Self
Set the callback triggered when a date is selected from the Datepicker view.
Source§impl Handle<'_, Divider>
impl Handle<'_, Divider>
Sourcepub fn orientation(self, orientation: impl Res<Orientation>) -> Self
pub fn orientation(self, orientation: impl Res<Orientation>) -> Self
Set the orientation of the divider. Accepts a value or a lens to an Orientation.
Source§impl Handle<'_, Dropdown>
impl Handle<'_, Dropdown>
Sourcepub fn placement(self, placement: impl Res<Placement>) -> Self
pub fn placement(self, placement: impl Res<Placement>) -> Self
Sets the position where the tooltip should appear relative to its parent element.
Defaults to Placement::Bottom
.
Sourcepub fn show_arrow(self, show_arrow: bool) -> Self
pub fn show_arrow(self, show_arrow: bool) -> Self
Sets whether the popup should include an arrow. Defaults to true.
Sourcepub fn arrow_size(self, size: impl Into<Length>) -> Self
pub fn arrow_size(self, size: impl Into<Length>) -> Self
Sets the size of the popup arrow, or gap if the arrow is hidden.
Sourcepub fn should_reposition(self, flag: bool) -> Self
pub fn should_reposition(self, flag: bool) -> Self
Set to whether the popup should reposition to always be visible.
Source§impl<L: Lens<Target = f32>> Handle<'_, Knob<L>>
impl<L: Lens<Target = f32>> Handle<'_, Knob<L>>
Source§impl Handle<'_, Label>
impl Handle<'_, Label>
Sourcepub fn describing(self, entity_identifier: impl Into<String>) -> Self
pub fn describing(self, entity_identifier: impl Into<String>) -> Self
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");
Source§impl Handle<'_, List>
impl Handle<'_, List>
Sourcepub fn selected<S: Lens>(self, selected: S) -> Self
pub fn selected<S: Lens>(self, selected: S) -> Self
Sets the selected items of the list. Takes a lens to a list of indices.
Sourcepub fn on_select<F>(self, callback: F) -> Self
pub fn on_select<F>(self, callback: F) -> Self
Sets the callback triggered when a ListItem is selected.
Sourcepub fn selectable<U: Into<Selectable>>(self, selectable: impl Res<U>) -> Self
pub fn selectable<U: Into<Selectable>>(self, selectable: impl Res<U>) -> Self
Set the selectable state of the List.
Sourcepub fn selection_follows_focus<U: Into<bool>>(self, flag: impl Res<U>) -> Self
pub fn selection_follows_focus<U: Into<bool>>(self, flag: impl Res<U>) -> Self
Sets whether the selection should follow the focus.
Sourcepub fn horizontal<U: Into<bool>>(self, flag: impl Res<U>) -> Self
pub fn horizontal<U: Into<bool>>(self, flag: impl Res<U>) -> Self
Sets the orientation of the list.
Source§impl Handle<'_, PickList>
impl Handle<'_, PickList>
Sourcepub fn placeholder<P: ToStringLocalized>(self, placeholder: impl Res<P>) -> Self
pub fn placeholder<P: ToStringLocalized>(self, placeholder: impl Res<P>) -> Self
Sets the placeholder text that appears when the textbox has no value.
Source§impl Handle<'_, Popup>
impl Handle<'_, Popup>
Sourcepub fn placement(self, placement: impl Res<Placement>) -> Self
pub fn placement(self, placement: impl Res<Placement>) -> Self
Sets the position where the popup should appear relative to its parent element.
Defaults to Placement::Bottom
.
Sourcepub fn show_arrow(self, show_arrow: impl Res<bool>) -> Self
pub fn show_arrow(self, show_arrow: impl Res<bool>) -> Self
Sets whether the popup should include an arrow. Defaults to true.
Sourcepub fn arrow_size<U: Into<Length>>(self, size: impl Res<U>) -> Self
pub fn arrow_size<U: Into<Length>>(self, size: impl Res<U>) -> Self
Sets the size of the popup arrow, or gap if the arrow is hidden.
Sourcepub fn should_reposition(self, should_reposition: impl Res<bool>) -> Self
pub fn should_reposition(self, should_reposition: impl Res<bool>) -> Self
Set to whether the popup should reposition to always be visible.
Sourcepub fn on_blur<F>(self, f: F) -> Selfwhere
F: 'static + Fn(&mut EventContext<'_>),
pub fn on_blur<F>(self, f: F) -> Selfwhere
F: 'static + Fn(&mut EventContext<'_>),
Registers a callback for when the user clicks off of the popup, usually with the intent of closing it.
Source§impl Handle<'_, RadioButton>
impl Handle<'_, RadioButton>
Sourcepub fn on_select<F>(self, callback: F) -> Selfwhere
F: 'static + Fn(&mut EventContext<'_>),
pub fn on_select<F>(self, callback: F) -> Selfwhere
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));
Source§impl Handle<'_, Rating>
impl Handle<'_, Rating>
Source§impl<L1: 'static + Lens<Target = f32>> Handle<'_, Scrollbar<L1>>
impl<L1: 'static + Lens<Target = f32>> Handle<'_, Scrollbar<L1>>
Sourcepub fn scroll_to_cursor(self, scroll_to_cursor: impl Res<bool>) -> Self
pub fn scroll_to_cursor(self, scroll_to_cursor: impl Res<bool>) -> Self
Sets whether the scrollbar should move to the cursor when pressed.
Source§impl Handle<'_, ScrollView>
impl Handle<'_, ScrollView>
Sourcepub fn on_scroll(
self,
callback: impl Fn(&mut EventContext<'_>, f32, f32) + 'static + Send + Sync,
) -> Self
pub fn on_scroll( self, callback: impl Fn(&mut EventContext<'_>, f32, f32) + 'static + Send + Sync, ) -> Self
Sets a callback which will be called when a scrollview is scrolled, either with the mouse wheel, touchpad, or using the scroll bars.
Sourcepub fn scroll_to_cursor(self, scroll_to_cursor: bool) -> Self
pub fn scroll_to_cursor(self, scroll_to_cursor: bool) -> Self
Sets whether the scrollbar should move to the cursor when pressed.
Sourcepub fn scroll_x(self, scrollx: impl Res<f32>) -> Self
pub fn scroll_x(self, scrollx: impl Res<f32>) -> Self
Set the horizontal scroll position of the ScrollView. Accepts a value or lens to an ‘f32’ between 0 and 1.
Sourcepub fn scroll_y(self, scrollx: impl Res<f32>) -> Self
pub fn scroll_y(self, scrollx: impl Res<f32>) -> Self
Set the vertical scroll position of the ScrollView. Accepts a value or lens to an ‘f32’ between 0 and 1.
Sourcepub fn show_horizontal_scrollbar(self, flag: impl Res<bool>) -> Self
pub fn show_horizontal_scrollbar(self, flag: impl Res<bool>) -> Self
Sets whether the horizontal scrollbar should be visible.
Sourcepub fn show_vertical_scrollbar(self, flag: impl Res<bool>) -> Self
pub fn show_vertical_scrollbar(self, flag: impl Res<bool>) -> Self
Sets whether the vertical scrollbar should be visible.
Source§impl<L: Lens> Handle<'_, Slider<L>>
impl<L: Lens> Handle<'_, Slider<L>>
Sourcepub fn on_change<F>(self, callback: F) -> Self
pub fn on_change<F>(self, callback: F) -> Self
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.
§Example
Slider::new(cx, AppData::value)
.on_change(|cx, value| {
debug!("Slider on_changing: {}", value);
});
Sourcepub fn range(self, range: Range<f32>) -> Self
pub fn range(self, range: Range<f32>) -> Self
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.
§Example
Slider::new(cx, AppData::value)
.range(-20.0..50.0)
.on_changing(|cx, value| {
debug!("Slider on_changing: {}", value);
});
Sourcepub fn keyboard_fraction(self, keyboard_fraction: f32) -> Self
pub fn keyboard_fraction(self, keyboard_fraction: f32) -> Self
Sets the fraction of a slider that a press of an arrow key will change.
§Example
Slider::new(cx, AppData::value)
.keyboard_fraction(0.05)
.on_changing(|cx, value| {
debug!("Slider on_changing: {}", value);
});
Source§impl Handle<'_, Spinbox>
impl Handle<'_, Spinbox>
Sourcepub fn on_increment<F>(self, callback: F) -> Self
pub fn on_increment<F>(self, callback: F) -> Self
Sets the callback which is triggered when the Spinbox value is incremented.
Sourcepub fn on_decrement<F>(self, callback: F) -> Self
pub fn on_decrement<F>(self, callback: F) -> Self
Sets the callback which is triggered when the Spinbox value is decremented.
Sourcepub fn orientation(self, orientation: impl Res<Orientation>) -> Self
pub fn orientation(self, orientation: impl Res<Orientation>) -> Self
Sets the orientation of the Spinbox.
Sourcepub fn icons(self, icons: impl Res<SpinboxIcons>) -> Self
pub fn icons(self, icons: impl Res<SpinboxIcons>) -> Self
Set the icons which should be used for the increment and decrement buttons of the Spinbox
Source§impl Handle<'_, Switch>
impl Handle<'_, Switch>
Sourcepub fn on_toggle<F>(self, callback: F) -> Selfwhere
F: 'static + Fn(&mut EventContext<'_>),
pub fn on_toggle<F>(self, callback: F) -> Selfwhere
F: 'static + Fn(&mut EventContext<'_>),
Set the callback triggered when the Switch is pressed.
§Examples
Switch::new(cx, AppData::value)
.on_toggle(|cx| cx.emit(AppEvent::ToggleValue));
Source§impl<L: Lens> Handle<'_, Textbox<L>>
impl<L: Lens> Handle<'_, Textbox<L>>
Sourcepub fn on_edit<F>(self, callback: F) -> Self
pub fn on_edit<F>(self, callback: F) -> Self
Sets the callback triggered when a textbox is edited, i.e. text is inserted/deleted.
Callback provides the current text of the textbox.
Sourcepub fn on_submit<F>(self, callback: F) -> Self
pub fn on_submit<F>(self, callback: F) -> Self
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.
Sourcepub fn on_blur<F>(self, callback: F) -> Self
pub fn on_blur<F>(self, callback: F) -> Self
Sets the callback triggered when a textbox is blurred, i.e. the mouse is pressed outside of the textbox.
Sourcepub fn on_cancel<F>(self, callback: F) -> Self
pub fn on_cancel<F>(self, callback: F) -> Self
Sets the callback triggered when a textbox edit is cancelled, i.e. the escape key is pressed while editing.
Sourcepub fn validate<F>(self, is_valid: F) -> Self
pub fn validate<F>(self, is_valid: F) -> Self
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.
Sourcepub fn placeholder<P: ToStringLocalized>(self, text: impl Res<P>) -> Self
pub fn placeholder<P: ToStringLocalized>(self, text: impl Res<P>) -> Self
Sets the placeholder text that appears when the textbox has no value.
Source§impl Handle<'_, ToggleButton>
impl Handle<'_, ToggleButton>
Sourcepub fn on_toggle(
self,
callback: impl Fn(&mut EventContext<'_>) + 'static,
) -> Self
pub fn on_toggle( self, callback: impl Fn(&mut EventContext<'_>) + 'static, ) -> Self
Sets the callback triggered when the ToggleButton is toggled.
Source§impl Handle<'_, Tooltip>
impl Handle<'_, Tooltip>
Sourcepub fn placement<U: Into<Placement>>(self, placement: impl Res<U>) -> Self
pub fn placement<U: Into<Placement>>(self, placement: impl Res<U>) -> Self
Sets the position where the tooltip should appear relative to its parent element.
Defaults to Placement::Bottom
.
Sourcepub fn arrow<U: Into<bool>>(self, show_arrow: impl Res<U>) -> Self
pub fn arrow<U: Into<bool>>(self, show_arrow: impl Res<U>) -> Self
Sets whether the tooltip should include an arrow. Defaults to true.
Sourcepub fn arrow_size<U: Into<Length>>(self, size: impl Res<U>) -> Self
pub fn arrow_size<U: Into<Length>>(self, size: impl Res<U>) -> Self
Sets the size of the tooltip arrow if enabled.
Source§impl Handle<'_, VirtualList>
impl Handle<'_, VirtualList>
Sourcepub fn scroll_to_cursor(self, flag: bool) -> Self
pub fn scroll_to_cursor(self, flag: bool) -> Self
Sets whether the scrollbar should move to the cursor when pressed.
Trait Implementations§
Source§impl<V> AbilityModifiers for Handle<'_, V>
impl<V> AbilityModifiers for Handle<'_, V>
Source§fn hoverable<U: Into<bool>>(self, state: impl Res<U>) -> Self
fn hoverable<U: Into<bool>>(self, state: impl Res<U>) -> Self
Source§fn focusable<U: Into<bool>>(self, state: impl Res<U>) -> Self
fn focusable<U: Into<bool>>(self, state: impl Res<U>) -> Self
Source§fn checkable<U: Into<bool>>(self, state: impl Res<U>) -> Self
fn checkable<U: Into<bool>>(self, state: impl Res<U>) -> Self
Source§impl<V: View> AccessibilityModifiers for Handle<'_, V>
impl<V: View> AccessibilityModifiers for Handle<'_, V>
Source§fn name<U: ToStringLocalized>(self, name: impl Res<U>) -> Self
fn name<U: ToStringLocalized>(self, name: impl Res<U>) -> Self
Source§fn live(self, live: Live) -> Self
fn live(self, live: Live) -> Self
Source§fn numeric_value<U: Into<f64>>(self, value: impl Res<U>) -> Self
fn numeric_value<U: Into<f64>>(self, value: impl Res<U>) -> Self
Source§fn text_value<U: ToStringLocalized>(self, value: impl Res<U>) -> Self
fn text_value<U: ToStringLocalized>(self, value: impl Res<U>) -> Self
Source§impl<V: View> ActionModifiers<V> for Handle<'_, V>
impl<V: View> ActionModifiers<V> for Handle<'_, V>
Source§fn tooltip<C: Fn(&mut Context) -> Handle<'_, Tooltip> + 'static>(
self,
content: C,
) -> Self
fn tooltip<C: Fn(&mut Context) -> Handle<'_, Tooltip> + 'static>( self, content: C, ) -> Self
Source§fn on_press_down<F>(self, action: F) -> Self
fn on_press_down<F>(self, action: F) -> Self
Source§fn on_double_click<F>(self, action: F) -> Self
fn on_double_click<F>(self, action: F) -> Self
MouseDoubleClick
event. Read moreSource§fn on_hover<F>(self, action: F) -> Self
fn on_hover<F>(self, action: F) -> Self
Source§fn on_hover_out<F>(self, action: F) -> Self
fn on_hover_out<F>(self, action: F) -> Self
Source§fn on_over<F>(self, action: F) -> Self
fn on_over<F>(self, action: F) -> Self
Source§fn on_over_out<F>(self, action: F) -> Self
fn on_over_out<F>(self, action: F) -> Self
Source§fn on_mouse_move<F>(self, action: F) -> Self
fn on_mouse_move<F>(self, action: F) -> Self
Source§fn on_mouse_down<F>(self, action: F) -> Self
fn on_mouse_down<F>(self, action: F) -> Self
on_press
callback, this callback is triggered for all mouse buttons and not for any keyboard keys. Read moreSource§fn on_mouse_up<F>(self, action: F) -> Self
fn on_mouse_up<F>(self, action: F) -> Self
on_release
callback, this callback is triggered for all mouse buttons and not for any keyboard keys. Read moreSource§fn on_focus_in<F>(self, action: F) -> Self
fn on_focus_in<F>(self, action: F) -> Self
Source§fn on_focus_out<F>(self, action: F) -> Self
fn on_focus_out<F>(self, action: F) -> Self
Source§fn on_geo_changed<F>(self, action: F) -> Self
fn on_geo_changed<F>(self, action: F) -> Self
Source§impl ButtonModifiers for Handle<'_, Button>
impl ButtonModifiers for Handle<'_, Button>
Source§impl ButtonModifiers for Handle<'_, ButtonGroup>
impl ButtonModifiers for Handle<'_, ButtonGroup>
Source§impl<V> DataContext for Handle<'_, V>
impl<V> DataContext for Handle<'_, V>
Source§fn data<T: 'static>(&self) -> Option<&T>
fn data<T: 'static>(&self) -> Option<&T>
None
if the data does not exist.Source§fn localization_context(&self) -> Option<LocalizationContext<'_>>
fn localization_context(&self) -> Option<LocalizationContext<'_>>
Source§impl<V: View> LayoutModifiers for Handle<'_, V>
impl<V: View> LayoutModifiers for Handle<'_, V>
Source§fn layout_type<U: Into<LayoutType>>(self, value: impl Res<U>) -> Self
fn layout_type<U: Into<LayoutType>>(self, value: impl Res<U>) -> Self
Source§fn position_type<U: Into<PositionType>>(self, value: impl Res<U>) -> Self
fn position_type<U: Into<PositionType>>(self, value: impl Res<U>) -> Self
Source§fn left<U: Into<Units>>(self, value: impl Res<U>) -> Self
fn left<U: Into<Units>>(self, value: impl Res<U>) -> Self
Source§fn right<U: Into<Units>>(self, value: impl Res<U>) -> Self
fn right<U: Into<Units>>(self, value: impl Res<U>) -> Self
Source§fn top<U: Into<Units>>(self, value: impl Res<U>) -> Self
fn top<U: Into<Units>>(self, value: impl Res<U>) -> Self
Source§fn bottom<U: Into<Units>>(self, value: impl Res<U>) -> Self
fn bottom<U: Into<Units>>(self, value: impl Res<U>) -> Self
Source§fn space<U: Into<Units>>(self, value: impl Res<U>) -> Self
fn space<U: Into<Units>>(self, value: impl Res<U>) -> Self
Source§fn size<U: Into<Units>>(self, value: impl Res<U>) -> Self
fn size<U: Into<Units>>(self, value: impl Res<U>) -> Self
Source§fn padding_left<U: Into<Units>>(self, value: impl Res<U>) -> Self
fn padding_left<U: Into<Units>>(self, value: impl Res<U>) -> Self
Source§fn padding_right<U: Into<Units>>(self, value: impl Res<U>) -> Self
fn padding_right<U: Into<Units>>(self, value: impl Res<U>) -> Self
Source§fn padding_top<U: Into<Units>>(self, value: impl Res<U>) -> Self
fn padding_top<U: Into<Units>>(self, value: impl Res<U>) -> Self
Source§fn padding_bottom<U: Into<Units>>(self, value: impl Res<U>) -> Self
fn padding_bottom<U: Into<Units>>(self, value: impl Res<U>) -> Self
Source§fn alignment<U: Into<Alignment>>(self, value: impl Res<U>) -> Self
fn alignment<U: Into<Alignment>>(self, value: impl Res<U>) -> Self
Source§fn padding<U: Into<Units>>(self, value: impl Res<U>) -> Self
fn padding<U: Into<Units>>(self, value: impl Res<U>) -> Self
Source§fn vertical_gap<U: Into<Units>>(self, value: impl Res<U>) -> Self
fn vertical_gap<U: Into<Units>>(self, value: impl Res<U>) -> Self
Source§fn horizontal_gap<U: Into<Units>>(self, value: impl Res<U>) -> Self
fn horizontal_gap<U: Into<Units>>(self, value: impl Res<U>) -> Self
Source§fn gap<U: Into<Units>>(self, value: impl Res<U>) -> Self
fn gap<U: Into<Units>>(self, value: impl Res<U>) -> Self
Source§fn vertical_scroll<U: Into<f32>>(self, value: impl Res<U>) -> Self
fn vertical_scroll<U: Into<f32>>(self, value: impl Res<U>) -> Self
Source§fn horizontal_scroll<U: Into<f32>>(self, value: impl Res<U>) -> Self
fn horizontal_scroll<U: Into<f32>>(self, value: impl Res<U>) -> Self
Source§fn min_width<U: Into<Units>>(self, value: impl Res<U>) -> Self
fn min_width<U: Into<Units>>(self, value: impl Res<U>) -> Self
Source§fn min_height<U: Into<Units>>(self, value: impl Res<U>) -> Self
fn min_height<U: Into<Units>>(self, value: impl Res<U>) -> Self
Source§fn min_size<U: Into<Units>>(self, value: impl Res<U>) -> Self
fn min_size<U: Into<Units>>(self, value: impl Res<U>) -> Self
Source§fn max_width<U: Into<Units>>(self, value: impl Res<U>) -> Self
fn max_width<U: Into<Units>>(self, value: impl Res<U>) -> Self
Source§fn max_height<U: Into<Units>>(self, value: impl Res<U>) -> Self
fn max_height<U: Into<Units>>(self, value: impl Res<U>) -> Self
Source§fn max_size<U: Into<Units>>(self, value: impl Res<U>) -> Self
fn max_size<U: Into<Units>>(self, value: impl Res<U>) -> Self
Source§fn min_horizontal_gap<U: Into<Units>>(self, value: impl Res<U>) -> Self
fn min_horizontal_gap<U: Into<Units>>(self, value: impl Res<U>) -> Self
Source§fn min_vertical_gap<U: Into<Units>>(self, value: impl Res<U>) -> Self
fn min_vertical_gap<U: Into<Units>>(self, value: impl Res<U>) -> Self
Source§fn min_gap<U: Into<Units>>(self, value: impl Res<U>) -> Self
fn min_gap<U: Into<Units>>(self, value: impl Res<U>) -> Self
Source§fn max_horizontal_gap<U: Into<Units>>(self, value: impl Res<U>) -> Self
fn max_horizontal_gap<U: Into<Units>>(self, value: impl Res<U>) -> Self
Source§fn max_vertical_gap<U: Into<Units>>(self, value: impl Res<U>) -> Self
fn max_vertical_gap<U: Into<Units>>(self, value: impl Res<U>) -> Self
Source§fn max_gap<U: Into<Units>>(self, value: impl Res<U>) -> Self
fn max_gap<U: Into<Units>>(self, value: impl Res<U>) -> Self
Source§fn grid_columns<U: Into<Vec<Units>>>(self, value: impl Res<U>) -> Self
fn grid_columns<U: Into<Vec<Units>>>(self, value: impl Res<U>) -> Self
Source§fn grid_rows<U: Into<Vec<Units>>>(self, value: impl Res<U>) -> Self
fn grid_rows<U: Into<Vec<Units>>>(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
Source§impl<V: View> StyleModifiers for Handle<'_, V>
impl<V: View> StyleModifiers for Handle<'_, V>
Source§fn toggle_class(self, name: &str, applied: impl Res<bool>) -> Self
fn toggle_class(self, name: &str, applied: impl Res<bool>) -> Self
Source§fn checked<U: Into<bool>>(self, state: impl Res<U>) -> Self
fn checked<U: Into<bool>>(self, state: impl Res<U>) -> Self
Source§fn focused<U: Into<bool>>(self, state: impl Res<U>) -> Self
fn focused<U: Into<bool>>(self, state: impl Res<U>) -> Self
Source§fn focused_with_visibility<U: Into<bool>>(
self,
focus: impl Res<U> + Copy + 'static,
visibility: impl Res<U> + Copy + 'static,
) -> Self
fn focused_with_visibility<U: Into<bool>>( self, focus: impl Res<U> + Copy + 'static, visibility: impl Res<U> + Copy + 'static, ) -> Self
Source§fn read_only<U: Into<bool>>(self, state: impl Res<U>) -> Self
fn read_only<U: Into<bool>>(self, state: impl Res<U>) -> Self
Source§fn read_write<U: Into<bool>>(self, state: impl Res<U>) -> Self
fn read_write<U: Into<bool>>(self, state: impl Res<U>) -> Self
Source§fn disabled<U: Into<bool>>(self, value: impl Res<U>) -> Self
fn disabled<U: Into<bool>>(self, value: impl Res<U>) -> Self
Source§fn display<U: Into<Display>>(self, value: impl Res<U>) -> Self
fn display<U: Into<Display>>(self, value: impl Res<U>) -> Self
Source§fn visibility<U: Into<Visibility>>(self, value: impl Res<U>) -> Self
fn visibility<U: Into<Visibility>>(self, value: impl Res<U>) -> Self
Source§fn opacity<U: Into<Opacity>>(self, value: impl Res<U>) -> Self
fn opacity<U: Into<Opacity>>(self, value: impl Res<U>) -> Self
Source§fn z_index<U: Into<i32>>(self, value: impl Res<U>) -> Self
fn z_index<U: Into<i32>>(self, value: impl Res<U>) -> Self
Source§fn clip_path<U: Into<ClipPath>>(self, value: impl Res<U>) -> Self
fn clip_path<U: Into<ClipPath>>(self, value: impl Res<U>) -> Self
Source§fn overflow<U: Into<Overflow>>(self, value: impl Res<U>) -> Self
fn overflow<U: Into<Overflow>>(self, value: impl Res<U>) -> Self
Source§fn overflowx<U: Into<Overflow>>(self, value: impl Res<U>) -> Self
fn overflowx<U: Into<Overflow>>(self, value: impl Res<U>) -> Self
Source§fn overflowy<U: Into<Overflow>>(self, value: impl Res<U>) -> Self
fn overflowy<U: Into<Overflow>>(self, value: impl Res<U>) -> Self
Source§fn backdrop_filter<U: Into<Filter>>(self, value: impl Res<U>) -> Self
fn backdrop_filter<U: Into<Filter>>(self, value: impl Res<U>) -> Self
Source§fn shadows<U: Into<Vec<Shadow>>>(self, value: impl Res<U>) -> Self
fn shadows<U: Into<Vec<Shadow>>>(self, value: impl Res<U>) -> Self
Source§fn background_gradient<U: Into<Gradient>>(self, value: impl Res<U>) -> Self
fn background_gradient<U: Into<Gradient>>(self, value: impl Res<U>) -> Self
Source§fn background_color<U: Into<Color>>(self, value: impl Res<U>) -> Self
fn background_color<U: Into<Color>>(self, value: impl Res<U>) -> Self
Source§fn background_image<'i, U: Into<BackgroundImage<'i>>>(
self,
value: impl Res<U>,
) -> Self
fn background_image<'i, U: Into<BackgroundImage<'i>>>( self, value: impl Res<U>, ) -> Self
fn border_width<U: Into<LengthOrPercentage>>(self, value: impl Res<U>) -> Self
Source§fn border_color<U: Into<Color>>(self, value: impl Res<U>) -> Self
fn border_color<U: Into<Color>>(self, value: impl Res<U>) -> Self
Source§fn border_style<U: Into<BorderStyleKeyword>>(self, value: impl Res<U>) -> Self
fn border_style<U: Into<BorderStyleKeyword>>(self, value: impl Res<U>) -> Self
Source§fn corner_top_left_radius<U: Into<LengthOrPercentage>>(
self,
value: impl Res<U>,
) -> Self
fn corner_top_left_radius<U: Into<LengthOrPercentage>>( self, value: impl Res<U>, ) -> Self
Source§fn corner_top_right_radius<U: Into<LengthOrPercentage>>(
self,
value: impl Res<U>,
) -> Self
fn corner_top_right_radius<U: Into<LengthOrPercentage>>( self, value: impl Res<U>, ) -> Self
Source§fn corner_bottom_left_radius<U: Into<LengthOrPercentage>>(
self,
value: impl Res<U>,
) -> Self
fn corner_bottom_left_radius<U: Into<LengthOrPercentage>>( self, value: impl Res<U>, ) -> Self
Source§fn corner_bottom_right_radius<U: Into<LengthOrPercentage>>(
self,
value: impl Res<U>,
) -> Self
fn corner_bottom_right_radius<U: Into<LengthOrPercentage>>( self, value: impl Res<U>, ) -> Self
Source§fn corner_radius<U: Debug + Into<CornerRadius>>(
self,
value: impl Res<U>,
) -> Self
fn corner_radius<U: Debug + Into<CornerRadius>>( self, value: impl Res<U>, ) -> Self
Source§fn corner_top_left_shape<U: Into<CornerShape>>(self, value: impl Res<U>) -> Self
fn corner_top_left_shape<U: Into<CornerShape>>(self, value: impl Res<U>) -> Self
Source§fn corner_top_right_shape<U: Into<CornerShape>>(
self,
value: impl Res<U>,
) -> Self
fn corner_top_right_shape<U: Into<CornerShape>>( self, value: impl Res<U>, ) -> Self
Source§fn corner_bottom_left_shape<U: Into<CornerShape>>(
self,
value: impl Res<U>,
) -> Self
fn corner_bottom_left_shape<U: Into<CornerShape>>( self, value: impl Res<U>, ) -> Self
Source§fn corner_bottom_right_shape<U: Into<CornerShape>>(
self,
value: impl Res<U>,
) -> Self
fn corner_bottom_right_shape<U: Into<CornerShape>>( self, value: impl Res<U>, ) -> Self
Source§fn corner_shape<U: Debug + Into<Rect<CornerShape>>>(
self,
value: impl Res<U>,
) -> Self
fn corner_shape<U: Debug + Into<Rect<CornerShape>>>( self, value: impl Res<U>, ) -> Self
Source§fn corner_top_left_smoothing<U: Into<f32>>(self, value: impl Res<U>) -> Self
fn corner_top_left_smoothing<U: Into<f32>>(self, value: impl Res<U>) -> Self
Source§fn corner_top_right_smoothing<U: Into<f32>>(self, value: impl Res<U>) -> Self
fn corner_top_right_smoothing<U: Into<f32>>(self, value: impl Res<U>) -> Self
Source§fn corner_bottom_left_smoothing<U: Into<f32>>(self, value: impl Res<U>) -> Self
fn corner_bottom_left_smoothing<U: Into<f32>>(self, value: impl Res<U>) -> Self
Source§fn corner_bottom_right_smoothing<U: Into<f32>>(self, value: impl Res<U>) -> Self
fn corner_bottom_right_smoothing<U: Into<f32>>(self, value: impl Res<U>) -> Self
Source§fn corner_smoothing<U: Debug + Into<Rect<f32>>>(
self,
value: impl Res<U>,
) -> Self
fn corner_smoothing<U: Debug + Into<Rect<f32>>>( self, value: impl Res<U>, ) -> Self
Source§fn outline_width<U: Into<LengthOrPercentage>>(self, value: impl Res<U>) -> Self
fn outline_width<U: Into<LengthOrPercentage>>(self, value: impl Res<U>) -> Self
Source§fn outline_color<U: Into<Color>>(self, value: impl Res<U>) -> Self
fn outline_color<U: Into<Color>>(self, value: impl Res<U>) -> Self
Source§fn outline_offset<U: Into<LengthOrPercentage>>(self, value: impl Res<U>) -> Self
fn outline_offset<U: Into<LengthOrPercentage>>(self, value: impl Res<U>) -> Self
Source§fn cursor<U: Into<CursorIcon>>(self, value: impl Res<U>) -> Self
fn cursor<U: Into<CursorIcon>>(self, value: impl Res<U>) -> Self
Source§fn pointer_events<U: Into<PointerEvents>>(self, value: impl Res<U>) -> Self
fn pointer_events<U: Into<PointerEvents>>(self, value: impl Res<U>) -> Self
Source§fn transform<U: Into<Vec<Transform>>>(self, value: impl Res<U>) -> Self
fn transform<U: Into<Vec<Transform>>>(self, value: impl Res<U>) -> Self
Source§fn transform_origin<U: Into<Position>>(self, value: impl Res<U>) -> Self
fn transform_origin<U: Into<Position>>(self, value: impl Res<U>) -> Self
Source§fn translate<U: Into<Translate>>(self, value: impl Res<U>) -> Self
fn translate<U: Into<Translate>>(self, value: impl Res<U>) -> Self
Source§impl<V> TextModifiers for Handle<'_, V>
impl<V> TextModifiers for Handle<'_, V>
Source§fn text<T: ToStringLocalized>(self, value: impl Res<T>) -> Self
fn text<T: ToStringLocalized>(self, value: impl Res<T>) -> Self
Source§fn font_family<U: Into<Vec<FamilyOwned>>>(self, value: impl Res<U>) -> Self
fn font_family<U: Into<Vec<FamilyOwned>>>(self, value: impl Res<U>) -> Self
Source§fn font_weight<U: Into<FontWeight>>(self, value: impl Res<U>) -> Self
fn font_weight<U: Into<FontWeight>>(self, value: impl Res<U>) -> Self
Source§fn font_slant<U: Into<FontSlant>>(self, value: impl Res<U>) -> Self
fn font_slant<U: Into<FontSlant>>(self, value: impl Res<U>) -> Self
Source§fn font_width<U: Into<FontWidth>>(self, value: impl Res<U>) -> Self
fn font_width<U: Into<FontWidth>>(self, value: impl Res<U>) -> Self
Source§fn font_variation_settings<U: Into<Vec<FontVariation>>>(
self,
value: impl Res<U>,
) -> Self
fn font_variation_settings<U: Into<Vec<FontVariation>>>( self, value: impl Res<U>, ) -> Self
Source§fn color<U: Clone + Into<Color>>(self, value: impl Res<U>) -> Self
fn color<U: Clone + Into<Color>>(self, value: impl Res<U>) -> Self
Source§fn font_size<U: Into<FontSize>>(self, value: impl Res<U>) -> Self
fn font_size<U: Into<FontSize>>(self, value: impl Res<U>) -> Self
Source§fn caret_color<U: Into<Color>>(self, value: impl Res<U>) -> Self
fn caret_color<U: Into<Color>>(self, value: impl Res<U>) -> Self
Source§fn selection_color<U: Into<Color>>(self, value: impl Res<U>) -> Self
fn selection_color<U: Into<Color>>(self, value: impl Res<U>) -> Self
Source§fn text_wrap<U: Into<bool>>(self, value: impl Res<U>) -> Self
fn text_wrap<U: Into<bool>>(self, value: impl Res<U>) -> Self
Source§fn text_align<U: Into<TextAlign>>(self, value: impl Res<U>) -> Self
fn text_align<U: Into<TextAlign>>(self, value: impl Res<U>) -> Self
Source§fn text_overflow<U: Into<TextOverflow>>(self, value: impl Res<U>) -> Self
fn text_overflow<U: Into<TextOverflow>>(self, value: impl Res<U>) -> Self
Source§fn text_decoration_line<U: Into<TextDecorationLine>>(
self,
value: impl Res<U>,
) -> Self
fn text_decoration_line<U: Into<TextDecorationLine>>( self, value: impl Res<U>, ) -> Self
Source§fn text_stroke_width<U: Into<Length>>(self, value: impl Res<U>) -> Self
fn text_stroke_width<U: Into<Length>>(self, value: impl Res<U>) -> Self
skia_safe::textlayout::TextStyle
’s foreground skia_safe::Paint
to
draw a stroke on the text. Read moreSource§fn text_stroke_style<U: Into<TextStrokeStyle>>(self, value: impl Res<U>) -> Self
fn text_stroke_style<U: Into<TextStrokeStyle>>(self, value: impl Res<U>) -> Self
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.