LibreOffice Module UnoControls (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
unocontrols::OMRCListenerMultiplexerHelper Class Referencefinal

#include <multiplexer.hxx>

Inheritance diagram for unocontrols::OMRCListenerMultiplexerHelper:
[legend]
Collaboration diagram for unocontrols::OMRCListenerMultiplexerHelper:
[legend]

Public Member Functions

 OMRCListenerMultiplexerHelper (const css::uno::Reference< css::awt::XWindow > &xControl, const css::uno::Reference< css::awt::XWindow > &xPeer)
 constructor Create a Multiplexer of XWindowEvents. More...
 
 OMRCListenerMultiplexerHelper (const OMRCListenerMultiplexerHelper &aCopyInstance)
 copy-constructor More...
 
virtual ~OMRCListenerMultiplexerHelper () override
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &aType) override
 give answer, if interface is supported The interfaces are searched by type. More...
 
virtual void SAL_CALL acquire () noexcept override
 increment refcount XInterface release() A RuntimeException is thrown. More...
 
virtual void SAL_CALL release () noexcept override
 decrement refcount XInterface acquire() A RuntimeException is thrown. More...
 
OMRCListenerMultiplexerHelperoperator= (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::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
 

Detailed Description

Definition at line 41 of file multiplexer.hxx.

Constructor & Destructor Documentation

unocontrols::OMRCListenerMultiplexerHelper::OMRCListenerMultiplexerHelper ( const css::uno::Reference< css::awt::XWindow > &  xControl,
const css::uno::Reference< css::awt::XWindow > &  xPeer 
)

constructor Create a Multiplexer of XWindowEvents.

Parameters
rControlThe control. All listeners think that this is the original broadcaster.
rPeerThe peer from which the original events are dispatched. Null is allowed.
unocontrols::OMRCListenerMultiplexerHelper::OMRCListenerMultiplexerHelper ( const OMRCListenerMultiplexerHelper aCopyInstance)

copy-constructor

Parameters
rCopyInstanceC++-Reference to instance to make copy from.

Definition at line 75 of file multiplexer.cxx.

References m_aMutex.

unocontrols::OMRCListenerMultiplexerHelper::~OMRCListenerMultiplexerHelper ( )
overridevirtual

Definition at line 88 of file multiplexer.cxx.

Member Function Documentation

void SAL_CALL unocontrols::OMRCListenerMultiplexerHelper::acquire ( )
overridevirtualnoexcept

increment refcount XInterface release() 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 
)
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.

void SAL_CALL unocontrols::OMRCListenerMultiplexerHelper::disposing ( const css::lang::EventObject &  aSource)
overridevirtual

Definition at line 218 of file multiplexer.cxx.

References m_aMutex, and m_xPeer.

void unocontrols::OMRCListenerMultiplexerHelper::focusGained ( const css::awt::FocusEvent &  aEvent)
overridevirtual

Definition at line 227 of file multiplexer.cxx.

References MULTIPLEX.

void unocontrols::OMRCListenerMultiplexerHelper::focusLost ( const css::awt::FocusEvent &  aEvent)
overridevirtual

Definition at line 234 of file multiplexer.cxx.

References MULTIPLEX.

void unocontrols::OMRCListenerMultiplexerHelper::impl_adviseToPeer ( const css::uno::Reference< css::awt::XWindow > &  xPeer,
const css::uno::Type &  aType 
)
private

Remove the listener from the peer.

Parameters
xPeerThe peer from which the listener is removed.
rTypeThe listener type, which specify the type of the listener.

Definition at line 381 of file multiplexer.cxx.

Referenced by advise(), and setPeer().

void unocontrols::OMRCListenerMultiplexerHelper::impl_unadviseFromPeer ( const css::uno::Reference< css::awt::XWindow > &  xPeer,
const css::uno::Type &  aType 
)
private

Add the listener to the peer.

Parameters
xPeerThe peer to which the listener is added.
rTypeThe listener type, which specify the type of the listener.

Definition at line 411 of file multiplexer.cxx.

Referenced by setPeer(), and unadvise().

void unocontrols::OMRCListenerMultiplexerHelper::keyPressed ( const css::awt::KeyEvent &  aEvent)
overridevirtual

Definition at line 269 of file multiplexer.cxx.

References MULTIPLEX.

void unocontrols::OMRCListenerMultiplexerHelper::keyReleased ( const css::awt::KeyEvent &  aEvent)
overridevirtual

Definition at line 276 of file multiplexer.cxx.

References MULTIPLEX.

void unocontrols::OMRCListenerMultiplexerHelper::mouseDragged ( const css::awt::MouseEvent &  aEvent)
overridevirtual

Definition at line 311 of file multiplexer.cxx.

References MULTIPLEX.

void unocontrols::OMRCListenerMultiplexerHelper::mouseEntered ( const css::awt::MouseEvent &  aEvent)
overridevirtual

Definition at line 297 of file multiplexer.cxx.

References MULTIPLEX.

void unocontrols::OMRCListenerMultiplexerHelper::mouseExited ( const css::awt::MouseEvent &  aEvent)
overridevirtual

Definition at line 304 of file multiplexer.cxx.

References MULTIPLEX.

