| Did you know ... | Search Documentation: |
| Send methods |
->all_off -active ->updateobject. Object
is either a menu_item or the value of a menu_item. Example:
?- new(M, menu(fill, marked)),
send_list(M, append,
[ @nil,
@grey12_image,
@grey25_image
]),
send(M, active_item, @grey12_image, @off).
<-active_item ->updatesend(Menu, active_all_items, @off).
Available for backward compatibility.
->all_on ->active_all_itemssend(Menu, active_all_items, @on).
Available for backward compatibility.
->all_off
For popup objects,
if the argument is the name gap, the last added item is
sent menu_item->end_group.
This inserts a group-separation line in the menu.
See also menu->members, menu->insert_before
and send_list/3.
->prepend <-convert -members<-modified
yields @on or always
equals @on and menu<-selection
succeeds, dialog_item<-message
is forwarded with the following arguments:
@receiver the menu @arg1 menu <-selection.
See also dialog->apply.
-border->selection.
->selection->compute
recalculates various variables to speed-up redraw. These are menu<-label_area, menu<-item_offset, menu<-item_size, menu<-left_offset
and
menu<-right_offset.<->value
as the argument from the menu. Note that it is generally bad style to
change the contents of menu's. Normally items that should not be
activated in some context are made inactive.->event.
On failure it passes the event of @_button_gesture if graphical<-active
equals @on.
The real work is done by menu->execute.
<-item_from_event ->execute<->selected
attribute of the item on which the event occurred.->event
->label, menu->kind
and dialog_item->message.
See class menu for
details.
Defaults: The default dialog_item->label
is the classname of the menu (menu). The default
menu->kind
is determined by the resource menu.kind.
The default message is @default.
-message -kind -label |menu_itembefore is a name, menu<-member
is used to translate it into a menu_item. If before is not
in the menu, the new item is menu->append’ed
to the menu.
See also menu->append
and menu->prepend.
<->active
equals @off.
->is_on<->active
equals @on.
->is_off->kind
method allows for the selection of some commonly occurring combinations
of menu parameters with a single method. The available options are:
<-on_image
and
menu<-off_image)
to indicate the selected item.<-kind
cycle menus.
Bugs: Used to set the notion of menu<->current
in older versions. In its current definition it is not very useful. Use menu<-member
to test membership.
<-member->clear
the menu and then use menu->append
to add each member of the chain to the menu. This implies chain may
contain both menu_item
objects and plain names.
See also menu_item<-convert
and send_list/3.
<-modified<-active
after the currently selected menu_item. When the currently selected item
is the last or there is no currently selected item, the first active
item is selected.
Used internally when menu<-show_selection_only
equals @on (menu<->kind:
cycle).
->active
on the indicated menu-item, making the indicated menu-item insensitive.
-condition -active ->on <-member->off,
but activates the menu_item.
->off->append
and menu->insert_before.
->append<-selected
of item. Equivalent to sending the message directly to the menu_item
object, but type-conversion will convert a menu_item<-value
to the corresponding menu_item.|chain*
If the argument is @nil,
this is equivalent to menu->clear_selection,
<-value.
Backward compatibility.
Bugs: Does not check menu<-multiple_selection,
resulting in an inconsistent menu when multiple object are selected in a
menu with menu<-multiple_selection:
@off.
<-selection -selected ->clear_selection<-status
of a menu is not used.<-menu
of all member items to @nil,
clears menu->members
and invokes menu->unlink
on the super-class.
->unlink<->condition not equal
to @nil, it
invokes the
menu_item<->condition
attribute, providing the following context information:
@receiver The menu_item @arg1 The argument (i .e. the context)
If the message evaluates successfully, the menu_item is activated, otherwise it is deactivated.
->active_item ->active_all_items ->update