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

#include <basecontrol.hxx>

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

Public Member Functions

 BaseControl (const css::uno::Reference< css::uno::XComponentContext > &rxContext)
 
virtual ~BaseControl () 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...
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () override
 get information about supported interfaces @seealso XTypeProvider More...
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () override
 get implementation id @descr This ID is necessary for UNO-caching. More...
 
virtual sal_Bool SAL_CALL supportsService (const OUString &sServiceName) override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
virtual void SAL_CALL dispose () override
 
virtual void SAL_CALL addEventListener (const css::uno::Reference< css::lang::XEventListener > &xListener) override
 
virtual void SAL_CALL removeEventListener (const css::uno::Reference< css::lang::XEventListener > &xListener) override
 
virtual void SAL_CALL createPeer (const css::uno::Reference< css::awt::XToolkit > &xToolkit, const css::uno::Reference< css::awt::XWindowPeer > &xParent) override
 
virtual void SAL_CALL setContext (const css::uno::Reference< css::uno::XInterface > &xContext) override
 
virtual sal_Bool SAL_CALL setModel (const css::uno::Reference< css::awt::XControlModel > &xModel) override=0
 
virtual void SAL_CALL setDesignMode (sal_Bool bOn) override
 
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getContext () override
 
virtual css::uno::Reference< css::awt::XControlModel > SAL_CALL getModel () override=0
 
virtual css::uno::Reference< css::awt::XWindowPeer > SAL_CALL getPeer () override
 
virtual css::uno::Reference< css::awt::XView > SAL_CALL getView () override
 
virtual sal_Bool SAL_CALL isDesignMode () override
 
virtual sal_Bool SAL_CALL isTransparent () override
 
virtual void SAL_CALL setPosSize (sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nFlags) override
 
virtual void SAL_CALL setVisible (sal_Bool bVisible) override
 
virtual void SAL_CALL setEnable (sal_Bool bEnable) override
 
virtual void SAL_CALL setFocus () override
 
virtual css::awt::Rectangle SAL_CALL getPosSize () override
 
virtual void SAL_CALL addWindowListener (const css::uno::Reference< css::awt::XWindowListener > &xListener) override
 
virtual void SAL_CALL addFocusListener (const css::uno::Reference< css::awt::XFocusListener > &xListener) override
 
virtual void SAL_CALL addKeyListener (const css::uno::Reference< css::awt::XKeyListener > &xListener) override
 
virtual void SAL_CALL addMouseListener (const css::uno::Reference< css::awt::XMouseListener > &xListener) override
 
virtual void SAL_CALL addMouseMotionListener (const css::uno::Reference< css::awt::XMouseMotionListener > &xListener) override
 
virtual void SAL_CALL addPaintListener (const css::uno::Reference< css::awt::XPaintListener > &xListener) override
 
virtual void SAL_CALL removeWindowListener (const css::uno::Reference< css::awt::XWindowListener > &xListener) override
 
virtual void SAL_CALL removeFocusListener (const css::uno::Reference< css::awt::XFocusListener > &xListener) override
 
virtual void SAL_CALL removeKeyListener (const css::uno::Reference< css::awt::XKeyListener > &xListener) override
 
virtual void SAL_CALL removeMouseListener (const css::uno::Reference< css::awt::XMouseListener > &xListener) override
 
virtual void SAL_CALL removeMouseMotionListener (const css::uno::Reference< css::awt::XMouseMotionListener > &xListener) override
 
virtual void SAL_CALL removePaintListener (const css::uno::Reference< css::awt::XPaintListener > &xListener) override
 
virtual void SAL_CALL draw (sal_Int32 nX, sal_Int32 nY) override
 
virtual sal_Bool SAL_CALL setGraphics (const css::uno::Reference< css::awt::XGraphics > &xDevice) override
 
virtual void SAL_CALL setZoom (float fZoomX, float fZoomY) override
 
virtual css::uno::Reference< css::awt::XGraphics > SAL_CALL getGraphics () override
 
virtual css::awt::Size SAL_CALL getSize () override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &rSource) override
 
virtual void SAL_CALL windowPaint (const css::awt::PaintEvent &rEvent) 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
 

Protected Member Functions

const css::uno::Reference< css::uno::XComponentContext > & impl_getComponentContext () const
 
const css::uno::Reference< css::awt::XWindow > & impl_getPeerWindow () const
 
const css::uno::Reference< css::awt::XGraphics > & impl_getGraphicsPeer () const
 
