The Code Editor features a help sidebar that can be used both for Macro and Python scripts. The sidebar can offer help for: functions and colour editing.
Built-in function help (F1)
The function help can be activated by pressing F1
.
Function list
If we press F1
when the text cursor is not positioned on a built-in function or icon parameter, or we press the icon in the toolbar, the help sidebar will open up showing the full Metview function list (including icon and non-icon functions).
Here we have the option of either insert the selected function into the editor or copy it into the clipboard. If we double-click or press the Details button the function's help page will be shown (see below).
Icon functions
If we press F1
on any of the icon functions' name the help sidebar will open showing the icon help panel. In the example below the text cursor was located in "mgraph(" when we pressed F1
so the sidebar shows the deatils of the Graph plotting icon:
Alternatively, if we press F1
on an icon parameter (within an icon function) the help sidebar will show the icon help panel with the given parameter automatically selected in the parameter list. In the example below the text cursor was located in parameter "graph_symbol_outline" (within the icon function mgraph
) when we pressed F1
.
The icon help page contains two tabs:
- Icon parameters
- Icon documentation
The Icon parameters tab
This tab shows the list of all the parameters belonging to the icon:
When we click on a parameter in the list the available values of the parameter (if it offers a predefined list of values) will be shown in the Values list. By clicking on a colour parameter the colour editor will appear below the parameter list:
The Code generated for selection section at the bottom of the panel shows a preview of the code generated for the current parameter and its selected value. Using the buttons below this section the text can be either inserted into the code editor or copied into the clipboard.
The Icon documentation tab
This tab shows the Metview web-based documentation about the icon.
Non-icon functions
If we press F1
on any of the non-icon functions in the text editor the help sidebar will show the description and web-based documentation of the given function. In the example below the text cursor was located in text "gradient(" when we pressed F1
so the sidebar shows the documentation of function gradient()
.
Functions available for multiple datatypes
It can happen that a given function can be used with various data types so it is documented on multiple web pages Let us take the values() function as an example. The first thing to note is that in the function list the tooltip describes all the variants of this function:
Then in the function's help page at the top we can chose from a list which variant documentation we want to see
Integrated Colour Editor (F2)
The colour editor can be activated by pressing F2
or clicking on the icon in the toolbar: