LibreOffice Module UnoControls (master) 1
basecontrol.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <basecontrol.hxx>
21#include <multiplexer.hxx>
22
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>
30
31// namespaces
32
33using namespace ::cppu;
34using namespace ::osl;
35using namespace ::com::sun::star::uno;
36using namespace ::com::sun::star::lang;
37using namespace ::com::sun::star::awt;
38
39namespace unocontrols {
40
41constexpr sal_Int32 DEFAULT_X = 0;
42constexpr sal_Int32 DEFAULT_Y = 0;
43constexpr sal_Int32 DEFAULT_WIDTH = 100;
44constexpr sal_Int32 DEFAULT_HEIGHT = 100;
45constexpr bool DEFAULT_VISIBLE = false;
46constexpr bool DEFAULT_INDESIGNMODE = false;
47constexpr bool DEFAULT_ENABLE = true;
48
49// construct/destruct
50
51BaseControl::BaseControl( const Reference< XComponentContext >& rxContext )
52 : WeakComponentImplHelper ( m_aMutex )
53 , m_xComponentContext ( rxContext )
54 , m_nX ( DEFAULT_X )
55 , m_nY ( DEFAULT_Y )
56 , m_nWidth ( DEFAULT_WIDTH )
57 , m_nHeight ( DEFAULT_HEIGHT )
58 , m_bVisible ( DEFAULT_VISIBLE )
59 , m_bInDesignMode ( DEFAULT_INDESIGNMODE )
60 , m_bEnable ( DEFAULT_ENABLE )
61{
62}
63
65{
66}
67
68// XInterface
69
70Any SAL_CALL BaseControl::queryInterface( const Type& rType )
71{
72 // Ask for my own supported interfaces ...
73 // Attention: XTypeProvider and XInterface are supported by WeakComponentImplHelper!
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 )
81 )
82 );
83
84 // If searched interface supported by this class ...
85 if ( aReturn.hasValue() )
86 {
87 // ... return this information.
88 return aReturn;
89 }
90 else
91 {
92 // Else; ... ask baseclass for interfaces!
93 return WeakComponentImplHelper::queryInterface( rType );
94 }
95}
96
97// XInterface
98
99void SAL_CALL BaseControl::acquire() noexcept
100{
101 // Attention:
102 // Don't use mutex or guard in this method!!! Is a method of XInterface.
103
104 // Forward to baseclass
105 WeakComponentImplHelper::acquire();
106}
107
108// XInterface
109
110void SAL_CALL BaseControl::release() noexcept
111{
112 // Attention:
113 // Don't use mutex or guard in this method!!! Is a method of XInterface.
114
115 // Forward to baseclass
116 WeakComponentImplHelper::release();
117}
118
119// XTypeProvider
120
121Sequence< Type > SAL_CALL BaseControl::getTypes()
122{
123 static OTypeCollection ourTypeCollection(
130 WeakComponentImplHelper::getTypes() );
131
132 return ourTypeCollection.getTypes();
133}
134
135// XTypeProvider
136
138{
139 return css::uno::Sequence<sal_Int8>();
140}
141
142// XServiceInfo
143
145{
146 return OUString();
147}
148
149// XServiceInfo
150
151sal_Bool SAL_CALL BaseControl::supportsService( const OUString& sServiceName )
152{
154}
155
156// XServiceInfo
157
158Sequence< OUString > SAL_CALL BaseControl::getSupportedServiceNames()
159{
160 return Sequence< OUString >();
161}
162
163// XComponent
164
165void SAL_CALL BaseControl::dispose()
166{
167 // Ready for multithreading
168 MutexGuard aGuard( m_aMutex );
169
170 if ( m_xMultiplexer.is() )
171 {
172 // to all other paint, focus, etc.
173 m_xMultiplexer->disposeAndClear();
174 }
175
176 // set the service manager to disposed
177 WeakComponentImplHelper::dispose();
178
179 // release context and peer
180 m_xContext.clear();
181 if ( m_xPeer.is() )
182 {
183 if ( m_xGraphicsPeer.is() )
184 {
185 removePaintListener( this );
186 removeWindowListener( this );
187 m_xGraphicsPeer.clear();
188 }
189
190 m_xPeer->dispose();
191 m_xPeerWindow.clear();
192 m_xPeer.clear();
193
194 if ( m_xMultiplexer.is() )
195 {
196 // take changes on multiplexer
197 m_xMultiplexer->setPeer( Reference< XWindow >() );
198 }
199 }
200
201 // release view
202 if ( m_xGraphicsView.is() )
203 {
204 m_xGraphicsView.clear();
205 }
206}
207
208// XComponent
209
210void SAL_CALL BaseControl::addEventListener( const Reference< XEventListener >& xListener )
211{
212 // Ready for multithreading
213 MutexGuard aGuard( m_aMutex );
214 WeakComponentImplHelper::addEventListener( xListener );
215}
216
217// XComponent
218
219void SAL_CALL BaseControl::removeEventListener( const Reference< XEventListener >& xListener )
220{
221 // Ready for multithreading
222 MutexGuard aGuard( m_aMutex );
223 WeakComponentImplHelper::removeEventListener( xListener );
224}
225
226// XControl
227
228void SAL_CALL BaseControl::createPeer( const Reference< XToolkit >& xToolkit ,
229 const Reference< XWindowPeer >& xParentPeer )
230{
231 // Ready for multithreading
232 MutexGuard aGuard( m_aMutex );
233
234 if ( m_xPeer.is() )
235 return;
236
237 // use method "BaseControl::getWindowDescriptor()" to change window attributes!
238 WindowDescriptor aDescriptor = impl_getWindowDescriptor( xParentPeer );
239
240 if ( m_bVisible )
241 {
242 aDescriptor.WindowAttributes |= WindowAttribute::SHOW;
243 }
244
245 // very slow under remote conditions!
246 // create the window on the server
247 Reference< XToolkit > xLocalToolkit = xToolkit;
248 if ( !xLocalToolkit.is() )
249 {
250 // but first create well known toolkit, if it not exist
251 xLocalToolkit.set( Toolkit::create(m_xComponentContext), UNO_QUERY_THROW );
252 }
253 m_xPeer = xLocalToolkit->createWindow( aDescriptor );
254 m_xPeerWindow.set( m_xPeer, UNO_QUERY );
255
256 if ( !m_xPeerWindow.is() )
257 return;
258
259 if ( m_xMultiplexer.is() )
260 {
261 m_xMultiplexer->setPeer( m_xPeerWindow );
262 }
263
264 // create new reference to xgraphics for painting on a peer
265 // and add a paint listener
266 Reference< XDevice > xDevice( m_xPeerWindow, UNO_QUERY );
267
268 if ( xDevice.is() )
269 {
270 m_xGraphicsPeer = xDevice->createGraphics();
271 }
272
273 if ( m_xGraphicsPeer.is() )
274 {
275 addPaintListener( this );
276 addWindowListener( this );
277 }
278
279 m_xPeerWindow->setPosSize( m_nX, m_nY, m_nWidth, m_nHeight, PosSize::POSSIZE );
280 m_xPeerWindow->setEnable( m_bEnable );
281 m_xPeerWindow->setVisible( m_bVisible && !m_bInDesignMode );
282}
283
284// XControl
285
286void SAL_CALL BaseControl::setContext( const Reference< XInterface >& xContext )
287{
288 // Ready for multithreading
289 MutexGuard aGuard( m_aMutex );
290 m_xContext = xContext;
291}
292
293// XControl
294
296{
297 // Ready for multithreading
298 MutexGuard aGuard( m_aMutex );
299 m_bInDesignMode = bOn;
300}
301
302// XControl
303
304Reference< XInterface > SAL_CALL BaseControl::getContext()
305{
306 // Ready for multithreading
307 MutexGuard aGuard( m_aMutex );
308 return m_xContext;
309}
310
311// XControl
312
313Reference< XWindowPeer > SAL_CALL BaseControl::getPeer()
314{
315 // Ready for multithreading
316 MutexGuard aGuard( m_aMutex );
317 return m_xPeer;
318}
319
320// XControl
321
322Reference< XView > SAL_CALL BaseControl::getView()
323{
324 // Ready for multithreading
325 MutexGuard aGuard( m_aMutex );
326 return this;
327}
328
329// XControl
330
332{
333 // Ready for multithreading
334 MutexGuard aGuard( m_aMutex );
335 return m_bInDesignMode;
336}
337
338// XControl
339
341{
342 return false;
343}
344
345// XWindow
346
347void SAL_CALL BaseControl::setPosSize( sal_Int32 nX ,
348 sal_Int32 nY ,
349 sal_Int32 nWidth ,
350 sal_Int32 nHeight ,
351 sal_Int16 nFlags )
352{
353 // - change size and position of window and save the values
354
355 // Ready for multithreading
356 MutexGuard aGuard( m_aMutex );
357
358 bool bChanged = false;
359
360 if ( nFlags & PosSize::X )
361 {
362 bChanged |= m_nX != nX;
363 m_nX = nX;
364 }
365
366 if ( nFlags & PosSize::Y )
367 {
368 bChanged |= m_nY != nY;
369 m_nY = nY;
370 }
371
372 if ( nFlags & PosSize::WIDTH )
373 {
374 bChanged |= m_nWidth != nWidth;
375 m_nWidth = nWidth;
376 }
377
378 if ( nFlags & PosSize::HEIGHT )
379 {
380 bChanged |= m_nHeight != nHeight;
381 m_nHeight = nHeight;
382 }
383
384 if ( bChanged && m_xPeerWindow.is() )
385 {
386 m_xPeerWindow->setPosSize( m_nX, m_nY, m_nWidth, m_nHeight, nFlags );
387 }
388}
389
390// XWindow
391
392void SAL_CALL BaseControl::setVisible( sal_Bool bVisible )
393{
394 // Ready for multithreading
395 MutexGuard aGuard( m_aMutex );
396
397 // Set new state of flag
399
400 if ( m_xPeerWindow.is() )
401 {
402 // Set it also on peerwindow
403 m_xPeerWindow->setVisible( m_bVisible );
404 }
405}
406
407// XWindow
408
409void SAL_CALL BaseControl::setEnable( sal_Bool bEnable )
410{
411 // Ready for multithreading
412 MutexGuard aGuard( m_aMutex );
413
414 // Set new state of flag
415 m_bEnable = bEnable;
416
417 if ( m_xPeerWindow.is() )
418 {
419 // Set it also on peerwindow
420 m_xPeerWindow->setEnable( m_bEnable );
421 }
422}
423
424// XWindow
425
427{
428 // Ready for multithreading
429 MutexGuard aGuard( m_aMutex );
430
431 if ( m_xPeerWindow.is() )
432 {
433 m_xPeerWindow->setFocus();
434 }
435}
436
437// XWindow
438
440{
441 // Ready for multithreading
442 MutexGuard aGuard( m_aMutex );
443 return Rectangle( m_nX, m_nY , m_nWidth, m_nHeight );
444}
445
446// XWindow
447
448void SAL_CALL BaseControl::addWindowListener( const Reference< XWindowListener >& xListener )
449{
451}
452
453// XWindow
454
455void SAL_CALL BaseControl::addFocusListener( const Reference< XFocusListener >& xListener )
456{
458}
459
460// XWindow
461
462void SAL_CALL BaseControl::addKeyListener( const Reference< XKeyListener >& xListener )
463{
465}
466
467// XWindow
468
469void SAL_CALL BaseControl::addMouseListener( const Reference< XMouseListener >& xListener )
470{
472}
473
474// XWindow
475
476void SAL_CALL BaseControl::addMouseMotionListener( const Reference< XMouseMotionListener >& xListener )
477{
479}
480
481// XWindow
482
483void SAL_CALL BaseControl::addPaintListener( const Reference< XPaintListener >& xListener )
484{
486}
487
488// XWindow
489
490void SAL_CALL BaseControl::removeWindowListener( const Reference< XWindowListener >& xListener )
491{
493}
494
495// XWindow
496
497void SAL_CALL BaseControl::removeFocusListener( const Reference< XFocusListener >& xListener )
498{
500}
501
502// XWindow
503
504void SAL_CALL BaseControl::removeKeyListener( const Reference< XKeyListener >& xListener )
505{
507}
508
509// XWindow
510
511void SAL_CALL BaseControl::removeMouseListener( const Reference< XMouseListener >& xListener )
512{
514}
515
516// XWindow
517
518void SAL_CALL BaseControl::removeMouseMotionListener( const Reference< XMouseMotionListener >& xListener )
519{
521}
522
523// XWindow
524
525void SAL_CALL BaseControl::removePaintListener( const Reference< XPaintListener >& xListener )
526{
528}
529
530// XView
531
532void SAL_CALL BaseControl::draw( sal_Int32 nX ,
533 sal_Int32 nY )
534{
535 // Ready for multithreading
536 MutexGuard aGuard( m_aMutex );
537
538 // - paint to a view
539 // - use the method "paint()"
540 // - see also "windowPaint()"
541 impl_paint( nX, nY, m_xGraphicsView );
542}
543
544// XView
545
546sal_Bool SAL_CALL BaseControl::setGraphics( const Reference< XGraphics >& xDevice )
547{
548 // - set the graphics for a view
549 // - in this class exist 2 graphics-member ... one for peer[_xGraphicsPeer] and one for view[_xGraphicsView]
550 // - they are used by "windowPaint() and draw()", forwarded to "paint ()"
551 bool bReturn = false;
552 if ( xDevice.is() )
553 {
554 // Ready for multithreading
555 MutexGuard aGuard( m_aMutex );
556
557 m_xGraphicsView = xDevice;
558 bReturn = true;
559 }
560
561 return bReturn;
562}
563
564// XView
565
566void SAL_CALL BaseControl::setZoom( float /*fZoomX*/ ,
567 float /*fZoomY*/ )
568{
569 // Not implemented yet
570}
571
572// XView
573
574Reference< XGraphics > SAL_CALL BaseControl::getGraphics()
575{
576 // Ready for multithreading
577 MutexGuard aGuard( m_aMutex );
578 return m_xGraphicsView;
579}
580
581// XView
582
584{
585 // Ready for multithreading
586 MutexGuard aGuard( m_aMutex );
587 return Size( m_nWidth, m_nHeight );
588}
589
590// XEventListener
591
592void SAL_CALL BaseControl::disposing( const EventObject& /*aSource*/ )
593{
594 // Ready for multithreading
595 MutexGuard aGuard( m_aMutex );
596
597 // - release ALL references
598 // - it must be !!!
599 if ( m_xGraphicsPeer.is() )
600 {
601 removePaintListener( this );
602 removeWindowListener( this );
603 m_xGraphicsPeer.clear();
604 }
605
606 if ( m_xGraphicsView.is() )
607 {
608 m_xGraphicsView.clear();
609 }
610}
611
612// XPaintListener
613
614void SAL_CALL BaseControl::windowPaint( const PaintEvent& /*aEvent*/ )
615{
616 // Ready for multithreading
617 MutexGuard aGuard( m_aMutex );
618
619 // - repaint the peer
620 // - use the method "paint ()" for painting on a peer and a print device !!!
621 // - see also "draw ()"
623}
624
625// XWindowListener
626
627void SAL_CALL BaseControl::windowResized( const WindowEvent& aEvent )
628{
629 // Ready for multithreading
630 MutexGuard aGuard( m_aMutex );
631
632 m_nWidth = aEvent.Width;
633 m_nHeight = aEvent.Height;
634 WindowEvent aMappedEvent = aEvent;
635 aMappedEvent.X = 0;
636 aMappedEvent.Y = 0;
637 impl_recalcLayout( aMappedEvent );
638}
639
640// XWindowListener
641
642void SAL_CALL BaseControl::windowMoved( const WindowEvent& aEvent )
643{
644 // Ready for multithreading
645 MutexGuard aGuard( m_aMutex );
646
647 m_nWidth = aEvent.Width;
648 m_nHeight = aEvent.Height;
649 WindowEvent aMappedEvent = aEvent;
650 aMappedEvent.X = 0;
651 aMappedEvent.Y = 0;
652 impl_recalcLayout( aMappedEvent );
653}
654
655// XWindowListener
656
657void SAL_CALL BaseControl::windowShown( const EventObject& /*aEvent*/ )
658{
659}
660
661// XWindowListener
662
663void SAL_CALL BaseControl::windowHidden( const EventObject& /*aEvent*/ )
664{
665}
666
667// protected method
668
669WindowDescriptor BaseControl::impl_getWindowDescriptor( const Reference< XWindowPeer >& xParentPeer )
670{
671 // - used from "createPeer()" to set the values of a css::awt::WindowDescriptor !!!
672 // - if you will change the descriptor-values, you must override this virtual function
673 // - the caller must release the memory for this dynamical descriptor !!!
674
675 WindowDescriptor aDescriptor;
676
677 aDescriptor.Type = WindowClass_SIMPLE;
678 aDescriptor.WindowServiceName = "window";
679 aDescriptor.ParentIndex = -1;
680 aDescriptor.Parent = xParentPeer;
681 aDescriptor.Bounds = getPosSize ();
682 aDescriptor.WindowAttributes = 0;
683
684 return aDescriptor;
685}
686
687// protected method
688
689void BaseControl::impl_paint( sal_Int32 /*nX*/ ,
690 sal_Int32 /*nY*/ ,
691 const Reference< XGraphics >& /*xGraphics*/ )
692{
693 // - one paint method for peer AND view !!!
694 // (see also => "windowPaint()" and "draw()")
695 // - not used in this implementation, but it's not necessary to make it pure virtual !!!
696}
697
698// protected method
699
700void BaseControl::impl_recalcLayout( const WindowEvent& /*aEvent*/ )
701{
702 // We need as virtual function to support automatically resizing of derived controls!
703 // But we make it not pure virtual because it's not necessary for all derived classes!
704}
705
706// private method
707
709{
710 if ( !m_xMultiplexer.is() )
711 {
712 m_xMultiplexer = new OMRCListenerMultiplexerHelper( static_cast<XWindow*>(this), m_xPeerWindow );
713 }
714
715 return m_xMultiplexer.get();
716}
717
718} // namespace unocontrols
719
720/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
constexpr OUStringLiteral sServiceName
AnyEventRef aEvent
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.
Definition: basecontrol.cxx:70
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
Definition: basecontrol.cxx:64
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)
Definition: basecontrol.cxx:51
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.
Definition: basecontrol.cxx:99
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
std::mutex m_aMutex
Type
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
constexpr bool DEFAULT_INDESIGNMODE
Definition: basecontrol.cxx:46
constexpr sal_Int32 DEFAULT_HEIGHT
Definition: basecontrol.cxx:44
constexpr sal_Int32 DEFAULT_Y
Definition: basecontrol.cxx:42
constexpr sal_Int32 DEFAULT_WIDTH
Definition: basecontrol.cxx:43
constexpr sal_Int32 DEFAULT_X
Definition: basecontrol.cxx:41
constexpr bool DEFAULT_VISIBLE
Definition: basecontrol.cxx:45
constexpr bool DEFAULT_ENABLE
Definition: basecontrol.cxx:47
bool bVisible
unsigned char sal_Bool