A popup_gesture is used to show a popup
object. It event->posts all incoming
events to the popup-menu and requests the popup to execute the selected
command after the user releases the button that caused the gesture to
activate the popup.
Many classes define methods for associating popup
objects using the method graphical->popup
or a redefinition thereof. Direct use of instances of this class is
often not necessary.
->initiate
method. For example, class list_browser
sets the popup_gesture<-context
to the dict_item
object under the pointer.
See also popup_gesture->terminate.
->cancel’ed
otherwise the menu is displayed on the up event.|function*->verify
using the following arguments:
@arg1 event <-master (normally receiving graphical)@arg2 The event (normally @event)
The slot -current is filled with the result.
->event.
When not successful and the event is a keyboard event, popup->key
will be invoked with the key description. This facility makes keyboard
accelerators associated with the popup active.|function],
button=[button_name], modifier=[modifier]<-popup.|](112,
[111,112,117,112,32,45,62,117,112,100,97,116,101,58,32,67,111,110,116,101,120,116])|](112,
[111,112,117,112,32,45,62,111,112,101,110,58,32,82,101,99,101,105,118,101,114,44,32,80,111,115,105,116,105,111,110])|](101,
[118,101,110,116,32,45,62,112,111,115,116,58,32,80,111,112,117,112])
<-context
and -current variables to @nil
->post
to the -current popup menu
->execute
the menu, providing the context @see popup->execute
-receiver
if it is not set to @nil.
If the popup_gesture<->popup
attribute of the gesture is set, this popup menu is used. If it is a function
object, the function is evaluated. See
popup_gesture<-popup.
Otherwise, the event<-master
is requested a popup with
popup_gesture<-popup.
After finding a popup
object, this object is sent popup->update
to update its menu_items. If, after graphical<-active
or‘popup
popup_gesture<-members’is empty, popup_gesture->verify
fails.