Scilab Function

addmenu - interactive button or menu definition

Calling Sequence

addmenu(button [,submenus] [,action])
addmenu(gwin,button [,submenus] [,action])

Parameters

Description

The function allows the user to add new buttons or menus in the main window or graphics windows command panels.

  • If action argument 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 action argument is set to 0

    proc_name should be the name of a Scilab string vector. Actions associated with the kth sub_menu must be defined by scilab instructions stored in the kth element of the character string variable.

  • If action argument is set to 1

    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. The C calling sequence is:

    (char* button_name, int* gwin,int *k)

  • If action argument is set to 2

    proc_name designes a Scilab function. This function calling sequence should be:

    + proc_name(k)for a main window command

    + proc_name(k,gwin)for a graphic window command or a main window command

  • Examples

    See Also