forked from 1b-agent/opencadstudio-upstream
Each item below was gated by #[allow(dead_code)] and has zero callers across src/ — none of them are part of any public API consumed by external crates (this is a binary, not a library): * modules/insert/underlay_frames.rs + edit_aliases.rs — toolbar stubs whose `tool()` registrars were never wired into the ribbon; the parent mod.rs inlines its own include_bytes! for the SVGs, so the files were orphan dead weight. * ui/snap_popup.rs:snap_marker_color — never called. * ui/ribbon/mod.rs:last_dropdown_cmd — never called. * ui/scale_popup.rs:anno_scale_for_label — never called. * ui/layers.rs:color_name_to_aci — inverse of aci_color_display with zero call sites. * linetypes.rs:name_list — never called. * scene/pipeline/wire_gpu.rs:new_ghost — never called. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
79 lines
3.0 KiB
Rust
79 lines
3.0 KiB
Rust
// Manage module — customization and drawing cleanup tools.
|
|
|
|
mod audit;
|
|
mod cui_export;
|
|
mod cui_import;
|
|
mod find_nonpurgeable;
|
|
mod options;
|
|
mod overkill;
|
|
mod purge;
|
|
mod user_interface;
|
|
|
|
use crate::modules::{CadModule, IconKind, RibbonGroup, RibbonItem};
|
|
|
|
pub struct ManageModule;
|
|
|
|
impl CadModule for ManageModule {
|
|
fn id(&self) -> &'static str {
|
|
"manage"
|
|
}
|
|
fn title(&self) -> &'static str {
|
|
"Manage"
|
|
}
|
|
|
|
fn ribbon_groups(&self) -> Vec<RibbonGroup> {
|
|
vec![
|
|
// ── Customization ─────────────────────────────────────────────────
|
|
RibbonGroup {
|
|
title: "Customization",
|
|
tools: vec![
|
|
RibbonItem::LargeTool(user_interface::tool()),
|
|
RibbonItem::LargeTool(crate::modules::ToolDef {
|
|
id: "TOOLPALETTES",
|
|
label: "Tool\nPalettes",
|
|
icon: IconKind::Svg(include_bytes!(
|
|
"../../../assets/icons/tool_palettes.svg"
|
|
)),
|
|
event: crate::modules::ModuleEvent::Command("TOOLPALETTES".to_string()),
|
|
}),
|
|
RibbonItem::Tool(cui_import::tool()),
|
|
RibbonItem::Tool(cui_export::tool()),
|
|
RibbonItem::Dropdown {
|
|
id: "ALIASEDIT_DROPDOWN",
|
|
icon: IconKind::Svg(include_bytes!(
|
|
"../../../assets/icons/edit_aliases.svg"
|
|
)),
|
|
items: vec![
|
|
(
|
|
"ALIASEDIT",
|
|
"Edit Aliases",
|
|
IconKind::Svg(include_bytes!(
|
|
"../../../assets/icons/edit_aliases.svg"
|
|
)),
|
|
),
|
|
(
|
|
"CUILOAD",
|
|
"Load Partial CUI",
|
|
IconKind::Svg(include_bytes!(
|
|
"../../../assets/icons/cui_import.svg"
|
|
)),
|
|
),
|
|
],
|
|
default: "ALIASEDIT",
|
|
},
|
|
],
|
|
},
|
|
// ── Cleanup ───────────────────────────────────────────────────────
|
|
RibbonGroup {
|
|
title: "Cleanup",
|
|
tools: vec![
|
|
RibbonItem::LargeTool(find_nonpurgeable::tool()),
|
|
RibbonItem::Tool(purge::tool()),
|
|
RibbonItem::Tool(overkill::tool()),
|
|
RibbonItem::Tool(audit::tool()),
|
|
],
|
|
},
|
|
]
|
|
}
|
|
}
|