LibreOffice: XMouseListener Interface Reference

LibreOffice LibreOffice 26.8 SDK API Reference

Loading...
Searching...
No Matches
XMouseListener Interface Referencepublished

makes it possible to receive events from the mouse in a certain window. More...

`import "XMouseListener.idl";`

Inheritance diagram for XMouseListener:

## Public Member Functions
void | mousePressed ([in] com::sun::star::awt::MouseEvent e)
| is invoked when a mouse button has been pressed on a window.
void | mouseReleased ([in] com::sun::star::awt::MouseEvent e)
| is invoked when a mouse button has been released on a window.
void | mouseEntered ([in] com::sun::star::awt::MouseEvent e)
| is invoked when the mouse enters a window.
void | mouseExited ([in] com::sun::star::awt::MouseEvent e)
| is invoked when the mouse exits a window.
Public Member Functions inherited from XEventListener
void | disposing ([in] com::sun::star::lang::EventObject Source)
| gets called when the broadcaster is about to be disposed.
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object.
void | acquire ()
| increases the reference counter by one.
void | release ()
| decreases the reference counter by one.

## Detailed Description

makes it possible to receive events from the mouse in a certain window.

Use the following interfaces which allow to receive (and consume) mouse events even on windows which are not at the top:

- com::sun::star::awt::XMouseClickHandler
- com::sun::star::awt::XMouseMotionHandler

These interfaces are better suited for many purposes. In opposite to this listener they don't need to be added on exactly the correct widget. Optionally they can also consume events.

See also
  com::sun::star::awt::XVclContainer The function getWindows might be helpful to find the correct widget to add this listener to.

## Member Function Documentation

## ◆ mouseEntered()

void mouseEntered | ( | [in] com::sun::star::awt::MouseEvent | e | ) |

is invoked when the mouse enters a window.

## ◆ mouseExited()

void mouseExited | ( | [in] com::sun::star::awt::MouseEvent | e | ) |

is invoked when the mouse exits a window.

## ◆ mousePressed()

void mousePressed | ( | [in] com::sun::star::awt::MouseEvent | e | ) |

is invoked when a mouse button has been pressed on a window.

Since mouse presses are usually also used to indicate requests for pop-up menus (also known as context menus) on objects, you might receive two events for a single mouse press: For example, if, on your operating system, pressing the right mouse button indicates the request for a context menu, then you will receive one call to mousePressed() indicating the mouse click, and another one indicating the context menu request. For the latter, the MouseEvent::PopupTrigger member of the event will be set to TRUE.

## ◆ mouseReleased()

void mouseReleased | ( | [in] com::sun::star::awt::MouseEvent | e | ) |

is invoked when a mouse button has been released on a window.

The documentation for this interface was generated from the following file:

- com/sun/star/awt/XMouseListener.idl