pub struct SettingsMenu {
pub settings: ChartSettings,
pub is_open: bool,
/* private fields */
}Expand description
Quick settings popup menu for chart configuration
Fields§
§settings: ChartSettingsCurrent chart settings
is_open: boolWhether the menu popup is open
Implementations§
Source§impl SettingsMenu
impl SettingsMenu
Sourcepub fn settings(&self) -> &ChartSettings
pub fn settings(&self) -> &ChartSettings
Get a reference to the current chart settings
Sourcepub fn settings_mut(&mut self) -> &mut ChartSettings
pub fn settings_mut(&mut self) -> &mut ChartSettings
Get a mutable reference to the current chart settings
Sourcepub fn apply_to_config(&self, config: ChartConfig) -> ChartConfig
pub fn apply_to_config(&self, config: ChartConfig) -> ChartConfig
Apply current settings to a ChartConfig
Sourcepub fn chart_type(&self) -> ChartType
pub fn chart_type(&self) -> ChartType
Get the currently selected chart type
Sourcepub fn show_btn(&mut self, ui: &mut Ui, chart_rect: Rect) -> Response
pub fn show_btn(&mut self, ui: &mut Ui, chart_rect: Rect) -> Response
Show the settings button (bottom-right corner)
Show the settings popup menu
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SettingsMenu
impl RefUnwindSafe for SettingsMenu
impl Send for SettingsMenu
impl Sync for SettingsMenu
impl Unpin for SettingsMenu
impl UnsafeUnpin for SettingsMenu
impl UnwindSafe for SettingsMenu
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