Next: Tracking Mode, Previous: The MFC GUI on Windows, Up: Getting started [Contents]

### 3.2 The CLI GUI

On all supported platforms, 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 also 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.
- If the clipboard contains an alt-text embedded chart or an alt-text encoded chart source, the `Paste Clipboard` button on the menu bar becomes active. Clicking it will paste the chart for editing. For embedded objects you can then press Ctrl+S to save the object back to the cliboard from where you can re-insert it into PowerPoint or Word. See Office integration for more details.

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. Turning ‘`Auto Paste Clipboard`’ on will make Msc-generator automatically open any alt-text embedded chart copied to the clipboard and bring Msc-generator to the front. See more on this in Alt-text embedding. 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, the recently opened file list and the autosave. On Linux and the Mac it is placed into `$HOME/.msc-genrc` by default or to `$MSC_GEN_RC/.msc-genrc`, if `MSC_GEN_RC` is set. On Windows it is in the `AppData\Roaming\Msc-generator` folder. You can freely delete this file to erase settings and history.

Finally, the command-line GUI has an example store similar to the other GUI (See Example Library). Selecting `Examples` from the menu bar opens a dialog box with example snippets demonstrating the features of each language.

The examples are keyword searchable, just start typing the topic you have in mind to narrow the list of examples. You can then copy and paste chart text from the exampes to your chart. In addition, the examples are editable allowing you to experiment with the language there and then. (Hinting with Ctrl+Space works, too.) Any changes made are immediately visible in the chart on the right. The examples are reset to their original text each time you exit Msc-generator.

Next: Tracking Mode, Previous: The MFC GUI on Windows, Up: Getting started [Contents]