pub struct TimeframeToolbar {
pub state: TimeframeToolbarState,
pub config: TimeframeToolbarConfig,
/* private fields */
}Expand description
Bottom panel component
Fields§
§state: TimeframeToolbarStateState
config: TimeframeToolbarConfigConfiguration
Implementations§
Source§impl TimeframeToolbar
impl TimeframeToolbar
Sourcepub fn with_config(config: TimeframeToolbarConfig) -> Self
pub fn with_config(config: TimeframeToolbarConfig) -> Self
Create with custom config
Sourcepub fn set_control_visible(&mut self, control: Control, visible: bool)
pub fn set_control_visible(&mut self, control: Control, visible: bool)
Shows or hides control: TimeZone, Session and DividendAdjustment. The toolbar
ignores the other controls.
Sourcepub fn update_time(&mut self)
pub fn update_time(&mut self)
Update the current time display
Sourcepub fn show(&mut self, ui: &mut Ui) -> TimeframeToolbarAction
pub fn show(&mut self, ui: &mut Ui) -> TimeframeToolbarAction
Show bottom panel and return action
Sourcepub fn state(&self) -> &TimeframeToolbarState
pub fn state(&self) -> &TimeframeToolbarState
Get the current state
Sourcepub fn state_mut(&mut self) -> &mut TimeframeToolbarState
pub fn state_mut(&mut self) -> &mut TimeframeToolbarState
Get mutable state
Sourcepub fn set_date_range(&mut self, range: DateRange)
pub fn set_date_range(&mut self, range: DateRange)
Set the selected date range
Sourcepub fn set_timezone(&mut self, timezone: String)
pub fn set_timezone(&mut self, timezone: String)
Set the timezone
Sourcepub fn set_session(&mut self, session: SessionType)
pub fn set_session(&mut self, session: SessionType)
Set the session type
Sourcepub fn toggle_dividends(&mut self)
pub fn toggle_dividends(&mut self)
Toggle dividend adjustment
Sourcepub fn sync_from_app_state(&mut self, app_state: &dyn ChartAppState)
pub fn sync_from_app_state(&mut self, app_state: &dyn ChartAppState)
Sync from application state.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TimeframeToolbar
impl RefUnwindSafe for TimeframeToolbar
impl Send for TimeframeToolbar
impl Sync for TimeframeToolbar
impl Unpin for TimeframeToolbar
impl UnsafeUnpin for TimeframeToolbar
impl UnwindSafe for TimeframeToolbar
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