23#include <com/sun/star/awt/XDevice.hpp>
24#include <com/sun/star/awt/WindowAttribute.hpp>
25#include <com/sun/star/awt/PosSize.hpp>
26#include <com/sun/star/awt/Toolkit.hpp>
33using namespace ::
cppu;
52 : WeakComponentImplHelper (
m_aMutex )
74 Any aReturn ( ::cppu::queryInterface( rType ,
75 static_cast< XPaintListener*
> (
this ) ,
76 static_cast< XWindowListener*
> (
this ) ,
77 static_cast< XView*
> (
this ) ,
78 static_cast< XWindow*
> (
this ) ,
79 static_cast< XServiceInfo*
> (
this ) ,
80 static_cast< XControl*
> (
this )
85 if ( aReturn.hasValue() )
93 return WeakComponentImplHelper::queryInterface( rType );
105 WeakComponentImplHelper::acquire();
116 WeakComponentImplHelper::release();
123 static OTypeCollection ourTypeCollection(
130 WeakComponentImplHelper::getTypes() );
132 return ourTypeCollection.getTypes();
139 return css::uno::Sequence<sal_Int8>();
160 return Sequence< OUString >();
177 WeakComponentImplHelper::dispose();
214 WeakComponentImplHelper::addEventListener( xListener );
223 WeakComponentImplHelper::removeEventListener( xListener );
229 const Reference< XWindowPeer >& xParentPeer )
242 aDescriptor.WindowAttributes |= WindowAttribute::SHOW;
247 Reference< XToolkit > xLocalToolkit = xToolkit;
248 if ( !xLocalToolkit.is() )
253 m_xPeer = xLocalToolkit->createWindow( aDescriptor );
358 bool bChanged =
false;
360 if ( nFlags & PosSize::X )
362 bChanged |=
m_nX != nX;
366 if ( nFlags & PosSize::Y )
368 bChanged |=
m_nY != nY;
372 if ( nFlags & PosSize::WIDTH )
378 if ( nFlags & PosSize::HEIGHT )
551 bool bReturn =
false;
634 WindowEvent aMappedEvent =
aEvent;
649 WindowEvent aMappedEvent =
aEvent;
675 WindowDescriptor aDescriptor;
677 aDescriptor.Type = WindowClass_SIMPLE;
678 aDescriptor.WindowServiceName =
"window";
679 aDescriptor.ParentIndex = -1;
680 aDescriptor.Parent = xParentPeer;
682 aDescriptor.WindowAttributes = 0;
691 const Reference< XGraphics >& )
constexpr OUStringLiteral sServiceName
mutable::osl::Mutex m_aMutex
virtual OUString SAL_CALL getImplementationName() 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 createPeer(const css::uno::Reference< css::awt::XToolkit > &xToolkit, const css::uno::Reference< css::awt::XWindowPeer > &xParent) override
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual void SAL_CALL setFocus() override
virtual sal_Bool SAL_CALL isTransparent() override
virtual void SAL_CALL windowMoved(const css::awt::WindowEvent &aEvent) override
virtual void SAL_CALL windowPaint(const css::awt::PaintEvent &rEvent) override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual void SAL_CALL setContext(const css::uno::Reference< css::uno::XInterface > &xContext) override
virtual void SAL_CALL setPosSize(sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nFlags) override
css::uno::Reference< css::awt::XGraphics > m_xGraphicsView
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
get implementation id @descr This ID is necessary for UNO-caching.
css::uno::Reference< css::awt::XWindow > m_xPeerWindow
virtual void SAL_CALL windowShown(const css::lang::EventObject &aEvent) override
virtual void SAL_CALL release() noexcept override
decrement refcount @seealso XInterface @seealso acquire() @onerror A RuntimeException is thrown.
virtual void SAL_CALL setZoom(float fZoomX, float fZoomY) override
virtual sal_Bool SAL_CALL supportsService(const OUString &sServiceName) override
virtual void SAL_CALL setEnable(sal_Bool bEnable) override
virtual void SAL_CALL removeMouseListener(const css::uno::Reference< css::awt::XMouseListener > &xListener) override
virtual void SAL_CALL setVisible(sal_Bool bVisible) override
css::uno::Reference< css::awt::XWindowPeer > m_xPeer
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
get information about supported interfaces @seealso XTypeProvider
virtual void SAL_CALL windowResized(const css::awt::WindowEvent &aEvent) override
virtual css::uno::Reference< css::awt::XWindowPeer > SAL_CALL getPeer() override
virtual css::uno::Reference< css::awt::XGraphics > SAL_CALL getGraphics() override
virtual void SAL_CALL removeMouseMotionListener(const css::uno::Reference< css::awt::XMouseMotionListener > &xListener) override
virtual void SAL_CALL draw(sal_Int32 nX, sal_Int32 nY) override
virtual void SAL_CALL addWindowListener(const css::uno::Reference< css::awt::XWindowListener > &xListener) 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.
virtual sal_Bool SAL_CALL isDesignMode() override
virtual void SAL_CALL addFocusListener(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 dispose() override
css::uno::Reference< css::uno::XComponentContext > m_xComponentContext
virtual void SAL_CALL setDesignMode(sal_Bool bOn) override
virtual css::awt::Rectangle SAL_CALL getPosSize() override
virtual void SAL_CALL removeFocusListener(const css::uno::Reference< css::awt::XFocusListener > &xListener) override
virtual void SAL_CALL addMouseMotionListener(const css::uno::Reference< css::awt::XMouseMotionListener > &xListener) override
virtual css::uno::Reference< css::awt::XView > SAL_CALL getView() override
virtual void impl_paint(sal_Int32 nX, sal_Int32 nY, const css::uno::Reference< css::awt::XGraphics > &xGraphics)
virtual void SAL_CALL windowHidden(const css::lang::EventObject &aEvent) override
virtual void SAL_CALL removeWindowListener(const css::uno::Reference< css::awt::XWindowListener > &xListener) override
virtual void SAL_CALL removePaintListener(const css::uno::Reference< css::awt::XPaintListener > &xListener) override
rtl::Reference< OMRCListenerMultiplexerHelper > m_xMultiplexer
virtual ~BaseControl() override
virtual sal_Bool SAL_CALL setGraphics(const css::uno::Reference< css::awt::XGraphics > &xDevice) override
css::uno::Reference< css::awt::XGraphics > m_xGraphicsPeer
virtual void SAL_CALL addPaintListener(const css::uno::Reference< css::awt::XPaintListener > &xListener) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL disposing(const css::lang::EventObject &rSource) override
BaseControl(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
css::uno::Reference< css::uno::XInterface > m_xContext
virtual css::awt::WindowDescriptor impl_getWindowDescriptor(const css::uno::Reference< css::awt::XWindowPeer > &xParentPeer)
OMRCListenerMultiplexerHelper * impl_getMultiplexer()
virtual css::awt::Size SAL_CALL getSize() override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getContext() override
virtual void impl_recalcLayout(const css::awt::WindowEvent &aEvent)
virtual void SAL_CALL acquire() noexcept override
increment refcount @seealso XInterface @seealso release() @onerror A RuntimeException is thrown.
void unadvise(const css::uno::Type &aType, const css::uno::Reference< css::uno::XInterface > &xListener)
Remove the specified listener from the source.
void advise(const css::uno::Type &aType, const css::uno::Reference< css::uno::XInterface > &xListener)
Add the specified listener to the source.
Reference< XComponentContext > const m_xComponentContext
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
constexpr bool DEFAULT_INDESIGNMODE
constexpr sal_Int32 DEFAULT_HEIGHT
constexpr sal_Int32 DEFAULT_Y
constexpr sal_Int32 DEFAULT_WIDTH
constexpr sal_Int32 DEFAULT_X
constexpr bool DEFAULT_VISIBLE
constexpr bool DEFAULT_ENABLE