File: uimenu.cat

package info (click to toggle)
scilab 2.4-1
  • links: PTS
  • area: non-free
  • in suites: potato, slink
  • size: 55,196 kB
  • ctags: 38,019
  • sloc: ansic: 231,970; fortran: 148,976; tcl: 7,099; makefile: 4,585; sh: 2,978; csh: 154; cpp: 101; asm: 39; sed: 5
file content (48 lines) | stat: -rw-r--r-- 1,565 bytes parent folder | download
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

uimenu(2)                      Scilab Function                      uimenu(2)
NAME
  uimenu - Create a menu or a submenu in a figure

  Author: Bertrand Guiheneuf

  This routine allows to add a menu or a submenu to the menu bar of a figure

Usage
  h=uimenu(parent,prop1, val1, prop2, valu2 ...)

Input parameter

  o    parent : integer Handle of menu's parent

  o    prop? : string character name of a propoerty to set up

  o    val?? : scilab object value to affect to the corresponding property

Output parameters

  o    h : integer handle of the corresponding menu

Description
  This allows to create menus in a figure. If 'parent' is a figure, then the
  menu item will be added to the menu bar of the figure.  If 'parent' is a
  menu item , then the new  item will be added to the parent item, allowing
  to create cascaded submenu.  The 'callback' property allows to set up the
  scilab instruction to call when the item is selected by the user.  The
  'label' property allows to set up the text appearing for the item.

EXAMPLE
  f=figure('position', [10 10 300 200]);
  // create a figure
  m=uimenu(f,'label', 'windows');
  // create an item on the menu bar
  m1=uimenu(m,'label', 'operations');
  m2=uimenu(m,'label', 'quit scilab', 'callback', "exit");
  //create two items in the menu "windows"
  m11=uimenu(m1,'label', 'new window', 'callback',"xselect()");
  m12=uimenu(m1,'label', 'clear  window', 'callback',"xbasc()");
  // create a submenu to the item "operations"
  close(f);
  // close the figure

See also
  figure, uicontrol, set, get