forked from 1b-agent/opencadstudio-upstream
refactor(scene): group modules into role-based subfolders
Move the 30 flat modules under src/scene/ into six folders by role: convert (entity→geometry), text (fonts/shaping), model (render models), pick (hit-test/selection/grips/xclip), view (camera/transform/render), cache (block + property caches). pipeline/ is unchanged. Full path migration — all `scene::X` references become `scene::<group>::X`, no compatibility re-exports. render.rs items that were `pub(super)` (parent was scene) become `pub(in crate::scene)` to keep their original scene-wide visibility. No behavior change; build and tests are green. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
cd048165a9
commit
7fe7e0230d
160 files changed
+732
-715
No files matched your search
+2
-2
@@ -6,7 +6,7 @@ use iced::widget::canvas;
|
||||
use iced::{Color, Element, Length, Point, Size, Theme};
|
||||
|
||||
use crate::app::Message;
|
||||
use crate::scene::object::GripShape;
|
||||
use crate::scene::model::object::GripShape;
|
||||
use crate::scene::SelectionState;
|
||||
|
||||
/// Half-size of the crosshair center square in screen pixels (square = SQ*2 × SQ*2).
|
||||
@@ -421,7 +421,7 @@ impl canvas::Program<Message> for SelectionCanvas {
|
||||
// ── Grip markers ──────────────────────────────────────────────────
|
||||
for grip in &self.grips {
|
||||
let sp = grip.pos;
|
||||
let h = crate::scene::grip::GRIP_HALF_PX;
|
||||
let h = crate::scene::pick::grip::GRIP_HALF_PX;
|
||||
let path = match grip.shape {
|
||||
GripShape::Square => canvas::Path::rectangle(
|
||||
Point::new(sp.x - h, sp.y - h),
|
||||
|
||||
@@ -22,7 +22,7 @@ const COMBO_PAD_V: f32 = (ROW_H - FONT_SZ * 1.3 - 2.0) / 2.0; // fills combo to
|
||||
const SWATCH_SZ: f32 = ROW_H * 0.54; // ≈14 px color swatch
|
||||
|
||||
use crate::app::Message;
|
||||
use crate::scene::object::{PropSection, PropValue};
|
||||
use crate::scene::model::object::{PropSection, PropValue};
|
||||
|
||||
const VARIES_LABEL: &str = "*VARIES*";
|
||||
|
||||
@@ -146,7 +146,7 @@ impl Default for PropertiesPanel {
|
||||
layer_combo: combo_box::State::new(vec![]),
|
||||
lineweight_combo: combo_box::State::new(lw_options()),
|
||||
linetype_combo: combo_box::State::new(vec![]),
|
||||
hatch_pattern_combo: combo_box::State::new(crate::scene::hatch_patterns::names()),
|
||||
hatch_pattern_combo: combo_box::State::new(crate::scene::model::hatch_patterns::names()),
|
||||
edit_buf: HashMap::default(),
|
||||
color_picker_open: false,
|
||||
color_palette_open: false,
|
||||
|
||||
+1
-1
@@ -256,7 +256,7 @@ pub fn view_window<'a>(v: TextStyleView<'a>) -> Element<'a, Message> {
|
||||
});
|
||||
|
||||
// ── System TrueType fonts (read from the user's machine via fontdb) ──
|
||||
let ttf_items: Vec<Element<'_, Message>> = crate::scene::sysfont::families()
|
||||
let ttf_items: Vec<Element<'_, Message>> = crate::scene::text::sysfont::families()
|
||||
.iter()
|
||||
.map(|fam| {
|
||||
let is_sel = ttf_buf.eq_ignore_ascii_case(fam);
|
||||
|
||||
Reference in new issue
Block a user