### 3.9 Command-line GUI

You can start Msc-generator in the command line with the `--gui` switch. This opens a GUI, where you can work with charts. Most of the GUI is quite straightforward, here we just list a few things you may not discover by yourself at first.

- You can use the mouse wheel to scroll and scale the editor and the chart.
- You can drag the chart to pan.
- You can press the ‘`Fit to window`’ and ‘`Fit to width`’ buttons in the menu bar to scale the chart accordingly. Checking the boxes beside these buttons will automatically re-scale the chart after each compilation.
- Right-clicking an element in the editor brings up a context menu. You can then rename elements (entities, graph nodes or blocks) or briefly flash the element (arrows, entities, boxes, graph nodes, etc.) in the chart graphics. You can also do these by pressing Ctrl-R and F4, respectively while the cursor is positioned in the desired element.
- Double-clicking the chart will enter Tracking mode. In this mode hoovering over an element of the chart will highlight the element and select its definition in the text editor. While in tracking mode, moving around in the text editor will highlight the element the cursor is currently in. You can als click to select and unselect chart elements - this is useful when explaining the chart in a screen sharing or presentation session. See Presentation mode below.
- If the chart contains multiple pages, you can use the page selector to cycle among them. (The page selector does not appear, if the chart has only one page.) Selecing page zero, will show all the pages.

There are also a few settings to tweak.

- You can set certain chart options, which will impact the chart appearance, the errors/warnings produced, etc. By default, Msc-generator will recompile the chart every time you change it. Unchecking ‘`Instant compilation`’ will prevent that. Then you can use F2 or the ‘`Compile`’ button to manually compile.
- In the middle column, you can adjust the zoom and its settings. You can also turn Auto heading mode off if you do not want the signalling chart headers to be shown always. (Auto heading has an effect only for signalling charts.) You can also enter Presentation mode here. In this mode only the chart is shown, but in full screen. You can press the Escape key to exit Presentation mode. Double-clicking the chart in presentation mode will enter tracking mode allowing you to explain the chart easier.
- In the third column you can experiment with editor settings. First, Msc-generator saves the chart text every second if the chart is associated with a file. You can turn this off by setting ‘`Auto Save`’ off. The error squiggles provided in the editor are a subset of the error messages received during a compilation. They are generated with color syntax highlighting and are useful as instant error feedback for charts that take longer to compile. If you turn Smart indent off, the Tab key will indent (Shift+Tab will de-indent) the line even if you are at the end of it.

You can use the following command-line switches alongside `--gui`.

`-S <chart type>`

  Adding this will skip the welcome screen and start the GUI with a fresh copy of the specified chart. If you also specify a filename, then here you can force its type.

`<input filename>`

  The file specified will be opened. Its chart type will be deduced from its extension or its content if it is a PNG file containing a chart (saved by Msc-generator).

`--nodesigns`

  This will skip loading the design libraries as usual.

Some other switches will abort (such as `--utf16` to force a UTF-16 encoded input), because the GUI does not support them, but some switches will just be silently ignored (such as `-q` for quiet output).

The GUI has a settings file `.msc-generator-ini`, which stores window positions, settings and the recently opened file list. On Linux it is placed into `$HOME/.msc-genrc` by default or to `$MSC_GEN_RC/.msc-genrc`. On Windows it is in the `AppData\Roaming\Msc-generator` folder. You can freely delete this file to erase settings and history.