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) -> 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.
Sourcepub 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.
Sourcepub 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.
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>(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);
Source§impl Handle<'_, Badge>
impl Handle<'_, Badge>
Sourcepub 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.
Source§impl Handle<'_, ButtonGroup>
impl Handle<'_, ButtonGroup>
Source§impl Handle<'_, Chip>
impl Handle<'_, Chip>
Sourcepub 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.
Sourcepub 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);
Source§impl Handle<'_, Datepicker>
impl Handle<'_, Datepicker>
Sourcepub 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.
Source§impl Handle<'_, Divider>
impl Handle<'_, Divider>
Sourcepub 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.
Source§impl Handle<'_, Dropdown>
impl Handle<'_, Dropdown>
Sourcepub 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
.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Source§impl Handle<'_, Label>
impl Handle<'_, Label>
Sourcepub 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");
Source§impl Handle<'_, List>
impl Handle<'_, List>
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Source§impl Handle<'_, PickList>
impl Handle<'_, PickList>
Sourcepub 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.
Source§impl Handle<'_, Popup>
impl Handle<'_, Popup>
Sourcepub 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
.
Sourcepub 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.
Sourcepub 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.
Source§impl Handle<'_, RadioButton>
impl Handle<'_, RadioButton>
Sourcepub 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));
Source§impl Handle<'_, ScrollView>
impl Handle<'_, ScrollView>
Sourcepub 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.
Sourcepub fn scroll_to_cursor(self, scroll_to_cursor: bool) -> Handle<'_, ScrollView>
pub fn scroll_to_cursor(self, scroll_to_cursor: bool) -> Handle<'_, ScrollView>
Sets whether the scrollbar should move to the cursor when pressed.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Source§impl<L> Handle<'_, Slider<L>>where
L: Lens,
impl<L> Handle<'_, Slider<L>>where
L: Lens,
Sourcepub 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.
§Example
Slider::new(cx, AppData::value)
.on_change(|cx, value| {
debug!("Slider on_changing: {}", value);
});
Sourcepub fn range(self, range: Range<f32>) -> Handle<'_, Slider<L>>
pub fn range(self, range: Range<f32>) -> 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.
§Example
Slider::new(cx, AppData::value)
.range(-20.0..50.0)
.on_changing(|cx, value| {
debug!("Slider on_changing: {}", value);
});
Source§impl Handle<'_, Spinbox>
impl Handle<'_, Spinbox>
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Source§impl<L> Handle<'_, Textbox<L>>where
L: Lens,
impl<L> Handle<'_, Textbox<L>>where
L: Lens,
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Source§impl Handle<'_, ToggleButton>
impl Handle<'_, ToggleButton>
Sourcepub 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.
Source§impl Handle<'_, Tooltip>
impl Handle<'_, Tooltip>
Sourcepub 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
.
Source§impl Handle<'_, VirtualList>
impl Handle<'_, VirtualList>
Sourcepub 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.
Trait Implementations§
Source§impl<V> AbilityModifiers for Handle<'_, V>
impl<V> AbilityModifiers for Handle<'_, V>
Source§fn hoverable<U>(self, state: impl Res<U>) -> Self
fn hoverable<U>(self, state: impl Res<U>) -> Self
Source§fn focusable<U>(self, state: impl Res<U>) -> Self
fn focusable<U>(self, state: impl Res<U>) -> Self
Source§fn checkable<U>(self, state: impl Res<U>) -> Self
fn checkable<U>(self, state: impl Res<U>) -> Self
Source§impl<V> AccessibilityModifiers for Handle<'_, V>where
V: View,
impl<V> AccessibilityModifiers for Handle<'_, V>where
V: View,
Source§fn name<U>(self, name: impl Res<U>) -> Selfwhere
U: ToStringLocalized,
fn name<U>(self, name: impl Res<U>) -> Selfwhere
U: ToStringLocalized,
Source§fn live(self, live: Live) -> Self
fn live(self, live: Live) -> Self
Source§fn numeric_value<U>(self, value: impl Res<U>) -> Self
fn numeric_value<U>(self, value: impl Res<U>) -> Self
Source§fn text_value<U>(self, value: impl Res<U>) -> Selfwhere
U: ToStringLocalized,
fn text_value<U>(self, value: impl Res<U>) -> Selfwhere
U: ToStringLocalized,
Source§impl<V> ActionModifiers<V> for Handle<'_, V>where
V: View,
impl<V> ActionModifiers<V> for Handle<'_, V>where
V: View,
Source§fn on_press_down<F>(self, action: F) -> Handle<'_, V>
fn on_press_down<F>(self, action: F) -> Handle<'_, V>
Source§fn on_double_click<F>(self, action: F) -> Handle<'_, V>
fn on_double_click<F>(self, action: F) -> Handle<'_, V>
MouseDoubleClick
event. Read moreSource§fn on_hover<F>(self, action: F) -> Handle<'_, V>
fn on_hover<F>(self, action: F) -> Handle<'_, V>
Source§fn on_hover_out<F>(self, action: F) -> Handle<'_, V>
fn on_hover_out<F>(self, action: F) -> Handle<'_, V>
Source§fn on_over<F>(self, action: F) -> Handle<'_, V>
fn on_over<F>(self, action: F) -> Handle<'_, V>
Source§fn on_over_out<F>(self, action: F) -> Handle<'_, V>
fn on_over_out<F>(self, action: F) -> Handle<'_, V>
Source§fn on_mouse_move<F>(self, action: F) -> Handle<'_, V>
fn on_mouse_move<F>(self, action: F) -> Handle<'_, V>
Source§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 moreSource§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 moreSource§fn on_focus_in<F>(self, action: F) -> Handle<'_, V>
fn on_focus_in<F>(self, action: F) -> Handle<'_, V>
Source§fn on_focus_out<F>(self, action: F) -> Handle<'_, V>
fn on_focus_out<F>(self, action: F) -> Handle<'_, V>
Source§fn on_geo_changed<F>(self, action: F) -> Handle<'_, V>
fn on_geo_changed<F>(self, action: F) -> Handle<'_, V>
Source§impl ButtonModifiers for Handle<'_, Button>
impl ButtonModifiers for Handle<'_, Button>
Source§impl ButtonModifiers for Handle<'_, ButtonGroup>
impl ButtonModifiers for Handle<'_, ButtonGroup>
Source§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>,
Source§impl<V> DataContext for Handle<'_, V>
impl<V> DataContext for Handle<'_, V>
Source§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.Source§fn localization_context(&self) -> Option<LocalizationContext<'_>>
fn localization_context(&self) -> Option<LocalizationContext<'_>>
Source§impl<V> LayoutModifiers for Handle<'_, V>where
V: View,
impl<V> LayoutModifiers for Handle<'_, V>where
V: View,
Source§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>,
Source§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>,
Source§fn left<U>(self, value: impl Res<U>) -> Self
fn left<U>(self, value: impl Res<U>) -> Self
Source§fn right<U>(self, value: impl Res<U>) -> Self
fn right<U>(self, value: impl Res<U>) -> Self
Source§fn top<U>(self, value: impl Res<U>) -> Self
fn top<U>(self, value: impl Res<U>) -> Self
Source§fn bottom<U>(self, value: impl Res<U>) -> Self
fn bottom<U>(self, value: impl Res<U>) -> Self
Source§fn padding_left<U>(self, value: impl Res<U>) -> Self
fn padding_left<U>(self, value: impl Res<U>) -> Self
Source§fn padding_right<U>(self, value: impl Res<U>) -> Self
fn padding_right<U>(self, value: impl Res<U>) -> Self
Source§fn padding_top<U>(self, value: impl Res<U>) -> Self
fn padding_top<U>(self, value: impl Res<U>) -> Self
Source§fn padding_bottom<U>(self, value: impl Res<U>) -> Self
fn padding_bottom<U>(self, value: impl Res<U>) -> Self
Source§fn padding<U>(self, value: impl Res<U>) -> Self
fn padding<U>(self, value: impl Res<U>) -> Self
Source§fn vertical_gap<U>(self, value: impl Res<U>) -> Self
fn vertical_gap<U>(self, value: impl Res<U>) -> Self
Source§fn horizontal_gap<U>(self, value: impl Res<U>) -> Self
fn horizontal_gap<U>(self, value: impl Res<U>) -> Self
Source§fn gap<U>(self, value: impl Res<U>) -> Self
fn gap<U>(self, value: impl Res<U>) -> Self
Source§fn vertical_scroll<U>(self, value: impl Res<U>) -> Self
fn vertical_scroll<U>(self, value: impl Res<U>) -> Self
Source§fn horizontal_scroll<U>(self, value: impl Res<U>) -> Self
fn horizontal_scroll<U>(self, value: impl Res<U>) -> Self
Source§fn min_height<U>(self, value: impl Res<U>) -> Self
fn min_height<U>(self, value: impl Res<U>) -> Self
Source§fn min_size<U>(self, value: impl Res<U>) -> Self
fn min_size<U>(self, value: impl Res<U>) -> Self
Source§fn max_height<U>(self, value: impl Res<U>) -> Self
fn max_height<U>(self, value: impl Res<U>) -> Self
Source§fn max_size<U>(self, value: impl Res<U>) -> Self
fn max_size<U>(self, value: impl Res<U>) -> Self
Source§fn min_horizontal_gap<U>(self, value: impl Res<U>) -> Self
fn min_horizontal_gap<U>(self, value: impl Res<U>) -> Self
Source§fn min_vertical_gap<U>(self, value: impl Res<U>) -> Self
fn min_vertical_gap<U>(self, value: impl Res<U>) -> Self
Source§fn min_gap<U>(self, value: impl Res<U>) -> Self
fn min_gap<U>(self, value: impl Res<U>) -> Self
Source§fn max_horizontal_gap<U>(self, value: impl Res<U>) -> Self
fn max_horizontal_gap<U>(self, value: impl Res<U>) -> Self
Source§fn max_vertical_gap<U>(self, value: impl Res<U>) -> Self
fn max_vertical_gap<U>(self, value: impl Res<U>) -> Self
Source§impl<V> StyleModifiers for Handle<'_, V>where
V: View,
impl<V> StyleModifiers for Handle<'_, V>where
V: View,
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 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
Source§fn read_only<U>(self, state: impl Res<U>) -> Self
fn read_only<U>(self, state: impl Res<U>) -> Self
Source§fn read_write<U>(self, state: impl Res<U>) -> Self
fn read_write<U>(self, state: impl Res<U>) -> Self
Source§fn display<U>(self, value: impl Res<U>) -> Self
fn display<U>(self, value: impl Res<U>) -> Self
Source§fn visibility<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<Visibility>,
fn visibility<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<Visibility>,
Source§fn overflow<U>(self, value: impl Res<U>) -> Self
fn overflow<U>(self, value: impl Res<U>) -> Self
Source§fn overflowx<U>(self, value: impl Res<U>) -> Self
fn overflowx<U>(self, value: impl Res<U>) -> Self
Source§fn overflowy<U>(self, value: impl Res<U>) -> Self
fn overflowy<U>(self, value: impl Res<U>) -> Self
Source§fn backdrop_filter<U>(self, value: impl Res<U>) -> Self
fn backdrop_filter<U>(self, value: impl Res<U>) -> Self
Source§fn background_gradient<U>(self, value: impl Res<U>) -> Self
fn background_gradient<U>(self, value: impl Res<U>) -> Self
Source§fn background_color<U>(self, value: impl Res<U>) -> Self
fn background_color<U>(self, value: impl Res<U>) -> Self
Source§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>,
Source§fn border_color<U>(self, value: impl Res<U>) -> Self
fn border_color<U>(self, value: impl Res<U>) -> Self
Source§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>,
Source§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>,
Source§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>,
Source§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>,
Source§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>,
Source§fn corner_radius<U>(self, value: impl Res<U>) -> Self
fn corner_radius<U>(self, value: impl Res<U>) -> Self
Source§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>,
Source§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>,
Source§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>,
Source§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>,
Source§fn corner_shape<U>(self, value: impl Res<U>) -> Self
fn corner_shape<U>(self, value: impl Res<U>) -> Self
Source§fn corner_top_left_smoothing<U>(self, value: impl Res<U>) -> Self
fn corner_top_left_smoothing<U>(self, value: impl Res<U>) -> Self
Source§fn corner_top_right_smoothing<U>(self, value: impl Res<U>) -> Self
fn corner_top_right_smoothing<U>(self, value: impl Res<U>) -> Self
Source§fn corner_bottom_left_smoothing<U>(self, value: impl Res<U>) -> Self
fn corner_bottom_left_smoothing<U>(self, value: impl Res<U>) -> Self
Source§fn corner_bottom_right_smoothing<U>(self, value: impl Res<U>) -> Self
fn corner_bottom_right_smoothing<U>(self, value: impl Res<U>) -> Self
Source§fn corner_smoothing<U>(self, value: impl Res<U>) -> Self
fn corner_smoothing<U>(self, value: impl Res<U>) -> Self
Source§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>,
Source§fn outline_color<U>(self, value: impl Res<U>) -> Self
fn outline_color<U>(self, value: impl Res<U>) -> Self
Source§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>,
Source§fn cursor<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<CursorIcon>,
fn cursor<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<CursorIcon>,
Source§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>,
Source§fn transform<U>(self, value: impl Res<U>) -> Self
fn transform<U>(self, value: impl Res<U>) -> Self
Source§fn transform_origin<U>(self, value: impl Res<U>) -> Self
fn transform_origin<U>(self, value: impl Res<U>) -> Self
Source§fn translate<U>(self, value: impl Res<U>) -> Self
fn translate<U>(self, value: impl Res<U>) -> Self
Source§impl<V> TextModifiers for Handle<'_, V>
impl<V> TextModifiers for Handle<'_, V>
Source§fn text<T>(self, value: impl Res<T>) -> Selfwhere
T: ToStringLocalized,
fn text<T>(self, value: impl Res<T>) -> Selfwhere
T: ToStringLocalized,
Source§fn font_family<U>(self, value: impl Res<U>) -> Self
fn font_family<U>(self, value: impl Res<U>) -> Self
Source§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>,
Source§fn font_slant<U>(self, value: impl Res<U>) -> Self
fn font_slant<U>(self, value: impl Res<U>) -> Self
Source§fn font_width<U>(self, value: impl Res<U>) -> Self
fn font_width<U>(self, value: impl Res<U>) -> Self
Source§fn font_variation_settings<U>(self, value: impl Res<U>) -> Self
fn font_variation_settings<U>(self, value: impl Res<U>) -> Self
Source§fn caret_color<U>(self, value: impl Res<U>) -> Self
fn caret_color<U>(self, value: impl Res<U>) -> Self
Source§fn selection_color<U>(self, value: impl Res<U>) -> Self
fn selection_color<U>(self, value: impl Res<U>) -> Self
Source§fn text_wrap<U>(self, value: impl Res<U>) -> Self
fn text_wrap<U>(self, value: impl Res<U>) -> Self
Source§fn text_align<U>(self, value: impl Res<U>) -> Self
fn text_align<U>(self, value: impl Res<U>) -> Self
Source§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>,
Source§fn line_clamp<U>(self, value: impl Res<U>) -> Self
fn line_clamp<U>(self, value: impl Res<U>) -> Self
Source§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>,
Source§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 moreSource§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>,
Source§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>
Source§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 moreSource§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 moreSource§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 moreSource§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 moreSource§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 moreSource§fn resizable(self, flag: impl Res<bool>) -> Handle<'_, Window>
fn resizable(self, flag: impl Res<bool>) -> Handle<'_, Window>
Source§fn minimized(self, flag: impl Res<bool>) -> Handle<'_, Window>
fn minimized(self, flag: impl Res<bool>) -> Handle<'_, Window>
Source§fn maximized(self, flag: impl Res<bool>) -> Handle<'_, Window>
fn maximized(self, flag: impl Res<bool>) -> Handle<'_, Window>
Source§fn visible(self, flag: impl Res<bool>) -> Handle<'_, Window>
fn visible(self, flag: impl Res<bool>) -> Handle<'_, Window>
Source§fn transparent(self, flag: bool) -> Handle<'_, Window>
fn transparent(self, flag: bool) -> Handle<'_, Window>
Source§fn decorations(self, flag: bool) -> Handle<'_, Window>
fn decorations(self, flag: bool) -> Handle<'_, Window>
Source§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.