1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//! Business logic services for the drawing system.
//!
//! Each service encapsulates a single concern and can be used independently or
//! composed via [`DrawingManager`](crate::drawings::DrawingManager). This
//! decomposition makes the code testable in isolation and allows custom
//! integrations to pick only the services they need.
//!
//! # Services
//!
//! | Service | Responsibility |
//! |---|---|
//! | `SelectionService` | Single and multi-select for drawings |
//! | `HistoryService` | Undo/redo via the command pattern |
//! | `SnapService` | Magnet mode, snap-to-price, snap-to-time |
//! | `HandleService` | Selection handle discovery, hit testing, dragging, rendering |
//! | `DrawingInteraction` | Self-contained hit testing + selection + handle dragging |
//! | `ZOrderService` | Bring-to-front / send-to-back layer ordering |
//!
//! # Usage
//!
//! ```ignore
//! use egui_charts::drawings::services::{
//! SelectionService, HistoryService, SnapService, ZOrderService,
//! };
//!
//! // Selection
//! let mut selection = SelectionService::new();
//! selection.select(drawing_id);
//! selection.toggle(other_id); // Ctrl+click toggle
//!
//! // Undo/redo
//! let mut history = HistoryService::new();
//! history.push_add(drawing.clone());
//! history.undo(&mut drawings);
//!
//! // Snapping
//! let snap = SnapService::new();
//! let snapped = snap.snap_point(cursor_pos, &snap_targets);
//!
//! // Z-ordering
//! ZOrderService::bring_to_front(&mut drawings, selected_id);
//! ZOrderService::sort_by_z_order(&mut drawings);
//! ```
pub use ;
pub use ;
pub use ;
pub use SelectionService;
pub use ;
pub use ZOrderService;