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

#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 () override throw ()
 increment refcount XInterface release() A RuntimeException is thrown. More...
 
virtual void SAL_CALL release () override throw ()
 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 > ()
 

Protected 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...
 
- Protected Member Functions inherited from cppu::OWeakObject
virtual ~OWeakObject () COVERITY_NOEXCEPT_FALSE
 
void disposeWeakConnectionPoint ()
 

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...
 
::cppu::OMultiTypeInterfaceContainerHelper m_aListenerHolder
 

Additional Inherited Members

- Protected Attributes inherited from cppu::OWeakObject
oslInterlockedCount m_refCount
 

Detailed Description

Definition at line 42 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 78 of file multiplexer.cxx.

References m_aMutex.

unocontrols::OMRCListenerMultiplexerHelper::~OMRCListenerMultiplexerHelper ( )
overridevirtual

Definition at line 91 of file multiplexer.cxx.

Member Function Documentation

void SAL_CALL unocontrols::OMRCListenerMultiplexerHelper::acquire ( )
throw (
)
overridevirtual

increment refcount XInterface release() A RuntimeException is thrown.

Reimplemented from cppu::OWeakObject.

Definition at line 131 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 180 of file multiplexer.cxx.

References aEvent, cppu::OMultiTypeInterfaceContainerHelper::disposeAndClear(), m_aListenerHolder, and m_xControl.

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

Definition at line 221 of file multiplexer.cxx.

References m_aMutex, and m_xPeer.

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

Definition at line 230 of file multiplexer.cxx.

References MULTIPLEX.

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

Definition at line 237 of file multiplexer.cxx.

References MULTIPLEX.

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

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 384 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 
)
protected

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 414 of file multiplexer.cxx.

Referenced by setPeer(), and unadvise().

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

Definition at line 272 of file multiplexer.cxx.

References MULTIPLEX.

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

Definition at line 279 of file multiplexer.cxx.

References MULTIPLEX.

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

Definition at line 314 of file multiplexer.cxx.

References MULTIPLEX.

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

Definition at line 300 of file multiplexer.cxx.

References MULTIPLEX.

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

Definition at line 307 of file multiplexer.cxx.

References MULTIPLEX.

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

Definition at line 321 of file multiplexer.cxx.

References MULTIPLEX.

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

Definition at line 286 of file multiplexer.cxx.

References MULTIPLEX.

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

Definition at line 293 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 97 of file multiplexer.cxx.

References Any, and cppu::queryInterface().

void SAL_CALL unocontrols::OMRCListenerMultiplexerHelper::release ( )
throw (
)
overridevirtual

decrement refcount XInterface acquire() A RuntimeException is thrown.

Reimplemented from cppu::OWeakObject.

Definition at line 142 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 153 of file multiplexer.cxx.

References cppu::OMultiTypeInterfaceContainerHelper::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 370 of file multiplexer.cxx.

References MULTIPLEX.

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

Definition at line 349 of file multiplexer.cxx.

References MULTIPLEX.

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

Definition at line 342 of file multiplexer.cxx.

References MULTIPLEX.

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

Definition at line 377 of file multiplexer.cxx.

References MULTIPLEX.

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

Definition at line 265 of file multiplexer.cxx.

References MULTIPLEX.

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

Definition at line 356 of file multiplexer.cxx.

References MULTIPLEX.

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

Definition at line 251 of file multiplexer.cxx.

References MULTIPLEX.

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

Definition at line 363 of file multiplexer.cxx.

References MULTIPLEX.

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

Definition at line 335 of file multiplexer.cxx.

References MULTIPLEX.

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

Definition at line 328 of file multiplexer.cxx.

References MULTIPLEX.

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

Definition at line 244 of file multiplexer.cxx.

References MULTIPLEX.

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

Definition at line 258 of file multiplexer.cxx.

References MULTIPLEX.

Member Data Documentation

::cppu::OMultiTypeInterfaceContainerHelper unocontrols::OMRCListenerMultiplexerHelper::m_aListenerHolder
private

Definition at line 229 of file multiplexer.hxx.

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

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

Definition at line 226 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 228 of file multiplexer.hxx.

Referenced by disposeAndClear().

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

Definition at line 227 of file multiplexer.hxx.

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


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