#[non_exhaustive]pub enum RightClickTarget {
Element {
id: ChartElementId,
bar_idx: usize,
pos: Pos2,
price: f64,
},
Drawing {
drawing_id: usize,
pos: Pos2,
},
Background {
pos: Pos2,
price: f64,
},
}Expand description
The object a right-click landed on, with the data needed to position and populate a context menu.
Captured during Chart::show when the user
right-clicks inside the chart area. Drain it once per frame with
Chart::take_right_click. Right-clicking also selects the hit object (the
same as a left click) so selection handles and the menu stay consistent.
This type intentionally carries no ui-feature types, so the core chart can
surface right-clicks even when built without the ui feature; the host
(or ChartMenus with the ui feature) maps it to a concrete menu.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Element
A series or overlay/pane indicator line was hit.
Fields
id: ChartElementIdThe selected chart element (series or indicator).
pos: Pos2Screen position of the click (menu anchor).
Drawing
A drawing object was hit. The drawing is identified by its drawing id.
Fields
pos: Pos2Screen position of the click (menu anchor).
Background
Empty chart area was hit (no series, indicator, or drawing).
Trait Implementations§
Source§impl Clone for RightClickTarget
impl Clone for RightClickTarget
Source§fn clone(&self) -> RightClickTarget
fn clone(&self) -> RightClickTarget
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for RightClickTarget
Source§impl Debug for RightClickTarget
impl Debug for RightClickTarget
Source§impl PartialEq for RightClickTarget
impl PartialEq for RightClickTarget
impl StructuralPartialEq for RightClickTarget
Auto Trait Implementations§
impl Freeze for RightClickTarget
impl RefUnwindSafe for RightClickTarget
impl Send for RightClickTarget
impl Sync for RightClickTarget
impl Unpin for RightClickTarget
impl UnsafeUnpin for RightClickTarget
impl UnwindSafe for RightClickTarget
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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