mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-14 19:26:56 -04:00
Prepare module hooks for parallel tool/effect work
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
873e9f5c99
commit
db38f51046
7 files changed
+47
-1
No files matched your search
@@ -0,0 +1,7 @@
|
||||
//! Commands backing the drawing tools (pencil, scissors, knife…).
|
||||
|
||||
use super::CommandSpec;
|
||||
|
||||
pub fn specs() -> Vec<CommandSpec> {
|
||||
vec![]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
//! Effect menu commands (live effects).
|
||||
|
||||
use super::CommandSpec;
|
||||
|
||||
pub fn specs() -> Vec<CommandSpec> {
|
||||
vec![]
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
//! The command registry. Ids follow Illustrator's menu structure.
|
||||
|
||||
mod create;
|
||||
mod draw2;
|
||||
mod effectcmd;
|
||||
mod xform;
|
||||
mod edit;
|
||||
mod layer;
|
||||
mod object;
|
||||
@@ -113,6 +116,9 @@ pub fn command_specs() -> &'static [CommandSpec] {
|
||||
v.extend(select::specs());
|
||||
v.extend(paint::specs());
|
||||
v.extend(layer::specs());
|
||||
v.extend(draw2::specs());
|
||||
v.extend(xform::specs());
|
||||
v.extend(effectcmd::specs());
|
||||
v.extend(pathops::specs());
|
||||
v.extend(typecmd::specs());
|
||||
v
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
//! Commands backing transform/utility tools (eyedropper, gradient, artboard…).
|
||||
|
||||
use super::CommandSpec;
|
||||
|
||||
pub fn specs() -> Vec<CommandSpec> {
|
||||
vec![]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
//! Drawing and path-editing tools (pencil, curvature, anchor tools, scissors, knife, line family…).
|
||||
|
||||
use crate::Tool;
|
||||
|
||||
/// Create a drawing tool by id (None = not one of ours).
|
||||
pub fn create(_id: &str) -> Option<Box<dyn Tool>> {
|
||||
None
|
||||
}
|
||||
@@ -10,6 +10,8 @@
|
||||
pub mod bbox;
|
||||
pub mod catalog;
|
||||
pub mod direct;
|
||||
pub mod draw2;
|
||||
pub mod xform;
|
||||
pub mod guides;
|
||||
pub mod pen;
|
||||
pub mod select;
|
||||
@@ -241,7 +243,7 @@ pub fn create(id: &str) -> Box<dyn Tool> {
|
||||
"pen" => Box::new(pen::PenTool::default()),
|
||||
"type" => Box::new(text::TypeTool::default()),
|
||||
"rectangle" | "roundedRectangle" | "ellipse" | "polygon" | "star" | "lineSegment" => Box::new(shape::ShapeTool::new(id)),
|
||||
other => Box::new(NoopTool(tool_info(other).map(|t| t.id).unwrap_or("selection"))),
|
||||
other => draw2::create(other).or_else(|| xform::create(other)).unwrap_or_else(|| Box::new(NoopTool(tool_info(other).map(|t| t.id).unwrap_or("selection")))),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
//! Transform and utility tools (rotate/reflect/scale/shear, free transform, eyedropper, gradient,
|
||||
//! artboard, magic wand, lasso, measure).
|
||||
|
||||
use crate::Tool;
|
||||
|
||||
/// Create a transform/utility tool by id (None = not one of ours).
|
||||
pub fn create(_id: &str) -> Option<Box<dyn Tool>> {
|
||||
None
|
||||
}
|
||||
Reference in new issue
Block a user