The DejaVU Framework -- hush 3.1
[.] Papers Tutorials Examples Manuals Interfaces Sources Packages Resources ?

Manual: MENU 5 1996


[.] [man] man1 man2 man3 man4 man5 man6 man7 man8 man9 manl mann ?

NAME

menu -- to create menu widgets, menubuttons and menubars

SYNOPSIS


A menu consists of a number of button-like entries, each associated with an action. A menu entry may also consist of another menu, that pops up whenever the entry is selected.


slide: SYNOPSIS

INTERFACE


  interface menu : widget {                   
<widgets/menu.h>

sources/java/hush.dv.widgets.menu

menu(); menu(char* p, char* options = ""); menu(widget* w, char* p, char* options = ""); menu* add(char* s, char* args ="", char* options=""); menu* add(char* s, binding* ac, char* args ="", char* opts=""); menu* checkbutton(char* label, char* args ="", char* opts = "");
checkbutton

menu* radiobutton(char* label, char* variable, char* args ="", char* opts = "");
checkbutton

menu* cascade(char* s, menu* m, char* options = "");
to install a menu

char* entryconfigure(int i, char* options); int index(char *s); int active();
returns active index

void del(int i);
delete entry with index i

void del(char* s);
delete entry

void invoke(int i);
invoke entry with index i

void invoke(char *s );
invoke

void post(int x = 500, int y = 500); void unpost(); };

slide: INTERFACE

OPTIONS


  -postcommand <tcl-command>
  -selector <color>
  

slide: OPTIONS

STANDARD OPTIONS


activebackground, activeborderwidth, activeforeground, background, borderwidth, cursor, disabledforeground, font, foreground


slide: STANDARD OPTIONS

DESCRIPTION


The add function is included to allow arbitrary entries (as defined by Tk) to be added. We restrict ourselves to simple command and cascade entries. The entry function (that is used for adding simple command entries) may explicitly be given an action to be associated with the entry. Alternatively, if no action is specified, the default handler action installed by invoking widget::bind will be used. The string used as a label for the entries (the first parameter of entry) will be given as a parameter to the action invoked when selecting the entry. The string given in the args parameter will be added to the actual parameters for the action invoked. The cascade function may either be given a menu or a string, containing the pathname of the menu. In any case the cascaded menu must be a descendent of the original menu The function index returns the integer index associated with the string describing the entry. The function active may be used to inquire which entry has been selected. Entries may be deleted using the function del and invoked by using invoke. For both functions, the entry may be indicated by its numerical index or a string. Menus are toplevel widgets, they are mapped to the screen either by invoking the function post, or by pressing the menubutton to which the menu is attached.


slide: DESCRIPTION

LIBRARY


widget -- file


slide: LIBRARY

SEE ALSO

widget(4), mebubar(5), menubutton(5), menu(n)
[.] Papers Tutorials Examples Manuals Interfaces Sources Packages Resources ?
Hush Online Technology
hush@cs.vu.nl
09/24/99