sal_Int32 impl_getWidth () const
 
sal_Int32 impl_getHeight () const
 
virtual css::awt::WindowDescriptor impl_getWindowDescriptor (const css::uno::Reference< css::awt::XWindowPeer > &xParentPeer)
 
virtual void impl_paint (sal_Int32 nX, sal_Int32 nY, const css::uno::Reference< css::awt::XGraphics > &xGraphics)
 
virtual void impl_recalcLayout (const css::awt::WindowEvent &aEvent)
 

Private Member Functions

OMRCListenerMultiplexerHelperimpl_getMultiplexer ()
 

Private Attributes

css::uno::Reference< css::uno::XComponentContext > m_xComponentContext
 
rtl::Reference< OMRCListenerMultiplexerHelperm_xMultiplexer
 
css::uno::Reference< css::uno::XInterface > m_xContext
 
css::uno::Reference< css::awt::XWindowPeer > m_xPeer
 
css::uno::Reference< css::awt::XWindow > m_xPeerWindow
 
css::uno::Reference< css::awt::XGraphics > m_xGraphicsView
 
css::uno::Reference< css::awt::XGraphics > m_xGraphicsPeer
 
sal_Int32 m_nX
 
sal_Int32 m_nY
 
sal_Int32 m_nWidth
 
sal_Int32 m_nHeight
 
bool m_bVisible
 
bool m_bInDesignMode
 
bool m_bEnable
 

Additional Inherited Members

- Protected Attributes inherited from cppu::BaseMutex
mutable::osl::Mutex m_aMutex
 

Detailed Description

Definition at line 42 of file basecontrol.hxx.

Constructor & Destructor Documentation

◆ BaseControl()

unocontrols::BaseControl::BaseControl ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext)

Definition at line 51 of file basecontrol.cxx.

References m_aMutex, and m_xComponentContext.

◆ ~BaseControl()

unocontrols::BaseControl::~BaseControl ( )
overridevirtual

Definition at line 64 of file basecontrol.cxx.

Member Function Documentation

◆ acquire()

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

◆ addEventListener()

void SAL_CALL unocontrols::BaseControl::addEventListener ( const css::uno::Reference< css::lang::XEventListener > &  xListener)
overridevirtual

Definition at line 210 of file basecontrol.cxx.

References cppu::BaseMutex::m_aMutex.

◆ addFocusListener()

void SAL_CALL unocontrols::BaseControl::addFocusListener ( const css::uno::Reference< css::awt::XFocusListener > &  xListener)
overridevirtual

◆ addKeyListener()

void SAL_CALL unocontrols::BaseControl::addKeyListener ( const css::uno::Reference< css::awt::XKeyListener > &  xListener)
overridevirtual

◆ addMouseListener()

void SAL_CALL unocontrols::BaseControl::addMouseListener ( const css::uno::Reference< css::awt::XMouseListener > &  xListener)
overridevirtual

◆ addMouseMotionListener()

void SAL_CALL unocontrols::BaseControl::addMouseMotionListener ( const css::uno::Reference< css::awt::XMouseMotionListener > &  xListener)
overridevirtual

◆ addPaintListener()

void SAL_CALL unocontrols::BaseControl::addPaintListener ( const css::uno::Reference< css::awt::XPaintListener > &  xListener)
overridevirtual

◆ addWindowListener()

void SAL_CALL unocontrols::BaseControl::addWindowListener ( const css::uno::Reference< css::awt::XWindowListener > &  xListener)
overridevirtual

◆ createPeer()

void SAL_CALL unocontrols::BaseControl::createPeer ( const css::uno::Reference< css::awt::XToolkit > &  xToolkit,
const css::uno::Reference< css::awt::XWindowPeer > &  xParent 
)
overridevirtual

◆ dispose()

void SAL_CALL unocontrols::BaseControl::dispose ( void  )
overridevirtual

◆ disposing()

void SAL_CALL unocontrols::BaseControl::disposing ( const css::lang::EventObject &  rSource)
overridevirtual

◆ draw()

void SAL_CALL unocontrols::BaseControl::draw ( sal_Int32  nX,
sal_Int32  nY 
)
overridevirtual

Definition at line 532 of file basecontrol.cxx.

References impl_paint(), cppu::BaseMutex::m_aMutex, and m_xGraphicsView.

◆ getContext()

Reference< XInterface > SAL_CALL unocontrols::BaseControl::getContext ( )
overridevirtual

◆ getGraphics()

