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 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 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<'_, Badge>
impl Handle<'_, Badge>
pub fn placement(self, placement: BadgePlacement) -> Handle<'_, Badge>
pub fn placement(self, placement: BadgePlacement) -> Handle<'_, Badge>
Sets the placement of a badge relative to its parent when used with the badge
modifier.
§impl Handle<'_, ButtonGroup>
impl Handle<'_, ButtonGroup>
pub fn vertical(self, is_vertical: impl Res<bool>) -> Handle<'_, ButtonGroup>
§impl Handle<'_, Chip>
impl Handle<'_, Chip>
§impl Handle<'_, Datepicker>
impl Handle<'_, Datepicker>
pub fn on_select<F>(self, callback: F) -> Handle<'_, Datepicker>
§impl Handle<'_, Divider>
impl Handle<'_, Divider>
pub fn orientation( self, orientation: impl Res<Orientation>, ) -> Handle<'_, Divider>
§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<'_, ScrollList>
impl Handle<'_, ScrollList>
pub fn on_select<F>(self, callback: F) -> Handle<'_, ScrollList>
§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 tooltip should appear relative to its parent element.
Defaults to Placement::Bottom
.
pub fn arrow(self, show_arrow: bool) -> Handle<'_, Popup>
pub fn arrow(self, show_arrow: bool) -> Handle<'_, Popup>
Sets whether the popup should include an arrow. Defaults to true.
pub fn arrow_size(self, size: impl Into<Length>) -> Handle<'_, Popup>
pub fn arrow_size(self, size: impl Into<Length>) -> Handle<'_, Popup>
Sets the size of the popup arrow, or gap if the arrow is hidden.
pub fn should_reposition(self, flag: bool) -> Handle<'_, Popup>
pub fn should_reposition(self, flag: 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<'_, ProgressBar>
impl Handle<'_, ProgressBar>
pub fn bar_color(self, color: impl Res<Color>) -> Handle<'_, ProgressBar>
pub fn bar_color(self, color: impl Res<Color>) -> Handle<'_, ProgressBar>
Set the color of the bar inside the ProgressBar.
you also pass a lens to this method if you want to be able to change the color dynamically.
§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<L1> Handle<'_, Scrollbar<L1>>
impl<L1> Handle<'_, Scrollbar<L1>>
pub fn scroll_to_cursor( self, scroll_to_cursor: impl Res<bool>, ) -> Handle<'_, Scrollbar<L1>>
§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: bool) -> Handle<'_, ScrollView>
pub fn scrollx(self, scrollx: impl Res<f32>) -> Handle<'_, ScrollView>
pub fn scrolly(self, scrollx: impl Res<f32>) -> Handle<'_, ScrollView>
§impl<L> Handle<'_, Slider<L>>where
L: Lens,
impl<L> Handle<'_, Slider<L>>where
L: Lens,
pub fn on_changing<F>(self, callback: F) -> Handle<'_, Slider<L>>
pub fn on_changing<F>(self, callback: F) -> Handle<'_, Slider<L>>
Sets the callback triggered when the slider value is changing (dragging).
Takes a closure which triggers when the slider value is changing, either by pressing the track or dragging the thumb along the track.
§Example
Slider::new(cx, AppData::value)
.on_changing(|cx, value| {
debug!("Slider on_changing: {}", value);
});
pub 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);
});
pub fn step(self, step: f32) -> Handle<'_, Slider<L>>
pub fn keyboard_fraction(self, keyboard_fraction: f32) -> Handle<'_, Slider<L>>
pub fn keyboard_fraction(self, keyboard_fraction: f32) -> Handle<'_, Slider<L>>
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);
});
§impl Handle<'_, NamedSlider>
impl Handle<'_, NamedSlider>
pub fn on_changing<F>(self, callback: F) -> Handle<'_, NamedSlider>
pub fn range(self, range: Range<f32>) -> Handle<'_, NamedSlider>
pub fn keyboard_fraction( self, keyboard_fraction: f32, ) -> Handle<'_, NamedSlider>
§impl Handle<'_, Spinbox>
impl Handle<'_, Spinbox>
pub fn on_increment<F>(self, callback: F) -> Handle<'_, Spinbox>
pub fn on_decrement<F>(self, callback: F) -> Handle<'_, Spinbox>
pub fn orientation( self, orientation: impl Res<Orientation>, ) -> Handle<'_, Spinbox>
pub fn icons(self, icons: impl Res<SpinboxIcons>) -> Handle<'_, 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<'_, Tooltip>
impl Handle<'_, Tooltip>
pub fn placement(self, placement: Placement) -> Handle<'_, Tooltip>
pub fn placement(self, placement: Placement) -> Handle<'_, Tooltip>
Sets the position where the tooltip should appear relative to its parent element.
Defaults to Placement::Bottom
.
pub fn arrow(self, show_arrow: bool) -> Handle<'_, Tooltip>
pub fn arrow(self, show_arrow: bool) -> Handle<'_, Tooltip>
Sets whether the tooltip should include an arrow. Defaults to true.
pub fn arrow_size(self, size: impl Into<Length>) -> Handle<'_, Tooltip>
§impl Handle<'_, VirtualList>
impl Handle<'_, VirtualList>
pub fn scroll_to_cursor(self, flag: bool) -> Handle<'_, VirtualList>
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 default_action_verb(self, action_verb: DefaultActionVerb) -> Self
fn default_action_verb(self, action_verb: DefaultActionVerb) -> Self
§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 tooltip<C>(self, content: C) -> Handle<'_, V>
§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>
fn on_drag<F>(self, action: F) -> Handle<'_, V>
fn on_drop<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 as_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 child_left<U>(self, value: impl Res<U>) -> Self
fn child_left<U>(self, value: impl Res<U>) -> Self
§fn child_right<U>(self, value: impl Res<U>) -> Self
fn child_right<U>(self, value: impl Res<U>) -> Self
§fn child_top<U>(self, value: impl Res<U>) -> Self
fn child_top<U>(self, value: impl Res<U>) -> Self
§fn child_bottom<U>(self, value: impl Res<U>) -> Self
fn child_bottom<U>(self, value: impl Res<U>) -> Self
§fn child_space<U>(self, value: impl Res<U>) -> Self
fn child_space<U>(self, value: impl Res<U>) -> Self
§fn row_between<U>(self, value: impl Res<U>) -> Self
fn row_between<U>(self, value: impl Res<U>) -> Self
§fn col_between<U>(self, value: impl Res<U>) -> Self
fn col_between<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_bottom<U>(self, value: impl Res<U>) -> Self
fn min_bottom<U>(self, value: impl Res<U>) -> Self
§fn max_bottom<U>(self, value: impl Res<U>) -> Self
fn max_bottom<U>(self, value: impl Res<U>) -> 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 read_only<U>(self, state: impl Res<U>) -> Self
fn read_write<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 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 shadows<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 border_width<U>(self, value: impl Res<U>) -> Selfwhere
U: Into<LengthOrPercentage>,
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>,
§impl ToggleButtonModifiers for Handle<'_, ToggleButton>
impl ToggleButtonModifiers for Handle<'_, ToggleButton>
fn on_toggle( self, callback: impl Fn(&mut EventContext<'_>) + 'static, ) -> Handle<'_, ToggleButton>
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.