| Did you know ... | Search Documentation: |
| Instance variables |
->key, which will make the
menu behave as if this menu_item was selected if the argument key
matches this slot.Defaults: @on (active to events)
->off -condition ->active_all_items
Defaults:
@default (its
default value) will paint the menu_item in the colour of its associated menu_item<-menu.
-label -font<-active
according the this truth value.
Tested by popup->update.
Defaults: @nil
(popup->update
does not change activation status).
->off ->update -active -update_messageDefaults: @off (no line is painted).
<-label.
Normally used to realise font-selection menus.
Defaults: When @default, menu<-value_font
of the associated menu_item<-menu
is used.
-value_font -label -colour|image]<-colour
and menu_item<-font
specified with this item. When is is an image, the menu will display
this image in menu_item<-colour.
The initial value is normally computed by menu_item<-default_label
from the
menu_item<-value
by menu_item->initialise.
The menu maintains a list of menu_items manipulated in menu<-members.
-members<-message
from the associated menu_item<-menu
will be sent.
The arguments forwarded depend on the menu. See description with class menu.
<-convert
method transforms popup
objects in menu_items with this popup associated, which allows appending
popup menu's to popup menus to create pullright menus.
Defaults: @nil
<-convert <->multiple_selection.
The visual feedback is determined by
menu<->feedback.
->selection -feedback -multiple_selection
This separation is useful for two purposes. First of all menu's are
often used to select some value. For example a colour in a drawing tool.
In this case the colour
object is used as a value, while an all-1's image with is used as label
and menu_item<->colour
is set to
menu_item<->value.
When the user selects a menu-item, the colour
object to be used may be read directly from the menu_item<->value
object of the menu_item.
Second, this mechanism may be used to implement multi-language
interfaces. In this case the menu_item<->value
represents the internal name used by the program and the menu_item<->label
the external name that may be in a different language.
The default menu_item<->label
is compute from the initial menu_item<->value
using
menu_item<-default_label.
<-default_label -label