#[non_exhaustive]pub enum DrawingToolType {
Show 98 variants
CrossCursor,
DotCursor,
ArrowCursor,
Eraser,
TrendLine,
Ray,
InfoLine,
ExtendedLine,
HorizontalLine,
HorizontalRay,
VerticalLine,
CrossLine,
TrendAngle,
ParallelChannel,
RegressionTrend,
FlatTopBottom,
DisjointChannel,
Pitchfork,
SchiffPitchfork,
ModifiedSchiffPitchfork,
InsidePitchfork,
FibonacciRetracement,
FibonacciExtension,
FibonacciChannel,
FibonacciTimeZones,
FibonacciSpeedFan,
TrendBasedFibTime,
FibonacciCircles,
FibonacciSpiral,
FibonacciSpeedResistanceArcs,
FibonacciWedge,
Pitchfan,
GannBox,
GannSquare,
GannFixed,
GannFan,
XABCDPattern,
CypherPattern,
HeadAndShoulders,
ABCDPattern,
TrianglePattern,
ThreeDrivesPattern,
ElliottImpulse,
ElliottCorrection,
ElliottTriangle,
ElliottDoubleCombo,
ElliottTripleCombo,
CyclicLines,
TimeCycles,
SineLine,
LongPos,
ShortPos,
Forecast,
BarsPattern,
GhostFeed,
ProjectionTool,
AnchoredVWAP,
FixedRangeVolumeProfile,
AnchoredVolumeProfile,
Measure,
PriceRange,
DateRange,
DateAndPriceRange,
Brush,
Highlighter,
ArrowMarker,
Arrow,
ArrowMarkUp,
ArrowMarkDown,
ArrowMarkLeft,
ArrowMarkRight,
Rect,
RotatedRect,
Path,
Circle,
Ellipse,
Polyline,
Triangle,
Sector,
Arc,
Curve,
DoubleCurve,
TextLabel,
AnchoredText,
Note,
PriceNote,
AnchoredNote,
Table,
Callout,
Comment,
PriceLabel,
Signpost,
FlagNote,
Image,
Tweet,
Idea,
FontIcon,
Sticker,
}Expand description
Enumeration of all drawing tool types available in the charting engine.
Identifies a drawing’s rendering behavior, interaction mode, required point
count and toolbar placement. Use categories and
by_category to build a categorized picker.
§Interaction modes
interaction_mode describes how a tool captures
points; required_points gives its completion count,
or None for tools without a fixed count.
§Parsing
DrawingToolType implements FromStr with flexible
case-insensitive matching, including common abbreviations:
let tool: DrawingToolType = "fib".parse().unwrap();
assert_eq!(tool, DrawingToolType::FibonacciRetracement);Serde writes and reads the variant name ("FibonacciRetracement"), which
stays stable when display names change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CrossCursor
Crosshair cursor overlay – not a drawing, provides precision targeting.
DotCursor
Dot cursor overlay – minimal cursor for clean chart views.
ArrowCursor
Standard arrow/pointer cursor.
Eraser
Eraser tool – click on drawings to delete them.
TrendLine
A line segment between two points (click-click interaction).
Ray
A ray starting at a point and extending infinitely in one direction.
InfoLine
An info line showing distance, angle, and bar count between two points.
ExtendedLine
A line that extends infinitely in both directions through two points.
HorizontalLine
A horizontal line at a specific price level, extending across the chart.
HorizontalRay
A horizontal ray extending from a point to the right edge of the chart.
VerticalLine
A vertical line at a specific bar/time, extending top to bottom.
CrossLine
Combined horizontal + vertical crosshair lines at a single point.
TrendAngle
A trend line that displays the angle of the line in degrees.
ParallelChannel
Two parallel lines defining a price channel (3-point: two on baseline, one for width).
RegressionTrend
Linear regression channel with standard deviation bands.
FlatTopBottom
A trend line through the first two anchors and a horizontal line at the third anchor’s price.
DisjointChannel
Two lines over the first two anchors’ bars with opposite slopes; the third anchor positions the mirrored line.
Pitchfork
Andrews’ Pitchfork – median line with parallel support/resistance (3-point).
SchiffPitchfork
Schiff Pitchfork variant with adjusted median line start point.
ModifiedSchiffPitchfork
Modified Schiff Pitchfork with further median line adjustment.
InsidePitchfork
Inside Pitchfork – median line drawn inside the price action.
FibonacciRetracement
Fibonacci retracement levels between two price points (drag-to-draw).
FibonacciExtension
Trend-based Fibonacci extension projecting levels beyond the measured move.
FibonacciChannel
Fibonacci channel with parallel lines at Fibonacci ratios.
FibonacciTimeZones
Vertical time zones at Fibonacci number intervals from a start point.
FibonacciSpeedFan
Fibonacci speed/resistance fan with diagonal lines at Fibonacci angles.
TrendBasedFibTime
Trend-based Fibonacci time projections using price swing timing.
FibonacciCircles
Concentric circles at Fibonacci ratio radii.
FibonacciSpiral
Golden spiral (logarithmic spiral based on the golden ratio).
FibonacciSpeedResistanceArcs
Arcs at Fibonacci speed/resistance levels.
FibonacciWedge
Fibonacci wedge – converging lines at Fibonacci angles.
Pitchfan
Pitch fan – fan lines at specific angle ratios from a pivot point.
GannBox
Gann Box – a grid of price/time squares using Gann ratios.
GannSquare
Gann Square – W.D. Gann’s square of nine overlay.
GannFixed
Gann Square Fixed – fixed-size Gann grid.
GannFan
Gann Fan – fan lines at standard Gann angles (1x1, 1x2, 2x1, etc.).
XABCDPattern
XABCD harmonic pattern (5-point: Gartley, Butterfly, Bat, Crab, etc.).
CypherPattern
Cypher harmonic pattern (5-point variant with specific ratio rules).
HeadAndShoulders
Head and Shoulders reversal pattern (7-point).
ABCDPattern
ABCD harmonic pattern (4-point geometric price pattern).
TrianglePattern
Triangle chart pattern (ascending, descending, or symmetrical; 7-point).
ThreeDrivesPattern
Three Drives harmonic pattern (6-point repeating impulse pattern).
ElliottImpulse
Elliott impulse wave: a start point and waves 1 to 5 (6 points).
ElliottCorrection
Elliott correction wave: a start point and waves A, B and C (4 points).
ElliottTriangle
Elliott triangle: a start point and waves A to E (6 points).
ElliottDoubleCombo
Elliott double combination: a start point and waves W, X and Y (4 points).
ElliottTripleCombo
Elliott triple combination: a start point and waves W, X, Y, X and Z (6 points).
CyclicLines
Evenly-spaced vertical lines highlighting cyclic time intervals.
TimeCycles
Circular time cycle arcs projected from a start point.
SineLine
Sine wave curve between two points, for cyclical analysis.
LongPos
Long position risk/reward tool showing entry, stop loss, and take profit.
ShortPos
Short position risk/reward tool showing entry, stop loss, and take profit.
Forecast
Forecast/prediction zone projected from two points.
BarsPattern
Bars pattern – copy and project a price pattern forward in time.
GhostFeed
Ghost feed – translucent historical price overlay for comparison.
ProjectionTool
Generic projection tool for price/time forecasting.
AnchoredVWAP
Anchored VWAP (Volume-Weighted Average Price) from a user-selected bar.
FixedRangeVolumeProfile
Fixed-range volume profile histogram between two time points.
AnchoredVolumeProfile
Anchored volume profile starting from a user-selected bar.
Measure
Ruler/measure tool showing distance, bars, and percentage between two points.
PriceRange
Price range highlight (vertical span at a price zone).
DateRange
Date range highlight (horizontal span across a time period).
DateAndPriceRange
Combined date-and-price range rectangle.
Brush
Freehand drawing brush (continuous-draw interaction). Drawings saved with the former
Paintbrush tool, which drew the same, load as brushes.
Highlighter
Semi-transparent highlighter brush for marking chart regions.
ArrowMarker
Two-point directional arrow marker.
Arrow
Two-point arrow with customizable head styles.
ArrowMarkUp
Upward arrow marker (single-click, bullish signal).
ArrowMarkDown
Downward arrow marker (single-click, bearish signal).
ArrowMarkLeft
Leftward arrow mark placed with one click at its tip.
ArrowMarkRight
Rightward arrow mark placed with one click at its tip.
Rect
Axis-aligned rectangle defined by two corner points.
RotatedRect
Rectangle that can be rotated to any angle.
Path
Multi-segment path ending in an arrowhead.
Circle
Circle defined by center and edge point.
Ellipse
Ellipse defined by bounding rectangle corners.
Polyline
Open polyline with unlimited points (double-click to finish).
Triangle
Triangle defined by three corner points.
Sector
Circular sector: center, radius endpoint, then end ray, swept clockwise on screen.
Arc
Circular arc between two points with adjustable curvature.
Curve
Quadratic Bezier curve (3 control points: start, control, end).
DoubleCurve
Cubic Bezier curve (4 control points).
TextLabel
Simple text label placed on the chart.
AnchoredText
Text label anchored to screen position (doesn’t move with pan).
Note
Note: a text label joined to the bar and price it annotates by a thin line.
PriceNote
Price note: the anchor’s price and any text in a solid label, joined to the anchor by a thin line.
AnchoredNote
Pin: a marker on a bar and price, with its text in a popup while selected.
Table
Data table overlay on the chart.
Callout
Callout with arrow pointing to a chart location.
Comment
Comment: its text in one bubble with a corner on the anchor.
PriceLabel
Price label: the anchor’s price in a badge beside the point, with a pointer to it.
Signpost
Signpost: a label on a thin pole above or below its bar.
FlagNote
Flag/mark note at a specific chart location.
Image
Image embed identifier; built-in rendering draws a frame without loading an image.
Tweet
Social post embed identifier; built-in rendering draws a card without fetching content.
Idea
Idea embed identifier; built-in rendering draws a badge without fetching content.
FontIcon
Bundled vector icon or Unicode emoji placed at a single point.
Sticker
Bundled illustrated sticker placed with one click, sized by Drawing::font_size.
Implementations§
Source§impl DrawingToolType
impl DrawingToolType
Sourcepub fn is_cursor(&self) -> bool
pub fn is_cursor(&self) -> bool
Returns true if this tool is a cursor/utility tool rather than a
drawing tool.
Cursor tools (CrossCursor, DotCursor, ArrowCursor, Eraser)
do not create Drawing objects. They modify
the cursor appearance or provide utility functions (e.g., erasing).
Sourcepub fn supports_fill(&self) -> bool
pub fn supports_fill(&self) -> bool
Whether the renderer paints a filled area that takes the drawing’s fill colour.
Sourcepub fn supports_extend(&self) -> bool
pub fn supports_extend(&self) -> bool
Whether the drawing’s left and right extension flags change its geometry.
Sourcepub fn supports_text(&self) -> bool
pub fn supports_text(&self) -> bool
Whether the renderer displays the drawing’s editable text.
Sourcepub fn supports_line_ends(&self) -> bool
pub fn supports_line_ends(&self) -> bool
Whether the renderer draws the drawing’s line start and line end styles.
Sourcepub fn supports_middle_line(&self) -> bool
pub fn supports_middle_line(&self) -> bool
Whether the renderer draws a middle line when the drawing’s middle line flag is on.
Sourcepub fn edits_text_inline(&self) -> bool
pub fn edits_text_inline(&self) -> bool
Whether a double click edits the drawing’s text in place instead of opening its settings.
Sourcepub fn interaction_mode(&self) -> DrawingInteractionMode
pub fn interaction_mode(&self) -> DrawingInteractionMode
Returns the DrawingInteractionMode that governs how mouse input is
captured when creating a drawing of this type.
See DrawingInteractionMode for details on each mode.
Sourcepub fn required_points(&self) -> Option<usize>
pub fn required_points(&self) -> Option<usize>
Returns the number of points placed to complete a drawing of this type, or None for
tools with no fixed count (Polyline, Path, Brush, cursors). Some tools store more
anchors than they are placed with: a long or short position adds its target and stop,
three anchors in all, and a curve and a double curve add their controls between their
ends, three and four. A bars pattern adds its copy anchor, three anchors in all.
| Mode | Typical count |
|---|---|
SingleClick | 1 |
ClickClick / DragToDraw | 2 |
MultiPoint | 2 to 7 depending on tool |
ContinuousDraw | None (unlimited) |
NotDrawing | None |
Source§impl DrawingToolType
impl DrawingToolType
Sourcepub fn by_category(category: &str) -> Vec<Self>
pub fn by_category(category: &str) -> Vec<Self>
Returns all tools belonging to the given category (case-insensitive).
Valid category names: "cursors", "lines", "channels", "pitchforks",
"fibonacci", "gann", "patterns", "elliott", "cycles",
"projection", "volume", "measurers", "brushes", "arrows",
"shapes", "annotations", "content", "icons".
Returns an empty vector for an unknown category name.
Sourcepub fn categories() -> &'static [&'static str]
pub fn categories() -> &'static [&'static str]
Returns the names of all 18 tool categories in display order.
These are the finer command-list groups, not the toolbar menu groups
defined by drawings::categories.
Sourcepub fn all() -> &'static [Self]
pub fn all() -> &'static [Self]
Returns a static slice of all tool types in canonical order.
The order matches the category groupings: cursors, lines, channels, pitchforks, fibonacci, gann, patterns, elliott, cycles, projection, volume, measurers, brushes, arrows, shapes, annotations, content, icons.
Trait Implementations§
Source§impl Clone for DrawingToolType
impl Clone for DrawingToolType
Source§fn clone(&self) -> DrawingToolType
fn clone(&self) -> DrawingToolType
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 DrawingToolType
Source§impl Debug for DrawingToolType
impl Debug for DrawingToolType
Source§impl<'de> Deserialize<'de> for DrawingToolType
impl<'de> Deserialize<'de> for DrawingToolType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for DrawingToolType
impl Display for DrawingToolType
impl Eq for DrawingToolType
Source§impl FromStr for DrawingToolType
impl FromStr for DrawingToolType
Source§impl Hash for DrawingToolType
impl Hash for DrawingToolType
Source§impl PartialEq for DrawingToolType
impl PartialEq for DrawingToolType
Source§impl Serialize for DrawingToolType
impl Serialize for DrawingToolType
impl StructuralPartialEq for DrawingToolType
Auto Trait Implementations§
impl Freeze for DrawingToolType
impl RefUnwindSafe for DrawingToolType
impl Send for DrawingToolType
impl Sync for DrawingToolType
impl Unpin for DrawingToolType
impl UnsafeUnpin for DrawingToolType
impl UnwindSafe for DrawingToolType
Blanket Implementations§
impl<T> AsId for T
impl<T> AsIdSalt for T
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
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