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

+3 -3
View File
@@ -126,7 +126,7 @@ impl OpenCADStudio {
let wants_text = self.tabs[i]
.active_cmd
.as_ref()
.map(|c| c.wants_text_input())
.map(|c| c.input_kind().wants_text())
.unwrap_or(false);
// A point step that also accepts keyword letters (PLINE A/L/C…) keeps
// its polar boxes: only letters reach the command line, digits stay
@@ -604,7 +604,7 @@ impl OpenCADStudio {
let wants_text = self.tabs[i]
.active_cmd
.as_ref()
.map(|c| c.wants_text_input())
.map(|c| c.input_kind().wants_text())
.unwrap_or(false);
if !wants_text {
if let Some(text) = self.tabs[i]
@@ -645,7 +645,7 @@ impl OpenCADStudio {
.active_cmd
.as_ref()
.map(|c| {
(c.wants_text_input() && !c.point_step_accepts_keywords())
(c.input_kind().wants_text() && !c.point_step_accepts_keywords())
|| c.dyn_commit_as_text()
})
.unwrap_or(false);