Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

mouse-right-down

Arguments: object buttons cursor-position

This generic function is called when the user presses the right mouse button while the mouse cursor is in the interior (client) area of a window, dialog-item, or hotspot. An application may add methods to this generic function to respond to mouse events in these objects.

object is the window, dialog-item, or hotspot in which the event occurred. If the event occurred in a dialog-item, then this function will be called on the dialog-item and also on its associated widget-window. An application could specialize on whichever object is more convenient (this is typically the dialog-item). In any case, the built-in methods on the widget-window normally should not be overridden, because they implement the widget's built-in click behavior.

buttons is an integer indicating which mouse buttons and shift keys were down when the event occurred. The value is the result of applying logior to the values of the following bit-flag variables:

Other bits might be turned on as well, so functions such as logtest should be used to determine whether a particular mouse button or shift key was down; for example,

(logtest right-mouse-button buttons) 

will return true if and only if the right mouse button was down. For "down" events, the value includes the button or key being pressed now; for "up" events, the value does not include the button or key being released.

cursor-position is a position object indicating the location of the mouse cursor when the event occurred. It is in "stream coordinates", which are relative to the origin of the possibly scrolled page (canvas) of the window; pixels are the unit of distance unless the window is a scaling-stream. (The origin of a stream is typcially left at 0,0, which indicates the top-left corner of the scrollable page; see stream-origin.)

The default mouse-right-down methods for basic-pane and dialog-item call pop-up-shortcut-menu, which will show a shortcut menu if a shortcut-commands method for the window or widget returns a list of menu-items. An application could make a right-click show a menu by adding a shortcut-commands method, or it could add custom right-click behavior by adding a mouse-right-down method instead. Note that in releases prior to 6.2, the default mouse-right-down methods called pop-up-shortcut-menu only in the IDE, and not in generated standalone applications.


Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version