pub struct DrawingManagerOptions {
pub default_color: Option<[u8; 4]>,
pub snap_to_price: bool,
pub snap_to_time: bool,
pub snap_distance: f32,
pub magnet_mode: bool,
pub magnet_distance: f32,
pub strong_magnet: bool,
pub snap_to_indicators: bool,
pub handle_config: HandleConfig,
}Expand description
Configuration options for the DrawingManager.
Controls default colors, snapping behavior, magnet mode thresholds, and selection handle appearance.
Fields§
§default_color: Option<[u8; 4]>Line colour every new drawing takes instead of its tool’s own, as RGBA bytes. None
(the default) keeps each tool’s colour; a default saved for a tool wins over both.
snap_to_price: boolEnable snap-to-price (Y-axis snapping to OHLC levels).
snap_to_time: boolEnable snap-to-time (X-axis snapping to candle timestamps).
snap_distance: f32Snap distance threshold in screen pixels.
magnet_mode: boolEnable magnet mode (snap to existing drawing anchor points).
magnet_distance: f32Magnet snap distance threshold in screen pixels.
strong_magnet: boolSnap to the nearest OHLC value of the bar under the pointer regardless of distance.
Requires magnet_mode; false retains the pixel threshold and nearby overlay targets.
snap_to_indicators: boolInclude visible study plots in magnet targets. Independent of OHLC and drawing anchors.
handle_config: HandleConfigConfiguration for selection handle appearance and hit testing.
Trait Implementations§
Source§impl Clone for DrawingManagerOptions
impl Clone for DrawingManagerOptions
Source§fn clone(&self) -> DrawingManagerOptions
fn clone(&self) -> DrawingManagerOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DrawingManagerOptions
impl Debug for DrawingManagerOptions
Auto Trait Implementations§
impl Freeze for DrawingManagerOptions
impl RefUnwindSafe for DrawingManagerOptions
impl Send for DrawingManagerOptions
impl Sync for DrawingManagerOptions
impl Unpin for DrawingManagerOptions
impl UnsafeUnpin for DrawingManagerOptions
impl UnwindSafe for DrawingManagerOptions
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