pub struct RangeHistogramSlider { /* private fields */ }Expand description
Arc RangeHistogramSlider — a two-thumb range over the histogram of the data it filters.
Implementations§
Source§impl RangeHistogramSlider
impl RangeHistogramSlider
pub fn new( id: impl Into<ElementId>, label: impl Into<SharedString>, ) -> RangeHistogramSlider
Sourcepub fn data<I>(self, data: I) -> RangeHistogramSliderwhere
I: IntoIterator<Item = f32>,
pub fn data<I>(self, data: I) -> RangeHistogramSliderwhere
I: IntoIterator<Item = f32>,
The raw values the histogram counts, such as every listing’s price.
pub fn value(self, value: (f32, f32)) -> RangeHistogramSlider
pub fn default_value(self, value: (f32, f32)) -> RangeHistogramSlider
Sourcepub fn min(self, min: f32) -> RangeHistogramSlider
pub fn min(self, min: f32) -> RangeHistogramSlider
Defaults to the smallest and largest data values.
pub fn max(self, max: f32) -> RangeHistogramSlider
pub fn step(self, step: f32) -> RangeHistogramSlider
Sourcepub fn bins(self, bins: usize) -> RangeHistogramSlider
pub fn bins(self, bins: usize) -> RangeHistogramSlider
How many bars the histogram draws.
Sourcepub fn snap_to_bins(self, snap: bool) -> RangeHistogramSlider
pub fn snap_to_bins(self, snap: bool) -> RangeHistogramSlider
A released thumb that lands near the edge of a bar settles on that edge.
Sourcepub fn min_steps_between_thumbs(self, steps: f32) -> RangeHistogramSlider
pub fn min_steps_between_thumbs(self, steps: f32) -> RangeHistogramSlider
The closest the two thumbs may sit, in steps.
pub fn format( self, format: impl Fn(f64) -> String + 'static, ) -> RangeHistogramSlider
pub fn thumb_labels(self, labels: [&str; 2]) -> RangeHistogramSlider
pub fn disabled(self, disabled: bool) -> RangeHistogramSlider
pub fn width(self, width: impl Into<Pixels>) -> RangeHistogramSlider
pub fn on_value_change( self, handler: impl Fn(&(f32, f32), &mut Window, &mut App) + 'static, ) -> RangeHistogramSlider
Sourcepub fn on_value_commit(
self,
handler: impl Fn(&(f32, f32), &mut Window, &mut App) + 'static,
) -> RangeHistogramSlider
pub fn on_value_commit( self, handler: impl Fn(&(f32, f32), &mut Window, &mut App) + 'static, ) -> RangeHistogramSlider
Runs once a drag is released or a key changes the value.
Trait Implementations§
Source§impl IntoElement for RangeHistogramSlider
impl IntoElement for RangeHistogramSlider
Source§type Element = ViewElement<RangeHistogramSlider>
type Element = ViewElement<RangeHistogramSlider>
The specific type of element into which the implementing type is converted.
Useful for converting other types into elements automatically, like Strings
Source§fn into_element(self) -> <RangeHistogramSlider as IntoElement>::Element
fn into_element(self) -> <RangeHistogramSlider as IntoElement>::Element
Convert self into a type that implements
Element.Source§fn into_any_element(self) -> AnyElement
fn into_any_element(self) -> AnyElement
Convert self into a dynamically-typed
AnyElement.Source§impl RenderOnce for RangeHistogramSlider
impl RenderOnce for RangeHistogramSlider
Source§fn render(self, window: &mut Window, cx: &mut App) -> impl IntoElement
fn render(self, window: &mut Window, cx: &mut App) -> impl IntoElement
Render this component into an element tree. Note that this method
takes ownership of self, as compared to
Render::render() method
which takes a mutable reference.Auto Trait Implementations§
impl !RefUnwindSafe for RangeHistogramSlider
impl !Send for RangeHistogramSlider
impl !Sync for RangeHistogramSlider
impl !UnwindSafe for RangeHistogramSlider
impl Forget for RangeHistogramSlider
impl Freeze for RangeHistogramSliderwhere
NonZero<u32>: Freeze,
&'static str: Freeze,
*const ArcInner<str> is !null: Freeze,
PhantomData<ArcInner<str>>: Freeze,
*const ArcInner<Path> is !null: Freeze,
PhantomData<ArcInner<Path>>: Freeze,
*const str is !null: Freeze,
PhantomData<&'static str>: Freeze,
*const ArcInner<ElementId> is !null: Freeze,
PhantomData<ArcInner<ElementId>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<f32>: Freeze,
*const RcInner<dyn Fn(f64) -> String> is !null: Freeze,
PhantomData<RcInner<dyn Fn(f64) -> String>>: Freeze,
*const RcInner<dyn Fn(&(f32, f32), &mut Window, &mut App)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&(f32, f32), &mut Window, &mut App)>>: Freeze,
impl Move for RangeHistogramSlider
impl Unpin for RangeHistogramSlider
impl UnsafeUnpin for RangeHistogramSliderwhere
NonZeroU32Inner: UnsafeUnpin,
&'static str: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
*const ArcInner<Path> is !null: UnsafeUnpin,
PhantomData<ArcInner<Path>>: UnsafeUnpin,
*const str is !null: UnsafeUnpin,
PhantomData<&'static str>: UnsafeUnpin,
*const ArcInner<ElementId> is !null: UnsafeUnpin,
PhantomData<ArcInner<ElementId>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<f32>: UnsafeUnpin,
*const RcInner<dyn Fn(f64) -> String> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(f64) -> String>>: UnsafeUnpin,
*const RcInner<dyn Fn(&(f32, f32), &mut Window, &mut App)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&(f32, f32), &mut Window, &mut App)>>: UnsafeUnpin,
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,
Render this component or element with an animation
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,
Render this component or element with a chain of animations
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>
Renders this component or element at the value produced by a spring. Read more
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&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,
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,
Imperatively modify self with the given closure.
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,
Conditionally modify self with the given closure.
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,
Conditionally modify self with the given closure.
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> ⓘ
Converts
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> ⓘ
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<E> TestTextExt for Ewhere
E: IntoElement,
impl<E> TestTextExt for Ewhere
E: IntoElement,
Source§fn test_text(self, text: impl Into<SharedString>) -> Self::Element
fn test_text(self, text: impl Into<SharedString>) -> Self::Element
With
test-support, records text each time the element paints.
Otherwise returns the element it builds.Source§fn test_alt_text(self, text: impl Into<SharedString>) -> Self::Element
fn test_alt_text(self, text: impl Into<SharedString>) -> Self::Element
Like
Self::test_text for an image’s alternative text, which
stands in for what the element draws.