Command registry
larrygram-commands
Every action in Larrygram is a command with a stable id, such as edit.undo or file.export. The menus, the command bar, the keyboard shortcuts and the command-line tool all dispatch the same ids through one registry, so they always behave the same way. The registry also owns undo, redo and the selection.
The layout data lists 977 command ids. Commands that are not built yet are registered as stubs: they show in the layouts, disabled, with the tooltip “Not yet implemented”.
Invocation
Section titled “Invocation”A command receives named arguments. The documented contracts include:
| Command | Arguments |
|---|---|
file.open |
path (or name and data for in-memory files) |
file.save_as |
path |
file.inspect |
path, page, json |
file.render |
path, out, page, format, scale, background, strict |
file.export |
path, out, format, scale, strict |
file.close |
optional confirm (the answer to the close confirmation) |
view.zoom.fit |
width, height (points) |
view.units |
units (a display-unit name) |
Each command also has an enabled check. For example, edit.undo is enabled only when there is something to undo.
Implemented commands
Section titled “Implemented commands”Generated from the app’s command tables.
app.*
| Id | Label |
|---|---|
app.office.center.options | Options |
app.quit | Exit |
arrange.*
| Id | Label |
|---|---|
arrange.align.bottom | Bottom |
arrange.align.center_x | Align Center |
arrange.align.left | Align Left |
arrange.align.middle | Middle |
arrange.align.right | Align Right |
arrange.align.top | Top |
arrange.bring_forward | Bring Forward |
arrange.bring_to_front | Bring to Front |
arrange.distribute.horizontal | Distribute Horizontally |
arrange.distribute.vertical | Distribute Vertically |
arrange.group | Group |
arrange.send_backward | Send Backward |
arrange.send_to_back | Send to Back |
arrange.ungroup | Ungroup |
connector.*
| Id | Label |
|---|---|
connector.draw | Draw Connector |
connector.glue_begin | Glue Begin |
connector.glue_end | Glue End |
connector.reroute_all | Reroute All |
connector.style | Connector Style |
connector.unglue | Unglue |
edit.*
| Id | Label |
|---|---|
edit.copy | Copy |
edit.cut | Cut |
edit.delete | Delete |
edit.deselect | Deselect |
edit.duplicate | Duplicate |
edit.paste | Paste |
edit.redo | Redo |
edit.select | Select |
edit.select_all | Select All |
edit.undo | Undo |
file.*
| Id | Label |
|---|---|
file.close | Close |
file.exit | Exit |
file.export | Export |
file.inspect | Inspect |
file.new | New |
file.open | Open |
file.render | Render |
file.save | Save |
file.save_as | Save As |
help.*
| Id | Label |
|---|---|
help.about | About |
insert.*
| Id | Label |
|---|---|
insert.drawing.ellipse | Ellipse |
insert.drawing.line | Line |
insert.drawing.rectangle | Rectangle |
insert.drawing.text_box | Text Box |
insert.shape | Shape |
page.*
| Id | Label |
|---|---|
page.add | New Page |
page.delete | Delete Page |
page.move_left | Move Page Left |
page.move_right | Move Page Right |
page.next | Next Page |
page.previous | Previous Page |
page.rename | Rename Page |
page.reorder | Reorder |
shape.*
| Id | Label |
|---|---|
shape.ellipse | Ellipse |
shape.enter_group | Enter Group |
shape.exit_group | Exit Group |
shape.line | Line |
shape.move | Move |
shape.rectangle | Rectangle |
shape.resize | Resize |
shape.rotate | Rotate |
shape.set.angle | Angle |
shape.set.height | Height |
shape.set.pin | Position |
shape.set.text | Shape Text |
shape.set.width | Width |
text.*
| Id | Label |
|---|---|
text.begin | Edit Text |
text.cancel | Cancel Text |
text.commit | Commit Text |
tools.*
| Id | Label |
|---|---|
tools.connector | Connector Tool |
tools.ellipse | Ellipse |
tools.pointer | Pointer Tool |
tools.rectangle | Rectangle |
tools.text | Text Tool |
view.*
| Id | Label |
|---|---|
view.rulers | Rulers |
view.toggle_grid | Toggle Grid |
view.ui_layout.visio_2016 | Visio 2016 Ribbon |
view.ui_layout.visio_365 | Microsoft 365 Ribbon |
view.units | Units |
view.zoom.fit | Fit to Window |
view.zoom.in | Zoom In |
view.zoom.out | Zoom Out |
84 implemented commands, app commit 4112a26.