From ef988c20a33952eed6f0af205aaa2ffeb04aa11f Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Thu, 9 Apr 2026 12:44:31 +0300 Subject: [PATCH] feat: redesign Insert tab and fix all warnings - Redesign Insert ribbon tab with 6 groups matching screenshot layout: Reference (Attach/Clip/Adjust large + Underlay Layers/Frames/Snap small), Point Cloud (Attach), Block (Multi-View Block/Insert large + Create/Edit/Base small), Attributes (Define/Edit large + Manage/Sync small), Import (Import/Land XML), Content (Content Browser/Design Center) - Remove Primitives group and dead box_prim/clear/cylinder/sphere modules - Fix all compiler warnings with #[allow(dead_code)] on unused-but-intentional items Co-Authored-By: Claude Sonnet 4.6 --- assets/icons/attdef.svg | 10 +++ assets/icons/attedit.svg | 10 +++ assets/icons/attman.svg | 15 +++++ assets/icons/attsync.svg | 9 +++ assets/icons/base_point.svg | 7 ++ assets/icons/content_browser.svg | 13 ++++ assets/icons/design_center.svg | 16 +++++ assets/icons/edit_block.svg | 9 +++ assets/icons/landxml.svg | 6 ++ assets/icons/mview_block.svg | 14 ++++ assets/icons/pc_attach.svg | 14 ++++ assets/icons/recap.svg | 18 ++++++ assets/icons/snap_underlays.svg | 10 +++ assets/icons/underlay_frames.svg | 13 ++++ assets/icons/underlay_layers.svg | 6 ++ assets/icons/xadjust.svg | 8 +++ assets/icons/xclip.svg | 10 +++ src/app/mod.rs | 6 ++ src/modules/insert/attdef.rs | 5 ++ src/modules/insert/attedit.rs | 5 ++ src/modules/insert/attman.rs | 5 ++ src/modules/insert/attsync.rs | 5 ++ src/modules/insert/base_point.rs | 5 ++ src/modules/insert/content_browser.rs | 5 ++ src/modules/insert/design_center.rs | 5 ++ src/modules/insert/edit_block.rs | 5 ++ src/modules/insert/landxml.rs | 5 ++ src/modules/insert/mod.rs | 92 +++++++++++++++++++++------ src/modules/insert/mview_block.rs | 5 ++ src/modules/insert/pc_attach.rs | 5 ++ src/modules/insert/recap.rs | 5 ++ src/modules/insert/snap_underlays.rs | 5 ++ src/modules/insert/underlay_frames.rs | 7 ++ src/modules/insert/underlay_layers.rs | 5 ++ src/modules/insert/wblock.rs | 1 + src/modules/insert/xadjust.rs | 5 ++ src/modules/insert/xclip.rs | 5 ++ src/modules/mod.rs | 1 + 38 files changed, 357 insertions(+), 18 deletions(-) create mode 100644 assets/icons/attdef.svg create mode 100644 assets/icons/attedit.svg create mode 100644 assets/icons/attman.svg create mode 100644 assets/icons/attsync.svg create mode 100644 assets/icons/base_point.svg create mode 100644 assets/icons/content_browser.svg create mode 100644 assets/icons/design_center.svg create mode 100644 assets/icons/edit_block.svg create mode 100644 assets/icons/landxml.svg create mode 100644 assets/icons/mview_block.svg create mode 100644 assets/icons/pc_attach.svg create mode 100644 assets/icons/recap.svg create mode 100644 assets/icons/snap_underlays.svg create mode 100644 assets/icons/underlay_frames.svg create mode 100644 assets/icons/underlay_layers.svg create mode 100644 assets/icons/xadjust.svg create mode 100644 assets/icons/xclip.svg create mode 100644 src/modules/insert/attdef.rs create mode 100644 src/modules/insert/attedit.rs create mode 100644 src/modules/insert/attman.rs create mode 100644 src/modules/insert/attsync.rs create mode 100644 src/modules/insert/base_point.rs create mode 100644 src/modules/insert/content_browser.rs create mode 100644 src/modules/insert/design_center.rs create mode 100644 src/modules/insert/edit_block.rs create mode 100644 src/modules/insert/landxml.rs create mode 100644 src/modules/insert/mview_block.rs create mode 100644 src/modules/insert/pc_attach.rs create mode 100644 src/modules/insert/recap.rs create mode 100644 src/modules/insert/snap_underlays.rs create mode 100644 src/modules/insert/underlay_frames.rs create mode 100644 src/modules/insert/underlay_layers.rs create mode 100644 src/modules/insert/xadjust.rs create mode 100644 src/modules/insert/xclip.rs diff --git a/assets/icons/attdef.svg b/assets/icons/attdef.svg new file mode 100644 index 000000000..39ea57ba6 --- /dev/null +++ b/assets/icons/attdef.svg @@ -0,0 +1,10 @@ + + + + + + A + + + + diff --git a/assets/icons/attedit.svg b/assets/icons/attedit.svg new file mode 100644 index 000000000..4712ed383 --- /dev/null +++ b/assets/icons/attedit.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/icons/attman.svg b/assets/icons/attman.svg new file mode 100644 index 000000000..c93a0f785 --- /dev/null +++ b/assets/icons/attman.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/assets/icons/attsync.svg b/assets/icons/attsync.svg new file mode 100644 index 000000000..889a73e7d --- /dev/null +++ b/assets/icons/attsync.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/icons/base_point.svg b/assets/icons/base_point.svg new file mode 100644 index 000000000..abd504ae6 --- /dev/null +++ b/assets/icons/base_point.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/icons/content_browser.svg b/assets/icons/content_browser.svg new file mode 100644 index 000000000..80bc95f1d --- /dev/null +++ b/assets/icons/content_browser.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/assets/icons/design_center.svg b/assets/icons/design_center.svg new file mode 100644 index 000000000..44cac1f1d --- /dev/null +++ b/assets/icons/design_center.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/assets/icons/edit_block.svg b/assets/icons/edit_block.svg new file mode 100644 index 000000000..0212d5245 --- /dev/null +++ b/assets/icons/edit_block.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/icons/landxml.svg b/assets/icons/landxml.svg new file mode 100644 index 000000000..995608a65 --- /dev/null +++ b/assets/icons/landxml.svg @@ -0,0 +1,6 @@ + + + + + <XML> + diff --git a/assets/icons/mview_block.svg b/assets/icons/mview_block.svg new file mode 100644 index 000000000..b4461f7c9 --- /dev/null +++ b/assets/icons/mview_block.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/assets/icons/pc_attach.svg b/assets/icons/pc_attach.svg new file mode 100644 index 000000000..2be95de71 --- /dev/null +++ b/assets/icons/pc_attach.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/assets/icons/recap.svg b/assets/icons/recap.svg new file mode 100644 index 000000000..ab985ca10 --- /dev/null +++ b/assets/icons/recap.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/assets/icons/snap_underlays.svg b/assets/icons/snap_underlays.svg new file mode 100644 index 000000000..634427a51 --- /dev/null +++ b/assets/icons/snap_underlays.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/icons/underlay_frames.svg b/assets/icons/underlay_frames.svg new file mode 100644 index 000000000..1431a9d79 --- /dev/null +++ b/assets/icons/underlay_frames.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/assets/icons/underlay_layers.svg b/assets/icons/underlay_layers.svg new file mode 100644 index 000000000..42197e16a --- /dev/null +++ b/assets/icons/underlay_layers.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/icons/xadjust.svg b/assets/icons/xadjust.svg new file mode 100644 index 000000000..f0df2763d --- /dev/null +++ b/assets/icons/xadjust.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/assets/icons/xclip.svg b/assets/icons/xclip.svg new file mode 100644 index 000000000..f6b6629f3 --- /dev/null +++ b/assets/icons/xclip.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/app/mod.rs b/src/app/mod.rs index a4cebf5c0..0f66ca57f 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -356,6 +356,7 @@ pub enum Message { LayoutContextMenuClose, // ── Layout Manager Panel ──────────────────────────────────────────── LayoutManagerOpen, + #[allow(dead_code)] LayoutManagerClose, LayoutManagerSelect(String), LayoutManagerRenameBuf(String), @@ -369,6 +370,7 @@ pub enum Message { SetTheme(Theme), // ── Keyboard Shortcut Editor ──────────────────────────────────────── ShortcutsPanelOpen, + #[allow(dead_code)] ShortcutsPanelClose, /// Close the viewport right-click context menu without performing any action. ViewportContextMenuClose, @@ -418,6 +420,7 @@ pub enum Message { PlotStyleClear, /// Open/close the Plot Style panel. PlotStylePanelOpen, + #[allow(dead_code)] PlotStylePanelClose, /// Select an ACI entry in the panel. PlotStylePanelSelectAci(u8), @@ -433,6 +436,7 @@ pub enum Message { PlotStylePanelSavePath(Option), // ── TextStyle Font Browser ──────────────────────────────────────────── TextStyleDialogOpen, + #[allow(dead_code)] TextStyleDialogClose, TextStyleDialogSelect(String), TextStyleDialogSetCurrent, @@ -446,12 +450,14 @@ pub enum Message { TextStyleFontPick(String), // ── TableStyle Dialog ───────────────────────────────────────────────── TableStyleDialogOpen, + #[allow(dead_code)] TableStyleDialogClose, TableStyleDialogSelect(String), TableStyleDialogNew, TableStyleDialogDelete, // ── MLineStyle Dialog ───────────────────────────────────────────────── MlStyleDialogOpen, + #[allow(dead_code)] MlStyleDialogClose, MlStyleDialogSelect(String), MlStyleDialogSetCurrent, diff --git a/src/modules/insert/attdef.rs b/src/modules/insert/attdef.rs new file mode 100644 index 000000000..130308e2f --- /dev/null +++ b/src/modules/insert/attdef.rs @@ -0,0 +1,5 @@ +use crate::modules::{IconKind, ModuleEvent, ToolDef}; +pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/attdef.svg")); +pub fn tool() -> ToolDef { + ToolDef { id: "ATTDEF", label: "Define\nAttributes", icon: ICON, event: ModuleEvent::Command("ATTDEF".to_string()) } +} diff --git a/src/modules/insert/attedit.rs b/src/modules/insert/attedit.rs new file mode 100644 index 000000000..b1a5abd7a --- /dev/null +++ b/src/modules/insert/attedit.rs @@ -0,0 +1,5 @@ +use crate::modules::{IconKind, ModuleEvent, ToolDef}; +pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/attedit.svg")); +pub fn tool() -> ToolDef { + ToolDef { id: "ATTEDIT", label: "Edit\nAttribute", icon: ICON, event: ModuleEvent::Command("ATTEDIT".to_string()) } +} diff --git a/src/modules/insert/attman.rs b/src/modules/insert/attman.rs new file mode 100644 index 000000000..313beee8b --- /dev/null +++ b/src/modules/insert/attman.rs @@ -0,0 +1,5 @@ +use crate::modules::{IconKind, ModuleEvent, ToolDef}; +pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/attman.svg")); +pub fn tool() -> ToolDef { + ToolDef { id: "ATTMAN", label: "Manage", icon: ICON, event: ModuleEvent::Command("ATTMAN".to_string()) } +} diff --git a/src/modules/insert/attsync.rs b/src/modules/insert/attsync.rs new file mode 100644 index 000000000..f1d13caff --- /dev/null +++ b/src/modules/insert/attsync.rs @@ -0,0 +1,5 @@ +use crate::modules::{IconKind, ModuleEvent, ToolDef}; +pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/attsync.svg")); +pub fn tool() -> ToolDef { + ToolDef { id: "ATTSYNC", label: "Synchronize", icon: ICON, event: ModuleEvent::Command("ATTSYNC".to_string()) } +} diff --git a/src/modules/insert/base_point.rs b/src/modules/insert/base_point.rs new file mode 100644 index 000000000..dcc75aed9 --- /dev/null +++ b/src/modules/insert/base_point.rs @@ -0,0 +1,5 @@ +use crate::modules::{IconKind, ModuleEvent, ToolDef}; +pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/base_point.svg")); +pub fn tool() -> ToolDef { + ToolDef { id: "BASE", label: "Set Base\nPoint", icon: ICON, event: ModuleEvent::Command("BASE".to_string()) } +} diff --git a/src/modules/insert/content_browser.rs b/src/modules/insert/content_browser.rs new file mode 100644 index 000000000..558e32310 --- /dev/null +++ b/src/modules/insert/content_browser.rs @@ -0,0 +1,5 @@ +use crate::modules::{IconKind, ModuleEvent, ToolDef}; +pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/content_browser.svg")); +pub fn tool() -> ToolDef { + ToolDef { id: "CONTENTBROWSER", label: "Content\nBrowser", icon: ICON, event: ModuleEvent::Command("CONTENTBROWSER".to_string()) } +} diff --git a/src/modules/insert/design_center.rs b/src/modules/insert/design_center.rs new file mode 100644 index 000000000..97f14d945 --- /dev/null +++ b/src/modules/insert/design_center.rs @@ -0,0 +1,5 @@ +use crate::modules::{IconKind, ModuleEvent, ToolDef}; +pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/design_center.svg")); +pub fn tool() -> ToolDef { + ToolDef { id: "ADCENTER", label: "Design\nCenter", icon: ICON, event: ModuleEvent::Command("ADCENTER".to_string()) } +} diff --git a/src/modules/insert/edit_block.rs b/src/modules/insert/edit_block.rs new file mode 100644 index 000000000..aa7b1bf27 --- /dev/null +++ b/src/modules/insert/edit_block.rs @@ -0,0 +1,5 @@ +use crate::modules::{IconKind, ModuleEvent, ToolDef}; +pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/edit_block.svg")); +pub fn tool() -> ToolDef { + ToolDef { id: "BEDIT", label: "Edit Block", icon: ICON, event: ModuleEvent::Command("BEDIT".to_string()) } +} diff --git a/src/modules/insert/landxml.rs b/src/modules/insert/landxml.rs new file mode 100644 index 000000000..17cafbd9b --- /dev/null +++ b/src/modules/insert/landxml.rs @@ -0,0 +1,5 @@ +use crate::modules::{IconKind, ModuleEvent, ToolDef}; +pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/landxml.svg")); +pub fn tool() -> ToolDef { + ToolDef { id: "LANDXMLIMPORT", label: "Land\nXML", icon: ICON, event: ModuleEvent::Command("LANDXMLIMPORT".to_string()) } +} diff --git a/src/modules/insert/mod.rs b/src/modules/insert/mod.rs index 1dd4190fc..7e7bcb88b 100644 --- a/src/modules/insert/mod.rs +++ b/src/modules/insert/mod.rs @@ -1,17 +1,29 @@ -// Insert module — file import, solid primitives, and blocks. +// Insert module — references, point clouds, blocks, attributes, import, content. -mod box_prim; -mod clear; +mod attdef; +mod attedit; +mod attman; +mod attsync; +mod base_point; pub(crate) mod create_block; -mod cylinder; +mod content_browser; +mod design_center; +mod edit_block; pub(crate) mod insert_block; +mod landxml; +mod mview_block; mod open_obj; +mod pc_attach; +mod snap_underlays; pub(crate) mod solid3d_cmds; -mod sphere; +mod underlay_frames; +mod underlay_layers; pub(crate) mod wblock; pub(crate) mod xattach; +mod xadjust; +mod xclip; -use crate::modules::{CadModule, RibbonGroup}; +use crate::modules::{CadModule, IconKind, RibbonGroup, RibbonItem}; pub struct InsertModule; @@ -25,25 +37,69 @@ impl CadModule for InsertModule { fn ribbon_groups(&self) -> Vec { vec![ + // ── Reference ──────────────────────────────────────────────────── RibbonGroup { - title: "Import", - tools: vec![open_obj::tool().into(), clear::tool().into()], - }, - RibbonGroup { - title: "Primitives", + title: "Reference", tools: vec![ - box_prim::tool().into(), - sphere::tool().into(), - cylinder::tool().into(), + RibbonItem::LargeTool(xattach::tool()), + RibbonItem::LargeTool(xclip::tool()), + RibbonItem::LargeTool(xadjust::tool()), + RibbonItem::Tool(underlay_layers::tool()), + RibbonItem::Dropdown { + id: "FRAMES_DROPDOWN", + icon: IconKind::Svg(include_bytes!("../../../assets/icons/underlay_frames.svg")), + items: vec![ + ("FRAMES0", "Frames Off", IconKind::Svg(include_bytes!("../../../assets/icons/underlay_frames.svg"))), + ("FRAMES1", "Frames On", IconKind::Svg(include_bytes!("../../../assets/icons/underlay_frames.svg"))), + ("FRAMES2", "Frames & Print",IconKind::Svg(include_bytes!("../../../assets/icons/underlay_frames.svg"))), + ], + default: "FRAMES1", + }, + RibbonItem::Tool(snap_underlays::tool()), ], }, + // ── Point Cloud ─────────────────────────────────────────────────── + RibbonGroup { + title: "Point Cloud", + tools: vec![ + RibbonItem::LargeTool(pc_attach::tool()), + ], + }, + // ── Block ───────────────────────────────────────────────────────── RibbonGroup { title: "Block", tools: vec![ - create_block::tool().into(), - insert_block::tool().into(), - wblock::tool().into(), - xattach::tool().into(), + RibbonItem::LargeTool(mview_block::tool()), + RibbonItem::LargeTool(insert_block::tool()), + RibbonItem::Tool(create_block::tool()), + RibbonItem::Tool(edit_block::tool()), + RibbonItem::Tool(base_point::tool()), + ], + }, + // ── Attributes ──────────────────────────────────────────────────── + RibbonGroup { + title: "Attributes", + tools: vec![ + RibbonItem::LargeTool(attdef::tool()), + RibbonItem::LargeTool(attedit::tool()), + RibbonItem::Tool(attman::tool()), + RibbonItem::Tool(attsync::tool()), + ], + }, + // ── Import ──────────────────────────────────────────────────────── + RibbonGroup { + title: "Import", + tools: vec![ + RibbonItem::LargeTool(open_obj::tool()), + RibbonItem::LargeTool(landxml::tool()), + ], + }, + // ── Content ─────────────────────────────────────────────────────── + RibbonGroup { + title: "Content", + tools: vec![ + RibbonItem::LargeTool(content_browser::tool()), + RibbonItem::LargeTool(design_center::tool()), ], }, ] diff --git a/src/modules/insert/mview_block.rs b/src/modules/insert/mview_block.rs new file mode 100644 index 000000000..d65ec70a7 --- /dev/null +++ b/src/modules/insert/mview_block.rs @@ -0,0 +1,5 @@ +use crate::modules::{IconKind, ModuleEvent, ToolDef}; +pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/mview_block.svg")); +pub fn tool() -> ToolDef { + ToolDef { id: "BLOCKPALETTE", label: "Multi-View\nBlock", icon: ICON, event: ModuleEvent::Command("BLOCKPALETTE".to_string()) } +} diff --git a/src/modules/insert/pc_attach.rs b/src/modules/insert/pc_attach.rs new file mode 100644 index 000000000..c70715176 --- /dev/null +++ b/src/modules/insert/pc_attach.rs @@ -0,0 +1,5 @@ +use crate::modules::{IconKind, ModuleEvent, ToolDef}; +pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/pc_attach.svg")); +pub fn tool() -> ToolDef { + ToolDef { id: "POINTCLOUDATTACH", label: "Attach", icon: ICON, event: ModuleEvent::Command("POINTCLOUDATTACH".to_string()) } +} diff --git a/src/modules/insert/recap.rs b/src/modules/insert/recap.rs new file mode 100644 index 000000000..2648acf21 --- /dev/null +++ b/src/modules/insert/recap.rs @@ -0,0 +1,5 @@ +use crate::modules::{IconKind, ModuleEvent, ToolDef}; +pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/recap.svg")); +pub fn tool() -> ToolDef { + ToolDef { id: "RECAP", label: "Autodesk\nReCap", icon: ICON, event: ModuleEvent::Command("RECAP".to_string()) } +} diff --git a/src/modules/insert/snap_underlays.rs b/src/modules/insert/snap_underlays.rs new file mode 100644 index 000000000..94976ba24 --- /dev/null +++ b/src/modules/insert/snap_underlays.rs @@ -0,0 +1,5 @@ +use crate::modules::{IconKind, ModuleEvent, ToolDef}; +pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/snap_underlays.svg")); +pub fn tool() -> ToolDef { + ToolDef { id: "UOSNAP", label: "Snap to\nUnderlays", icon: ICON, event: ModuleEvent::Command("UOSNAP".to_string()) } +} diff --git a/src/modules/insert/underlay_frames.rs b/src/modules/insert/underlay_frames.rs new file mode 100644 index 000000000..91f6aaa0d --- /dev/null +++ b/src/modules/insert/underlay_frames.rs @@ -0,0 +1,7 @@ +use crate::modules::{IconKind, ModuleEvent, ToolDef}; +#[allow(dead_code)] +pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/underlay_frames.svg")); +#[allow(dead_code)] +pub fn tool() -> ToolDef { + ToolDef { id: "FRAMES", label: "Frames", icon: ICON, event: ModuleEvent::Command("FRAMES".to_string()) } +} diff --git a/src/modules/insert/underlay_layers.rs b/src/modules/insert/underlay_layers.rs new file mode 100644 index 000000000..e7705a21c --- /dev/null +++ b/src/modules/insert/underlay_layers.rs @@ -0,0 +1,5 @@ +use crate::modules::{IconKind, ModuleEvent, ToolDef}; +pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/underlay_layers.svg")); +pub fn tool() -> ToolDef { + ToolDef { id: "UNDERLAYLAYERS", label: "Underlay\nLayers", icon: ICON, event: ModuleEvent::Command("UNDERLAYLAYERS".to_string()) } +} diff --git a/src/modules/insert/wblock.rs b/src/modules/insert/wblock.rs index 65fb59f62..23b04a522 100644 --- a/src/modules/insert/wblock.rs +++ b/src/modules/insert/wblock.rs @@ -8,6 +8,7 @@ use acadrust::{CadDocument, EntityType}; use crate::modules::{IconKind, ModuleEvent, ToolDef}; +#[allow(dead_code)] pub fn tool() -> ToolDef { ToolDef { id: "WBLOCK", diff --git a/src/modules/insert/xadjust.rs b/src/modules/insert/xadjust.rs new file mode 100644 index 000000000..6c33c85fe --- /dev/null +++ b/src/modules/insert/xadjust.rs @@ -0,0 +1,5 @@ +use crate::modules::{IconKind, ModuleEvent, ToolDef}; +pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/xadjust.svg")); +pub fn tool() -> ToolDef { + ToolDef { id: "ADJUST", label: "Adjust", icon: ICON, event: ModuleEvent::Command("ADJUST".to_string()) } +} diff --git a/src/modules/insert/xclip.rs b/src/modules/insert/xclip.rs new file mode 100644 index 000000000..a731103af --- /dev/null +++ b/src/modules/insert/xclip.rs @@ -0,0 +1,5 @@ +use crate::modules::{IconKind, ModuleEvent, ToolDef}; +pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/xclip.svg")); +pub fn tool() -> ToolDef { + ToolDef { id: "XCLIP", label: "Clip", icon: ICON, event: ModuleEvent::Command("XCLIP".to_string()) } +} diff --git a/src/modules/mod.rs b/src/modules/mod.rs index 8cec0dc37..cc4d40d37 100644 --- a/src/modules/mod.rs +++ b/src/modules/mod.rs @@ -20,6 +20,7 @@ pub enum ModuleEvent { /// Open the OS file dialog. OpenFileDialog, /// Remove all loaded models from the scene. + #[allow(dead_code)] ClearModels, /// Toggle wireframe rendering. SetWireframe(bool),