I’m trying to invoke MouseMotionListener in LO Draw, but no luck so far. Not sure if it’s even possible, but it definitely seems to be. If someone could help me out by pointing me in the right direction, I’d be very grateful. My code so far is as follows:
global listenerMouseMotionHandler as object
sub registerMouseMotionHandler()
dim oDoc as object: oDoc = thisComponent
dim oController as object: oController = oDoc.currentController
dim oComponentWindow as object: oComponentWindow = oController.componentWindowlistenerMouseMotionHandler = createUnoListener(“MouseMove_”, “com.sun.star.awt.XMouseMotionListener”)
oComponentWindow.addMouseMotionListener(listenerMouseMotionHandler)
end subsub unregisterMouseMotionHandler()
thisComponent.currentController.componentWindow.removeMouseMotionListener(listenerMouseMotionHandler)
end subfunction MouseMove_MouseDragged(oEvt) as boolean
end function
function MouseMove_MouseMoved(oEvt) as boolean
doSomething() ’ does not cause any response
end functionsub MouseMove_disposing(oEvt)
end sub