feat(table): add TABLEDIT point picking, and consolidate InputKind

- Implement `TABLEDIT` command supporting viewport point-picking on cell interiors
- Support overlapping table hit testing with selection cycling and top-table resolution
- Support `/n` and `\n` multiline paragraph breaks (`\P`) in table cell text editing
- Unify text input modes via `InputKind` (`Point`, `SingleToken`, `FreeText`) on `CadCommand`
- Migrate 15+ commands across annotate, draw, insert, layout, and view modules
- Preserve text casing, literal spaces, and bypass arithmetic eval during FreeText input
- Add dedicated `tabledit_tests` and `free_text_entry_tests` test suites
This commit is contained in:
Karim Jerbi committed 2026-09-02 14:55:49 +01:00
1 parent bde9cc2715
commit d6a6dd6a7d
23 files changed
+860 -254

No files matched your search

+10 -8
View File
@@ -6,7 +6,7 @@ use acadrust::types::{Vector2, Vector3};
use acadrust::{EntityType, Handle};
use crate::t;
use crate::command::{CadCommand, CmdOption, CmdResult};
use crate::command::{CadCommand, CmdOption, CmdResult, InputKind};
use crate::modules::draw::draw::polyline::{
arc_sample_points, compute_bulge, seg_exit_tangent, update_tangent_after_arc,
};
@@ -464,14 +464,16 @@ impl CadCommand for MviewCommand {
}
}
fn wants_text_input(&self) -> bool {
self.step == Step::RectangleFirst
|| self.step == Step::ChooseView
fn input_kind(&self) -> InputKind {
if self.step == Step::ChooseView {
InputKind::FreeText
} else if self.step == Step::RectangleFirst
|| (self.step == Step::Polygon && !self.polygon.is_empty())
}
fn wants_text_with_spaces(&self) -> bool {
self.step == Step::ChooseView
{
InputKind::SingleToken
} else {
InputKind::Point
}
}
fn point_step_accepts_keywords(&self) -> bool {