pub struct TimeframeBar {
pub config: TimeframeBarConfig,
pub active_timeframe: QuickTimeframe,
pub show_adj: bool,
pub adj_enabled: bool,
/* private fields */
}Expand description
Bottom Timeframe Quick-Select Bar
Fields§
§config: TimeframeBarConfigDisplay and layout options for this component.
active_timeframe: QuickTimeframeCurrently selected date range preset.
show_adj: boolWhether to display the adjustment toggle.
adj_enabled: boolWhether the adjustment toggle is selected.
Implementations§
Source§impl TimeframeBar
impl TimeframeBar
Sourcepub fn with_config(self, config: TimeframeBarConfig) -> Self
pub fn with_config(self, config: TimeframeBarConfig) -> Self
Set a custom configuration
Sourcepub fn with_active_timeframe(self, tf: QuickTimeframe) -> Self
pub fn with_active_timeframe(self, tf: QuickTimeframe) -> Self
Set the initially active timeframe
Sourcepub fn show(&mut self, ui: &mut Ui) -> TimeframeBarAction
pub fn show(&mut self, ui: &mut Ui) -> TimeframeBarAction
Show the timeframe bar
Sourcepub fn set_active_timeframe(&mut self, tf: QuickTimeframe)
pub fn set_active_timeframe(&mut self, tf: QuickTimeframe)
Select the displayed date range preset.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TimeframeBar
impl RefUnwindSafe for TimeframeBar
impl Send for TimeframeBar
impl Sync for TimeframeBar
impl Unpin for TimeframeBar
impl UnsafeUnpin for TimeframeBar
impl UnwindSafe for TimeframeBar
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