IDLitWindow::OnMouseDown

Syntax | Arguments | Keywords | Implementing the OnMouseDown Interface | Version History | See Also

The IDLitWindow::OnMouseDown procedure method handles notification (from the native window device) that a mouse down event has occurred, and passes along that notification to all observers in the list of window event observers (as specified by calls to the IDLitWindow::AddWindowEventObserver method). You can also simulate a mouse down event by calling this method directly.

Note
Window event observers that handle mouse down events must implement the OnMouseDown method, as described in Implementing the OnMouseDown Interface. In addition, window event observers must implement the OnKeyboard, OnMouseMotion, and OnMouseUp methods. See IDLitWindow::AddWindowEventObserver for details.

Syntax

Obj->[IDLitWindow::]OnMouseDown, X, Y, ButtonMask, Modifiers, NumClicks

Arguments

X

A long integer representing the x-location (in device coordinates) of the mouse event.

Y

A long integer representing the y-location (in device coordinates) of the mouse event.

ButtonMask

An integer containing a bitwise mask indicating which of the left, center, or right mouse button was pressed:

Table 32-16: Bitmask for Button Events

Bitmask
Mouse Button
1

Left

2

Middle

4

Right

Modifiers

A long integer containing a bitwise mask indicating which modifier keys are active at the time the mouse button is pressed. If a bit is zero, the key is up; if the bit is set, the key is pressed. The following table describes the bits in this bitmask:

Table 32-17: Bits of the Modifier Key Mask

Bit
Value
Modifier Key

0

1

Shift

1

2

Control

2

4

Caps Lock

3

8

Alt

NumClicks

An integer indicating the number of times the mouse button was clicked.

Keywords

None

Implementing the OnMouseDown Interface

When defining a window event observer that handles mouse down events, you must implement an OnMouseDown procedure method with the following signature:

PRO OnMouseDown, Window, X, Y, ButtonMask, Modifiers, NumClicks 

where the Window argument is an object reference to the IDLitWindow object in which the event was generated, and all of the other arguments are described above.

In addition, you must implement OnKeyboard, OnMouseMotion, and OnMouseUp procedure methods, as discussed in IDLitWindow::AddWindowEventObserver.

Version History

6.0

Introduced

See Also

IDLitWindow::AddWindowEventObserver, IDLitWindow::OnKeyboard, IDLitWindow::OnMouseMotion, IDLitWindow::OnMouseUp