1 Overview
Windowing
Drawing
Editor
2 Reference
Windowing Classes
Windowing Functions
Drawing Classes
Drawing Functions
Editor Classes
Editor Functions
WXME Decoding
3 Configuration
4 Dynamic Loading
Index

Inherited methods:

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

from menu-item-container<%>

get-items

Version: 4.0.2

 

menu% : class?

  superclass: object%

  extends: 

menu-item-container<%>

 

labelled-menu-item<%>

A menu% object is a submenu within a menu% or popup-menu%, or as a top-level menu in a menu-bar%.

(new menu%

 

[label label]

 

 

 

[parent parent]

 

 

 [

[help-string help-string]

 

 

 

[demand-callback demand-callback]])

 

  (is-a?/c menu%)

  label : label-string?

  

parent

 

:

 

(or/c (is-a?/c menu%) (is-a?/c popup-menu%)

      (is-a?/c menu-bar%))

  help-string : (or/c label-string? false/c) = #f

  

demand-callback

 

:

 

((is-a?/c menu%) . -> . any)

 

 

 

=

 

(lambda (m) (void))

Creates a new menu with the given label.

If label contains a &, it is handled specially; under Windows, the character following a & is underlined in the displayed menu title to indicate a keyboard mnemonic. Pressing and releasing the Alt key switches to menu-selection mode in the menu bar where mnemonic characters are used for navigation. An Alt combination might select a specific menu via on-menu-char. A && in label is replaced by a literal (non-navigation) &ampersand. Under X and Mac OS X, &s in the label are parsed in the same way as for Windows, but no mnemonic underline is displayed.

If help-string is not #f, the menu 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.