[Contents] [index] [Help] [Retrace] [browse <] [Browse >]

A double menu requester is exactly like other requesters with one
exception: it is displayed only when the user double clicks the mouse menu
button.  Double menu requesters block input in exactly the same manner as
other true requesters.  a double menu requester is attached to a window by
calling setdmrequest().

    BOOL SetDMRequest( struct Window *window,
                       struct Requester *requester );

This call does not display the requester, it simply prepares it for
display.  The requester will be brought up when the user double clicks the
mouse menu button.  The parent window will receive idcmp_reqset and
idcmp_reqclear messages when the requester is added and removed.

To prevent the user from bringing up a double menu requester, unlink it
from the window by calling cleardmrequest().  if a double menu request is
set for a window, ClearDMRequest() should be called to remove the
requester before that window is closed.

    BOOL ClearDMRequest( struct Window *window );

This function unlinks the requester from the window and disables the
ability of the user to bring it up.  cleardmrequest() will fail if the
double menu request is currently being displayed.

Double menu requesters can be positioned relative to the current mouse
pointer position.  For a mouse relative requester, specify pointrel in the
flags field and initialize the relleft and reltop variables.  relleft and
RelTop describe the offset of the upper, left corner of the requester from
the pointer position at the time the requester is displayed.  These values
can be either negative or positive.

The values of relleft and reltop are only advisory; the actual position
will be restricted such that the requester is entirely contained within
the borders of its parent window, if possible.  The actual top and left
positions are stored in the topedge and leftedge variables.

Positioning relative to the mouse pointer is possible only with double
menu requesters.  Setting pointrel in a requester which is not a double
menu requester will position the requester relative to the center of the
window.