ui: neutral wording in code and help text; keywords first in the command menu

Comments and the Options help text describe the behaviour of commercial
solutions without naming any product. The command menu puts the command's
keywords directly under Enter / Cancel, with Recent Input and Snap
Overrides below them, so the choices that change from step to step are the
closest to the pointer.

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 02cd98e790
commit 0fbb5bcb4f
35 files changed
+83 -81

No files matched your search

+1 -1
View File
@@ -60,7 +60,7 @@ options =
.right-click-customization = تخصيص النقر بالزر الأيمن
.right-click-in-drawing-area = النقر بالزر الأيمن في منطقة الرسم
.hold-duration = مدة الضغط
.right-click-mode-help = قائمة الاختصارات: النقر بالزر الأيمن يفتح القائمة دائمًا (الافتراضي في AutoCAD). حساس للوقت: النقرة السريعة تعني Enter، والضغط المطوّل يفتح القائمة (SHORTCUTMENUDURATION).
.right-click-mode-help = قائمة الاختصارات: النقر بالزر الأيمن يفتح القائمة دائمًا. حساس للوقت: النقرة السريعة تعني Enter، والضغط المطوّل يفتح القائمة (SHORTCUTMENUDURATION).
.right-click-mode-shortcut-menu = قائمة الاختصارات
.right-click-mode-time-sensitive = حساس للوقت (نقرة سريعة = Enter)
.right-click-mode-enter-first = Enter أولًا، النقرة الثانية = القائمة
+1 -1
View File
@@ -60,7 +60,7 @@ options =
.right-click-customization = Настройка на десния бутон
.right-click-in-drawing-area = Десен бутон в чертожната област
.hold-duration = Време на задържане
.right-click-mode-help = Контекстно меню: десният бутон винаги отваря менюто (по подразбиране в AutoCAD). Зависимо от времето: бързо щракване е Enter, по-дълго задържане отваря менюто (SHORTCUTMENUDURATION).
.right-click-mode-help = Контекстно меню: десният бутон винаги отваря менюто. Зависимо от времето: бързо щракване е Enter, по-дълго задържане отваря менюто (SHORTCUTMENUDURATION).
.right-click-mode-shortcut-menu = Контекстно меню
.right-click-mode-time-sensitive = Зависимо от времето (бързо щракване = Enter)
.right-click-mode-enter-first = Първо Enter, второ щракване = меню
+1 -1
View File
@@ -60,7 +60,7 @@ options =
.right-click-customization = Přizpůsobení pravého tlačítka
.right-click-in-drawing-area = Pravé tlačítko v kreslicí ploše
.hold-duration = Doba podržení
.right-click-mode-help = Kontextová nabídka: pravé tlačítko vždy otevře nabídku (výchozí v AutoCADu). Časově citlivé: krátké kliknutí je Enter, delší podržení otevře nabídku (SHORTCUTMENUDURATION).
.right-click-mode-help = Kontextová nabídka: pravé tlačítko vždy otevře nabídku. Časově citlivé: krátké kliknutí je Enter, delší podržení otevře nabídku (SHORTCUTMENUDURATION).
.right-click-mode-shortcut-menu = Kontextová nabídka
.right-click-mode-time-sensitive = Časově citlivé (krátké kliknutí = Enter)
.right-click-mode-enter-first = Nejprve Enter, druhé kliknutí = nabídka
+1 -1
View File
@@ -60,7 +60,7 @@ options =
.right-click-customization = Rechtsklick-Anpassung
.right-click-in-drawing-area = Rechtsklick im Zeichenbereich
.hold-duration = Haltedauer
.right-click-mode-help = Kontextmenü: Rechtsklick öffnet immer das Menü (AutoCAD-Standard). Zeitabhängig: ein kurzer Klick ist Enter, längeres Halten öffnet das Menü (SHORTCUTMENUDURATION).
.right-click-mode-help = Kontextmenü: Rechtsklick öffnet immer das Menü. Zeitabhängig: ein kurzer Klick ist Enter, längeres Halten öffnet das Menü (SHORTCUTMENUDURATION).
.right-click-mode-shortcut-menu = Kontextmenü
.right-click-mode-time-sensitive = Zeitabhängig (kurzer Klick = Enter)
.right-click-mode-enter-first = Erst Enter, zweiter Klick = Menü
+1 -1
View File
@@ -60,7 +60,7 @@ options =
.right-click-customization = Προσαρμογή δεξιού κλικ
.right-click-in-drawing-area = Δεξί κλικ στην περιοχή σχεδίασης
.hold-duration = Διάρκεια παρατεταμένου πατήματος
.right-click-mode-help = Μενού συντόμευσης: το δεξί κλικ ανοίγει πάντα το μενού (προεπιλογή AutoCAD). Χρονοευαίσθητο: γρήγορο κλικ = Enter, παρατεταμένο πάτημα ανοίγει το μενού (SHORTCUTMENUDURATION).
.right-click-mode-help = Μενού συντόμευσης: το δεξί κλικ ανοίγει πάντα το μενού. Χρονοευαίσθητο: γρήγορο κλικ = Enter, παρατεταμένο πάτημα ανοίγει το μενού (SHORTCUTMENUDURATION).
.right-click-mode-shortcut-menu = Μενού συντόμευσης
.right-click-mode-time-sensitive = Χρονοευαίσθητο (γρήγορο κλικ = Enter)
.right-click-mode-enter-first = Πρώτα Enter, δεύτερο κλικ = μενού
+1 -1
View File
@@ -60,7 +60,7 @@ options =
.right-click-customization = Right-click Customization
.right-click-in-drawing-area = Right-click in drawing area
.hold-duration = Hold duration
.right-click-mode-help = Shortcut menu: right-click always opens the menu (AutoCAD default). Time-sensitive: a quick click is Enter, holding longer opens the menu (SHORTCUTMENUDURATION).
.right-click-mode-help = Shortcut menu: right-click always opens the menu. Time-sensitive: a quick click is Enter, holding longer opens the menu (SHORTCUTMENUDURATION).
.right-click-mode-shortcut-menu = Shortcut menu
.right-click-mode-time-sensitive = Time-sensitive (quick click = Enter)
.right-click-mode-enter-first = Enter first, second click = menu
+1 -1
View File
@@ -60,7 +60,7 @@ options =
.right-click-customization = Personalización del botón derecho
.right-click-in-drawing-area = Botón derecho en el área de dibujo
.hold-duration = Duración de pulsación
.right-click-mode-help = Menú contextual: el botón derecho siempre abre el menú (valor por defecto de AutoCAD). Sensible al tiempo: un clic rápido es Intro, mantener pulsado abre el menú (SHORTCUTMENUDURATION).
.right-click-mode-help = Menú contextual: el botón derecho siempre abre el menú. Sensible al tiempo: un clic rápido es Intro, mantener pulsado abre el menú (SHORTCUTMENUDURATION).
.right-click-mode-shortcut-menu = Menú contextual
.right-click-mode-time-sensitive = Sensible al tiempo (clic rápido = Intro)
.right-click-mode-enter-first = Primero Intro, segundo clic = menú
+1 -1
View File
@@ -60,7 +60,7 @@ options =
.right-click-customization = Hiiren oikean painikkeen mukautus
.right-click-in-drawing-area = Oikea painike piirtoalueella
.hold-duration = Painalluksen kesto
.right-click-mode-help = Pikavalikko: oikea painike avaa aina valikon (AutoCADin oletus). Aikaherkkä: nopea napsautus on Enter, pidempi painallus avaa valikon (SHORTCUTMENUDURATION).
.right-click-mode-help = Pikavalikko: oikea painike avaa aina valikon. Aikaherkkä: nopea napsautus on Enter, pidempi painallus avaa valikon (SHORTCUTMENUDURATION).
.right-click-mode-shortcut-menu = Pikavalikko
.right-click-mode-time-sensitive = Aikaherkkä (nopea napsautus = Enter)
.right-click-mode-enter-first = Ensin Enter, toinen napsautus = valikko
+1 -1
View File
@@ -60,7 +60,7 @@ options =
.right-click-customization = Personnalisation du clic droit
.right-click-in-drawing-area = Clic droit dans la zone de dessin
.hold-duration = Durée de maintien
.right-click-mode-help = Menu contextuel : le clic droit ouvre toujours le menu (défaut AutoCAD). Sensible au temps : un clic bref vaut Entrée, un appui prolongé ouvre le menu (SHORTCUTMENUDURATION).
.right-click-mode-help = Menu contextuel : le clic droit ouvre toujours le menu. Sensible au temps : un clic bref vaut Entrée, un appui prolongé ouvre le menu (SHORTCUTMENUDURATION).
.right-click-mode-shortcut-menu = Menu contextuel
.right-click-mode-time-sensitive = Sensible au temps (clic bref = Entrée)
.right-click-mode-enter-first = Entrée d'abord, second clic = menu
+1 -1
View File
@@ -60,7 +60,7 @@ options =
.right-click-customization = राइट-क्लिक अनुकूलन
.right-click-in-drawing-area = ड्रॉइंग क्षेत्र में राइट-क्लिक
.hold-duration = दबाए रखने की अवधि
.right-click-mode-help = शॉर्टकट मेनू: राइट-क्लिक हमेशा मेनू खोलता है (AutoCAD डिफ़ॉल्ट)। समय-संवेदी: त्वरित क्लिक Enter है, देर तक दबाए रखने से मेनू खुलता है (SHORTCUTMENUDURATION)।
.right-click-mode-help = शॉर्टकट मेनू: राइट-क्लिक हमेशा मेनू खोलता है। समय-संवेदी: त्वरित क्लिक Enter है, देर तक दबाए रखने से मेनू खुलता है (SHORTCUTMENUDURATION)।
.right-click-mode-shortcut-menu = शॉर्टकट मेनू
.right-click-mode-time-sensitive = समय-संवेदी (त्वरित क्लिक = Enter)
.right-click-mode-enter-first = पहले Enter, दूसरा क्लिक = मेनू
+1 -1
View File
@@ -60,7 +60,7 @@ options =
.right-click-customization = Jobb kattintás testreszabása
.right-click-in-drawing-area = Jobb kattintás a rajzterületen
.hold-duration = Nyomva tartás ideje
.right-click-mode-help = Helyi menü: a jobb kattintás mindig a menüt nyitja (AutoCAD alapértelmezés). Időérzékeny: a rövid kattintás Enter, a hosszabb nyomva tartás a menüt nyitja (SHORTCUTMENUDURATION).
.right-click-mode-help = Helyi menü: a jobb kattintás mindig a menüt nyitja. Időérzékeny: a rövid kattintás Enter, a hosszabb nyomva tartás a menüt nyitja (SHORTCUTMENUDURATION).
.right-click-mode-shortcut-menu = Helyi menü
.right-click-mode-time-sensitive = Időérzékeny (rövid kattintás = Enter)
.right-click-mode-enter-first = Előbb Enter, második kattintás = menü
+1 -1
View File
@@ -60,7 +60,7 @@ options =
.right-click-customization = Personalizzazione clic destro
.right-click-in-drawing-area = Clic destro nell'area di disegno
.hold-duration = Durata pressione
.right-click-mode-help = Menu di scelta rapida: il clic destro apre sempre il menu (impostazione predefinita di AutoCAD). Sensibile al tempo: un clic rapido è Invio, tenere premuto apre il menu (SHORTCUTMENUDURATION).
.right-click-mode-help = Menu di scelta rapida: il clic destro apre sempre il menu. Sensibile al tempo: un clic rapido è Invio, tenere premuto apre il menu (SHORTCUTMENUDURATION).
.right-click-mode-shortcut-menu = Menu di scelta rapida
.right-click-mode-time-sensitive = Sensibile al tempo (clic rapido = Invio)
.right-click-mode-enter-first = Prima Invio, secondo clic = menu
+1 -1
View File
@@ -60,7 +60,7 @@ options =
.right-click-customization = 右クリックのカスタマイズ
.right-click-in-drawing-area = 作図領域での右クリック
.hold-duration = 長押し時間
.right-click-mode-help = ショートカットメニュー: 右クリックで常にメニューを開く (AutoCAD の既定)。時間依存: 短いクリックは Enter、長押しでメニューを開く (SHORTCUTMENUDURATION)。
.right-click-mode-help = ショートカットメニュー: 右クリックで常にメニューを開く。時間依存: 短いクリックは Enter、長押しでメニューを開く (SHORTCUTMENUDURATION)。
.right-click-mode-shortcut-menu = ショートカットメニュー
.right-click-mode-time-sensitive = 時間依存 (短いクリック = Enter)
.right-click-mode-enter-first = 1 回目は Enter、2 回目でメニュー
+1 -1
View File
@@ -60,7 +60,7 @@ options =
.right-click-customization = 오른쪽 클릭 사용자화
.right-click-in-drawing-area = 도면 영역에서 오른쪽 클릭
.hold-duration = 누르는 시간
.right-click-mode-help = 바로 가기 메뉴: 오른쪽 클릭 시 항상 메뉴를 엽니다 (AutoCAD 기본값). 시간 민감: 짧은 클릭은 Enter, 길게 누르면 메뉴가 열립니다 (SHORTCUTMENUDURATION).
.right-click-mode-help = 바로 가기 메뉴: 오른쪽 클릭 시 항상 메뉴를 엽니다. 시간 민감: 짧은 클릭은 Enter, 길게 누르면 메뉴가 열립니다 (SHORTCUTMENUDURATION).
.right-click-mode-shortcut-menu = 바로 가기 메뉴
.right-click-mode-time-sensitive = 시간 민감 (짧은 클릭 = Enter)
.right-click-mode-enter-first = 먼저 Enter, 두 번째 클릭 = 메뉴
+1 -1
View File
@@ -60,7 +60,7 @@ options =
.right-click-customization = Rechtsklik aanpassen
.right-click-in-drawing-area = Rechtsklik in tekengebied
.hold-duration = Vasthoudduur
.right-click-mode-help = Snelmenu: rechtsklik opent altijd het menu (AutoCAD-standaard). Tijdgevoelig: een korte klik is Enter, langer vasthouden opent het menu (SHORTCUTMENUDURATION).
.right-click-mode-help = Snelmenu: rechtsklik opent altijd het menu. Tijdgevoelig: een korte klik is Enter, langer vasthouden opent het menu (SHORTCUTMENUDURATION).
.right-click-mode-shortcut-menu = Snelmenu
.right-click-mode-time-sensitive = Tijdgevoelig (korte klik = Enter)
.right-click-mode-enter-first = Eerst Enter, tweede klik = menu
+1 -1
View File
@@ -60,7 +60,7 @@ options =
.right-click-customization = Dostosowanie prawego przycisku
.right-click-in-drawing-area = Prawy przycisk w obszarze rysunku
.hold-duration = Czas przytrzymania
.right-click-mode-help = Menu skrótów: prawy przycisk zawsze otwiera menu (domyślnie w AutoCAD). Zależne od czasu: krótkie kliknięcie to Enter, dłuższe przytrzymanie otwiera menu (SHORTCUTMENUDURATION).
.right-click-mode-help = Menu skrótów: prawy przycisk zawsze otwiera menu. Zależne od czasu: krótkie kliknięcie to Enter, dłuższe przytrzymanie otwiera menu (SHORTCUTMENUDURATION).
.right-click-mode-shortcut-menu = Menu skrótów
.right-click-mode-time-sensitive = Zależne od czasu (krótkie kliknięcie = Enter)
.right-click-mode-enter-first = Najpierw Enter, drugie kliknięcie = menu
+1 -1
View File
@@ -60,7 +60,7 @@ options =
.right-click-customization = Personalização do clique direito
.right-click-in-drawing-area = Clique direito na área de desenho
.hold-duration = Duração do pressionamento
.right-click-mode-help = Menu de atalho: o clique direito sempre abre o menu (padrão do AutoCAD). Sensível ao tempo: um clique rápido é Enter, segurar mais tempo abre o menu (SHORTCUTMENUDURATION).
.right-click-mode-help = Menu de atalho: o clique direito sempre abre o menu. Sensível ao tempo: um clique rápido é Enter, segurar mais tempo abre o menu (SHORTCUTMENUDURATION).
.right-click-mode-shortcut-menu = Menu de atalho
.right-click-mode-time-sensitive = Sensível ao tempo (clique rápido = Enter)
.right-click-mode-enter-first = Primeiro Enter, segundo clique = menu
+1 -1
View File
@@ -60,7 +60,7 @@ options =
.right-click-customization = Настройка правой кнопки мыши
.right-click-in-drawing-area = Правая кнопка в области чертежа
.hold-duration = Длительность удержания
.right-click-mode-help = Контекстное меню: правая кнопка всегда открывает меню (по умолчанию в AutoCAD). С учётом времени: короткий щелчок — Enter, удержание открывает меню (SHORTCUTMENUDURATION).
.right-click-mode-help = Контекстное меню: правая кнопка всегда открывает меню. С учётом времени: короткий щелчок — Enter, удержание открывает меню (SHORTCUTMENUDURATION).
.right-click-mode-shortcut-menu = Контекстное меню
.right-click-mode-time-sensitive = С учётом времени (короткий щелчок = Enter)
.right-click-mode-enter-first = Сначала Enter, второй щелчок = меню
+1 -1
View File
@@ -60,7 +60,7 @@ options =
.right-click-customization = Sağ tık özelleştirme
.right-click-in-drawing-area = Çizim alanında sağ tık
.hold-duration = Basılı tutma süresi
.right-click-mode-help = Kısayol menüsü: sağ tık her zaman menüyü açar (AutoCAD varsayılanı). Zamana duyarlı: kısa tık Enter, uzun basma menüyü açar (SHORTCUTMENUDURATION).
.right-click-mode-help = Kısayol menüsü: sağ tık her zaman menüyü açar. Zamana duyarlı: kısa tık Enter, uzun basma menüyü açar (SHORTCUTMENUDURATION).
.right-click-mode-shortcut-menu = Kısayol menüsü
.right-click-mode-time-sensitive = Zamana duyarlı (kısa tık = Enter)
.right-click-mode-enter-first = Önce Enter, ikinci tık = menü
+1 -1
View File
@@ -60,7 +60,7 @@ options =
.right-click-customization = 右键单击自定义
.right-click-in-drawing-area = 在绘图区域中单击右键
.hold-duration = 按住时长
.right-click-mode-help = 快捷菜单:右键单击始终打开菜单(AutoCAD 默认)。时间敏感:快速单击等于 Enter,长按打开菜单 (SHORTCUTMENUDURATION)。
.right-click-mode-help = 快捷菜单:右键单击始终打开菜单。时间敏感:快速单击等于 Enter,长按打开菜单 (SHORTCUTMENUDURATION)。
.right-click-mode-shortcut-menu = 快捷菜单
.right-click-mode-time-sensitive = 时间敏感(快速单击 = Enter)
.right-click-mode-enter-first = 先 Enter,第二次单击 = 菜单
+1 -1
View File
@@ -60,7 +60,7 @@ options =
.right-click-customization = 右鍵自訂
.right-click-in-drawing-area = 在繪圖區域按右鍵
.hold-duration = 按住時間
.right-click-mode-help = 快捷功能表:按右鍵一律開啟功能表(AutoCAD 預設)。時間敏感:快速按一下等於 Enter,長按開啟功能表 (SHORTCUTMENUDURATION)。
.right-click-mode-help = 快捷功能表:按右鍵一律開啟功能表。時間敏感:快速按一下等於 Enter,長按開啟功能表 (SHORTCUTMENUDURATION)。
.right-click-mode-shortcut-menu = 快捷功能表
.right-click-mode-time-sensitive = 時間敏感(快速按一下 = Enter)
.right-click-mode-enter-first = 先 Enter,第二次按一下 = 功能表
+1 -1
View File
@@ -63,7 +63,7 @@ impl OpenCADStudio {
// routing, so every path below (Start-tab gate, plugins, all dispatch
// families, the Repeat menu) sees the canonical command. Arguments after
// the first space are left untouched. A non-alias passes through as-is.
// AutoCAD's transparent prefix: `'PAN` / `'ZOOM` run in the middle
// The transparent prefix of commercial solutions: `'PAN` / `'ZOOM` run in the middle
// of another command and hand control back to it afterwards.
let (cmd, quoted) = match cmd.trim().strip_prefix('\'') {
Some(rest) => (rest.trim(), true),
+2 -2
View File
@@ -1492,9 +1492,9 @@ impl OpenCADStudio {
Ok((format!("ZOOMFACTOR = {}", self.zoom_factor), false))
}
},
// AutoCAD bit code: 0 = no shortcut menus (right-click
// Bit code of commercial solutions: 0 = no shortcut menus (right-click
// is Enter), 16 = time-sensitive; everything else is the
// regular shortcut menu. Reported as AutoCAD's defaults
// regular shortcut menu. Reported as the defaults of commercial solutions
// (11 = default+edit+command menus, +16 when
// time-sensitive).
"SHORTCUTMENU" => {
+3 -3
View File
@@ -132,16 +132,16 @@ impl CursorType {
}
}
/// What a right-click in the drawing area does (AutoCAD SHORTCUTMENU /
/// What a right-click in the drawing area does (SHORTCUTMENU in commercial solutions /
/// "Right-click Customization").
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
pub enum RightClickMode {
/// AutoCAD default: a right-click always opens the shortcut menu (Enter /
/// The default of commercial solutions: a right-click always opens the shortcut menu (Enter /
/// Cancel / the command's options while a command runs; Repeat / edit
/// tools when idle).
#[default]
ShortcutMenu,
/// AutoCAD "time-sensitive right-click": a quick click is Enter (or
/// The "time-sensitive right-click" of commercial solutions: a quick click is Enter (or
/// repeats the last command when idle); holding the button longer than
/// `right_click_hold_ms` opens the shortcut menu.
TimeSensitive,
+2 -2
View File
@@ -234,7 +234,7 @@ impl OpenCADStudio {
/// when the message was consumed; `None` lets it fall through to the
/// normal handlers (after closing the menu when the key is not a menu key,
/// so typing a command name or a coordinate just works — the menu gets
/// out of the way exactly as it does in AutoCAD).
/// out of the way exactly as it does in commercial solutions).
pub(in crate::app) fn intercept_context_menu_key(&mut self, msg: &Message) -> Option<Task<Message>> {
match msg {
Message::ArrowKeyPressed { direction, .. }
@@ -308,7 +308,7 @@ impl OpenCADStudio {
None
}
/// Grip-mode shortcut menu (AutoCAD's grip menu): the grip stays hot
/// Grip-mode shortcut menu (the grip menu of commercial solutions): the grip stays hot
/// for Stretch / Base Point / Copy / Undo; Move / Rotate / Scale / Mirror
/// hand the selection to the matching command with the grip as its base
/// point; Exit drops the edit.
+3 -3
View File
@@ -304,7 +304,7 @@ impl OpenCADStudio {
}
// The open right-click context menu owns the keyboard the same way:
// arrows / Enter / mnemonic letters drive it, any other key closes it
// and falls through to the command line (AutoCAD behaviour).
// and falls through to the command line (the behaviour of commercial solutions).
if self.context_menu_open() {
if let Some(task) = self.intercept_context_menu_key(&msg) {
return task;
@@ -3582,7 +3582,7 @@ impl OpenCADStudio {
return self.update(Message::CommandFinalize);
}
// A right-click. What it does is the user's choice (Options →
// User Preferences, AutoCAD's SHORTCUTMENU):
// User Preferences, SHORTCUTMENU in commercial solutions):
// • Shortcut menu — always open the context menu, whose
// default row (Enter / Repeat) sits under the pointer.
// • Time-sensitive — a quick click is Enter while a command
@@ -3607,7 +3607,7 @@ impl OpenCADStudio {
sel.right_click_entered = true;
drop(sel);
// CommandFinalize is Enter during a command and "repeat
// the last command" when idle — exactly AutoCAD's quick
// the last command" when idle — exactly the quick
// right-click.
return self.update(Message::CommandFinalize);
}
+1 -1
View File
@@ -6237,7 +6237,7 @@ properties={:.1}ms picked={}",
/// Grip-menu Copy: leave the originals where they were and add the
/// edited shapes as new entities, then re-arm the same grip at its
/// origin so the next placement makes another copy (AutoCAD grip Copy).
/// origin so the next placement makes another copy (grip Copy, as in commercial solutions).
fn commit_active_grip_edit_as_copy(&mut self, grip: GripEdit) -> Task<Message> {
let i = self.active_tab;
let handles = std::mem::take(&mut self.grip_preview_handles);
+1 -1
View File
@@ -1150,7 +1150,7 @@ fn context_menu_gutter(icon: Option<MenuIcon>) -> Element<'static, Message> {
/// Render the right-click context menu (rows from
/// `ui::popup::context_menu::build_context_menu`). The panel is placed so the
/// default row sits under the pointer: right-click then left-click in place
/// completes the step without moving the mouse (AutoCAD anchors its shortcut
/// completes the step without moving the mouse (commercial solutions anchor their shortcut
/// menu the same way). `highlighted` is the keyboard highlight, if any.
pub(super) fn viewport_context_menu_overlay(
pos: iced::Point,
+1 -1
View File
@@ -5131,7 +5131,7 @@ pub(super) fn message_attribute(source: &str) -> Option<(&'static str, &'static
"Right-click Customization" => Some(("options", "right-click-customization")),
"Right-click in drawing area" => Some(("options", "right-click-in-drawing-area")),
"Hold duration" => Some(("options", "hold-duration")),
"Shortcut menu: right-click always opens the menu (AutoCAD default). Time-sensitive: a quick click is Enter, holding longer opens the menu (SHORTCUTMENUDURATION)." => Some(("options", "right-click-mode-help")),
"Shortcut menu: right-click always opens the menu. Time-sensitive: a quick click is Enter, holding longer opens the menu (SHORTCUTMENUDURATION)." => Some(("options", "right-click-mode-help")),
"Shortcut menu" => Some(("options", "right-click-mode-shortcut-menu")),
"Time-sensitive (quick click = Enter)" => Some(("options", "right-click-mode-time-sensitive")),
"Enter first, second click = menu" => Some(("options", "right-click-mode-enter-first")),
+5 -5
View File
@@ -411,9 +411,9 @@ impl CadCommand for ArcCSECommand {
}
}
// ── ARC: AutoCAD prompt flow ──────────────────────────────────────────────
// ── ARC: compatible prompt flow ───────────────────────────────────────────
//
// The plain ARC command follows AutoCAD's prompts, so every keyword a user
// The plain ARC command follows the prompts of commercial solutions, so every keyword a user
// knows is there at the same step:
// Specify start point of arc or [Center]
// Specify second point of arc or [Center/End]
@@ -620,7 +620,7 @@ impl CadCommand for ArcCommand {
CmdResult::NeedPoint
}
ArcStep::EndSC { s, c } => self.commit(self.sc_end(s, c, pt)),
// At a typed prompt a pick reads as AutoCAD does: the cursor's
// At a typed prompt a pick reads as commercial solutions do: the cursor's
// direction from the centre (angle) or its distance (length,
// radius), the cursor itself for a direction / sagitta.
ArcStep::AngleSC { s, c } => {
@@ -726,7 +726,7 @@ impl CadCommand for ArcCommand {
fn on_enter(&mut self) -> CmdResult {
match self.step {
// Enter at the start prompt: continue tangent from the last
// line or arc, as AutoCAD does.
// line or arc, as commercial solutions do.
ArcStep::Start => CmdResult::Dispatch("ARC_CONT".into()),
_ => CmdResult::Cancel,
}
@@ -1997,7 +1997,7 @@ mod acad_flow_tests {
}
#[test]
fn prompts_follow_autocad_keywords() {
fn prompts_follow_compatible_keywords() {
let mut cmd = ArcCommand::new();
assert_eq!(keywords(&cmd), ["C"]);
cmd.on_point(p(0.0, 0.0));
+2 -2
View File
@@ -73,7 +73,7 @@ impl CadCommand for LineCommand {
fn options(&self) -> Vec<crate::command::CmdOption> {
use crate::command::CmdOption;
// Mirrors AutoCAD's LINE prompt: Undo once a point is placed, Close
// Covers the LINE prompt of commercial solutions: Undo once a point is placed, Close
// once a closing segment is possible, eXit always.
match self.points.len() {
0 => Vec::new(),
@@ -201,7 +201,7 @@ impl CadCommand for LineCommand {
}
}
// eXit: end the command keeping every segment drawn so far
// (AutoCAD LINE's third keyword).
// (the third LINE keyword of commercial solutions).
"X" | "EXIT" => Some(CmdResult::Cancel),
"U" | "UNDO" => {
if self.points.len() >= 2 {
+8 -8
View File
@@ -1,7 +1,7 @@
// Polyline tool — ribbon definition + interactive command.
//
// Command: PLINE (PL)
// Each click adds a vertex. Keywords follow AutoCAD:
// Each click adds a vertex. Keywords match commercial solutions:
// Line mode: Arc / Close / Halfwidth / Length / Undo / Width
// Arc mode: Angle / CEnter / CLose / Direction / Halfwidth / Line /
// Radius / Second pt / Undo / Width
@@ -42,7 +42,7 @@ enum SegMode {
Arc,
}
/// A keyword sub-step inside PLINE (AutoCAD's option prompts). `None` is the
/// A keyword sub-step inside PLINE (the option prompts of commercial solutions). `None` is the
/// regular "specify next point" step for the current segment mode. Every
/// sub-step returns to `None` once it has produced a vertex, or when Undo /
/// Enter / Escape backs out of it.
@@ -114,7 +114,7 @@ pub struct PlineCommand {
/// `(start, end)` width for segment i → i+1, parallel to `bulges`.
widths: Vec<(f64, f64)>,
/// Width pair applied to the next segment. After a segment lands its end
/// width becomes the next start width, as in AutoCAD.
/// width becomes the next start width, as in commercial solutions.
cur_width: (f64, f64),
mode: SegMode,
sub: Sub,
@@ -696,7 +696,7 @@ pub(crate) fn arc_sample_points(a: Vec3, bulge: f64, b: Vec3, n: usize) -> Vec<[
impl PlineCommand {
/// Close the polyline: in Arc mode the closing segment is an arc tangent
/// to the last segment (AutoCAD's CLose), in Line mode a straight one.
/// to the last segment (CLose in commercial solutions), in Line mode a straight one.
fn close(&mut self) -> CmdResult {
if self.vertices.len() < 2 {
return CmdResult::NeedPoint;
@@ -779,7 +779,7 @@ impl CadCommand for PlineCommand {
let can_close = self.vertices.len() >= 3
|| (self.vertices.len() == 2 && matches!(self.mode, SegMode::Arc));
match self.sub {
// AutoCAD's keyword sets, in AutoCAD's order.
// The keyword sets of commercial solutions, in their order.
Sub::None => match self.mode {
SegMode::Line => {
let mut opts = vec![CmdOption::new("Arc", "A")];
@@ -849,7 +849,7 @@ impl CadCommand for PlineCommand {
match self.sub {
Sub::None => {}
// A picked point at a typed-value prompt reads as the distance
// (or angle) from the last vertex, as AutoCAD allows.
// (or angle) from the last vertex, as commercial solutions allow.
sub if sub.is_scalar() => {
let value = if sub.is_angle() {
(p - a).y.atan2((p - a).x).to_degrees()
@@ -1068,7 +1068,7 @@ impl CadCommand for PlineCommand {
self.sub = Sub::ArcCenter;
Some(CmdResult::NeedPoint)
}
// AutoCAD wants CL in arc mode; a bare C is accepted as well.
// Commercial solutions want CL in arc mode; a bare C is accepted as well.
(SegMode::Arc, "CL" | "C" | "CLOSE") => Some(self.close()),
(SegMode::Arc, "D" | "DIRECTION") => {
self.sub = Sub::ArcDirection;
@@ -1272,7 +1272,7 @@ mod tests {
}
#[test]
fn options_per_mode_match_autocad_keywords() {
fn options_per_mode_match_compatible_keywords() {
let mut cmd = pl(&[(0.0, 0.0), (10.0, 0.0)]);
assert_eq!(keywords(&cmd), ["A", "H", "L", "U", "W", ""]);
cmd.on_point(DVec3::new(10.0, 5.0, 0.0));
+2 -2
View File
@@ -4,7 +4,7 @@
// Requires at least one entity selected before starting.
// Step 1: pick base point, or D = type the displacement vector directly
// Step 2: pick destination → translates all selected entities by (dest - base);
// Enter uses the base point as the displacement (AutoCAD).
// Enter uses the base point as the displacement (commercial solutions).
use acadrust::Handle;
use glam::DVec3;
@@ -119,7 +119,7 @@ impl CadCommand for MoveCommand {
fn on_enter(&mut self) -> CmdResult {
match self.step {
// AutoCAD: Enter at the second point uses the base point as the
// Commercial solutions: Enter at the second point uses the base point as the
// displacement from the origin.
Step::Target(base) => CmdResult::TransformSelected(
self.handles.clone(),
+30 -28
View File
@@ -6,7 +6,7 @@
//! walks the same rows to resolve Up/Down/Enter/mnemonic picks, so what the
//! user sees and what a keypress selects can never diverge.
//!
//! The layout mirrors AutoCAD's shortcut menus, which the user base already
//! The layout covers the shortcut menus of commercial solutions, which the user base already
//! knows: while a command runs the menu offers Enter / Cancel / the command's
//! own keyword options (with the keyword shown as a hint, so the menu also
//! teaches the typed shortcut); when idle it offers Repeat / Recent Input /
@@ -44,7 +44,7 @@ pub enum SubmenuId {
SnapOverrides,
}
/// Glyph drawn in a row's icon gutter (AutoCAD shows one for object snaps
/// Glyph drawn in a row's icon gutter (commercial solutions show one for object snaps
/// and the navigation rows).
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum MenuIcon {
@@ -54,7 +54,7 @@ pub enum MenuIcon {
Zoom,
}
/// What a grip-menu row does (AutoCAD grip-mode shortcut menu).
/// What a grip-menu row does (the grip-mode shortcut menu of commercial solutions).
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum GripMenuCmd {
Stretch,
@@ -425,8 +425,10 @@ fn command_rows(
open_submenu: Option<SubmenuId>,
) -> Vec<MenuRow> {
let mut rows = Vec::new();
// AutoCAD order: Enter, Cancel, Recent Input, the command's keywords,
// Snap Overrides, then the transparent navigation commands.
// Ordered by how often a drafter reaches for each row: Enter / Cancel
// under the pointer, the command's own keywords right below them (the
// choices that change from step to step), then the recall and snap
// helpers, and the transparent navigation commands last.
//
// A command may name its own finish action (PLINE "Done", OFFSET's
// "<0.5000>" default). That row *is* Enter: it is not listed twice, and
@@ -442,14 +444,6 @@ fn command_rows(
rows.push(MenuRow::Item(
MenuItem::new(t!("Cancel").into_owned(), MenuAction::Cancel).hint("Esc"),
));
rows.push(recent_input_submenu(
recent_inputs
.iter()
.take(RECENT_LIMIT)
.map(|tok| MenuItem::new(tok.clone(), MenuAction::FeedInput(tok.clone())))
.collect(),
open_submenu,
));
let keyword_opts: Vec<&CmdOption> = options.iter().filter(|o| !o.keyword.is_empty()).collect();
if !keyword_opts.is_empty() {
@@ -463,8 +457,16 @@ fn command_rows(
}
}
rows.push(MenuRow::Separator);
rows.push(recent_input_submenu(
recent_inputs
.iter()
.take(RECENT_LIMIT)
.map(|tok| MenuItem::new(tok.clone(), MenuAction::FeedInput(tok.clone())))
.collect(),
open_submenu,
));
if has_point_step {
rows.push(MenuRow::Separator);
rows.push(MenuRow::Submenu {
id: SubmenuId::SnapOverrides,
label: t!("Snap Overrides").into_owned(),
@@ -478,7 +480,7 @@ fn command_rows(
rows
}
/// Recent Input ▸ — always listed (AutoCAD keeps the entry even when there
/// Recent Input ▸ — always listed (commercial solutions keep the entry even when there
/// is nothing to recall yet; it is simply disabled then).
fn recent_input_submenu(items: Vec<MenuItem>, open_submenu: Option<SubmenuId>) -> MenuRow {
MenuRow::Submenu {
@@ -489,7 +491,7 @@ fn recent_input_submenu(items: Vec<MenuItem>, open_submenu: Option<SubmenuId>) -
}
}
/// Snap Overrides ▸: one-shot object snaps for the next pick, in AutoCAD's
/// Snap Overrides ▸: one-shot object snaps for the next pick, in the
/// grouping (M2P, then the edge snaps, the curve snaps, the relation snaps,
/// None) plus the settings dialog.
fn snap_override_items() -> Vec<MenuItem> {
@@ -520,7 +522,7 @@ fn snap_override_items() -> Vec<MenuItem> {
}
/// Pan / Zoom rows. While a command runs they execute transparently (the
/// `'` prefix, as in AutoCAD) so the command resumes afterwards.
/// `'` prefix, as in commercial solutions) so the command resumes afterwards.
fn navigation_rows(transparent: bool) -> Vec<MenuRow> {
let prefix = if transparent { "'" } else { "" };
vec![
@@ -607,7 +609,7 @@ fn idle_rows(
));
rows.push(MenuRow::Separator);
// ── Selection edit block (AutoCAD "Edit" shortcut menu) ────────────
// ── Selection edit block (the "Edit" shortcut menu of commercial solutions) ──
if has_selection {
rows.push(MenuRow::Item(MenuItem::new(
t!("Erase").into_owned(),
@@ -663,7 +665,7 @@ fn idle_rows(
// ── Navigation ─────────────────────────────────────────────────────
rows.extend(navigation_rows(false));
// The edit menu is long already; Zoom Extents stays on the idle menu
// (and on the middle button's double-click), as in AutoCAD.
// (and on the middle button's double-click), as in commercial solutions.
if !has_selection {
rows.push(MenuRow::Item(cmd(t!("Zoom Extents").into_owned(), "ZOOM EXTENTS")));
}
@@ -775,25 +777,25 @@ mod tests {
#[test]
fn command_menu_lists_options_with_hints() {
let menu = build_context_menu(&line_ctx(), None);
// AutoCAD order: Enter, Cancel, Recent Input, keywords, Snap
// Overrides, Pan / Zoom.
// Enter / Cancel, the keywords, then the recall / snap helpers and
// the navigation rows.
assert_eq!(
labels(&menu),
vec![
tl("Enter"),
tl("Cancel"),
format!("{} >", tl("Recent Input")),
"---".into(),
tl("Close"),
tl("Undo"),
"---".into(),
format!("{} >", tl("Recent Input")),
format!("{} >", tl("Snap Overrides")),
"---".into(),
tl("Pan"),
tl("Zoom"),
]
);
let close = item_at(&menu, 4);
let close = item_at(&menu, 3);
assert_eq!(close.hint.as_deref(), Some("C"));
assert_eq!(close.mnemonic, Some('C'));
assert_eq!(close.action, MenuAction::Option("C".into()));
@@ -821,8 +823,8 @@ mod tests {
[
MenuAction::Enter,
MenuAction::Cancel,
MenuAction::Option("A".into()),
MenuAction::ToggleSubmenu(SubmenuId::RecentInput),
MenuAction::Option("A".into())
]
);
// A default value shows on the Enter row as its hint (OFFSET <dist>).
@@ -1014,10 +1016,10 @@ mod tests {
recent_inputs: Vec::new(),
};
let menu = build_context_menu(&ctx, None);
// rows: Enter(0) Cancel(1) Recent Input(2) Angle(3) CEnter(4) CLose(5) …
assert_eq!(menu.find_mnemonic('c', None), Some(4));
assert_eq!(menu.find_mnemonic('C', Some(4)), Some(5));
assert_eq!(menu.find_mnemonic('C', Some(5)), Some(4));
// rows: Enter(0) Cancel(1) Angle(2) CEnter(3) CLose(4) …
assert_eq!(menu.find_mnemonic('c', None), Some(3));
assert_eq!(menu.find_mnemonic('C', Some(3)), Some(4));
assert_eq!(menu.find_mnemonic('C', Some(4)), Some(3));
assert_eq!(menu.find_mnemonic('Z', None), None);
}
+1 -1
View File
@@ -1269,7 +1269,7 @@ pub fn view_window<'a>(
.align_y(iced::Center),
Space::new().height(6),
text(crate::t!(
"Shortcut menu: right-click always opens the menu (AutoCAD default). Time-sensitive: a quick click is Enter, holding longer opens the menu (SHORTCUTMENUDURATION)."
"Shortcut menu: right-click always opens the menu. Time-sensitive: a quick click is Enter, holding longer opens the menu (SHORTCUTMENUDURATION)."
))
.size(11)
.width(sizing.width),