VARKON Version 1.15 1997-10-16
VARKON menus usually reside in menufiles having names ending with ".MDF"
(MenuDefinitionFile). Each time VARKON is started or the active project
is changed VARKON loads a new menufile. The name of the file is found on
the last row of the PID-file belonging to the project. Additional files
can also be loaded from MBS with the load_mdf() procedure.
A menufile is an ordinary textfile that can be used to define or redefine
menus as well as texts (t-strings), function-keys (accelerators) or #include
other menufiles. For each project we recommend a unique menufile that first
of all #includes the VARKON system default file $VARKON_MDF/varkon.MDF
and then adds any project specific definitions. Here is an example....
! This is the menufile for the projet named "my_project"
! The name of the menufile is "my_project.MDF"
! First of all we load the system defaults
#include "$VARKON_MDF/varkon.MDF"
! Then we create a new menu
m200 = "NEW_MENU"
"line 1",action_1
"line 2",action_2
"line 3",action_3;
! Note that the last line is terminated by a semicolon.
! We can also define some t-strings......
t600 = "text 1"
t601 = "text 2"
t603 = "text 3"
! and program a PF-key to a specific operation.
s50 = "%27A",m201
! Finally we may want to indicate that our new menu number 200 above should
! be used as the main menu.
Main_menu = 200
Use menu numbers from 200 and up. Numbers lower than 200 are reserved by
the system. Numbers higher than 400 are illegal. The exact syntax of a
menu is:
mn = "Menu_name"
followed by one or more lines of the following form:
"text",action
the last line terminated by a semicolon ;
"Menu_name" is an arbitrary heading that will be displayed at
the top of the menu. "text" is an arbitrary text describing the
action to take place when this alternative is selected.
action is the letter "m", "f", "M", "p",
"r", or "a" followed by a number n. "m" activates
menu n. "f" activates built in function number n. "M"
calls a MACRO module named by t-string n. "p" creates a call
to and executes a LOCAL, GLOBAL or BASIC module named by t-string n. "r"
is the same as "p" but without saving the call in the active
module. "a" stands for "alternative" and performs no
action at all.
The following MBS routines apply to menus: CRE_MEN(), GET_MEN(), PSH_MEN(),
POP_MEN(), GET_ALT().
t-strings have the following syntax:
tn = "text"
where n must be a number from 600 up to 1500. Lower and higher numbers
are reserved by the system. A t-string is just a text with a number and
may be used for any purpose you can think of. The "M", "p"
and "r" actions in menus rely on t-strings to store the name
of the module to be called. VARKON itself uses the values of t-strings
when displaying messages of various kinds. MBS-routines CRE_TSTR() and
GET_TSTR() can be used to create a t-string and retrieve its value from
MBS.
PF-keys may be define using the following syntax:
sn = "%27c",action
where c is a character in the range "A" to "Z" and
action is the same as described above for menus. "A" to "Z"
gives a total number of 26 individual PF-keys or accelerators. "%27A"
is PF1, "%27B" is PF2 and so on. Most keyboards don't have as
many as 26 PF-keys but might emulate extra keys by the use of <SHIFT>PF1,
<SHIFT>PF2 etc. s1 to s12 are reserved by VARKON for the standard
PF-key setup. You may redefine any of these if you wish in your own menufile
and you may also add new ones.
Copyright © Microform AB Henningholmsgatan 4 S-703 69 Örebro SWEDEN E-mail: info@microform.se
VARKON Homepage | Index |