pub struct DrawingToolbarDomainState {
pub sel_tool: Option<DrawingToolType>,
pub magnet_mode: bool,
pub magnet_type: MagnetType,
pub snap_to_indicators: bool,
pub current_cursor_type: CursorType,
pub eraser_mode_enabled: bool,
pub stay_in_drawing_mode: bool,
pub drawing_color: [u8; 4],
}Expand description
Drawing and cursor choices shared by the host and drawing toolbar.
Copy host choices into the toolbar before showing it, then apply its returned actions to the chart and host state.
Fields§
§sel_tool: Option<DrawingToolType>The chart’s active drawing tool, or None after construction finishes.
magnet_mode: boolWhether snapping is enabled.
magnet_type: MagnetTypeThe snapping strength, retained while snapping is off.
snap_to_indicators: boolWhether magnet targets include visible study plots.
current_cursor_type: CursorTypeThe chart cursor used while the eraser is off.
eraser_mode_enabled: boolWhether the chart is erasing drawings.
stay_in_drawing_mode: boolWhether the active drawing tool remains selected after construction.
drawing_color: [u8; 4]Default colour for new drawings, in straight RGBA.
Trait Implementations§
Source§impl Clone for DrawingToolbarDomainState
impl Clone for DrawingToolbarDomainState
Source§fn clone(&self) -> DrawingToolbarDomainState
fn clone(&self) -> DrawingToolbarDomainState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DrawingToolbarDomainState
impl RefUnwindSafe for DrawingToolbarDomainState
impl Send for DrawingToolbarDomainState
impl Sync for DrawingToolbarDomainState
impl Unpin for DrawingToolbarDomainState
impl UnsafeUnpin for DrawingToolbarDomainState
impl UnwindSafe for DrawingToolbarDomainState
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> 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> ⓘ
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