Reference< XGraphics > SAL_CALL unocontrols::BaseControl::getGraphics ( )
overridevirtual

Reimplemented in unocontrols::FrameControl.

Definition at line 574 of file basecontrol.cxx.

References cppu::BaseMutex::m_aMutex, and m_xGraphicsView.

◆ getImplementationId()

Sequence< sal_Int8 > SAL_CALL unocontrols::BaseControl::getImplementationId ( )
overridevirtual

get implementation id @descr This ID is necessary for UNO-caching.

If there no ID, cache is disabled. Another way, cache is enabled.

@seealso XTypeProvider

Returns
ID as Sequence of byte

@onerror A RuntimeException is thrown.

Definition at line 137 of file basecontrol.cxx.

◆ getImplementationName()

OUString SAL_CALL unocontrols::BaseControl::getImplementationName ( )
overridevirtual

Reimplemented in unocontrols::FrameControl.

Definition at line 144 of file basecontrol.cxx.

◆ getModel()

virtual css::uno::Reference< css::awt::XControlModel > SAL_CALL unocontrols::BaseControl::getModel ( )
overridepure virtual

◆ getPeer()

Reference< XWindowPeer > SAL_CALL unocontrols::BaseControl::getPeer ( )
overridevirtual

◆ getPosSize()

Rectangle SAL_CALL unocontrols::BaseControl::getPosSize ( )
overridevirtual

◆ getSize()

Size SAL_CALL unocontrols::BaseControl::getSize ( )
overridevirtual

Definition at line 583 of file basecontrol.cxx.

References cppu::BaseMutex::m_aMutex, m_nHeight, and m_nWidth.

◆ getSupportedServiceNames()

Sequence< OUString > SAL_CALL unocontrols::BaseControl::getSupportedServiceNames ( )
overridevirtual

Reimplemented in unocontrols::FrameControl.

Definition at line 158 of file basecontrol.cxx.

◆ getTypes()

Sequence< Type > SAL_CALL unocontrols::BaseControl::getTypes ( )
overridevirtual

get information about supported interfaces @seealso XTypeProvider

Returns
Sequence of types of all supported interfaces

@onerror A RuntimeException is thrown.

Reimplemented in unocontrols::BaseContainerControl, unocontrols::FrameControl, unocontrols::ProgressBar, unocontrols::ProgressMonitor, and unocontrols::StatusIndicator.

Definition at line 121 of file basecontrol.cxx.

Referenced by unocontrols::BaseContainerControl::getTypes(), and unocontrols::FrameControl::getTypes().

◆ getView()

Reference< XView > SAL_CALL unocontrols::BaseControl::getView ( )
overridevirtual

Definition at line 322 of file basecontrol.cxx.

References cppu::BaseMutex::m_aMutex.

◆ impl_getComponentContext()

const css::uno::Reference< css::uno::XComponentContext > & unocontrols::BaseControl::impl_getComponentContext ( ) const
inlineprotected

Definition at line 270 of file basecontrol.hxx.

References m_xComponentContext.

Referenced by unocontrols::FrameControl::impl_createFrame().

◆ impl_getGraphicsPeer()

const css::uno::Reference< css::awt::XGraphics > & unocontrols::BaseControl::impl_getGraphicsPeer ( ) const
inlineprotected

◆ impl_getHeight()

sal_Int32 unocontrols::BaseControl::impl_getHeight ( ) const
inlineprotected

◆ impl_getMultiplexer()

OMRCListenerMultiplexerHelper * unocontrols::BaseControl::impl_getMultiplexer ( )
private

◆ impl_getPeerWindow()

const css::uno::Reference< css::awt::XWindow > & unocontrols::BaseControl::impl_getPeerWindow ( ) const
inlineprotected

◆ impl_getWidth()

sal_Int32 unocontrols::BaseControl::impl_getWidth ( ) const
inlineprotected

◆ impl_getWindowDescriptor()

WindowDescriptor unocontrols::BaseControl::impl_getWindowDescriptor ( const css::uno::Reference< css::awt::XWindowPeer > &  xParentPeer)
protectedvirtual

Reimplemented in unocontrols::BaseContainerControl, unocontrols::FrameControl, and unocontrols::StatusIndicator.

Definition at line 669 of file basecontrol.cxx.

References getPosSize().

Referenced by createPeer().

◆ impl_paint()

void unocontrols::BaseControl::impl_paint ( sal_Int32  nX,
sal_Int32  nY,
const css::uno::Reference< css::awt::XGraphics > &  xGraphics 
)
protectedvirtual

