pub struct SeriesContextMenu {
pub series_id: Option<SeriesId>,
pub symbol: String,
pub click_price: f64,
pub last_action: SeriesContextMenuAction,
/* private fields */
}Expand description
Series context menu state
Fields§
§series_id: Option<SeriesId>Series ID that was right-clicked
symbol: StringCurrent symbol for dynamic menu items
click_price: f64Price at click position
last_action: SeriesContextMenuActionLast action taken
Implementations§
Source§impl SeriesContextMenu
impl SeriesContextMenu
Sourcepub fn set_context(&mut self, symbol: impl Into<String>, price: f64)
pub fn set_context(&mut self, symbol: impl Into<String>, price: f64)
Set symbol and price for dynamic menu items
Sourcepub fn take_action(&mut self) -> SeriesContextMenuAction
pub fn take_action(&mut self) -> SeriesContextMenuAction
Take and consume the last action
Sourcepub fn show_with_shortcuts(
&mut self,
ctx: &Context,
theme: &Theme,
shortcuts: &ShortcutMap,
)
pub fn show_with_shortcuts( &mut self, ctx: &Context, theme: &Theme, shortcuts: &ShortcutMap, )
Show menu hints from the same bindings used by chart input.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SeriesContextMenu
impl RefUnwindSafe for SeriesContextMenu
impl Send for SeriesContextMenu
impl Sync for SeriesContextMenu
impl Unpin for SeriesContextMenu
impl UnsafeUnpin for SeriesContextMenu
impl UnwindSafe for SeriesContextMenu
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