pub struct ResizeHandle<T, E>where
T: 'static,
E: 'static + Render,{ /* private fields */ }Expand description
A band that resizes along one axis when it is dragged, carrying a T that
the drag renders as an E. See resize_handle.
Implementations§
Source§impl<T, E> ResizeHandle<T, E>where
T: 'static,
E: 'static + Render,
impl<T, E> ResizeHandle<T, E>where
T: 'static,
E: 'static + Render,
Sourcepub fn with_appearance(
self,
appearance: Rc<dyn Fn(&ResizeHandleContext, &mut Window, &mut App) -> Option<AnyElement>>,
) -> ResizeHandle<T, E>
pub fn with_appearance( self, appearance: Rc<dyn Fn(&ResizeHandleContext, &mut Window, &mut App) -> Option<AnyElement>>, ) -> ResizeHandle<T, E>
Hand the painted part of this handle to appearance.
Sourcepub fn on_drag(
self,
value: T,
f: impl Fn(&T, &Point<Pixels>, &mut Window, &mut App) -> Entity<E> + 'static,
) -> ResizeHandle<T, E>
pub fn on_drag( self, value: T, f: impl Fn(&T, &Point<Pixels>, &mut Window, &mut App) -> Entity<E> + 'static, ) -> ResizeHandle<T, E>
Start a drag carrying value when the band is pressed and moved.
A band takes one drag, and this is it: use this rather than
StatefulInteractiveElement::on_drag, which it shadows.
GPUI tells drags apart by the type of their payload, so the drag
carries value itself, and a caller following it with
on_drag_move listens for a T.
Sourcepub fn inside(self, edge: HandleEdge) -> ResizeHandle<T, E>
pub fn inside(self, edge: HandleEdge) -> ResizeHandle<T, E>
Keep the whole handle inside its container, hugging edge, instead of
straddling the boundary it resizes.
Trait Implementations§
Source§impl<T, E> Element for ResizeHandle<T, E>where
T: 'static,
E: 'static + Render,
impl<T, E> Element for ResizeHandle<T, E>where
T: 'static,
E: 'static + Render,
Source§type PrepaintState = Hitbox
type PrepaintState = Hitbox
The band’s own hitbox, so the listeners in paint can ask whether the
pointer is really on the handle rather than merely within its bounds.
Source§type RequestLayoutState = AnyElement
type RequestLayoutState = AnyElement
Element::request_layout. A mutable reference to this state is subsequently
provided to Element::prepaint and Element::paint.Source§fn id(&self) -> Option<ElementId>
fn id(&self) -> Option<ElementId>
Source§fn source_location(&self) -> Option<&'static Location<'static>>
fn source_location(&self) -> Option<&'static Location<'static>>
Source§fn request_layout(
&mut self,
id: Option<&GlobalElementId>,
_: Option<&InspectorElementId>,
window: &mut Window,
cx: &mut App,
) -> (LayoutId, <ResizeHandle<T, E> as Element>::RequestLayoutState)
fn request_layout( &mut self, id: Option<&GlobalElementId>, _: Option<&InspectorElementId>, window: &mut Window, cx: &mut App, ) -> (LayoutId, <ResizeHandle<T, E> as Element>::RequestLayoutState)
Source§fn prepaint(
&mut self,
_: Option<&GlobalElementId>,
_: Option<&InspectorElementId>,
bounds: Bounds<Pixels>,
request_layout: &mut <ResizeHandle<T, E> as Element>::RequestLayoutState,
window: &mut Window,
cx: &mut App,
) -> <ResizeHandle<T, E> as Element>::PrepaintState
fn prepaint( &mut self, _: Option<&GlobalElementId>, _: Option<&InspectorElementId>, bounds: Bounds<Pixels>, request_layout: &mut <ResizeHandle<T, E> as Element>::RequestLayoutState, window: &mut Window, cx: &mut App, ) -> <ResizeHandle<T, E> as Element>::PrepaintState
Element::request_layout().Source§fn paint(
&mut self,
id: Option<&GlobalElementId>,
_: Option<&InspectorElementId>,
_: Bounds<Pixels>,
request_layout: &mut <ResizeHandle<T, E> as Element>::RequestLayoutState,
hitbox: &mut <ResizeHandle<T, E> as Element>::PrepaintState,
window: &mut Window,
cx: &mut App,
)
fn paint( &mut self, id: Option<&GlobalElementId>, _: Option<&InspectorElementId>, _: Bounds<Pixels>, request_layout: &mut <ResizeHandle<T, E> as Element>::RequestLayoutState, hitbox: &mut <ResizeHandle<T, E> as Element>::PrepaintState, window: &mut Window, cx: &mut App, )
Element::request_layout().Source§fn a11y_role(&self) -> Option<Role>
fn a11y_role(&self) -> Option<Role>
None are not included in the accessibility tree. Read moreSource§fn write_a11y_info(&self, _node: &mut Node)
fn write_a11y_info(&self, _node: &mut Node)
a11y_role() returns Some. Read moreSource§fn a11y_synthetic_children(
&mut self,
_prepaint: &mut Self::PrepaintState,
_builder: &mut A11ySubtreeBuilder<'_>,
)
fn a11y_synthetic_children( &mut self, _prepaint: &mut Self::PrepaintState, _builder: &mut A11ySubtreeBuilder<'_>, )
Source§fn into_any(self) -> AnyElement
fn into_any(self) -> AnyElement
AnyElement.Source§impl<T, E> InteractiveElement for ResizeHandle<T, E>where
T: 'static,
E: 'static + Render,
impl<T, E> InteractiveElement for ResizeHandle<T, E>where
T: 'static,
E: 'static + Render,
Source§fn interactivity(&mut self) -> &mut Interactivity
fn interactivity(&mut self) -> &mut Interactivity
Source§fn group(self, group: impl Into<SharedString>) -> Self
fn group(self, group: impl Into<SharedString>) -> Self
Source§fn id(self, id: impl Into<ElementId>) -> Stateful<Self>
fn id(self, id: impl Into<ElementId>) -> Stateful<Self>
Source§fn track_focus(self, focus_handle: &FocusHandle) -> Self
fn track_focus(self, focus_handle: &FocusHandle) -> Self
Source§fn tab_index(self, index: isize) -> Self
fn tab_index(self, index: isize) -> Self
Self::tab_stop for more information.
This should only be used in conjunction with tab_group
in order to not interfere with the tab index of other elements.Source§fn tab_group(self) -> Self
fn tab_group(self) -> Self
Source§fn key_context<C, E>(self, key_context: C) -> Self
fn key_context<C, E>(self, key_context: C) -> Self
Source§fn hover(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self
fn hover(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Self
Source§fn group_hover(
self,
group_name: impl Into<SharedString>,
f: impl FnOnce(StyleRefinement) -> StyleRefinement,
) -> Self
fn group_hover( self, group_name: impl Into<SharedString>, f: impl FnOnce(StyleRefinement) -> StyleRefinement, ) -> Self
Source§fn on_mouse_down(
self,
button: MouseButton,
listener: impl Fn(&MouseDownEvent, &mut Window, &mut App) + 'static,
) -> Self
fn on_mouse_down( self, button: MouseButton, listener: impl Fn(&MouseDownEvent, &mut Window, &mut App) + 'static, ) -> Self
Interactivity::on_mouse_down. Read moreSource§fn debug_selector(self, _: impl FnOnce() -> String) -> Self
fn debug_selector(self, _: impl FnOnce() -> String) -> Self
crate::VisualTestContext::debug_bounds] map. Read moreSource§fn capture_any_mouse_down(
self,
listener: impl Fn(&MouseDownEvent, &mut Window, &mut App) + 'static,
) -> Self
fn capture_any_mouse_down( self, listener: impl Fn(&MouseDownEvent, &mut Window, &mut App) + 'static, ) -> Self
Interactivity::capture_any_mouse_down. Read moreSource§fn on_any_mouse_down(
self,
listener: impl Fn(&MouseDownEvent, &mut Window, &mut App) + 'static,
) -> Self
fn on_any_mouse_down( self, listener: impl Fn(&MouseDownEvent, &mut Window, &mut App) + 'static, ) -> Self
Interactivity::on_any_mouse_down. Read moreSource§fn on_mouse_up(
self,
button: MouseButton,
listener: impl Fn(&MouseUpEvent, &mut Window, &mut App) + 'static,
) -> Self
fn on_mouse_up( self, button: MouseButton, listener: impl Fn(&MouseUpEvent, &mut Window, &mut App) + 'static, ) -> Self
Interactivity::on_mouse_up. Read moreSource§fn capture_any_mouse_up(
self,
listener: impl Fn(&MouseUpEvent, &mut Window, &mut App) + 'static,
) -> Self
fn capture_any_mouse_up( self, listener: impl Fn(&MouseUpEvent, &mut Window, &mut App) + 'static, ) -> Self
Interactivity::capture_any_mouse_up. Read moreSource§fn on_mouse_pressure(
self,
listener: impl Fn(&MousePressureEvent, &mut Window, &mut App) + 'static,
) -> Self
fn on_mouse_pressure( self, listener: impl Fn(&MousePressureEvent, &mut Window, &mut App) + 'static, ) -> Self
Interactivity::on_mouse_pressure Read moreSource§fn capture_mouse_pressure(
self,
listener: impl Fn(&MousePressureEvent, &mut Window, &mut App) + 'static,
) -> Self
fn capture_mouse_pressure( self, listener: impl Fn(&MousePressureEvent, &mut Window, &mut App) + 'static, ) -> Self
Interactivity::on_mouse_pressure Read moreSource§fn on_mouse_down_out(
self,
listener: impl Fn(&MouseDownEvent, &mut Window, &mut App) + 'static,
) -> Self
fn on_mouse_down_out( self, listener: impl Fn(&MouseDownEvent, &mut Window, &mut App) + 'static, ) -> Self
Interactivity::on_mouse_down_out. Read moreSource§fn on_mouse_up_out(
self,
button: MouseButton,
listener: impl Fn(&MouseUpEvent, &mut Window, &mut App) + 'static,
) -> Self
fn on_mouse_up_out( self, button: MouseButton, listener: impl Fn(&MouseUpEvent, &mut Window, &mut App) + 'static, ) -> Self
Interactivity::on_mouse_up_out. Read moreSource§fn on_mouse_move(
self,
listener: impl Fn(&MouseMoveEvent, &mut Window, &mut App) + 'static,
) -> Self
fn on_mouse_move( self, listener: impl Fn(&MouseMoveEvent, &mut Window, &mut App) + 'static, ) -> Self
Interactivity::on_mouse_move. Read moreSource§fn on_mouse_exit(
self,
listener: impl Fn(&MouseExitEvent, &mut Window, &mut App) + 'static,
) -> Self
fn on_mouse_exit( self, listener: impl Fn(&MouseExitEvent, &mut Window, &mut App) + 'static, ) -> Self
Interactivity::on_mouse_exit. Read moreSource§fn on_file_drop_exit(
self,
listener: impl Fn(&FileDropEvent, &mut Window, &mut App) + 'static,
) -> Self
fn on_file_drop_exit( self, listener: impl Fn(&FileDropEvent, &mut Window, &mut App) + 'static, ) -> Self
FileDropEvent::Exited when a platform file drag
leaves this element’s window while the element is hovered. Read moreSource§fn on_drag_move<T>(
self,
listener: impl Fn(&DragMoveEvent<T>, &mut Window, &mut App) + 'static,
) -> Selfwhere
T: 'static,
fn on_drag_move<T>(
self,
listener: impl Fn(&DragMoveEvent<T>, &mut Window, &mut App) + 'static,
) -> Selfwhere
T: 'static,
Interactivity::on_drag_move. Read moreSource§fn on_scroll(
self,
listener: impl Fn(&ScrollEvent, &mut Window, &mut App) + 'static,
) -> Self
fn on_scroll( self, listener: impl Fn(&ScrollEvent, &mut Window, &mut App) + 'static, ) -> Self
Interactivity::on_scroll. Read moreSource§fn on_scroll_wheel(
self,
listener: impl Fn(&ScrollEvent, &mut Window, &mut App) + 'static,
) -> Self
fn on_scroll_wheel( self, listener: impl Fn(&ScrollEvent, &mut Window, &mut App) + 'static, ) -> Self
renamed to on_scroll
InteractiveElement::on_scroll.Source§fn on_pinch(
self,
listener: impl Fn(&PinchEvent, &mut Window, &mut App) + 'static,
) -> Self
fn on_pinch( self, listener: impl Fn(&PinchEvent, &mut Window, &mut App) + 'static, ) -> Self
Interactivity::on_pinch. Read moreSource§fn on_back_gesture(
self,
listener: impl Fn(&BackGestureEvent, &mut Window, &mut App) + 'static,
) -> Self
fn on_back_gesture( self, listener: impl Fn(&BackGestureEvent, &mut Window, &mut App) + 'static, ) -> Self
Interactivity::on_back_gesture. Read moreSource§fn capture_pinch(
self,
listener: impl Fn(&PinchEvent, &mut Window, &mut App) + 'static,
) -> Self
fn capture_pinch( self, listener: impl Fn(&PinchEvent, &mut Window, &mut App) + 'static, ) -> Self
Interactivity::capture_pinch. Read moreSource§fn capture_action<A>(
self,
listener: impl Fn(&A, &mut Window, &mut App) + 'static,
) -> Selfwhere
A: Action,
fn capture_action<A>(
self,
listener: impl Fn(&A, &mut Window, &mut App) + 'static,
) -> Selfwhere
A: Action,
Interactivity::capture_action. Read moreSource§fn on_action<A>(
self,
listener: impl Fn(&A, &mut Window, &mut App) + 'static,
) -> Selfwhere
A: Action,
fn on_action<A>(
self,
listener: impl Fn(&A, &mut Window, &mut App) + 'static,
) -> Selfwhere
A: Action,
Interactivity::on_action. Read moreSource§fn on_boxed_action(
self,
action: &(dyn Action + 'static),
listener: impl Fn(&(dyn Action + 'static), &mut Window, &mut App) + 'static,
) -> Self
fn on_boxed_action( self, action: &(dyn Action + 'static), listener: impl Fn(&(dyn Action + 'static), &mut Window, &mut App) + 'static, ) -> Self
Interactivity::on_boxed_action. Read moreSource§fn on_key_down(
self,
listener: impl Fn(&KeyDownEvent, &mut Window, &mut App) + 'static,
) -> Self
fn on_key_down( self, listener: impl Fn(&KeyDownEvent, &mut Window, &mut App) + 'static, ) -> Self
Interactivity::on_key_down. Read moreSource§fn capture_key_down(
self,
listener: impl Fn(&KeyDownEvent, &mut Window, &mut App) + 'static,
) -> Self
fn capture_key_down( self, listener: impl Fn(&KeyDownEvent, &mut Window, &mut App) + 'static, ) -> Self
Interactivity::capture_key_down. Read moreSource§fn on_key_up(
self,
listener: impl Fn(&KeyUpEvent, &mut Window, &mut App) + 'static,
) -> Self
fn on_key_up( self, listener: impl Fn(&KeyUpEvent, &mut Window, &mut App) + 'static, ) -> Self
Interactivity::on_key_up. Read moreSource§fn capture_key_up(
self,
listener: impl Fn(&KeyUpEvent, &mut Window, &mut App) + 'static,
) -> Self
fn capture_key_up( self, listener: impl Fn(&KeyUpEvent, &mut Window, &mut App) + 'static, ) -> Self
Interactivity::capture_key_up. Read moreSource§fn on_modifiers_changed(
self,
listener: impl Fn(&ModifiersChangedEvent, &mut Window, &mut App) + 'static,
) -> Self
fn on_modifiers_changed( self, listener: impl Fn(&ModifiersChangedEvent, &mut Window, &mut App) + 'static, ) -> Self
Interactivity::on_modifiers_changed. Read moreSource§fn drag_over<S>(
self,
f: impl Fn(StyleRefinement, &S, &mut Window, &mut App) -> StyleRefinement + 'static,
) -> Selfwhere
S: 'static,
fn drag_over<S>(
self,
f: impl Fn(StyleRefinement, &S, &mut Window, &mut App) -> StyleRefinement + 'static,
) -> Selfwhere
S: 'static,
Source§fn group_drag_over<S>(
self,
group_name: impl Into<SharedString>,
f: impl FnOnce(StyleRefinement) -> StyleRefinement,
) -> Selfwhere
S: 'static,
fn group_drag_over<S>(
self,
group_name: impl Into<SharedString>,
f: impl FnOnce(StyleRefinement) -> StyleRefinement,
) -> Selfwhere
S: 'static,
Source§fn on_drop<T>(
self,
listener: impl Fn(&T, &mut Window, &mut App) + 'static,
) -> Selfwhere
T: 'static,
fn on_drop<T>(
self,
listener: impl Fn(&T, &mut Window, &mut App) + 'static,
) -> Selfwhere
T: 'static,
Interactivity::on_drop. Read moreSource§fn can_drop(
self,
predicate: impl Fn(&(dyn Any + 'static), &mut Window, &mut App) -> bool + 'static,
) -> Self
fn can_drop( self, predicate: impl Fn(&(dyn Any + 'static), &mut Window, &mut App) -> bool + 'static, ) -> Self
Interactivity::can_drop.Source§fn occlude(self) -> Self
fn occlude(self) -> Self
block_mouse_except_scroll should be preferred.
The fluent API equivalent to Interactivity::occlude_mouse.Source§fn window_control_area(self, area: WindowControlArea) -> Self
fn window_control_area(self, area: WindowControlArea) -> Self
Interactivity::window_control_area.Source§fn block_mouse_except_scroll(self) -> Self
fn block_mouse_except_scroll(self) -> Self
Interactivity::block_mouse_except_scroll. Read moreSource§fn focus(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Selfwhere
Self: Sized,
fn focus(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Selfwhere
Self: Sized,
InteractiveElement::track_focus.Source§fn in_focus(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Selfwhere
Self: Sized,
fn in_focus(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Selfwhere
Self: Sized,
InteractiveElement::track_focus.Source§fn focus_visible(
self,
f: impl FnOnce(StyleRefinement) -> StyleRefinement,
) -> Selfwhere
Self: Sized,
fn focus_visible(
self,
f: impl FnOnce(StyleRefinement) -> StyleRefinement,
) -> Selfwhere
Self: Sized,
:focus-visible pseudo-class - it only applies when the element
is focused AND the user is navigating via keyboard (not mouse clicks).
Requires that the element is focusable. Elements can be made focusable using InteractiveElement::track_focus.Source§impl<T, E> InteractiveElementExt for ResizeHandle<T, E>where
T: 'static,
E: 'static + Render,
impl<T, E> InteractiveElementExt for ResizeHandle<T, E>where
T: 'static,
E: 'static + Render,
Source§fn lock_scroll_axis(self) -> Selfwhere
Self: Sized + StatefulInteractiveElement,
fn lock_scroll_axis(self) -> Selfwhere
Self: Sized + StatefulInteractiveElement,
OngoingScrollExt for why this is a no-op on wasm32.Source§fn on_double_click(
self,
listener: impl Fn(&ClickEvent, &mut Window, &mut App) + 'static,
) -> Selfwhere
Self: Sized,
fn on_double_click(
self,
listener: impl Fn(&ClickEvent, &mut Window, &mut App) + 'static,
) -> Selfwhere
Self: Sized,
Source§impl<T, E> IntoElement for ResizeHandle<T, E>where
T: 'static,
E: 'static + Render,
impl<T, E> IntoElement for ResizeHandle<T, E>where
T: 'static,
E: 'static + Render,
Source§type Element = ResizeHandle<T, E>
type Element = ResizeHandle<T, E>
Source§fn into_element(self) -> <ResizeHandle<T, E> as IntoElement>::Element
fn into_element(self) -> <ResizeHandle<T, E> as IntoElement>::Element
Element.Source§fn into_any_element(self) -> AnyElement
fn into_any_element(self) -> AnyElement
AnyElement.Source§impl<T, E> StatefulInteractiveElement for ResizeHandle<T, E>where
T: 'static,
E: 'static + Render,
impl<T, E> StatefulInteractiveElement for ResizeHandle<T, E>where
T: 'static,
E: 'static + Render,
Source§fn accessibility_id(self, id: impl Into<SharedString>) -> Self
fn accessibility_id(self, id: impl Into<SharedString>) -> Self
Source§fn aria_label(self, label: impl Into<SharedString>) -> Self
fn aria_label(self, label: impl Into<SharedString>) -> Self
Source§fn aria_description(self, description: impl Into<SharedString>) -> Self
fn aria_description(self, description: impl Into<SharedString>) -> Self
Source§fn aria_keyshortcuts(self, keyshortcuts: impl Into<SharedString>) -> Self
fn aria_keyshortcuts(self, keyshortcuts: impl Into<SharedString>) -> Self
keyboard_shortcut). Read moreSource§fn aria_active_descendant(self) -> Self
fn aria_active_descendant(self) -> Self
Source§fn a11y_synthetic_children(
self,
f: impl FnOnce(&mut A11ySubtreeBuilder<'_>) + 'static,
) -> Self
fn a11y_synthetic_children( self, f: impl FnOnce(&mut A11ySubtreeBuilder<'_>) + 'static, ) -> Self
Source§fn aria_selected(self, selected: bool) -> Self
fn aria_selected(self, selected: bool) -> Self
Source§fn aria_expanded(self, expanded: bool) -> Self
fn aria_expanded(self, expanded: bool) -> Self
Source§fn aria_toggled(self, toggled: Toggled) -> Self
fn aria_toggled(self, toggled: Toggled) -> Self
Source§fn aria_numeric_value(self, value: f64) -> Self
fn aria_numeric_value(self, value: f64) -> Self
Source§fn aria_numeric_value_step(self, step: f64) -> Self
fn aria_numeric_value_step(self, step: f64) -> Self
Source§fn aria_value(self, value: impl Into<SharedString>) -> Self
fn aria_value(self, value: impl Into<SharedString>) -> Self
Source§fn aria_placeholder(self, placeholder: impl Into<SharedString>) -> Self
fn aria_placeholder(self, placeholder: impl Into<SharedString>) -> Self
Source§fn aria_min_numeric_value(self, value: f64) -> Self
fn aria_min_numeric_value(self, value: f64) -> Self
Source§fn aria_max_numeric_value(self, value: f64) -> Self
fn aria_max_numeric_value(self, value: f64) -> Self
Source§fn aria_orientation(self, orientation: Orientation) -> Self
fn aria_orientation(self, orientation: Orientation) -> Self
Source§fn aria_level(self, level: usize) -> Self
fn aria_level(self, level: usize) -> Self
Source§fn aria_position_in_set(self, position: usize) -> Self
fn aria_position_in_set(self, position: usize) -> Self
Source§fn aria_size_of_set(self, size: usize) -> Self
fn aria_size_of_set(self, size: usize) -> Self
Source§fn aria_row_index(self, index: usize) -> Self
fn aria_row_index(self, index: usize) -> Self
Source§fn aria_column_index(self, index: usize) -> Self
fn aria_column_index(self, index: usize) -> Self
Source§fn aria_row_count(self, count: usize) -> Self
fn aria_row_count(self, count: usize) -> Self
Source§fn aria_column_count(self, count: usize) -> Self
fn aria_column_count(self, count: usize) -> Self
Source§fn on_a11y_action(
self,
action: Action,
listener: impl FnMut(Option<&ActionData>, &mut Window, &mut App) + 'static,
) -> Self
fn on_a11y_action( self, action: Action, listener: impl FnMut(Option<&ActionData>, &mut Window, &mut App) + 'static, ) -> Self
Source§fn overflow_scroll(self) -> Self
fn overflow_scroll(self) -> Self
Source§fn overflow_x_scroll(self) -> Self
fn overflow_x_scroll(self) -> Self
Source§fn overflow_y_scroll(self) -> Self
fn overflow_y_scroll(self) -> Self
Source§fn restrict_scroll_to_axis(self) -> Self
fn restrict_scroll_to_axis(self) -> Self
Source§fn track_scroll(self, scroll_handle: &ScrollHandle) -> Self
fn track_scroll(self, scroll_handle: &ScrollHandle) -> Self
Source§fn anchor_scroll(self, scroll_anchor: Option<ScrollAnchor>) -> Self
fn anchor_scroll(self, scroll_anchor: Option<ScrollAnchor>) -> Self
Source§fn active(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Selfwhere
Self: Sized,
fn active(self, f: impl FnOnce(StyleRefinement) -> StyleRefinement) -> Selfwhere
Self: Sized,
Source§fn group_active(
self,
group_name: impl Into<SharedString>,
f: impl FnOnce(StyleRefinement) -> StyleRefinement,
) -> Selfwhere
Self: Sized,
fn group_active(
self,
group_name: impl Into<SharedString>,
f: impl FnOnce(StyleRefinement) -> StyleRefinement,
) -> Selfwhere
Self: Sized,
Source§fn on_click(
self,
listener: impl Fn(&ClickEvent, &mut Window, &mut App) + 'static,
) -> Selfwhere
Self: Sized,
fn on_click(
self,
listener: impl Fn(&ClickEvent, &mut Window, &mut App) + 'static,
) -> Selfwhere
Self: Sized,
Interactivity::on_click. Read moreSource§fn on_aux_click(
self,
listener: impl Fn(&ClickEvent, &mut Window, &mut App) + 'static,
) -> Selfwhere
Self: Sized,
fn on_aux_click(
self,
listener: impl Fn(&ClickEvent, &mut Window, &mut App) + 'static,
) -> Selfwhere
Self: Sized,
Interactivity::on_aux_click. Read moreSource§fn on_drag<T, W>(
self,
value: T,
constructor: impl Fn(&T, Point<Pixels>, &mut Window, &mut App) -> Entity<W> + 'static,
) -> Self
fn on_drag<T, W>( self, value: T, constructor: impl Fn(&T, Point<Pixels>, &mut Window, &mut App) -> Entity<W> + 'static, ) -> Self
InteractiveElement::on_drag_move API.
The callback also has access to the offset of triggering click from the origin of parent element.
The fluent API equivalent to Interactivity::on_drag. Read moreSource§fn external_drag_payload<T>(
self,
resolver: impl Fn(&T, &mut Window, &mut App) -> Option<ExternalDragPayload> + 'static,
) -> Selfwhere
Self: Sized,
T: 'static,
fn external_drag_payload<T>(
self,
resolver: impl Fn(&T, &mut Window, &mut App) -> Option<ExternalDragPayload> + 'static,
) -> Selfwhere
Self: Sized,
T: 'static,
Self::on_drag, with the same dragged value
type T.
The fluent API equivalent to Interactivity::external_drag_payload.Source§fn on_hover(
self,
listener: impl Fn(&bool, &mut Window, &mut App) + 'static,
) -> Selfwhere
Self: Sized,
fn on_hover(
self,
listener: impl Fn(&bool, &mut Window, &mut App) + 'static,
) -> Selfwhere
Self: Sized,
Source§fn hover_listener_mode(self, mode: HoverListenerMode) -> Selfwhere
Self: Sized,
fn hover_listener_mode(self, mode: HoverListenerMode) -> Selfwhere
Self: Sized,
Self::on_hover responds to key presses while the mouse is stationary.
This affects only the hover listener, not hover styles or tooltips. The fluent API
equivalent to Interactivity::hover_listener_mode.Source§fn tooltip(
self,
build_tooltip: impl Fn(&mut Window, &mut App) -> AnyView + 'static,
) -> Selfwhere
Self: Sized,
fn tooltip(
self,
build_tooltip: impl Fn(&mut Window, &mut App) -> AnyView + 'static,
) -> Selfwhere
Self: Sized,
Interactivity::tooltip.Source§fn hoverable_tooltip(
self,
build_tooltip: impl Fn(&mut Window, &mut App) -> AnyView + 'static,
) -> Selfwhere
Self: Sized,
fn hoverable_tooltip(
self,
build_tooltip: impl Fn(&mut Window, &mut App) -> AnyView + 'static,
) -> Selfwhere
Self: Sized,
Interactivity::hoverable_tooltip.Auto Trait Implementations§
impl<T, E> !RefUnwindSafe for ResizeHandle<T, E>
impl<T, E> !Send for ResizeHandle<T, E>
impl<T, E> !Sync for ResizeHandle<T, E>
impl<T, E> !UnwindSafe for ResizeHandle<T, E>
impl<T, E> Freeze for ResizeHandle<T, E>
impl<T, E> Unpin for ResizeHandle<T, E>
impl<T, E> UnsafeUnpin for ResizeHandle<T, E>
Blanket Implementations§
Source§impl<E> AnimationExt for Ewhere
E: IntoElement + 'static,
impl<E> AnimationExt for Ewhere
E: IntoElement + 'static,
Source§fn with_animation(
self,
id: impl Into<ElementId>,
animation: Animation,
animator: impl Fn(Self, f32) -> Self + 'static,
) -> AnimationElement<Self>where
Self: Sized,
fn with_animation(
self,
id: impl Into<ElementId>,
animation: Animation,
animator: impl Fn(Self, f32) -> Self + 'static,
) -> AnimationElement<Self>where
Self: Sized,
Source§fn with_animations(
self,
id: impl Into<ElementId>,
animations: Vec<Animation>,
animator: impl Fn(Self, usize, f32) -> Self + 'static,
) -> AnimationElement<Self>where
Self: Sized,
fn with_animations(
self,
id: impl Into<ElementId>,
animations: Vec<Animation>,
animator: impl Fn(Self, usize, f32) -> Self + 'static,
) -> AnimationElement<Self>where
Self: Sized,
Source§fn with_spring<T>(
self,
id: impl Into<ElementId>,
animation: SpringAnimation<T>,
animator: impl FnOnce(Self, <T as SpringTarget>::Output) -> Self + 'static,
) -> SpringAnimationElement<Self>
fn with_spring<T>( self, id: impl Into<ElementId>, animation: SpringAnimation<T>, animator: impl FnOnce(Self, <T as SpringTarget>::Output) -> Self + 'static, ) -> SpringAnimationElement<Self>
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FluentBuilder for Twhere
T: IntoElement,
impl<T> FluentBuilder for Twhere
T: IntoElement,
Source§fn map<U>(self, f: impl FnOnce(Self) -> U) -> Uwhere
Self: Sized,
fn map<U>(self, f: impl FnOnce(Self) -> U) -> Uwhere
Self: Sized,
Source§fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Selfwhere
Self: Sized,
fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Selfwhere
Self: Sized,
Source§fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Selfwhere
Self: Sized,
fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Selfwhere
Self: Sized,
Source§impl<T> FocusTrapElement for Twhere
T: InteractiveElement,
impl<T> FocusTrapElement for Twhere
T: InteractiveElement,
Source§fn focus_trap(
self,
id: impl Into<ElementId>,
focus_handle: &FocusHandle,
) -> FocusTrapContainer<Self>
fn focus_trap( self, id: impl Into<ElementId>, focus_handle: &FocusHandle, ) -> FocusTrapContainer<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more