The context menu is the menu which user can adjust and configure itself. The menu is caused by click of the right button of a mouse, through a toolbar or by program. Result of a choice of menu item is sending on a server of the given sequence of symbols. The sequence can contain any symbols and contents of the clipboard. For work with a context menu there are following server subroutines:
Sub GP.ContextMenuSub(StrMethod)
Sub GP.ContextMenuFn(StrMethod,Ret)
| DeleteMenu | MenuName[,position] | Deletes menu item |
| RenameMenu | Name1,Name2 | Renames menu |
| TrackMenu | MenuName[,[px],[py][,flags]] | Shows menu at the given position |
| CreatePopupMenu | ParentName,[InsertBefore],PopupMenuName,PopupMenuText | Creates popup menu item |
| InsertMenuItem | ParentName,[InsertBefore],MenuName,MenuText;MenuOutput | Inserts menu item into the given popup menu |
| InsertSeparator | ParentName,[InsertBefore][,SeparatorName] | Inserts separator into the given popup menu |
| SetOutputString | MenuName,[position],OutputString |
String which it will be transferred on a server at a choice of the specified element of the menu. See Sequence format description. |
| SetDescription | MenuName,[position],Description | Text description of the specified menu item |
| Load | FileName[,InitDir]", | Loads context menu from the specified file |
| LoadMenu | MenuName,FileName[,InitDir] | Loads given context menu from the specified file |
| AppendFromFile | MenuName,FileName[,InitDir] | Appends given context menu from the specified file |
| Save | FileName[,InitDir] | Saves context menu |
| SaveMenu | MenuName,FileName[,InitDir] | Saves given context menu |
| Execute | MenuName | Emulate menu item click (Allows parse clipboard) |
| DeleteAllItems | Deletes all items |
For adjustment of the menu is possible to use the dialog of adjustment of context menu or the text editor for editing a file containing the description of a menu. At start of the program the menu described in a file which is specified in dialogue of adjustment of the terminal is loaded. For enable of use the context menu is necessary to sets a flag in the menu "view". With the help the context menu is possible to automate work in a command line of the terminal.

MENUITEM<tab>Menu name<tab>Menu ID<tab>Menu text<tab>Description<tab>Output text
SUBMENU<tab>Menu name<tab>Menu ID<tab><tab>Menu text<tab>Description
END
MENUITEM<tab>nm1<tab>0<tab>EXIT<tab>Menu for exit<tab>EXIT\r
SUBMENU<tab>Snm1<tab>1<tab>0<tab>Operation with PICK files
MENUITEM<tab>nm2<tab>0<tab>List %CLIP a1 a2 a3 a3 a4 <tab>List %C a1 a2 a3 a3 a4\r
MENUITEM<tab>nm3<tab>0<tab>istat<tab>istat %c (s\r
END
END