The Hmenu Display Class

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

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.

A callback function on the slotfiller is required for menu actions; in the d position, only pd is given when the function is called. A callback occurs whenever a menu item is selected. Selecting an item does not cause a preset callback to fire.

See "The Vmenu Display Class" for details of the vertical 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)
  )
      }

hmenu: Horizontal Cascade Menu:

show `menu is `hmenu
 

  vmenu: Vertical Cascade Menu:

show `menu is `vmenu
 

 
 

Attributes
See the "Display Attributes" chapter for details concerning all the attributes that apply to objects in the hmenu 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 hM, ALL, CNFT, NFT, and TOP.

The attributes that are meaningful for the hmenu 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.