Inherited methods:
from selectable-menu-item<%>
command
get-shortcut
get-shortcut-prefix
set-shortcut
set-shortcut-prefix
from labelled-menu-item<%>
enable
get-help-string
get-label
get-plain-label
is-enabled?
on-demand
set-help-string
set-label
from menu-item<%>
delete
get-parent
is-deleted?
restore

menu-item% : class?

  superclass: object%

  extends: selectable-menu-item<%>
A menu-item% is a plain string-labelled menu item. Its parent must be a menu% or popup-menu%. When the user selects the menu item, its callback procedure is called.

(new menu-item% [label label] 
  [parent parent] 
  [[callback callback] 
  [shortcut shortcut] 
  [help-string help-string] 
  [demand-callback demand-callback] 
  [shortcut-prefix shortcut-prefix]]) 
  (is-a?/c menu-item%)
  label : label-string?
  parent : (or/c (is-a?/c menu% popup-menu%))
  callback : ((is-a?/c menu-item%) (is-a?/c control-event%) . -> . any)
   = (lambda (i e) (void))
  shortcut : (or/c char? false/c) = #f
  help-string : (or/c label-string? false/c) = #f
  demand-callback : ((is-a?/c menu-item%) . -> . any)
   = (lambda (i) (void))
  shortcut-prefix : 
(listof (one-of/c 'alt 'cmd 'meta 'ctl
                  'shift 'option))
   = (get-default-shortcut-prefix)
Creates a new menu item in parent. The item is initially shown, appended to the end of its parent. The callback procedure is called (with the event type 'menu) when the user selects the menu item (either via a menu bar, popup-menu in window<%>, or popup-menu in editor-admin%).

See set-label for information about mnemonic &s in label.

If shortcut is not #f, the item has a shortcut. See get-shortcut for more information. The shortcut-prefix argument determines the set of modifier keys for the shortcut; see get-shortcut-prefix.

If help is not #f, the item has a help string. See get-help-string for more information.

The demand-callback procedure is called by the default on-demand method with the object itself.