88f5a00e389b
ui_commands.rs
use super::DesignApp;
/// Menu and Quick Apply entries that only CJK typesetting uses: hidden unless
/// [`crate::cjk_features`]. The commands still run from scripts, the control channel and MCP.
pub const CJK_ONLY: &[&str] = &["type.tateChuYoko", "app.rubyDialog", "type.kenten", "type.warichu"];
/// Whether command `id` has a menu item or Quick Apply entry in the current interface (CJK-only
/// ones need [`crate::cjk_features`]).
pub fn shown(app: &DesignApp, id: &str) -> bool {
!CJK_ONLY.contains(&id) || crate::cjk_features(app)
}
/// UI commands: (id, label, shortcut, params).
pub const UI_COMMANDS: &[(&str, &str, Option<&str>, &str)] = &[
("app.newDocumentDialog", "New Document…", Some("Cmd+N"), "{}"),
("app.openDialog", "Open…", Some("Cmd+O"), "{path?} — without a path, choose the file in a dialog"),
("app.openRecent", "Open Recent File", None, "{index} — file.openRecent, with an alert when the file can't be opened"),
(
"app.placeDialog",
"Place…",
Some("Cmd+D"),
"{path?, paths?: [path] (several, loaded into the place cursor in order)} — without either, choose the files in a dialog",
),
("app.contactSheetDialog", "Place Contact Sheet…", None, "{} — place the images loaded in the place cursor on new pages"),
("app.saveDialog", "Save As…", Some("Cmd+Shift+S"), "{path?} — without a path, choose where in a dialog"),
("app.save", "Save", Some("Cmd+S"), "{}"),
("app.quit", "Quit DesignCraft", Some("Cmd+Q"), "{} — close the window; each document with unsaved changes asks first"),
("app.saveCopyDialog", "Save a Copy…", Some("Cmd+Alt+S"), "{path?} — choose where to write a copy (the document stays as it is)"),
("app.loadSwatches", "Load Swatches…", None, "{path?} — pick a swatch exchange (.ase) file"),
(
"app.loadParagraphStyles",
"Load Paragraph Styles…",
None,
"{} — pick a document (.designcraft or .idml) and choose which of its paragraph styles to load (style.load)",
),
("app.loadCharacterStyles", "Load Character Styles…", None, "{} — the same for its character styles"),
("app.loadTextStyles", "Load All Text Styles…", None, "{} — the same for its paragraph and character styles"),
(
"effects.dialog",
"Effects…",
None,
"{page?: transparency|dropShadow|innerShadow|outerGlow|innerGlow|bevel|satin|feather|directionalFeather|gradientFeather} — the Effects dialog for the selected objects",
),
(
"objectStyle.dialog",
"Object Style…",
None,
"{name?: style} — Object Style Options for the style `name`, or (without it) New Object Style from the selected object",
),
(
"app.packageDialog",
"Package…",
Some("Cmd+Alt+Shift+P"),
"{dir?} — the Package dialog (what the package carries, printing instructions), then the folder to create; with dir, packages into it at once (file.package)",
),
("app.saveSwatches", "Save Swatches for Exchange…", None, "{path?} — write the colour swatches as .ase"),
("app.exportPng", "Export Page as PNG…", Some("Cmd+E"), "{}"),
("app.exportIdml", "Export IDML…", None, "{path?} — InDesign Markup (IDML) package"),
(
"app.exportEpub",
"Export EPUB…",
None,
"{path?} — reflowable EPUB 3 (with the first page as its cover); without a path, EPUB Export Options (Split Document) and then the save dialog",
),
(
"app.exportInteractivePdf",
"Export PDF (Interactive)…",
None,
"{path?, fullScreen?, advanceSeconds?} — single pages fitted, bookmarks panel open, buttons, forms, transitions",
),
("app.exportFixedEpub", "Export EPUB (Fixed Layout)…", None, "{path?} — pre-paginated EPUB 3"),
("app.exportHtml", "Export HTML…", None, "{path?} — one self-contained web page"),
("app.exportPptx", "Export PowerPoint…", None, "{path?} — every page as a slide of editable shapes, pictures and text"),
("app.exportXml", "Export XML…", None, "{path?} — the tagged content"),
("app.printBooklet", "Print Booklet…", None, "{path?} — saddle-stitched printer spreads as PDF"),
("app.qrCode", "Generate QR Code…", None, "{} — the QR Code dialog (object.qrCode does the work)"),
("app.userDictionary", "User Dictionary…", None, "{} — hyphenation exceptions (hyphenation.* commands)"),
("app.fittingOptions", "Frame Fitting Options…", None, "{} — the dialog for object.fittingOptions"),
("app.menus", "Menus…", None, "{} — show or hide menu items"),
("window.hideMenuItem", "Hide Menu Item", None, "{item: \"Menu/Label\", hidden?: bool}"),
("edit.dynamicSpelling", "Dynamic Spelling", None, "{on?: bool} — underline misspelled words on the canvas"),
(
"app.language",
"Interface Language",
None,
"{lang?: \"\"|de|fr|es|ja|zh|ar|pt-br|it|uk|ru|cs|pl|ka|hu|sv} — menus and panel names (the macOS menu bar follows at once); without lang, opens Preferences, where it is the first setting",
),
(
"app.flattener",
"Transparency Flattener Presets",
None,
"{preset: \"\"|high|medium|low} — PDF export rasterises spreads with transparency at 300 / 150 / 72 ppi",
),
("app.graphicCell", "Convert Cell to Graphic Cell…", None, "{path?} — pick an image for the target table cell"),
("app.placeAndLink", "Place and Link", None, "{} — a linked copy of the selected frame's story, beside it"),
("app.placeWithOptions", "Place with Import Options…", Some("Cmd+Shift+D"), "{path?} — Word/RTF style mapping before placing"),
("app.exportText", "Export Text…", None, "{path?} — the story being edited, as Text Only (.txt) or Rich Text Format (.rtf)"),
("app.exportPdf", "Export PDF…", None, "{path?, …file.exportPdf options} — asks for a path when none is given"),
(
"app.exportBatch",
"Export Layouts and Versions…",
None,
"{layouts?: [names]} — the Export Layouts and Versions dialog (several formats and layouts at once, presets)",
),
("app.palette", "Quick Apply…", Some("Cmd+Return"), "{} — search styles and commands"),
("app.preferences", "Preferences…", Some("Cmd+K"), "{}"),
("window.uiScale", "UI Scaling", None, "{scale: 0.5–3 (1 = 100%)} — the size of the whole interface"),
(
"app.keyboardShortcuts",
"Keyboard Shortcuts…",
None,
"{command?, params?} — view and change the shortcut of any command, and the shortcut sets; with command, the dialog opens on it",
),
(
"window.shortcutSets",
"Shortcut Sets",
None,
"{select?: name} — the shortcut sets (Default is built in; Edit › Keyboard Shortcuts makes the others); select makes one active → {active, sets, builtIn}",
),
("window.richBlack", "Appearance of Black", None, "{on: bool} — show 100% black as rich black on screen (off: accurately)"),
(
"window.setShortcut",
"Set Shortcut",
None,
"{id, params?, shortcut: \"Cmd+Alt+J\" | \"\" (none) | null (default), steal?} — id is a command; a panel is id \"window.panel\" with params {panel: \"layers\"}, a tool is id \"tool.select\" with params {tool: \"pen\"} (or its tool id, \"pen\"); steal: true takes the keys from the commands holding them → {shortcut, conflicts: [command keys: ids, or `window.panel {\"panel\":\"layers\"}`]}",
),
("window.resetShortcuts", "Reset Shortcuts", None, "{} — every command of the active shortcut set back to its default shortcut"),
(
"window.importShortcuts",
"Import InDesign Shortcut Set",
None,
"{path | text} — a set saved by InDesign's Show Set (.txt), imported as a new shortcut set, which becomes active: matched commands, panels (Window menu items) and tools (Tools items) take its Default shortcuts (an item without Default keys takes its Text keys), or none when every item matched to them has none; other commands lose keys it takes unless they share them as defaults → {set, imported, changed [{id, label, item, line, from, to}], conflictsCleared [{id, label, shortcut}], skipped [{id, item, line, shortcut, takenBy, reason}] (an earlier item whose keys a later one took, or a reserved key), failed [{id, label, change, shortcuts}], unmatched [{item, line, keys, reason: noMatch | ambiguous | tool | context}], unmatchedWithoutShortcut, unreadable [{item, line, keys, reason}], approximated [{item, line, keys, note}] (numeric keypad keys bound as the main keys), suggestions [{item, line, candidates}] (never applied), matchedWithoutChange [{id, label, item, line, reason}] (a keyless panel-menu item that clears nothing), truncated, shortcutSet (the new set's name)}; ids are command keys (`window.panel {\"panel\":\"layers\"}`)",
),
("app.findChange", "Find/Change…", Some("Cmd+F"), "{}"),
("app.insertTableDialog", "Insert Table…", Some("Cmd+Alt+Shift+T"), "{} — Insert Table dialog (body/header/footer rows, columns, table style)"),
(
"app.convertTextToTableDialog",
"Convert Text to Table…",
None,
"{} — Convert Text to Table dialog (column and row separators, number of columns, table style)",
),
("app.convertTableToTextDialog", "Convert Table to Text…", None, "{} — Convert Table to Text dialog (column and row separators)"),
(
"app.cellOptionsDialog",
"Strokes and Fills…",
None,
"{} — Cell Options › Strokes and Fills of the target cells: edge proxy, stroke weight, type, colour, tint, gap colour, gap tint, and cell fill (table.setCell)",
),
(
"app.diagonalLinesDialog",
"Diagonal Lines…",
None,
"{} — Cell Options › Diagonal Lines of the target cells: the line type, its weight, type, color, tint, gap color and gap tint, and Draw (table.setCell {diagonal})",
),
("app.footnoteOptionsDialog", "Document Footnote Options…", None, "{} — numbering, formatting and layout of footnotes"),
("app.rubyDialog", "Ruby…", None, "{} — the reading set over the selected text"),
(
"app.paragraphRulesDialog",
"Paragraph Rules…",
Some("Cmd+Alt+J"),
"{rule?: ruleAbove|ruleBelow} — Rule Above / Rule Below of the selected paragraphs (type.para)",
),
(
"app.paragraphBordersDialog",
"Paragraph Borders and Shading…",
None,
"{tab?: border|shading} — border and shading of the selected paragraphs (type.para)",
),
("app.spanColumnsDialog", "Span Columns…", None, "{} — span or split columns of the selected paragraphs (type.para)"),
("app.keepOptionsDialog", "Keep Options…", None, "{} — Keep with Next and Keep Lines Together of the selected paragraphs (type.para)"),
(
"app.nestedStylesDialog",
"Drop Caps and Nested Styles…",
None,
"{} — drop cap, nested styles and nested line styles of the selected paragraphs (type.para)",
),
("app.grepStylesDialog", "GREP Styles…", None, "{} — GREP styles of the selected paragraphs (type.para)"),
("app.bulletsNumberingDialog", "Bullets and Numbering…", None, "{} — bullets or numbers of the selected paragraphs (type.para)"),
(
"app.hyphenationDialog",
"Hyphenation…",
None,
"{} — Hyphenation Settings of the selected paragraphs (type.para): limits, zone, Better Spacing ↔ Fewer Hyphens, Preview",
),
(
"app.justificationDialog",
"Justification…",
Some("Cmd+Alt+Shift+J"),
"{} — word and letter spacing, glyph scaling and composer of the selected paragraphs (type.para)",
),
("app.findFontDialog", "Find/Replace Font…", None, "{} — fonts used (missing ones flagged) and replacing them"),
("app.insertXrefDialog", "Insert Cross-Reference…", None, "{} — New Cross-Reference dialog (paragraph or text anchor, format)"),
("app.deleteAllGuides", "Delete All Guides on Spread", None, "{} — the spread in view"),
("app.deletePage", "Delete Page", None, "{} — deletes the page in view"),
("app.duplicateSpread", "Duplicate Spread", None, "{} — duplicates the spread in view (pages and items)"),
(
"app.parentOptions",
"Parent Options…",
None,
"{} — the Parent Options dialog for the parent selected in the Pages panel (or shown), else the first",
),
("app.alternateLayoutOptions", "Alternate Layout Options…", None, "{} — the Alternate Layout Options dialog for the layout of the page in view"),
("app.tablePanel", "Table Panel", Some("Shift+F9"), "{}"),
("app.tabsPanel", "Tabs", Some("Cmd+Shift+T"), "{} — show or hide the Tabs panel (it opens above the selected text frame)"),
("app.characterPanel", "Character", Some("Cmd+T"), "{} — the Character panel"),
("app.paragraphPanel", "Paragraph", Some("Cmd+Alt+T"), "{} — the Paragraph panel"),
("app.glyphsPanel", "Glyphs", Some("Alt+Shift+F11"), "{} — the Glyphs panel"),
("app.characterStylesPanel", "Character Styles", Some("Cmd+Shift+F11"), "{} — the Character Styles panel"),
("app.paragraphStylesPanel", "Paragraph Styles", Some("Cmd+F11"), "{} — the Paragraph Styles panel"),
("app.insertCurrentPageNumber", "Current Page Number", Some("Cmd+Alt+Shift+N"), "{} — the Current Page Number marker at the insertion point"),
("app.insertEmSpace", "Em Space", Some("Cmd+Shift+M"), "{} — an em space at the insertion point"),
("app.insertEnSpace", "En Space", Some("Cmd+Shift+N"), "{} — an en space at the insertion point"),
("app.storyEditor", "Edit in Story Editor", Some("Cmd+Y"), "{story?}"),
("view.zoomIn", "Zoom In", Some("Cmd+="), "{at?: [x, y] window pixels, kept in place when over the canvas}"),
("view.zoomOut", "Zoom Out", Some("Cmd+-"), "{at?: [x, y] window pixels, kept in place when over the canvas}"),
("view.fitPage", "Fit Page in Window", Some("Cmd+0"), "{}"),
("view.fitSelection", "Fit Selection in Window", Some("Cmd+Alt+="), "{}"),
("view.fitSpread", "Fit Spread in Window", Some("Cmd+Alt+0"), "{}"),
("view.actualSize", "Actual Size", Some("Cmd+1"), "{}"),
("view.entirePasteboard", "Entire Pasteboard", Some("Cmd+Alt+Shift+0"), "{}"),
("view.zoom", "Zoom To", None, "{zoom: 1.0 = 100%}"),
("view.screenMode", "Screen Mode", None, "{mode: normal|preview|bleed|slug|presentation}"),
("view.togglePreview", "Toggle Normal/Preview", Some("W"), "{}"),
(
"view.togglePresentation",
"Toggle Presentation",
Some("Shift+W"),
"{} — enters Presentation, or returns to the mode it was entered from; Esc also leaves it",
),
(
"app.formattingAffectsText",
"Formatting Affects Text",
Some("J"),
"{on?: bool} — with text frames selected, colours go to their text (on) or the frames (off); toggles without `on`",
),
(
"color.defaultFillStroke",
"Default Fill and Stroke",
Some("D"),
"{} — the selection gets no fill and a black stroke (object.defaultFillStroke); text colour edits (Formatting Affects Text) get a black fill and no stroke",
),
(
"color.swapFillStroke",
"Swap Fill and Stroke",
Some("Shift+X"),
"{} — each selected object's fill and stroke colours (and tints) trade places (object.swapFillStroke), or the text's with Formatting Affects Text",
),
("color.toggleFillStroke", "Toggle Fill and Stroke", Some("X"), "{} → {strokeFront} — which of fill and stroke the proxy has in front"),
(
"color.applyNone",
"Apply None",
Some("/"),
"{} — [None] for the fill or stroke in front of the proxy, of the objects or the text (Formatting Affects Text)",
),
("color.applyColor", "Apply Color", Some(","), "{} — the colour applied last ([Black] at first) to the fill or stroke in front of the proxy"),
(
"color.applyGradient",
"Apply Gradient",
Some("."),
"{} — the gradient applied last (else the document's first, else white to black) to the fill or stroke in front of the proxy",
),
("view.frameEdges", "Show/Hide Frame Edges", Some("Cmd+H"), "{}"),
("view.rulers", "Show/Hide Rulers", Some("Cmd+R"), "{}"),
("view.guides", "Show/Hide Guides", Some("Cmd+;"), "{}"),
("view.lockGuides", "Lock Guides", Some("Cmd+Alt+;"), "{on?: bool} — ruler guides can't be dragged; toggles without `on`"),
("view.snapToGuides", "Snap to Guides", Some("Cmd+Shift+;"), "{}"),
("view.snapToDocumentGrid", "Snap to Document Grid", None, "{}"),
("view.smartGuides", "Smart Guides", None, "{}"),
(
"view.snapPreferences",
"Smart Guide Options",
None,
"{alignEdges?, alignCenters?, smartDimensions?, smartSpacing?: bool, zone?: px} — what smart guides snap to and how close; returns the current values",
),
("view.baselineGrid", "Show/Hide Baseline Grid", Some("Cmd+Alt+'"), "{}"),
("view.documentGrid", "Show/Hide Document Grid", Some("Cmd+'"), "{}"),
("view.textThreads", "Show/Hide Text Threads", Some("Cmd+Alt+Y"), "{}"),
("view.hiddenCharacters", "Show Hidden Characters", Some("Cmd+Alt+I"), "{}"),
("view.taggedFrames", "Show/Hide Tagged Frames", None, "{} — XML-tagged frames outlined in their tag colour"),
(
"view.storyEditorStyleColumn",
"Show/Hide Style Name Column",
None,
"{on?: bool, width?: 40–400 (points)} — the Story Editor's column of paragraph style names; toggles without either → {on, width}",
),
(
"view.storyEditorDepthRuler",
"Show/Hide Depth Ruler",
None,
"{} — the Story Editor's vertical ruler of how deep the text reaches in its frames",
),
("window.hidePanels", "Show/Hide Panels", Some("Tab"), "{} — every panel, the Tools panel included"),
("window.hidePanelsExceptTools", "Show/Hide Panels Except Tools", Some("Shift+Tab"), "{}"),
("window.nextDocument", "Next Document", Some("Cmd+F6"), "{}"),
("window.previousDocument", "Previous Document", Some("Cmd+Shift+F6"), "{}"),
("app.layerOptions", "Object Layer Options…", None, "{} — show or hide the layers of the selected placed PDF"),
(
"app.layerOptionsDialog",
"Layer Options…",
None,
"{id?} (default: the active layer) — name, colour, show, lock, print, guides, text wrap (layer.set)",
),
("app.swatchOptionsDialog", "Swatch Options…", None, "{name} — name, colour type, mode and values, tint (swatch.options)"),
("app.colorGroupOptionsDialog", "Color Group Options…", None, "{name} — rename a colour group (swatch.renameColorGroup)"),
("view.tagMarkers", "Show Tag Markers", None, "{on?: bool} — brackets around inline-tagged text"),
("view.flattenerPreview", "Flattener Preview", None, "{on?: bool} — highlight objects that involve transparency"),
("view.rotateSpread", "Rotate Spread", None, "{angle: 90 (clockwise) | -90 | 180 | 0 (clear)} — turn the view in quarter turns"),
("view.proofColors", "Proof Colors", None, "{on?: bool} — simulate the proof target on screen"),
(
"view.proofSetup",
"Proof Setup",
None,
"{target?: workingCmyk|srgb|legacyMacRgb|monitorRgb|protanopia|deuteranopia|cmyk:<profile>, intent?, simulatePaper?: bool|\"toggle\"}",
),
("app.colorSettings", "Color Settings…", None, "{} — the working spaces, intent and black-point compensation"),
(
"view.separations",
"Separations Preview",
None,
"{on?: bool, plate?: all|cyan|magenta|yellow|black|spot ink name|null (null: all inks, and off unless an ink limit stays), inkLimit?: percent|null} — the plates of the PDF Export PDF writes → {on, plate, inkLimit, spread, inks: [{name, spot}], dpi, warning?, error?}",
),
("view.overprintPreview", "Overprint Preview", Some("Cmd+Alt+Shift+Y"), "{} — show how overprinting inks mix"),
("view.fastDisplay", "Fast Display", Some("Cmd+Alt+Shift+Z"), "{} — placed graphics as grey boxes, no effects"),
("view.typicalDisplay", "Typical Display", Some("Cmd+Alt+Z"), "{} — low-resolution image proxies"),
("view.highQualityDisplay", "High Quality Display", Some("Cmd+Alt+H"), "{} — full-resolution images"),
("view.firstPage", "First Page", Some("Cmd+Shift+PageUp"), "{} — scroll to the document's first page (zoom kept)"),
("view.previousPage", "Previous Page", Some("Shift+PageUp"), "{} — scroll to the page before the one in view"),
("view.nextPage", "Next Page", Some("Shift+PageDown"), "{} — scroll to the page after the one in view"),
("view.lastPage", "Last Page", Some("Cmd+Shift+PageDown"), "{} — scroll to the document's last page"),
("view.nextSpread", "Next Spread", Some("Alt+PageDown"), "{} — centre the spread after the one in view"),
("view.previousSpread", "Previous Spread", Some("Alt+PageUp"), "{} — centre the spread before the one in view"),
("view.goToPage", "Go to Page…", Some("Cmd+J"), "{page: number (position) | \"name\" (section page name, or \"+n\" for a position)}"),
("view.goBack", "Go Back", Some("Cmd+PageUp"), "{} — show the page viewed before this one in the window"),
("view.goForward", "Go Forward", Some("Cmd+PageDown"), "{} — show the page viewed after this one (after Go Back)"),
(
"window.panel",
"Show Panel",
None,
"{panel: properties|pages|layers|swatches|paragraphStyles|characterStyles|stroke|character|paragraph|textWrap|links|table|preflight}",
),
("window.floatPanel", "Float Panel", None, "{panel, x?, y?, width?, height?} — the panel in its own floating window (window.panel.float)"),
(
"window.panel.layout",
"Change Panel Layout",
None,
"{action} — serialized docking action, including floating geometry, divider sizes and accordion state",
),
(
"window.panel.move",
"Move Panel",
None,
"{panel, anchor, zone?: tab|center|left|right|top|bottom|above|below, before?: panel|null, group?, placement?} — group, split or reorder a panel (group: its whole tab group)",
),
(
"window.panel.float",
"Float Panel",
None,
"{panel, x?, y?, width?, height?, group?, column?} — detach a panel (or its group, or its dock column) into a floating window",
),
(
"window.panel.dock",
"Dock Panel",
None,
"{panel, anchor?, zone?, before?, group?, column?, side?: Start|End} — dock a floating panel: beside anchor, in a new column at side, or back where it floated from",
),
("window.panel.activate", "Activate Panel", None, "{panel} — show and select a panel in its current group"),
("window.panel.close", "Close Panel", None, "{panel} — hide a panel"),
("window.panel.closeGroup", "Close Tab Group", None, "{panel} — hide the panel and the panels tabbed with it"),
("window.panel.closeOthers", "Close Other Panels in Group", None, "{panel} — hide the panels tabbed with it"),
("window.panel.minimize", "Minimize", None, "{panel, minimized?} — minimize the panel's group to its tab strip (toggles without minimized)"),
("window.panel.iconic", "Collapse to Icons", None, "{panel, iconic?} — collapse the panel's dock column to icons (toggles without iconic)"),
(
"window.panel.window",
"Move Panel to New Window",
None,
"{panel, native?} — not available: a floating panel has its own window on the desktop and stays in the page on the web",
),
("window.workspace.new", "New Workspace", None, "{name} — save the current workspace (window.newWorkspace)"),
("window.workspace.delete", "Delete Workspace", None, "{name} — delete a saved workspace (window.deleteWorkspace)"),
("window.workspace.reset", "Reset Workspace", None, "{} — back to the current workspace as saved (window.resetWorkspace)"),
("window.workspace.lock", "Lock Workspace", None, "{locked?} — not available in DesignCraft"),
(
"ui.dock",
"Change Panel Layout",
None,
"{action} | {operation: open|close|activate|float|moveFloating|move|setStackOpen|resizeStack|resizeSplit, …} — craft-ui's shared ui.dock shape",
),
("ui.dock.reset", "Reset Workspace", None, "{} — window.workspace.reset"),
("window.collapseToIcons", "Collapse to Icons", None, "{} — the panel dock shrinks to its column of icons"),
("window.dockPanel", "Dock Panel", None, "{panel} — back to its place in the dock (window.panel.dock)"),
("window.controlBar", "Control", Some("Cmd+Alt+6"), "{}"),
// Object › Fitting with InDesign's shortcuts (one `object.fit` mode each).
("fit.fillFrameProportionally", "Fill Frame Proportionally", Some("Cmd+Alt+Shift+C"), "{} — object.fit {mode: fillProportionally}"),
("fit.contentProportionally", "Fit Content Proportionally", Some("Cmd+Alt+Shift+E"), "{} — object.fit {mode: fitProportionally}"),
("fit.frameToContent", "Fit Frame to Content", Some("Cmd+Alt+C"), "{} — object.fit {mode: fitFrameToContent}"),
("fit.contentToFrame", "Fit Content to Frame", Some("Cmd+Alt+E"), "{} — object.fit {mode: fitContentToFrame}"),
("fit.centerContent", "Center Content", Some("Cmd+Shift+E"), "{} — object.fit {mode: centerContent}"),
("window.split", "Split Window", None, "{on?: bool} — two views of the document side by side, each with its own zoom and scroll"),
("window.newWindow", "New Window", None, "{on?: bool} — another view of the active document in its own window"),
("window.minimize", "Minimize Window", None, "{} — minimize the desktop window"),
("window.maximize", "Maximize/Restore Window", None, "{on?: bool} — toggle maximization when omitted"),
("window.close", "Close Window", None, "{} — request that the desktop window close"),
("window.drag", "Move Window", None, "{} — begin a native window drag while the primary mouse button is held"),
("window.resize", "Resize Window", None, "{edge: north|south|east|west|northEast|southEast|northWest|southWest} — begin a native edge drag"),
("window.taskBar", "Contextual Task Bar", None, "{}"),
(
"window.taskBarPin",
"Pin Bar Position",
None,
"{on?: bool, at?: [x, y] (points from the canvas's top-left)} — the Contextual Task Bar stays where it is (or at `at`) instead of following the selection; with neither, toggles",
),
("window.taskBarReset", "Reset Bar Position", None, "{} — the Contextual Task Bar follows the selection again, under it"),
("help.discord", "Join the ArtCraft Discord…", None, "{} — opens https://discord.gg/artcraft in the browser"),
("help.appPage", "DesignCraft Website…", None, "{} — opens https://getartcraft.com/apps/designcraft"),
("help.github", "DesignCraft on GitHub…", None, "{} — opens https://github.com/storytold/designcraft"),
("help.issues", "Report an Issue…", None, "{} — opens the GitHub issue tracker"),
("help.website", "ArtCraft Website…", None, "{} — opens https://getartcraft.com"),
("help.app", "ArtCraft App Page…", None, "{app} — opens https://getartcraft.com/apps/{app} (e.g. photocraft)"),
(
"help.about",
"About DesignCraft",
None,
"{open?: true, tab?: \"about\"|\"contributors\"|\"models\"} — the About window: splash with community links, contributor and model credits (open: false closes it)",
),
("help.checkForUpdates", "Check for Updates…", None, "{} — checks for newer releases and offers to update"),
("window.toolsDoubleColumn", "Tools: Double Column", None, "{on?: bool (default: toggle)} → whether the Tools panel has two columns"),
(
"window.workspace",
"Workspace",
None,
"{name: Advanced|Book|Digital Publishing|Essentials|Essentials Classic|Interactive for PDF|Printing and Proofing|Typography or a saved workspace}",
),
(
"window.newWorkspace",
"New Workspace…",
None,
"{name, panelLocations?: bool (default true: the bars and panels), menuCustomization?: bool (default true: the menu items hidden with Edit › Menus)} — saves the workspace",
),
("window.deleteWorkspace", "Delete Workspace…", None, "{name}"),
("window.resetWorkspace", "Reset Workspace", None, "{} — back to the current workspace as saved (or its defaults)"),
("window.brightness", "Interface Color Theme", None, "{brightness: dark|mediumDark|mediumLight|light|highContrast}"),
];
pub fn ui_label(id: &str) -> Option<(&'static str, Option<&'static str>)> {
UI_COMMANDS.iter().find(|c| c.0 == id).map(|c| (c.1, c.2))
}
No file is open. Choose one in the tree, or press Ctrl+O (⌘O on a Mac) to find one by name.
Syntax highlighting could not load. The unmodified read-only text remains available above.