ui: fit the context menu above the command area; right-button control actions

Rows are 22 px (as the grip popup), the edit menu drops Select All and
Zoom Extents (both stay on the idle menu, matching the commercial solutions' edit menu),
and cursor-anchored panels now reserve the overlaid prompt lines
(CLIPROMPTLINES) as well as the input row, so a long menu is never hidden
behind the command area — it scrolls inside the visible canvas instead.

The automation port gains `pointer_right_press` / `pointer_right_release`
actions so scripts and MCP clients can exercise the context menu.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
PanosandClaude Opus 5 committed 2026-09-17 12:05:15 +03:00
1 parent 426af2d3a5
commit 96df4928c7
5 files changed
+39 -10

No files matched your search

+6 -1
View File
@@ -267,7 +267,8 @@ impl OpenCADStudio {
"mtext_cancel" => Message::MTextCancel,
"text_input" => Message::TextInlineInput(string(req, "value")?.into()),
"text_commit" => Message::TextInlineOk,
"pointer_move" | "pointer_press" | "pointer_release" => {
"pointer_move" | "pointer_press" | "pointer_release" | "pointer_right_press"
| "pointer_right_release" => {
let x = req["x"]
.as_f64()
.filter(|v| v.is_finite())
@@ -289,6 +290,10 @@ impl OpenCADStudio {
let event = match name {
"pointer_press" => self.update(Message::ViewportLeftPress),
"pointer_release" => self.update(Message::ViewportLeftRelease),
// Right button: the context menu / Enter behaviour chosen in
// Options (see `Message::ViewportRightRelease`).
"pointer_right_press" => self.update(Message::ViewportRightPress),
"pointer_right_release" => self.update(Message::ViewportRightRelease),
_ => Task::none(),
};
return Ok(Task::batch([move_task, event]));