LibreOffice Module UnoControls (master) 1
|
#include <multiplexer.hxx>
Public Member Functions | |
OMRCListenerMultiplexerHelper (const css::uno::Reference< css::awt::XWindow > &xControl, const css::uno::Reference< css::awt::XWindow > &xPeer) | |
constructor @descr Create a Multiplexer of XWindowEvents. More... | |
OMRCListenerMultiplexerHelper (const OMRCListenerMultiplexerHelper &aCopyInstance) | |
copy-constructor @descr More... | |
virtual | ~OMRCListenerMultiplexerHelper () override |
virtual css::uno::Any SAL_CALL | queryInterface (const css::uno::Type &aType) override |
give answer, if interface is supported @descr The interfaces are searched by type. More... | |
virtual void SAL_CALL | acquire () noexcept override |
increment refcount @seealso XInterface @seealso release() @onerror A RuntimeException is thrown. More... | |
virtual void SAL_CALL | release () noexcept override |
decrement refcount @seealso XInterface @seealso acquire() @onerror A RuntimeException is thrown. More... | |
OMRCListenerMultiplexerHelper & | operator= (const OMRCListenerMultiplexerHelper &aCopyInstance) |
void | setPeer (const css::uno::Reference< css::awt::XWindow > &xPeer) |
Remove all listeners from the previous set peer and add the needed listeners to rPeer. More... | |
void | disposeAndClear () |
Remove all listeners and send a disposing message. More... | |
void | advise (const css::uno::Type &aType, const css::uno::Reference< css::uno::XInterface > &xListener) |
Add the specified listener to the source. More... | |
void | unadvise (const css::uno::Type &aType, const css::uno::Reference< css::uno::XInterface > &xListener) |
Remove the specified listener from the source. More... | |
virtual void SAL_CALL | disposing (const css::lang::EventObject &aSource) override |
virtual void SAL_CALL | focusGained (const css::awt::FocusEvent &aEvent) override |
virtual void SAL_CALL | focusLost (const css::awt::FocusEvent &aEvent) override |
virtual void SAL_CALL | windowResized (const css::awt::WindowEvent &aEvent) override |
virtual void SAL_CALL | windowMoved (const css::awt::WindowEvent &aEvent) override |
virtual void SAL_CALL | windowShown (const css::lang::EventObject &aEvent) override |
virtual void SAL_CALL | windowHidden (const css::lang::EventObject &aEvent) override |
virtual void SAL_CALL | keyPressed (const css::awt::KeyEvent &aEvent) override |
virtual void SAL_CALL | keyReleased (const css::awt::KeyEvent &aEvent) override |
virtual void SAL_CALL | mousePressed (const css::awt::MouseEvent &aEvent) override |
virtual void SAL_CALL | mouseReleased (const css::awt::MouseEvent &aEvent) override |
virtual void SAL_CALL | mouseEntered (const css::awt::MouseEvent &aEvent) override |
virtual void SAL_CALL | mouseExited (const css::awt::MouseEvent &aEvent) override |
virtual void SAL_CALL | mouseDragged (const css::awt::MouseEvent &aEvent) override |
virtual void SAL_CALL | mouseMoved (const css::awt::MouseEvent &aEvent) override |
virtual void SAL_CALL | windowPaint (const css::awt::PaintEvent &aEvent) override |
virtual void SAL_CALL | windowOpened (const css::lang::EventObject &aEvent) override |
virtual void SAL_CALL | windowClosing (const css::lang::EventObject &aEvent) override |
virtual void SAL_CALL | windowClosed (const css::lang::EventObject &aEvent) override |
virtual void SAL_CALL | windowMinimized (const css::lang::EventObject &aEvent) override |
virtual void SAL_CALL | windowNormalized (const css::lang::EventObject &aEvent) override |
virtual void SAL_CALL | windowActivated (const css::lang::EventObject &aEvent) override |
virtual void SAL_CALL | windowDeactivated (const css::lang::EventObject &aEvent) override |
Public Member Functions inherited from cppu::OWeakObject | |
OWeakObject () | |
OWeakObject (const OWeakObject &) | |
OWeakObject &SAL_CALL | operator= (const OWeakObject &) |
virtual css::uno::Any SAL_CALL | queryInterface (const css::uno::Type &rType) SAL_OVERRIDE |
virtual void SAL_CALL | acquire () SAL_NOEXCEPT SAL_OVERRIDE |
virtual void SAL_CALL | release () SAL_NOEXCEPT SAL_OVERRIDE |
virtual css::uno::Reference< css::uno::XAdapter > SAL_CALL | queryAdapter () SAL_OVERRIDE |
SAL_CALL | operator css::uno::Reference< css::uno::XInterface > () |
Private Member Functions | |
void | impl_adviseToPeer (const css::uno::Reference< css::awt::XWindow > &xPeer, const css::uno::Type &aType) |
Remove the listener from the peer. More... | |
void | impl_unadviseFromPeer (const css::uno::Reference< css::awt::XWindow > &xPeer, const css::uno::Type &aType) |
Add the listener to the peer. More... | |
Private Attributes | |
::osl::Mutex | m_aMutex |
css::uno::Reference< css::awt::XWindow > | m_xPeer |
css::uno::WeakReference< css::awt::XWindow > | m_xControl |
The source of the events. Normally this is the peer object. More... | |
comphelper::OMultiTypeInterfaceContainerHelper2 | m_aListenerHolder |
Additional Inherited Members | |
Protected Member Functions inherited from cppu::OWeakObject | |
virtual | ~OWeakObject () COVERITY_NOEXCEPT_FALSE |
void | disposeWeakConnectionPoint () |
Protected Attributes inherited from cppu::OWeakObject | |
oslInterlockedCount | m_refCount |
Definition at line 41 of file multiplexer.hxx.
unocontrols::OMRCListenerMultiplexerHelper::OMRCListenerMultiplexerHelper | ( | const css::uno::Reference< css::awt::XWindow > & | xControl, |
const css::uno::Reference< css::awt::XWindow > & | xPeer | ||
) |
constructor @descr Create a Multiplexer of XWindowEvents.
rControl | The control. All listeners think that this is the original broadcaster. |
rPeer | The peer from which the original events are dispatched. Null is allowed. |
unocontrols::OMRCListenerMultiplexerHelper::OMRCListenerMultiplexerHelper | ( | const OMRCListenerMultiplexerHelper & | aCopyInstance | ) |
copy-constructor @descr
rCopyInstance | C++-Reference to instance to make copy from. |
Definition at line 75 of file multiplexer.cxx.
References m_aMutex.
|
overridevirtual |
Definition at line 88 of file multiplexer.cxx.
|
overridevirtualnoexcept |
increment refcount @seealso XInterface @seealso release() @onerror A RuntimeException is thrown.
Reimplemented from cppu::OWeakObject.
Definition at line 128 of file multiplexer.cxx.
void unocontrols::OMRCListenerMultiplexerHelper::advise | ( | const css::uno::Type & | aType, |
const css::uno::Reference< css::uno::XInterface > & | xListener | ||
) |
Add the specified listener to the source.
Definition at line 186 of file multiplexer.cxx.
References comphelper::OMultiTypeInterfaceContainerHelper2::addInterface(), impl_adviseToPeer(), m_aListenerHolder, m_aMutex, and m_xPeer.
Referenced by unocontrols::BaseControl::addFocusListener(), unocontrols::BaseControl::addKeyListener(), unocontrols::BaseControl::addMouseListener(), unocontrols::BaseControl::addMouseMotionListener(), unocontrols::BaseControl::addPaintListener(), and unocontrols::BaseControl::addWindowListener().
void unocontrols::OMRCListenerMultiplexerHelper::disposeAndClear | ( | ) |
Remove all listeners and send a disposing message.
Definition at line 177 of file multiplexer.cxx.
References aEvent, comphelper::OMultiTypeInterfaceContainerHelper2::disposeAndClear(), m_aListenerHolder, and m_xControl.
|
overridevirtual |
Definition at line 218 of file multiplexer.cxx.
|
overridevirtual |
Definition at line 227 of file multiplexer.cxx.
References aEvent, focusGained(), and MULTIPLEX.
Referenced by focusGained().
|
overridevirtual |
Definition at line 234 of file multiplexer.cxx.
References aEvent, focusLost(), and MULTIPLEX.
Referenced by focusLost().
|
private |
Remove the listener from the peer.
xPeer | The peer from which the listener is removed. |
rType | The listener type, which specify the type of the listener. |
Definition at line 381 of file multiplexer.cxx.
|
private |
Add the listener to the peer.
xPeer | The peer to which the listener is added. |
rType | The listener type, which specify the type of the listener. |
Definition at line 411 of file multiplexer.cxx.
Referenced by setPeer(), and unadvise().
|
overridevirtual |
Definition at line 269 of file multiplexer.cxx.
References aEvent, keyPressed(), and MULTIPLEX.
Referenced by keyPressed().
|
overridevirtual |
Definition at line 276 of file multiplexer.cxx.
References aEvent, keyReleased(), and MULTIPLEX.
Referenced by keyReleased().
|
overridevirtual |
Definition at line 311 of file multiplexer.cxx.
References aEvent, mouseDragged(), and MULTIPLEX.
Referenced by mouseDragged().
|
overridevirtual |
Definition at line 297 of file multiplexer.cxx.
References aEvent, mouseEntered(), and MULTIPLEX.
Referenced by mouseEntered().
|
overridevirtual |
Definition at line 304 of file multiplexer.cxx.
References aEvent, mouseExited(), and MULTIPLEX.
Referenced by mouseExited().
|
overridevirtual |
Definition at line 318 of file multiplexer.cxx.
References aEvent, mouseMoved(), and MULTIPLEX.
Referenced by mouseMoved().
|
overridevirtual |
Definition at line 283 of file multiplexer.cxx.
References aEvent, mousePressed(), and MULTIPLEX.
Referenced by mousePressed().
|
overridevirtual |
Definition at line 290 of file multiplexer.cxx.
References aEvent, mouseReleased(), and MULTIPLEX.
Referenced by mouseReleased().
OMRCListenerMultiplexerHelper & unocontrols::OMRCListenerMultiplexerHelper::operator= | ( | const OMRCListenerMultiplexerHelper & | aCopyInstance | ) |
|
overridevirtual |
give answer, if interface is supported @descr The interfaces are searched by type.
@seealso XInterface
rType | is the type of searched interface. |
@onerror A RuntimeException is thrown.
Reimplemented from cppu::OWeakObject.
Definition at line 94 of file multiplexer.cxx.
References Any.
|
overridevirtualnoexcept |
decrement refcount @seealso XInterface @seealso acquire() @onerror A RuntimeException is thrown.
Reimplemented from cppu::OWeakObject.
Definition at line 139 of file multiplexer.cxx.
void unocontrols::OMRCListenerMultiplexerHelper::setPeer | ( | const css::uno::Reference< css::awt::XWindow > & | xPeer | ) |
Remove all listeners from the previous set peer and add the needed listeners to rPeer.
rPeer | The peer from which the original events are dispatched. Null is allowed. |
Definition at line 150 of file multiplexer.cxx.
References comphelper::OMultiTypeInterfaceContainerHelper2::getContainedTypes(), impl_adviseToPeer(), impl_unadviseFromPeer(), m_aListenerHolder, m_aMutex, and m_xPeer.
void unocontrols::OMRCListenerMultiplexerHelper::unadvise | ( | const css::uno::Type & | aType, |
const css::uno::Reference< css::uno::XInterface > & | xListener | ||
) |
Remove the specified listener from the source.
Definition at line 202 of file multiplexer.cxx.
References impl_unadviseFromPeer(), m_aListenerHolder, m_aMutex, m_xPeer, and comphelper::OMultiTypeInterfaceContainerHelper2::removeInterface().
Referenced by unocontrols::BaseControl::removeFocusListener(), unocontrols::BaseControl::removeKeyListener(), unocontrols::BaseControl::removeMouseListener(), unocontrols::BaseControl::removeMouseMotionListener(), unocontrols::BaseControl::removePaintListener(), and unocontrols::BaseControl::removeWindowListener().
|
overridevirtual |
Definition at line 367 of file multiplexer.cxx.
References aEvent, MULTIPLEX, and windowActivated().
Referenced by windowActivated().
|
overridevirtual |
Definition at line 346 of file multiplexer.cxx.
References aEvent, MULTIPLEX, and windowClosed().
Referenced by windowClosed().
|
overridevirtual |
Definition at line 339 of file multiplexer.cxx.
References aEvent, MULTIPLEX, and windowClosing().
Referenced by windowClosing().
|
overridevirtual |
Definition at line 374 of file multiplexer.cxx.
References aEvent, MULTIPLEX, and windowDeactivated().
Referenced by windowDeactivated().
|
overridevirtual |
Definition at line 262 of file multiplexer.cxx.
References aEvent, MULTIPLEX, and windowHidden().
Referenced by windowHidden().
|
overridevirtual |
Definition at line 353 of file multiplexer.cxx.
References aEvent, MULTIPLEX, and windowMinimized().
Referenced by windowMinimized().
|
overridevirtual |
Definition at line 248 of file multiplexer.cxx.
References aEvent, MULTIPLEX, and windowMoved().
Referenced by windowMoved().
|
overridevirtual |
Definition at line 360 of file multiplexer.cxx.
References aEvent, MULTIPLEX, and windowNormalized().
Referenced by windowNormalized().
|
overridevirtual |
Definition at line 332 of file multiplexer.cxx.
References aEvent, MULTIPLEX, and windowOpened().
Referenced by windowOpened().
|
overridevirtual |
Definition at line 325 of file multiplexer.cxx.
References aEvent, MULTIPLEX, and windowPaint().
Referenced by windowPaint().
|
overridevirtual |
Definition at line 241 of file multiplexer.cxx.
References aEvent, MULTIPLEX, and windowResized().
Referenced by windowResized().
|
overridevirtual |
Definition at line 255 of file multiplexer.cxx.
References aEvent, MULTIPLEX, and windowShown().
Referenced by windowShown().
|
private |
Definition at line 226 of file multiplexer.hxx.
Referenced by advise(), disposeAndClear(), setPeer(), and unadvise().
|
private |
Definition at line 223 of file multiplexer.hxx.
Referenced by advise(), disposing(), setPeer(), and unadvise().
|
private |
The source of the events. Normally this is the peer object.
Definition at line 225 of file multiplexer.hxx.
Referenced by disposeAndClear().
|
private |
Definition at line 224 of file multiplexer.hxx.
Referenced by advise(), disposing(), setPeer(), and unadvise().