PCE version 4C man_modulenamespaceid_tablemodified current_idOIxN class/popupN referenceC hash_tablerefersizeOIxNbothIsNM.popup.S.dragCman_method_card identifiermodule last_modifiednamesummary descriptionsee_alsoinherit diagnosticsdefaultsbugsOIxNM.popup.S.dragRICdateOIx.$NdragnCstringOIxHandle a drag event. This method is called from ->event. It should not be used, nor be redefined, except for emergencies. This method locates the `current' item using <-item_from_event and activates this using ->preview. If the drag event is on an item with a `menu_item <-popup' and the event is near the popup marker (see <-popup_image), the pullright menu is activated by invoking ->show_pullright_menu.nnnnnsNC.popupCman_class_card identifiermodule last_modifiednamesummary descriptionsee_alsoinherituser_interfacebugsOIxNC.popupRIOIx6QNpopupnOIxsA `popup' is a menu that is associated with a graphical object, but is normally invisible. When the user depresses a predefined button, the popup is `pop'ed-up'. After the user has made a choice, the popup is removed from the display again. Some types of graphicals have an attribute called <->popup. For these types the easiest way to attach a popup to them is to fill this attribute with a popup menu. General graphicals don't have this feature. For these graphicals a popup_gesture object has to be used to connect the popup with some event. See also `graphical ->popup' and `graphical ->event'. PCE encourages you to associate popup-menus with the right mouse-button only. By default, a popup menu inverts the current item. This gives odd results on colour displays. You can change this into a box by adding the following line to your Defaults file. popup.preview_feedback: box The method ->execute is activated to execute the behaviour associated with the selected item. The documentation of this method describes the available context parameters. Forwarding rules for associated messages are described with ->execute.CchainsizeOI xI eN$$class/graphical$M.graphical.S.popupeN$$class/popup_gesture$C.popup_gestureeN$class/menu_item$C.menu_itemeN$class/menu$C.menueN$class/menu_bar$C.menu_bareN $topics$129eN$class/window$V.window.popupeN"$class/menu_item$V.menu_item.popupeN($class/list_browser$V.list_browser.popupeN&$class/dialog_item$V.dialog_item.popupXnOI xLWhen (normally) the right button is depressed on an object that has a popup associated to it, the popup will be mapped on the display such that the first option is below the mouse. If possible, the mouse itself is not moved. The user should HOLD the mouse-button depressed and DRAG to the approprate choice to RELEASE the mouse-button there. This will invoke the associated command. The user can CANCEL the operation by dragging the mouse-button outside the popup and releasing it. If an item has a mark `=>' at the right side, SUB-MENU can be obtained by dragging towards this mark.OI xWInterface styles such as `stay-up', OpenWindow like push-pins, etc. are not supported.sNM.popup.S.end_groupOI xNM.popup.S.end_groupRIOI x,B1N end_groupnOIx{If this is a pullright menu, set `menu_item ->end_group' in the associated menu_item. This will put a line below the item.nnnnnsNV.popup.update_messageCman_variable_card identifiermodule last_modifiednamesummary descriptionsee_alsoinheritdefaultsOIxNV.popup.update_messageRIOIx(qNupdate_messagenOIxiIf not @nil, this message is invoked by `Popup ->update: context'. This message is meant to generate the entries of the popup. Activating individual items is normally done by the condition message associated with each menu_item of the popup. When executed, the following arguments are forwarded: @receiver The popup itself @arg1 The argument of ->updateOIxIeN&$class/menu_item$V.menu_item.conditionENM.popup.S.updateXnOIx#By default, no updating takes placesNM.popup.S.openOIxNM.popup.S.openRIOIx,B NopennOIx:Open a popup menu on the display. Normally invoked from a popup_gesture object. The arguments are: # on Graphical (window) for which the popup is displayed (<-context) # offset # offset_is_pointer [@on] Position of the top-left corner of the popup relative to the <-context iff offset_is_pointer equals @off, otherwise the position of the pointer. # warp_pointer [@on] If the popup is moved (see ensure_on_display), move the pointer accordingly. # ensure_on_display [@on] If @on, move the popup if it would otherwise be (partly) outside the display.OIxIEN/$class/popup_gesture$M.popup_gesture.S.initiateXnnnnsNM.popup.S.initialiseOIxNM.popup.S.initialiseRIOIx,BN initialisenOIxCreate a popup menu from its name (which is only displayed if <-show_label equals @on) and a message. This message will be executed when a menu_item object is selected that has `menu_item <-message: @default'. Using a message at the popup (menu) level is commonly used if the menu selects from a value-set (fonts, colours, names. ...). If the menu is used to activate commands the actions are normally associated with the individual items.nnnnnsNV.popup.marginOIxNV.popup.marginRIOIx,¾NmarginnOIxcMargin to the left-and-right of the menu for generating the window size. See also `menu <-border'.nnnsNM.popup.S.updateOIxNM.popup.S.updateRIOIx0NupdatenOI xThis behaviour is normally invoked just before the popup-menu is mapped on the display. This is done automatically for popups associated with menu_bars or managed by a popup_gesture (i.e. all normal ways to manage a popup). Update first invokes <->update_message, providing its argument as @arg1. This message is supposed to update the available entries of the popup; not the activation status of the individual entries. Next, ->update invokes `Menu ->update: context', which takes care of activating the appropriate entries.OI!xIeN&$class/menu_item$V.menu_item.conditioneN$class/menu$M.menu.S.updateENV.popup.update_messageeN/$class/popup_gesture$M.popup_gesture.S.initiateXnnnnsNM.popup.S.resetOI"xNM.popup.S.resetRIOI#x,B5NresetnOI$xEquivalent to ->close.nnnnnsNV.popup.default_itemOI%xNV.popup.default_itemRIOI&x,BN default_itemnOI'xDetermines the initial positioning of the menu. Values: # first Position the pointer on the first item with `menu_item<-active: @on'. # @nil As `first', but places the pointer a few pixels to the left of the item so that it is not immediately selected. # selection Position the pointer on the current <-selection of the popup. In practice this is the last selected item. # Anything else Position the pointer on the menu item with the specified `menu_item <-value'. See alsonnnsNM.popup.S.showOI(xNM.popup.S.showRIOI)x(NNshownnOI*xIENV.popup.updateXnnnnsNM.popup.S.closeOI+xNM.popup.S.closeRIOI,x,BUNclosenOI-x'Remove the popup from the display. First it will ->close possible open pullright menus. Then is removes the popup menu from its <-window and adds the window to the pool of window objects used to display popup menu's. This method is always called as a normal message and thus may be redefined.nnnnnsNM.popup.S.eventOI.xNM.popup.S.eventRIOI/x,BNeventnOI0xPerforms the following steps * If the popup has a -pullright and the event is on an item of this menu, ->close the pullright menu. * If the popup has a -pullright *and* the event is a button-up of the same button that started the popup, assign <-selected_item with the pullright menu, assign -pullright with @nil and ->close the pullright. * If there is no -pullright and the event is the button-up event, assign <-selected_item with <-preview and ->close the popup. * If the event is a button-down, set <-selected_item to @nil and send <-button to the `event <-button' * If the event is a drag event, update ->preview. If a pullright area is entered, ->update the pullright and ->open it.nnnnnsNM.popup.S.show_pullright_menuOI1xNM.popup.S.show_pullright_menuRIOI2x.&Nshow_pullright_menunOI3xShow pullright for this item. Called from ->drag. `item' is the item for which to show a pullright menu. First updates the `menu_item <-popup' and -if the popup has <-members- opens the popup.nnnnnsNM.popup.S.executeOI4xNM.popup.S.executeRIOI5x*ڍXNexecutenOI6xThis method is normally invoked from `popup_gesture ->terminate'. The argument (denoted `context') is normally the object to which the popup menu is associated. First it locates the selected menu_item object and the message to execute. This message is `menu_item <-message' if this does not yeild @default, otherwise <-message. The forwarded arguments are: # <-multiple_selection: @off using `menu_item <-message' @receiver: The popup @arg1: The context argument # <-multiple_selection: @off using `popup <-message' @receiver: The popup @arg1 `menu_item <-value' @arg2: The context argument # <-multiple_selection: @on using `menu_item <-message' @receiver: The popup @arg1: `menu_item <-selected' @arg2: The context argument # <-multiple_selection: @on using `popup <-message' @receiver: The popup @arg1: `menu_item <-value' @arg2: `menu_item <-selected' @arg3: The context argumentOI7xIEN0$class/popup_gesture$M.popup_gesture.S.terminateXnnnnXaCnumber O I8xx