Skip to content

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”.

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.

Generated from the app’s command tables.

app.*

IdLabel
app.office.center.optionsOptions
app.quitExit

arrange.*

IdLabel
arrange.align.bottomBottom
arrange.align.center_xAlign Center
arrange.align.leftAlign Left
arrange.align.middleMiddle
arrange.align.rightAlign Right
arrange.align.topTop
arrange.bring_forwardBring Forward
arrange.bring_to_frontBring to Front
arrange.distribute.horizontalDistribute Horizontally
arrange.distribute.verticalDistribute Vertically
arrange.groupGroup
arrange.send_backwardSend Backward
arrange.send_to_backSend to Back
arrange.ungroupUngroup

connector.*

IdLabel
connector.drawDraw Connector
connector.glue_beginGlue Begin
connector.glue_endGlue End
connector.reroute_allReroute All
connector.styleConnector Style
connector.unglueUnglue

edit.*

IdLabel
edit.copyCopy
edit.cutCut
edit.deleteDelete
edit.deselectDeselect
edit.duplicateDuplicate
edit.pastePaste
edit.redoRedo
edit.selectSelect
edit.select_allSelect All
edit.undoUndo

file.*

IdLabel
file.closeClose
file.exitExit
file.exportExport
file.inspectInspect
file.newNew
file.openOpen
file.renderRender
file.saveSave
file.save_asSave As

help.*

IdLabel
help.aboutAbout

insert.*

IdLabel
insert.drawing.ellipseEllipse
insert.drawing.lineLine
insert.drawing.rectangleRectangle
insert.drawing.text_boxText Box
insert.shapeShape

page.*

IdLabel
page.addNew Page
page.deleteDelete Page
page.move_leftMove Page Left
page.move_rightMove Page Right
page.nextNext Page
page.previousPrevious Page
page.renameRename Page
page.reorderReorder

shape.*

IdLabel
shape.ellipseEllipse
shape.enter_groupEnter Group
shape.exit_groupExit Group
shape.lineLine
shape.moveMove
shape.rectangleRectangle
shape.resizeResize
shape.rotateRotate
shape.set.angleAngle
shape.set.heightHeight
shape.set.pinPosition
shape.set.textShape Text
shape.set.widthWidth

text.*

IdLabel
text.beginEdit Text
text.cancelCancel Text
text.commitCommit Text

tools.*

IdLabel
tools.connectorConnector Tool
tools.ellipseEllipse
tools.pointerPointer Tool
tools.rectangleRectangle
tools.textText Tool

view.*

IdLabel
view.rulersRulers
view.toggle_gridToggle Grid
view.ui_layout.visio_2016Visio 2016 Ribbon
view.ui_layout.visio_365Microsoft 365 Ribbon
view.unitsUnits
view.zoom.fitFit to Window
view.zoom.inZoom In
view.zoom.outZoom Out

84 implemented commands, app commit 4112a26.