void unocontrols::OMRCListenerMultiplexerHelper::mouseMoved ( const css::awt::MouseEvent &  aEvent)
overridevirtual

Definition at line 318 of file multiplexer.cxx.

References MULTIPLEX.

void unocontrols::OMRCListenerMultiplexerHelper::mousePressed ( const css::awt::MouseEvent &  aEvent)
overridevirtual

Definition at line 283 of file multiplexer.cxx.

References MULTIPLEX.

void unocontrols::OMRCListenerMultiplexerHelper::mouseReleased ( const css::awt::MouseEvent &  aEvent)
overridevirtual

Definition at line 290 of file multiplexer.cxx.

References MULTIPLEX.

OMRCListenerMultiplexerHelper& unocontrols::OMRCListenerMultiplexerHelper::operator= ( const OMRCListenerMultiplexerHelper aCopyInstance)
Any SAL_CALL unocontrols::OMRCListenerMultiplexerHelper::queryInterface ( const css::uno::Type &  aType)
overridevirtual

give answer, if interface is supported The interfaces are searched by type.

XInterface

Parameters
rTypeis the type of searched interface.
Returns
Any information about found interface

A RuntimeException is thrown.

Reimplemented from cppu::OWeakObject.

Definition at line 94 of file multiplexer.cxx.

References Any, and cppu::queryInterface().

void SAL_CALL unocontrols::OMRCListenerMultiplexerHelper::release ( )
overridevirtualnoexcept

decrement refcount XInterface acquire() 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.

Parameters
rPeerThe 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 
)
void unocontrols::OMRCListenerMultiplexerHelper::windowActivated ( const css::lang::EventObject &  aEvent)
overridevirtual

Definition at line 367 of file multiplexer.cxx.

References MULTIPLEX.

void unocontrols::OMRCListenerMultiplexerHelper::windowClosed ( const css::lang::EventObject &  aEvent)
overridevirtual

Definition at line 346 of file multiplexer.cxx.

References MULTIPLEX.

void unocontrols::OMRCListenerMultiplexerHelper::windowClosing ( const css::lang::EventObject &  aEvent)
overridevirtual

Definition at line 339 of file multiplexer.cxx.

References MULTIPLEX.

void unocontrols::OMRCListenerMultiplexerHelper::windowDeactivated ( const css::lang::EventObject &  aEvent)
overridevirtual

Definition at line 374 of file multiplexer.cxx.

References MULTIPLEX.

void unocontrols::OMRCListenerMultiplexerHelper::windowHidden ( const css::lang::EventObject &  aEvent)
overridevirtual

Definition at line 262 of file multiplexer.cxx.

References MULTIPLEX.

void unocontrols::OMRCListenerMultiplexerHelper::windowMinimized ( const css::lang::EventObject &  aEvent)
overridevirtual

Definition at line 353 of file multiplexer.cxx.

References MULTIPLEX.

void unocontrols::OMRCListenerMultiplexerHelper::windowMoved ( const css::awt::WindowEvent &  aEvent)
overridevirtual

Definition at line 248 of file multiplexer.cxx.

References MULTIPLEX.

void unocontrols::OMRCListenerMultiplexerHelper::windowNormalized ( const css::lang::EventObject &  aEvent)
overridevirtual

Definition at line 360 of file multiplexer.cxx.

References MULTIPLEX.

void unocontrols::OMRCListenerMultiplexerHelper::windowOpened ( const css::lang::EventObject &  aEvent)
overridevirtual

Definition at line 332 of file multiplexer.cxx.

References MULTIPLEX.

void unocontrols::OMRCListenerMultiplexerHelper::windowPaint ( const css::awt::PaintEvent &  aEvent)
overridevirtual

Definition at line 325 of file multiplexer.cxx.

References MULTIPLEX.

void unocontrols::OMRCListenerMultiplexerHelper::windowResized ( const css::awt::WindowEvent &  aEvent)
overridevirtual

Definition at line 241 of file multiplexer.cxx.

References MULTIPLEX.

void unocontrols::OMRCListenerMultiplexerHelper::windowShown ( const css::lang::EventObject &  aEvent)
overridevirtual

Definition at line 255 of file multiplexer.cxx.

References MULTIPLEX.

Member Data Documentation

comphelper::OMultiTypeInterfaceContainerHelper2 unocontrols::OMRCListenerMultiplexerHelper::m_aListenerHolder
private

Definition at line 226 of file multiplexer.hxx.

Referenced by advise(), disposeAndClear(), setPeer(), and unadvise().

::osl::Mutex unocontrols::OMRCListenerMultiplexerHelper::m_aMutex
private

Definition at line 223 of file multiplexer.hxx.

Referenced by advise(), disposing(), setPeer(), and unadvise().

css::uno::WeakReference< css::awt::XWindow > unocontrols::OMRCListenerMultiplexerHelper::m_xControl
private

The source of the events. Normally this is the peer object.

Definition at line 225 of file multiplexer.hxx.

Referenced by disposeAndClear().

css::uno::Reference< css::awt::XWindow > unocontrols::OMRCListenerMultiplexerHelper::m_xPeer
private

Definition at line 224 of file multiplexer.hxx.

Referenced by advise(), disposing(), setPeer(), and unadvise().


The documentation for this class was generated from the following files: