enableMouseBtnEvents
Enable or disable mouse events for specific buttons.
[read/write property]
enableMouseBtnEvents([out, retval] short *buttons)
enableMouseBtnEvents([in] short buttons)
This property enables or disables mouse button events for specific
mouse buttons. For example, this allows you to receive mouse events
for the middle and right buttons, while allowing XpdfViewer to handle
selection with the left mouse button.
The value of this property is the sum of:
- 1 for the left button
- 2 for the right button
- 4 for the middle button
viewer.enableMouseBtnEvents = 2 + 4
will
enable events for the right and middle buttons, while leaving
XpdfViewer to handle the left button.
The enableMouseBtnEvents
and enableMouseMoveEvents
properties are a finer-grained version of enableMouseEvents
(which
enables/disables events for all mouse buttons).
The events enabled by this property are:
MouseDown2
MouseUp2
MouseDoubleClick2
MouseMove2
(when a button is pressed)
If hyperlinks and mouse events (on button 1) are both enabled, MouseUp2 events will not be triggered if the mouse is over a hyperlink (it will activate the hyperlink instead).
For control over mouse movement events when no mouse button is
pressed, see enableMouseMoveEvents
. For control over mouse wheel
events, see enableMouseWheelEvents
.
VB:
viewer.enableMouseBtnEvents = 2 + 4