pub struct RangeSwitcher { /* private fields */ }Expand description
Range Switcher Widget
Displays horizontal row of date range btns (1D, 5D, 1M, etc.) Returns the selected range when a button is clicked.
Implementations§
Source§impl RangeSwitcher
impl RangeSwitcher
Sourcepub fn with_config(config: RangeSwitcherConfig) -> Self
pub fn with_config(config: RangeSwitcherConfig) -> Self
Create with custom config
Sourcepub fn with_id(self, id: impl Hash + Debug) -> Self
pub fn with_id(self, id: impl Hash + Debug) -> Self
Create with custom ID (for multiple instances)
Sourcepub fn preferred_width(&self, _ui: &Ui) -> f32
pub fn preferred_width(&self, _ui: &Ui) -> f32
Calculate the total width needed for the widget
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RangeSwitcher
impl RefUnwindSafe for RangeSwitcher
impl Send for RangeSwitcher
impl Sync for RangeSwitcher
impl Unpin for RangeSwitcher
impl UnsafeUnpin for RangeSwitcher
impl UnwindSafe for RangeSwitcher
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
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> 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 more