The Vmenu Display Class

The vmenu and hmenu display classes are for representing nested slotfillers as cascade menus. When vmenu is used, the top-level menu is laid out vertically, whereas hmenu gives a horizontal layout. All submenus are vertical in both cases.

A slotfiller consists of two parts, the symbolic indices and the values. A nested slotfiller is one whose values are also slotfillers. The values within the slotfiller values can also be slotfillers, and so on; slotfillers can be nested to any level. In terms of the menu display classes, the symbols of a slotfiller bound to either menu class correspond to the items in the top level of a menu. If a value is also a slotfiller, then its symbols correspond to a submenu, and so on.

Menus cannot be edited.

A callback function must be defined for the slotfiller if any actions are to be taken in response to selection of menu items. When a callback occurs, only pd appears in the d position.

Selecting an item does not cause a preset callback to fire.

See "The Hmenu Display Class" for details of the horizontal menu.

Visual Representation
menus.rsf{
    s.rsf converts a recursive association list to a recursive slotfiller
       (`file;(
                  `new;       newfn;
                  `open;      openfn;
                  `close;     closefn;
                  `save;(
                              `save;      savefn;
                              `save_as;   save_asfn));
       `edit;(
                  `undo;      undofn;
                  `cut;       cutfn;
                  `copy;      copyfn;
                  `paste;     pastefn);
       `format;(
                  `font;(
                              `kaplgallant;;
                              `courier;);
                  `size;      sizelist;
                  `style;     stylelist)
  )
      }

vmenu: Vertical Cascade Menu:

show `menu is `vmenu
 

  hmenu: Horizontal Cascade Menu:

show `menu is `hmenu
 

 
 

Attributes

See the "Display Attributes" chapter for details concerning all the attributes that apply to objects in the vmenu display class, as well as lists of colors and fonts. The keys in the Table of All Display Attributes that pertain to this class are vM, ALL, CNFT, NFT, and TOP.

The attributes that are meaningful for the vmenu display class (other than the print... attributes) are:

acceptfocus
active
ancestors
arrowdown
arrowkeys
arrowleft
arrowlist
arrowright
arrowup
at
atsector
b
bg
bound
class
clear
deiconized
doc
downto
dynamic
eval
evaluate
exit
extent
f1-f12
fg
fkeys
focus
followers
followertree
font
foot
freeze
fullscreen
h
H
has
head
hide
hl
hlthickness
icon
iconic
iconized
icontitle
incurrentworkspace
is
l
leader
leftto
literal
lower
mapped
mnemonics
naturalsize
notify
outofcurrentworkspace
parent
pin
preset
primary
r
raise
realize
refresh
request
resize
resizeable
rightto
script
sensitive
set
settings
script
shadowthickness
shell
shelltitle
show
state
stateself
syncshow
t
tabfrom
tablist
tabto
titlejustify
upto
vcol
vcols
verify
vrow
vrows
w
W
ws
x
X
xs
y
Y
ys
yx
YX
yxs
(Point the mouse cursor to an attribute to display a short description at the bottom of the screen)


doc@aplusdev.org© Copyright 1995–2008 Morgan Stanley Dean Witter & Co. All rights reserved.