forked from 1b-agent/opencadstudio-upstream
Split large files: ribbon widgets and scene render/selection
- ribbon.rs → ribbon/mod.rs + ribbon/widgets.rs Extracted all rendering helpers, button styles, colour constants, layout constants and dropdown position calculators into widgets.rs. - scene/mod.rs → scene/mod.rs + scene/selection.rs + scene/render.rs Moved SelectionState into selection.rs; moved CameraState, Primitive, shader::Program/Primitive impls, render_style and resolve_pattern into render.rs, reducing mod.rs from 1323 to ~1030 lines. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
1 parent
ed9cbc2092
commit
bdde862597
6 files changed
+1916
-2053
No files matched your search
@@ -0,0 +1,30 @@
|
||||
use iced::time::Instant;
|
||||
use iced::Point;
|
||||
|
||||
/// Mouse / selection interaction state for the viewport.
|
||||
#[derive(Clone, Default)]
|
||||
pub struct SelectionState {
|
||||
pub vp_size: (f32, f32),
|
||||
pub box_anchor: Option<Point>,
|
||||
pub box_current: Option<Point>,
|
||||
pub box_last: Option<(Point, Point)>,
|
||||
pub box_crossing: bool,
|
||||
pub box_last_crossing: bool,
|
||||
pub poly_active: bool,
|
||||
pub poly_points: Vec<Point>,
|
||||
pub poly_crossing: bool,
|
||||
pub poly_last_crossing: bool,
|
||||
pub context_menu: Option<Point>,
|
||||
pub last_move_pos: Option<Point>,
|
||||
pub left_down: bool,
|
||||
pub left_press_pos: Option<Point>,
|
||||
pub left_press_time: Option<Instant>,
|
||||
pub left_dragging: bool,
|
||||
pub right_down: bool,
|
||||
pub right_press_pos: Option<Point>,
|
||||
pub right_dragging: bool,
|
||||
pub right_last_pos: Option<Point>,
|
||||
pub middle_down: bool,
|
||||
pub middle_last_pos: Option<Point>,
|
||||
pub middle_last_press_time: Option<Instant>,
|
||||
}
|
||||
Reference in new issue
Block a user