pub struct Slider { /* private fields */ }Expand description
A draggable value selector bound to a Signal<f32> in a continuous
or discrete range. Visual chrome is fully delegated to a
[SliderStyle] implementation.
Implementations§
Source§impl Slider
impl Slider
Sourcepub fn new(value: Signal<f32>, min: f32, max: f32) -> Self
pub fn new(value: Signal<f32>, min: f32, max: f32) -> Self
Create a horizontal slider bound to value with the given inclusive
range. Use orientation to switch to vertical.
Sourcepub fn on_change(self, f: impl Fn(f32, &mut EventContext<'_>) + 'static) -> Self
pub fn on_change(self, f: impl Fn(f32, &mut EventContext<'_>) + 'static) -> Self
Run f for every value this control produces under the user’s
hand, with an EventContext, so it can do what a bare Signal write
cannot (ctx.send_intent(...), opening a window). Fires for a track
click, for each step of a drag, for the arrows, for an assistive
technology’s Increment / Decrement / SetValue, and for a reset to
the default_value.
A drag fires this repeatedly — once per value it actually produces, not once per pointer sample, since a write that changes nothing reports nothing. It is still the wrong place for work that should happen once per interaction: persisting to disk, a network call, an undo entry. There is no commit-on-release callback yet; observe the signal and do that work when the value settles.
Does not fire for programmatic writes to the bound signal — there is no event in flight to carry. Observe the signal for that.
Sourcepub fn step(self, step: f32) -> Self
pub fn step(self, step: f32) -> Self
Set the discrete step size for keyboard arrows and accessibility Increment/Decrement actions. When unset, defaults to 1 % of the range.
Sourcepub fn page_step(self, page_step: f32) -> Self
pub fn page_step(self, page_step: f32) -> Self
Set the step size for PageUp / PageDown. When unset, ten times the
effective step — so with the default step of 1 % of the
range a page is 10 % of it, which is what QAbstractSlider::pageStep,
GtkScale’s page increment and <input type=range> in both WebKit and
Blink all give, and the same 10 x rule
SpinBox::page_step uses.
Sourcepub fn orientation(self, orientation: Orientation) -> Self
pub fn orientation(self, orientation: Orientation) -> Self
Set the slider orientation (Horizontal by default). Vertical
sliders map Up/Down arrow keys to increase/decrease.
Sourcepub fn enabled(self, enabled: impl Into<Prop<bool>>) -> Self
pub fn enabled(self, enabled: impl Into<Prop<bool>>) -> Self
Set the enabled state, statically or reactively. Forwarded to
the arena at build time via
ctx.enabled_when(slider_id, self.enabled.clone()).
Sourcepub fn variant(self, variant: SliderVariant) -> Self
pub fn variant(self, variant: SliderVariant) -> Self
Pick a Tier-1 design-language variant
(SliderVariant::Continuous / Discrete / Range). The
active [SliderStyle] decides what to do with the hint —
IntUI’s default impl paints ticks for Discrete and ignores
Range (the widget itself doesn’t yet wire dual-thumb
behaviour).
Sourcepub fn tick_count(self, count: u32) -> Self
pub fn tick_count(self, count: u32) -> Self
Configure the tick count for a Discrete slider. The
IntUI default paints n evenly spaced tick marks above the
track (or to the leading side for vertical orientation).
Sourcepub fn style(self, style: impl SliderStyle) -> Self
pub fn style(self, style: impl SliderStyle) -> Self
Override the active [SliderStyle] for this widget instance
only.
Sourcepub fn label(self, label: impl Into<LocalizedString>) -> Self
pub fn label(self, label: impl Into<LocalizedString>) -> Self
Set an accessible name for the slider, announced by screen readers. ARIA requires sliders to have a label; when none is set here the caller is responsible for labelling via a wrapping element.
Sourcepub fn tooltip(self, text: impl Into<LocalizedString>) -> Self
pub fn tooltip(self, text: impl Into<LocalizedString>) -> Self
Attach a plain single-line tooltip shown after a hover delay.
Mutually exclusive with rich_tooltip,
rich_tooltip_content, and
composite_tooltip — the last setter
wins and clears the others. Independent of
value_tooltip, which neither replaces nor is
replaced by any of them.
Sourcepub fn rich_tooltip(self, key: impl Into<String>) -> Self
pub fn rich_tooltip(self, key: impl Into<String>) -> Self
Attach a rich tooltip driven by a registry key. The registry entry supplies title, body markup, optional shortcut chip and cascade links. Mutually exclusive with the other tooltip setters.
Sourcepub fn rich_tooltip_content(self, content: TooltipContent) -> Self
pub fn rich_tooltip_content(self, content: TooltipContent) -> Self
Attach a rich tooltip from an inline TooltipContent
value, bypassing the registry lookup. Mutually exclusive with the
other tooltip setters.
Sourcepub fn composite_tooltip(self, content: impl Widget + 'static) -> Self
pub fn composite_tooltip(self, content: impl Widget + 'static) -> Self
Attach a composite tooltip whose body is an arbitrary widget tree.
Uses the heavier tooltip_delay_heavy delay. Mutually exclusive
with the other tooltip setters.
Sourcepub fn value_tooltip(
self,
format: impl Fn(f32) -> LocalizedString + 'static,
) -> Self
pub fn value_tooltip( self, format: impl Fn(f32) -> LocalizedString + 'static, ) -> Self
Show the value as text by the thumb, formatted by format, while the
slider is hovered, dragged, or focused from the keyboard.
Unlike a tooltip, the readout is up at once, with no
hover delay; a press does not close it, so it stays up through a drag;
and it moves with the thumb and changes as the value does, without a
rebuild. By default it sits above a horizontal slider’s thumb, or below
it near the top of the window, and beside a vertical slider, on the
inline-start side when there is room, so it covers neither the thumb
nor the track; value_tooltip_placement
picks another side. It is re-placed on every layout pass from where the
slider is then, so it follows a value the application writes, a scroll
that moves the slider and a resize that stretches it. Its chrome is the
theme’s tooltip chrome unless
value_tooltip_style gives it another.
It takes no input of its own. A press or a hover on it reaches what is under it, and a press there closes a popover it is outside of. Escape hides it until the next hover, drag or key, and goes on to whatever else wanted the key, the focused field included, as a plain tooltip’s Escape does. Focus leaving the slider takes it down only when nothing else holds it up: the pointer still on the slider keeps it.
The text is also the slider’s accessible value, published beside the number: UI Automation and macOS carry it, so a reader there says “-3.0 dB” rather than “-3”. AT-SPI carries the number alone, so Orca keeps reading the number.
format receives the value the bound signal holds, on every change to
it. It returns a [LocalizedString], so a tr!(..) message
re-resolves on a locale change and lit!(..) serves text that is not
translated.
A tooltip, rich or composite tooltip set beside it
keeps its hover delay, its place under the slider and the accessible
description it gives, and both show; to name the control in the
readout instead, say so in format.
Sourcepub fn value_tooltip_placement(
self,
placement: SliderValueTooltipPlacement,
) -> Self
pub fn value_tooltip_placement( self, placement: SliderValueTooltipPlacement, ) -> Self
Choose where the value_tooltip readout sits:
above or below the thumb, or at the pointer while a drag moves the
value. SliderValueTooltipPlacement::Auto by default, which is where
the readout has always gone. Has no effect without a value_tooltip.
Sourcepub fn value_tooltip_style(self, style: impl TooltipStyle) -> Self
pub fn value_tooltip_style(self, style: impl TooltipStyle) -> Self
Paint the value_tooltip readout with style
rather than the active theme’s tooltip chrome
(theme.style_slots.tooltip, else the built-in recipe). Only this
slider’s readout changes; its plain, rich or composite
tooltip keeps the theme’s. Has no effect without a
value_tooltip.
Sourcepub fn jump_on_press(self, on: bool) -> Self
pub fn jump_on_press(self, on: bool) -> Self
Move the value to the pointer as soon as a mouse button goes down on the slider, rather than when the click is released or a drag starts. Off by default.
With it off, a press writes nothing: the value moves when the pointer
has travelled far enough to start a drag, or to the click’s position
when it is released without one. With it on, a primary press of a
mouse moves the value to the pointer at once, a drag that follows
carries on from there without a jump, and the release of a click adds
nothing. on_change reports the press’s value as a
user change.
Touch and pen keep the default whatever this says: a contact landing
on a slider may be the start of a scroll or of something an ancestor
claims, so it writes nothing until it is a drag or a tap. The second
press of a double-click does not jump either when a
default_value is set, since that click resets.
The keyboard and the accessibility actions are unaffected.
Sourcepub fn default_value(self, value: f32) -> Self
pub fn default_value(self, value: f32) -> Self
Let the user put the value back to value: with a double-click on the
slider, or with the “Reset to default” accessibility action, which this
also advertises.
The reset is a user change, written through the same path as a drag or
an arrow key, so on_change reports it unless the
value was already there. It is clamped to the range and not snapped to
the step: a default between two steps lands where it
was asked to. A double-click’s first click jumps the value to where it
landed, as every click on the track does, so on_change reports that
value and then the default; further clicks in the same burst leave the
default where it is. A disabled slider ignores the double-click, and
neither offers nor takes the action.
An application’s own .access_custom_action(..) on the slider is
offered beside the reset, not instead of it.
Trait Implementations§
Source§impl Widget for Slider
impl Widget for Slider
Source§fn target_regions(&self, bounds: Rect) -> Vec<TargetRegion>
fn target_regions(&self, bounds: Rect) -> Vec<TargetRegion>
What a slider paints inside its one node: a track and a knob.
The node itself is the target — a press anywhere on it jumps the value
and a drag from anywhere moves it — so it is reported whole, and it is
what the conformance audit measures (the shipped body is at least 24 dp
across, MIN_CROSS_SIZE in styles/recipe_slider_style.rs). The knob is
reported as a grab because that is the affordance a user aims at,
and because nothing else in the tree can see that it exists: it is drawn
on the same canvas as the track, and its diameter comes from the
resolved [SliderStyle], not from any layout.
The geometry is derived exactly as the body paints it, mirrored under RTL, so the report and the picture cannot drift.
Source§fn build(&mut self, ctx: &mut BuildContext<'_>) -> Vec<WidgetId>
fn build(&mut self, ctx: &mut BuildContext<'_>) -> Vec<WidgetId>
BindingLevel::Rebuild binding, rebuild_single_widget, or a density
switch. A theme or locale switch does not rebuild: set_theme and
set_locale mark layout + paint dirty and leave the built subtree
standing, so anything derived from the theme or the locale must be read
per pass or bound to a signal rather than captured here.
Takes &mut self — store child IDs, signal handles, any state needed later.
Returns the list of root child IDs (empty for leaf widgets).Source§fn layout_response(
&self,
proposal: SizeProposal,
ctx: &LayoutContext<'_>,
) -> LayoutResponse
fn layout_response( &self, proposal: SizeProposal, ctx: &LayoutContext<'_>, ) -> LayoutResponse
LayoutResponse]). Read moreSource§fn place_children(
&self,
bounds: Rect,
_proposal: SizeProposal,
children: &mut [WidgetPlacement],
ctx: &LayoutContext<'_>,
)
fn place_children( &self, bounds: Rect, _proposal: SizeProposal, children: &mut [WidgetPlacement], ctx: &LayoutContext<'_>, )
Source§fn accessibility(&self, builder: &mut AccessNodeBuilder)
fn accessibility(&self, builder: &mut AccessNodeBuilder)
§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
"teksilo_widgets::button::Button"). The default implementation
resolves at the impl site via std::any::type_name::<Self>(),
so calls through &dyn Widget correctly dispatch to the
monomorphized fn for the concrete type — getting the
concrete name through the vtable without per-impl boilerplate. Read more§fn cacheable_layout(&self) -> bool
fn cacheable_layout(&self) -> bool
layout_response may be
memoized by the per-pass layout cache. Defaults to true. Read more§fn paint(&self, _bounds: Rect, _canvas: &mut Canvas, _ctx: &PaintContext<'_>)
fn paint(&self, _bounds: Rect, _canvas: &mut Canvas, _ctx: &PaintContext<'_>)
§fn wants_after_paint(&self) -> bool
fn wants_after_paint(&self) -> bool
after_paint
hook to fire each frame. Returning false (the default) saves
a virtual call per widget per frame for the vast majority of
widgets that don’t aggregate descendant geometry. Read more§fn after_paint(&self, _view: &WidgetTreeView<'_>, _ctx: &PaintContext<'_>)
fn after_paint(&self, _view: &WidgetTreeView<'_>, _ctx: &PaintContext<'_>)
TitleBar aggregates its drag region and control-button
rects into a single HitRegions payload for the Windows
backend’s WM_NCHITTEST. Read more§fn wants_post_paint(&self) -> bool
fn wants_post_paint(&self) -> bool
post_paint
hook to fire each frame. Returning false (the default) saves a
virtual call per widget per frame for the vast majority of widgets
that don’t draw a foreground over their children. Read more§fn post_paint(
&self,
_bounds: Rect,
_canvas: &mut Canvas,
_ctx: &PaintContext<'_>,
)
fn post_paint( &self, _bounds: Rect, _canvas: &mut Canvas, _ctx: &PaintContext<'_>, )
§fn wants_descendant_redirects(&self) -> bool
fn wants_descendant_redirects(&self) -> bool
a11y_redirect_descendant
hook for every descendant during AT tree emission, not
just its direct arena children. Read more§fn culls_children(&self) -> bool
fn culls_children(&self) -> bool
§fn a11y_redirect_descendant(
&self,
_self_id: WidgetId,
_descendant: WidgetId,
) -> Option<NodeId>
fn a11y_redirect_descendant( &self, _self_id: WidgetId, _descendant: WidgetId, ) -> Option<NodeId>
§fn accessible_title_hint(&self) -> Option<String>
fn accessible_title_hint(&self) -> Option<String>
§fn accessible_title_node(&self) -> Option<WidgetId>
fn accessible_title_node(&self) -> Option<WidgetId>
§fn initial_focus_hint(&self) -> Option<WidgetId>
fn initial_focus_hint(&self) -> Option<WidgetId>
§fn accessibility_proxy(&self) -> Option<WidgetId>
fn accessibility_proxy(&self) -> Option<WidgetId>
§fn accessibility_children(&self) -> Option<Vec<WidgetId>>
fn accessibility_children(&self) -> Option<Vec<WidgetId>>
§fn as_any(&self) -> Option<&(dyn Any + 'static)>
fn as_any(&self) -> Option<&(dyn Any + 'static)>
None; concrete
widgets override with Some(self) when they want to expose
their concrete type to test-level introspection or reflection.
The trait already bounds on std::any::Any so concrete types
satisfy the 'static requirement.§fn as_any_mut(&mut self) -> Option<&mut (dyn Any + 'static)>
fn as_any_mut(&mut self) -> Option<&mut (dyn Any + 'static)>
as_any. Default
returns None; widgets that want to expose mutable state to
tests (e.g. so a test can mutate a Scene inside a
SceneView post-layout) override with Some(self). Should
follow the same opt-in pattern as as_any: only widgets
that opt into & introspection should opt into &mut.§fn clips_children(&self) -> bool
fn clips_children(&self) -> bool
§fn focus_reveal_rect(&self, _bounds: Rect) -> Option<Rect>
fn focus_reveal_rect(&self, _bounds: Rect) -> Option<Rect>
None (the default) reveals the widget’s whole
bounds — correct for most controls. Read more§fn hit_shape(&self, _local_point: Point, _bounds: Rect) -> bool
fn hit_shape(&self, _local_point: Point, _bounds: Rect) -> bool
false for a point that is inside
the bounding box makes the widget transparent to the click there,
so it falls through to whatever sibling is painted underneath
(the same machinery as a fully pass-through node, but shape-aware). Read more§fn accepts_child_hit(&self, _child: WidgetId, _point: Point) -> bool
fn accepts_child_hit(&self, _child: WidgetId, _point: Point) -> bool
§fn hit_outset(&self, _kind: PointerKind, _tokens: &InputTokens) -> EdgeInsets
fn hit_outset(&self, _kind: PointerKind, _tokens: &InputTokens) -> EdgeInsets
§fn hit_slop(&self, _kind: PointerKind, _tokens: &InputTokens) -> Option<HitSlop>
fn hit_slop(&self, _kind: PointerKind, _tokens: &InputTokens) -> Option<HitSlop>
§fn hit_distance(&self, local_point: Point, bounds: Rect) -> Option<f32>
fn hit_distance(&self, local_point: Point, bounds: Rect) -> Option<f32>
§fn preserves_children_on_rebuild(&self) -> bool
fn preserves_children_on_rebuild(&self) -> bool
rebuild_single_widget treats this widget’s existing children
when re-running its build(). Read more§fn tooltip_has_content(&self) -> bool
fn tooltip_has_content(&self) -> bool
§fn declare_shortcuts(&self) -> Vec<Shortcut>
fn declare_shortcuts(&self) -> Vec<Shortcut>
build()) and at certain lazy
boundaries (e.g. Switcher walks declarations on its
not-yet-mounted Pending slots), so settings UIs and the
ShortcutRegistry see the keystrokes the moment the owning
container mounts — even if build() hasn’t run. Read more§fn take_handler_set(&mut self) -> Option<HandlerSet>
fn take_handler_set(&mut self) -> Option<HandlerSet>
WidgetWithHandlers wrapper.
Called during arena insertion to transfer handlers to the WidgetNode.
Default: returns None (no attached handlers).Auto Trait Implementations§
impl !Freeze for Slider
impl !RefUnwindSafe for Slider
impl !Send for Slider
impl !Sync for Slider
impl !UnwindSafe for Slider
impl Unpin for Slider
impl UnsafeUnpin for Slider
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§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.impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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§impl<W> IntoTeksiChild for Wwhere
W: Widget + 'static,
impl<W> IntoTeksiChild for Wwhere
W: Widget + 'static,
fn into_pending(self) -> PendingChild
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<W> WidgetBuilder for Wwhere
W: Widget + 'static,
impl<W> WidgetBuilder for Wwhere
W: Widget + 'static,
fn on_tap( self, f: impl FnMut(&TapEvent, &mut EventContext<'_>) + 'static, ) -> WidgetWithHandlers<Self>
fn on_double_tap( self, f: impl FnMut(&TapEvent, &mut EventContext<'_>) + 'static, ) -> WidgetWithHandlers<Self>
fn on_triple_tap( self, f: impl FnMut(&TapEvent, &mut EventContext<'_>) + 'static, ) -> WidgetWithHandlers<Self>
fn on_long_press( self, f: impl FnMut(&TapEvent, &mut EventContext<'_>) + 'static, ) -> WidgetWithHandlers<Self>
on_tap. Default is [ButtonMask::PRIMARY]. Read moreon_double_tap. Default [ButtonMask::PRIMARY]. Read moreon_triple_tap. Default [ButtonMask::PRIMARY]. Read moreon_long_press. Default [ButtonMask::PRIMARY]. Read morefn on_drag( self, f: impl FnMut(DragPhase, &mut EventContext<'_>) + 'static, ) -> WidgetWithHandlers<Self>
fn on_swipe( self, f: impl FnMut(SwipeDirection, f32, &mut EventContext<'_>) + 'static, ) -> WidgetWithHandlers<Self>
fn on_pinch( self, f: impl FnMut(PinchPhase, &mut EventContext<'_>) + 'static, ) -> WidgetWithHandlers<Self>
fn on_focus( self, f: impl FnMut(bool, &mut EventContext<'_>) + 'static, ) -> WidgetWithHandlers<Self>
fn on_key( self, f: impl FnMut(&WidgetEvent, &mut EventContext<'_>) -> EventResponse + 'static, ) -> WidgetWithHandlers<Self>
§fn on_key_preview(
self,
f: impl FnMut(&WidgetEvent, &mut EventContext<'_>) -> EventResponse + 'static,
) -> WidgetWithHandlers<Self>
fn on_key_preview( self, f: impl FnMut(&WidgetEvent, &mut EventContext<'_>) -> EventResponse + 'static, ) -> WidgetWithHandlers<Self>
HandlerSet::on_key_preview].fn on_pointer_event( self, f: impl FnMut(&WidgetEvent, &mut EventContext<'_>) -> EventResponse + 'static, ) -> WidgetWithHandlers<Self>
fn on_hover( self, f: impl FnMut(bool, &mut EventContext<'_>) + 'static, ) -> WidgetWithHandlers<Self>
fn on_scroll( self, f: impl FnMut(&WidgetEvent, &mut EventContext<'_>) -> EventResponse + 'static, ) -> WidgetWithHandlers<Self>
fn on_access_action( self, f: impl FnMut(Action, &mut EventContext<'_>) -> EventResponse + 'static, ) -> WidgetWithHandlers<Self>
fn focusable(self, focusable: bool) -> WidgetWithHandlers<Self>
fn tab_index(self, index: i32) -> WidgetWithHandlers<Self>
fn cursor(self, cursor: CursorIcon) -> WidgetWithHandlers<Self>
fn clips_children_on(self, clips: bool) -> WidgetWithHandlers<Self>
§fn ime_input(self, ctx: ImeContext) -> WidgetWithHandlers<Self>
fn ime_input(self, ctx: ImeContext) -> WidgetWithHandlers<Self>
ctx’s purpose) while it is focused. See [crate::ime].§fn event_pass_through(self, pass_through: bool) -> WidgetWithHandlers<Self>
fn event_pass_through(self, pass_through: bool) -> WidgetWithHandlers<Self>
HandlerSet::event_pass_through].§fn gesture_dead_zone(self, dead_zone: bool) -> WidgetWithHandlers<Self>
fn gesture_dead_zone(self, dead_zone: bool) -> WidgetWithHandlers<Self>
HandlerSet::gesture_dead_zone].§fn long_press_role(self, role: LongPressRole) -> WidgetWithHandlers<Self>
fn long_press_role(self, role: LongPressRole) -> WidgetWithHandlers<Self>
HandlerSet::long_press_role].§fn touch_action(self, action: TouchAction) -> WidgetWithHandlers<Self>
fn touch_action(self, action: TouchAction) -> WidgetWithHandlers<Self>
HandlerSet::touch_action].§fn scroll_container(self, axes: PanAxes) -> WidgetWithHandlers<Self>
fn scroll_container(self, axes: PanAxes) -> WidgetWithHandlers<Self>
axes, kinetic, direct pointers
only. See [HandlerSet::scroll_container].§fn pan_claim(self, claim: PanClaim) -> WidgetWithHandlers<Self>
fn pan_claim(self, claim: PanClaim) -> WidgetWithHandlers<Self>
PanClaim]. See
[HandlerSet::pan_claim].§fn overscroll_behavior(
self,
behavior: OverscrollBehavior,
) -> WidgetWithHandlers<Self>
fn overscroll_behavior( self, behavior: OverscrollBehavior, ) -> WidgetWithHandlers<Self>
HandlerSet::overscroll_behavior].§fn drag_activation(self, activation: DragActivation) -> WidgetWithHandlers<Self>
fn drag_activation(self, activation: DragActivation) -> WidgetWithHandlers<Self>
HandlerSet::drag_activation].§fn multi_contact(self, policy: MultiContact) -> WidgetWithHandlers<Self>
fn multi_contact(self, policy: MultiContact) -> WidgetWithHandlers<Self>
MultiContact::First] — the second finger on a single-contact control
is terminated there rather than reaching an ancestor.§fn keyboard_capture(self, capture: bool) -> WidgetWithHandlers<Self>
fn keyboard_capture(self, capture: bool) -> WidgetWithHandlers<Self>
KeyDowns bypass shortcut resolution.
See [HandlerSet::keyboard_capture].§fn hit_transparent(self, transparent: bool) -> WidgetWithHandlers<Self>
fn hit_transparent(self, transparent: bool) -> WidgetWithHandlers<Self>
HandlerSet::hit_transparent].§fn hit_slop(self, slop: HitSlop) -> WidgetWithHandlers<Self>
fn hit_slop(self, slop: HitSlop) -> WidgetWithHandlers<Self>
HandlerSet::hit_slop].§fn no_hit_slop(self) -> WidgetWithHandlers<Self>
fn no_hit_slop(self) -> WidgetWithHandlers<Self>
Widget::hit_outset. See [HandlerSet::no_hit_slop].HandlerSet::context_menu] for the full contract.§fn focus_within(self, signal: Signal<bool>) -> WidgetWithHandlers<Self>
fn focus_within(self, signal: Signal<bool>) -> WidgetWithHandlers<Self>
Signal<bool> the framework writes when a strict
descendant has focus. See [HandlerSet::focus_within].§fn hover_within(self, signal: Signal<bool>) -> WidgetWithHandlers<Self>
fn hover_within(self, signal: Signal<bool>) -> WidgetWithHandlers<Self>
Signal<bool> the framework writes when a strict
descendant is hovered. See [HandlerSet::hover_within].§fn visible_when(self, state: impl Into<Prop<bool>>) -> WidgetWithHandlers<Self>
fn visible_when(self, state: impl Into<Prop<bool>>) -> WidgetWithHandlers<Self>
bool / Signal<bool> / Prop<bool>) as
a builder property, so teksu! can write visible_when: sig. Equivalent
to ctx.visible_when(id, ..). See [HandlerSet::visible_when].fn on_drag_hover( self, f: impl FnMut(&DragPayload, Point, &mut EventContext<'_>) -> DropFeedback + 'static, ) -> WidgetWithHandlers<Self>
fn on_drag_leave( self, f: impl FnMut(&mut EventContext<'_>) + 'static, ) -> WidgetWithHandlers<Self>
fn on_drag_tick( self, f: impl FnMut(Point, &mut EventContext<'_>) + 'static, ) -> WidgetWithHandlers<Self>
§fn on_pointer_cancel(
self,
f: impl FnMut(&PointerInfo, CancelReason, &mut EventContext<'_>) + 'static,
) -> WidgetWithHandlers<Self>
fn on_pointer_cancel( self, f: impl FnMut(&PointerInfo, CancelReason, &mut EventContext<'_>) + 'static, ) -> WidgetWithHandlers<Self>
HandlerSet::on_pointer_cancel].fn on_drop( self, f: impl FnMut(DragPayload, Point, &mut EventContext<'_>) -> bool + 'static, ) -> WidgetWithHandlers<Self>
§fn on_drag_ended(
self,
f: impl FnMut(DropOutcome, &mut EventContext<'_>) + 'static,
) -> WidgetWithHandlers<Self>
fn on_drag_ended( self, f: impl FnMut(DropOutcome, &mut EventContext<'_>) + 'static, ) -> WidgetWithHandlers<Self>
HandlerSet::on_drag_ended].