◆ impl_recalcLayout()

void unocontrols::BaseControl::impl_recalcLayout ( const css::awt::WindowEvent &  aEvent)
protectedvirtual

Reimplemented in unocontrols::ProgressMonitor, and unocontrols::StatusIndicator.

Definition at line 700 of file basecontrol.cxx.

Referenced by windowMoved(), and windowResized().

◆ isDesignMode()

sal_Bool SAL_CALL unocontrols::BaseControl::isDesignMode ( )
overridevirtual

Definition at line 331 of file basecontrol.cxx.

References cppu::BaseMutex::m_aMutex, and m_bInDesignMode.

◆ isTransparent()

sal_Bool SAL_CALL unocontrols::BaseControl::isTransparent ( )
overridevirtual

Definition at line 340 of file basecontrol.cxx.

◆ queryInterface()

Any SAL_CALL unocontrols::BaseControl::queryInterface ( const css::uno::Type &  aType)
overridevirtual

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

@seealso XInterface

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

@onerror A RuntimeException is thrown.

Reimplemented in unocontrols::BaseContainerControl, unocontrols::FrameControl, unocontrols::ProgressBar, unocontrols::ProgressMonitor, and unocontrols::StatusIndicator.

Definition at line 70 of file basecontrol.cxx.

References Any.

Referenced by unocontrols::BaseContainerControl::queryInterface(), unocontrols::FrameControl::queryInterface(), unocontrols::ProgressMonitor::queryInterface(), and unocontrols::StatusIndicator::queryInterface().

◆ release()

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

◆ removeEventListener()

void SAL_CALL unocontrols::BaseControl::removeEventListener ( const css::uno::Reference< css::lang::XEventListener > &  xListener)
overridevirtual

Definition at line 219 of file basecontrol.cxx.

References cppu::BaseMutex::m_aMutex.

◆ removeFocusListener()

void SAL_CALL unocontrols::BaseControl::removeFocusListener ( const css::uno::Reference< css::awt::XFocusListener > &  xListener)
overridevirtual

◆ removeKeyListener()

void SAL_CALL unocontrols::BaseControl::removeKeyListener ( const css::uno::Reference< css::awt::XKeyListener > &  xListener)
overridevirtual

◆ removeMouseListener()

void SAL_CALL unocontrols::BaseControl::removeMouseListener ( const css::uno::Reference< css::awt::XMouseListener > &  xListener)
overridevirtual

◆ removeMouseMotionListener()

void SAL_CALL unocontrols::BaseControl::removeMouseMotionListener ( const css::uno::Reference< css::awt::XMouseMotionListener > &  xListener)
overridevirtual

◆ removePaintListener()

void SAL_CALL unocontrols::BaseControl::removePaintListener ( const css::uno::Reference< css::awt::XPaintListener > &  xListener)
overridevirtual

◆ removeWindowListener()

void SAL_CALL unocontrols::BaseControl::removeWindowListener ( const css::uno::Reference< css::awt::XWindowListener > &  xListener)
overridevirtual

◆ setContext()

void SAL_CALL unocontrols::BaseControl::setContext ( const css::uno::Reference< css::uno::XInterface > &  xContext)
overridevirtual

Definition at line 286 of file basecontrol.cxx.

◆ setDesignMode()

void SAL_CALL unocontrols::BaseControl::setDesignMode ( sal_Bool  bOn)
overridevirtual

Definition at line 295 of file basecontrol.cxx.

References cppu::BaseMutex::m_aMutex, and m_bInDesignMode.

◆ setEnable()

void SAL_CALL unocontrols::BaseControl::setEnable ( sal_Bool  bEnable)
overridevirtual

Definition at line 409 of file basecontrol.cxx.

References cppu::BaseMutex::m_aMutex, m_bEnable, and m_xPeerWindow.

◆ setFocus()

void SAL_CALL unocontrols::BaseControl::setFocus ( )
overridevirtual

Definition at line 426 of file basecontrol.cxx.

References cppu::BaseMutex::m_aMutex, and m_xPeerWindow.

◆ setGraphics()

sal_Bool SAL_CALL unocontrols::BaseControl::setGraphics ( const css::uno::Reference< css::awt::XGraphics > &  xDevice)
overridevirtual

Reimplemented in unocontrols::FrameControl.

Definition at line 546 of file basecontrol.cxx.

References cppu::BaseMutex::m_aMutex, and m_xGraphicsView.

◆ setModel()

