1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
addmenu(3) Scilab Function addmenu(3)
NAME
addmenu - interactive button or menu definition
CALLING SEQUENCE
addmenu(button [,submenus] [,action])
addmenu(gwin,button [,submenus] [,action])
PARAMETERS
button : a character string. The button name
submenus : a vector of character string. The sub_menus items names
action : a list with 2 elements action=list(flag,proc_name)
flag : an integer (default value is 0)
flag==0 : the action is defined by a scilab
instruction
flag==1 : the action is defined by a C or For-
tran procedure
proc_name : a character string which gives the name of scilab
variable containing the instruction or the name of pro-
cedure to call.
gwin : integer. The number of graphic window where the button is
required to be installed
DESCRIPTION
The function allows the user to add new buttons or menus in the main window
or graphics windows command panels.
If action is not given the action associated with a button must be defined
by a scilab instruction given by the character string variable which name
is
button for a main window command
button_gwin for a graphic window command
If proc_name designes a C or Fortran procedure, this
procedure may be interfaced in Fortran subroutine
default/fbutn.f or dynamically linked with scilab using
the link function.
Actions associated with the kth sub_menu must be defined by scilab
instructions stored in the kth element of the character string variable
which name is
button for a main window command
button_gwin for a graphic window command
EXAMPLE
addmenu('foo')
foo='disp(''hello'')'
addmenu('Hello',['Franck';'Peter'])
Hello=['disp(''hello Franck'')';'disp(''hello Peter'')']
addmenu(0,'Hello',['Franck';'Peter'])
Hello_0=['disp(''hello Franck'')';'disp(''hello Peter'')']
addmenu('Bye',list(0,'French_Bye'))
French_Bye='disp(''Au revoir'')'
SEE ALSO
setmenu, unsetmenu, delmenu
|