virtual sal_Bool SAL_CALL unocontrols::BaseControl::setModel ( const css::uno::Reference< css::awt::XControlModel > &  xModel)
overridepure virtual

◆ setPosSize()

void SAL_CALL unocontrols::BaseControl::setPosSize ( sal_Int32  nX,
sal_Int32  nY,
sal_Int32  nWidth,
sal_Int32  nHeight,
sal_Int16  nFlags 
)
overridevirtual

◆ setVisible()

void SAL_CALL unocontrols::BaseControl::setVisible ( sal_Bool  bVisible)
overridevirtual

◆ setZoom()

void SAL_CALL unocontrols::BaseControl::setZoom ( float  fZoomX,
float  fZoomY 
)
overridevirtual

Definition at line 566 of file basecontrol.cxx.

◆ supportsService()

sal_Bool SAL_CALL unocontrols::BaseControl::supportsService ( const OUString &  sServiceName)
overridevirtual

Definition at line 151 of file basecontrol.cxx.

References sServiceName, and cppu::supportsService().

◆ windowHidden()

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

Definition at line 663 of file basecontrol.cxx.

◆ windowMoved()

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

◆ windowPaint()

void SAL_CALL unocontrols::BaseControl::windowPaint ( const css::awt::PaintEvent &  rEvent)
overridevirtual

Definition at line 614 of file basecontrol.cxx.

References impl_paint(), cppu::BaseMutex::m_aMutex, and m_xGraphicsPeer.

◆ windowResized()

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

◆ windowShown()

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

Definition at line 657 of file basecontrol.cxx.

Member Data Documentation

◆ m_bEnable

bool unocontrols::BaseControl::m_bEnable
private

Definition at line 306 of file basecontrol.hxx.

Referenced by createPeer(), and setEnable().

◆ m_bInDesignMode

bool unocontrols::BaseControl::m_bInDesignMode
private

Definition at line 305 of file basecontrol.hxx.

Referenced by createPeer(), isDesignMode(), and setDesignMode().

◆ m_bVisible

bool unocontrols::BaseControl::m_bVisible
private

Definition at line 304 of file basecontrol.hxx.

Referenced by createPeer(), and setVisible().

◆ m_nHeight

sal_Int32 unocontrols::BaseControl::m_nHeight
private

◆ m_nWidth

sal_Int32 unocontrols::BaseControl::m_nWidth
private

◆ m_nX

sal_Int32 unocontrols::BaseControl::m_nX
private

Definition at line 300 of file basecontrol.hxx.

Referenced by createPeer(), getPosSize(), and setPosSize().

◆ m_nY

sal_Int32 unocontrols::BaseControl::m_nY
private

Definition at line 301 of file basecontrol.hxx.

Referenced by createPeer(), getPosSize(), and setPosSize().

◆ m_xComponentContext

css::uno::Reference< css::uno::XComponentContext > unocontrols::BaseControl::m_xComponentContext
private

Definition at line 293 of file basecontrol.hxx.

Referenced by createPeer(), and impl_getComponentContext().

◆ m_xContext

css::uno::Reference< css::uno::XInterface > unocontrols::BaseControl::m_xContext
private

Definition at line 295 of file basecontrol.hxx.

Referenced by dispose(), and getContext().

◆ m_xGraphicsPeer

css::uno::Reference< css::awt::XGraphics > unocontrols::BaseControl::m_xGraphicsPeer
private

Definition at line 299 of file basecontrol.hxx.

Referenced by createPeer(), dispose(), disposing(), impl_getGraphicsPeer(), and windowPaint().

◆ m_xGraphicsView

css::uno::Reference< css::awt::XGraphics > unocontrols::BaseControl::m_xGraphicsView
private

Definition at line 298 of file basecontrol.hxx.

Referenced by dispose(), disposing(), draw(), getGraphics(), and setGraphics().

◆ m_xMultiplexer

rtl::Reference<OMRCListenerMultiplexerHelper> unocontrols::BaseControl::m_xMultiplexer
private

Definition at line 294 of file basecontrol.hxx.

Referenced by createPeer(), dispose(), and impl_getMultiplexer().

◆ m_xPeer

css::uno::Reference< css::awt::XWindowPeer > unocontrols::BaseControl::m_xPeer
private

Definition at line 296 of file basecontrol.hxx.

Referenced by createPeer(), dispose(), and getPeer().

◆ m_xPeerWindow

css::uno::Reference< css::awt::XWindow > unocontrols::BaseControl::m_xPeerWindow
private

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