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 
33 using namespace ::cppu;
34 using namespace ::osl;
35 using namespace ::com::sun::star::uno;
36 using namespace ::com::sun::star::lang;
37 using namespace ::com::sun::star::awt;
38 
39 namespace unocontrols {
40 
41 constexpr sal_Int32 DEFAULT_X = 0;
42 constexpr sal_Int32 DEFAULT_Y = 0;
43 constexpr sal_Int32 DEFAULT_WIDTH = 100;
44 constexpr sal_Int32 DEFAULT_HEIGHT = 100;
45 constexpr bool DEFAULT_VISIBLE = false;
46 constexpr bool DEFAULT_INDESIGNMODE = false;
47 constexpr bool DEFAULT_ENABLE = true;
48 
49 // construct/destruct
50 
52  : OComponentHelper ( 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 
70 Any SAL_CALL BaseControl::queryInterface( const Type& rType )
71 {
72  Any aReturn;
73  if ( m_xDelegator.is() )
74  {
75  // If a delegator exists, forward question to its queryInterface.
76  // Delegator will ask its own queryAggregation!
77  aReturn = m_xDelegator->queryInterface( rType );
78  }
79  else
80  {
81  // If a delegator is unknown, forward question to own queryAggregation.
82  aReturn = queryAggregation( rType );
83  }
84 
85  return aReturn;
86 }
87 
88 // XInterface
89 
90 void SAL_CALL BaseControl::acquire() noexcept
91 {
92  // Attention:
93  // Don't use mutex or guard in this method!!! Is a method of XInterface.
94 
95  // Forward to baseclass
96  OComponentHelper::acquire();
97 }
98 
99 // XInterface
100 
101 void SAL_CALL BaseControl::release() noexcept
102 {
103  // Attention:
104  // Don't use mutex or guard in this method!!! Is a method of XInterface.
105 
106  // Forward to baseclass
107  OComponentHelper::release();
108 }
109 
110 // XTypeProvider
111 
112 Sequence< Type > SAL_CALL BaseControl::getTypes()
113 {
114  static OTypeCollection ourTypeCollection(
121  OComponentHelper::getTypes() );
122 
123  return ourTypeCollection.getTypes();
124 }
125 
126 // XTypeProvider
127 
129 {
130  return css::uno::Sequence<sal_Int8>();
131 }
132 
133 // XAggregation
134 
135 void SAL_CALL BaseControl::setDelegator( const Reference< XInterface >& xDel )
136 {
137  // Ready for multithreading
138  MutexGuard aGuard( m_aMutex );
139  m_xDelegator = xDel;
140 }
141 
142 // XAggregation
143 
144 Any SAL_CALL BaseControl::queryAggregation( const Type& aType )
145 {
146  // Ask for my own supported interfaces ...
147  // Attention: XTypeProvider and XInterface are supported by OComponentHelper!
148  Any aReturn ( ::cppu::queryInterface( aType ,
149  static_cast< XPaintListener*> ( this ) ,
150  static_cast< XWindowListener*> ( this ) ,
151  static_cast< XView* > ( this ) ,
152  static_cast< XWindow* > ( this ) ,
153  static_cast< XServiceInfo* > ( this ) ,
154  static_cast< XControl* > ( this )
155  )
156  );
157 
158  // If searched interface supported by this class ...
159  if ( aReturn.hasValue() )
160  {
161  // ... return this information.
162  return aReturn;
163  }
164  else
165  {
166  // Else; ... ask baseclass for interfaces!
167  return OComponentHelper::queryAggregation( aType );
168  }
169 }
170 
171 // XServiceInfo
172 
174 {
175  return OUString();
176 }
177 
178 // XServiceInfo
179 
180 sal_Bool SAL_CALL BaseControl::supportsService( const OUString& sServiceName )
181 {
182  return cppu::supportsService(this, sServiceName);
183 }
184 
185 // XServiceInfo
186 
188 {
189  return Sequence< OUString >();
190 }
191 
192 // XComponent
193 
194 void SAL_CALL BaseControl::dispose()
195 {
196  // Ready for multithreading
197  MutexGuard aGuard( m_aMutex );
198 
199  if ( m_xMultiplexer.is() )
200  {
201  // to all other paint, focus, etc.
202  m_xMultiplexer->disposeAndClear();
203  }
204 
205  // set the service manager to disposed
206  OComponentHelper::dispose();
207 
208  // release context and peer
209  m_xContext.clear();
210  if ( m_xPeer.is() )
211  {
212  if ( m_xGraphicsPeer.is() )
213  {
214  removePaintListener( this );
215  removeWindowListener( this );
216  m_xGraphicsPeer.clear();
217  }
218 
219  m_xPeer->dispose();
220  m_xPeerWindow.clear();
221  m_xPeer.clear();
222 
223  if ( m_xMultiplexer.is() )
224  {
225  // take changes on multiplexer
226  m_xMultiplexer->setPeer( Reference< XWindow >() );
227  }
228  }
229 
230  // release view
231  if ( m_xGraphicsView.is() )
232  {
233  m_xGraphicsView.clear();
234  }
235 }
236 
237 // XComponent
238 
239 void SAL_CALL BaseControl::addEventListener( const Reference< XEventListener >& xListener )
240 {
241  // Ready for multithreading
242  MutexGuard aGuard( m_aMutex );
243  OComponentHelper::addEventListener( xListener );
244 }
245 
246 // XComponent
247 
248 void SAL_CALL BaseControl::removeEventListener( const Reference< XEventListener >& xListener )
249 {
250  // Ready for multithreading
251  MutexGuard aGuard( m_aMutex );
252  OComponentHelper::removeEventListener( xListener );
253 }
254 
255 // XControl
256 
257 void SAL_CALL BaseControl::createPeer( const Reference< XToolkit >& xToolkit ,
258  const Reference< XWindowPeer >& xParentPeer )
259 {
260  // Ready for multithreading
261  MutexGuard aGuard( m_aMutex );
262 
263  if ( m_xPeer.is() )
264  return;
265 
266  // use method "BaseControl::getWindowDescriptor()" to change window attributes!
267  WindowDescriptor aDescriptor = impl_getWindowDescriptor( xParentPeer );
268 
269  if ( m_bVisible )
270  {
271  aDescriptor.WindowAttributes |= WindowAttribute::SHOW;
272  }
273 
274  // very slow under remote conditions!
275  // create the window on the server
276  Reference< XToolkit > xLocalToolkit = xToolkit;
277  if ( !xLocalToolkit.is() )
278  {
279  // but first create well known toolkit, if it not exist
280  xLocalToolkit.set( Toolkit::create(m_xComponentContext), UNO_QUERY_THROW );
281  }
282  m_xPeer = xLocalToolkit->createWindow( aDescriptor );
283  m_xPeerWindow.set( m_xPeer, UNO_QUERY );
284 
285  if ( !m_xPeerWindow.is() )
286  return;
287 
288  if ( m_xMultiplexer.is() )
289  {
290  m_xMultiplexer->setPeer( m_xPeerWindow );
291  }
292 
293  // create new reference to xgraphics for painting on a peer
294  // and add a paint listener
295  Reference< XDevice > xDevice( m_xPeerWindow, UNO_QUERY );
296 
297  if ( xDevice.is() )
298  {
299  m_xGraphicsPeer = xDevice->createGraphics();
300  }
301 
302  if ( m_xGraphicsPeer.is() )
303  {
304  addPaintListener( this );
305  addWindowListener( this );
306  }
307 
308  m_xPeerWindow->setPosSize( m_nX, m_nY, m_nWidth, m_nHeight, PosSize::POSSIZE );
309  m_xPeerWindow->setEnable( m_bEnable );
310  m_xPeerWindow->setVisible( m_bVisible && !m_bInDesignMode );
311 }
312 
313 // XControl
314 
315 void SAL_CALL BaseControl::setContext( const Reference< XInterface >& xContext )
316 {
317  // Ready for multithreading
318  MutexGuard aGuard( m_aMutex );
319  m_xContext = xContext;
320 }
321 
322 // XControl
323 
325 {
326  // Ready for multithreading
327  MutexGuard aGuard( m_aMutex );
328  m_bInDesignMode = bOn;
329 }
330 
331 // XControl
332 
333 Reference< XInterface > SAL_CALL BaseControl::getContext()
334 {
335  // Ready for multithreading
336  MutexGuard aGuard( m_aMutex );
337  return m_xContext;
338 }
339 
340 // XControl
341 
342 Reference< XWindowPeer > SAL_CALL BaseControl::getPeer()
343 {
344  // Ready for multithreading
345  MutexGuard aGuard( m_aMutex );
346  return m_xPeer;
347 }
348 
349 // XControl
350 
351 Reference< XView > SAL_CALL BaseControl::getView()
352 {
353  // Ready for multithreading
354  MutexGuard aGuard( m_aMutex );
355  return this;
356 }
357 
358 // XControl
359 
361 {
362  // Ready for multithreading
363  MutexGuard aGuard( m_aMutex );
364  return m_bInDesignMode;
365 }
366 
367 // XControl
368 
370 {
371  return false;
372 }
373 
374 // XWindow
375 
376 void SAL_CALL BaseControl::setPosSize( sal_Int32 nX ,
377  sal_Int32 nY ,
378  sal_Int32 nWidth ,
379  sal_Int32 nHeight ,
380  sal_Int16 nFlags )
381 {
382  // - change size and position of window and save the values
383 
384  // Ready for multithreading
385  MutexGuard aGuard( m_aMutex );
386 
387  bool bChanged = false;
388 
389  if ( nFlags & PosSize::X )
390  {
391  bChanged |= m_nX != nX;
392  m_nX = nX;
393  }
394 
395  if ( nFlags & PosSize::Y )
396  {
397  bChanged |= m_nY != nY;
398  m_nY = nY;
399  }
400 
401  if ( nFlags & PosSize::WIDTH )
402  {
403  bChanged |= m_nWidth != nWidth;
404  m_nWidth = nWidth;
405  }
406 
407  if ( nFlags & PosSize::HEIGHT )
408  {
409  bChanged |= m_nHeight != nHeight;
410  m_nHeight = nHeight;
411  }
412 
413  if ( bChanged && m_xPeerWindow.is() )
414  {
415  m_xPeerWindow->setPosSize( m_nX, m_nY, m_nWidth, m_nHeight, nFlags );
416  }
417 }
418 
419 // XWindow
420 
421 void SAL_CALL BaseControl::setVisible( sal_Bool bVisible )
422 {
423  // Ready for multithreading
424  MutexGuard aGuard( m_aMutex );
425 
426  // Set new state of flag
427  m_bVisible = bVisible;
428 
429  if ( m_xPeerWindow.is() )
430  {
431  // Set it also on peerwindow
432  m_xPeerWindow->setVisible( m_bVisible );
433  }
434 }
435 
436 // XWindow
437 
438 void SAL_CALL BaseControl::setEnable( sal_Bool bEnable )
439 {
440  // Ready for multithreading
441  MutexGuard aGuard( m_aMutex );
442 
443  // Set new state of flag
444  m_bEnable = bEnable;
445 
446  if ( m_xPeerWindow.is() )
447  {
448  // Set it also on peerwindow
449  m_xPeerWindow->setEnable( m_bEnable );
450  }
451 }
452 
453 // XWindow
454 
455 void SAL_CALL BaseControl::setFocus()
456 {
457  // Ready for multithreading
458  MutexGuard aGuard( m_aMutex );
459 
460  if ( m_xPeerWindow.is() )
461  {
462  m_xPeerWindow->setFocus();
463  }
464 }
465 
466 // XWindow
467 
469 {
470  // Ready for multithreading
471  MutexGuard aGuard( m_aMutex );
472  return Rectangle( m_nX, m_nY , m_nWidth, m_nHeight );
473 }
474 
475 // XWindow
476 
477 void SAL_CALL BaseControl::addWindowListener( const Reference< XWindowListener >& xListener )
478 {
480 }
481 
482 // XWindow
483 
484 void SAL_CALL BaseControl::addFocusListener( const Reference< XFocusListener >& xListener )
485 {
487 }
488 
489 // XWindow
490 
491 void SAL_CALL BaseControl::addKeyListener( const Reference< XKeyListener >& xListener )
492 {
494 }
495 
496 // XWindow
497 
498 void SAL_CALL BaseControl::addMouseListener( const Reference< XMouseListener >& xListener )
499 {
501 }
502 
503 // XWindow
504 
505 void SAL_CALL BaseControl::addMouseMotionListener( const Reference< XMouseMotionListener >& xListener )
506 {
508 }
509 
510 // XWindow
511 
512 void SAL_CALL BaseControl::addPaintListener( const Reference< XPaintListener >& xListener )
513 {
515 }
516 
517 // XWindow
518 
519 void SAL_CALL BaseControl::removeWindowListener( const Reference< XWindowListener >& xListener )
520 {
522 }
523 
524 // XWindow
525 
526 void SAL_CALL BaseControl::removeFocusListener( const Reference< XFocusListener >& xListener )
527 {
529 }
530 
531 // XWindow
532 
533 void SAL_CALL BaseControl::removeKeyListener( const Reference< XKeyListener >& xListener )
534 {
536 }
537 
538 // XWindow
539 
540 void SAL_CALL BaseControl::removeMouseListener( const Reference< XMouseListener >& xListener )
541 {
543 }
544 
545 // XWindow
546 
547 void SAL_CALL BaseControl::removeMouseMotionListener( const Reference< XMouseMotionListener >& xListener )
548 {
550 }
551 
552 // XWindow
553 
554 void SAL_CALL BaseControl::removePaintListener( const Reference< XPaintListener >& xListener )
555 {
557 }
558 
559 // XView
560 
561 void SAL_CALL BaseControl::draw( sal_Int32 nX ,
562  sal_Int32 nY )
563 {
564  // Ready for multithreading
565  MutexGuard aGuard( m_aMutex );
566 
567  // - paint to a view
568  // - use the method "paint()"
569  // - see also "windowPaint()"
570  impl_paint( nX, nY, m_xGraphicsView );
571 }
572 
573 // XView
574 
575 sal_Bool SAL_CALL BaseControl::setGraphics( const Reference< XGraphics >& xDevice )
576 {
577  // - set the graphics for a view
578  // - in this class exist 2 graphics-member ... one for peer[_xGraphicsPeer] and one for view[_xGraphicsView]
579  // - they are used by "windowPaint() and draw()", forwarded to "paint ()"
580  bool bReturn = false;
581  if ( xDevice.is() )
582  {
583  // Ready for multithreading
584  MutexGuard aGuard( m_aMutex );
585 
586  m_xGraphicsView = xDevice;
587  bReturn = true;
588  }
589 
590  return bReturn;
591 }
592 
593 // XView
594 
595 void SAL_CALL BaseControl::setZoom( float /*fZoomX*/ ,
596  float /*fZoomY*/ )
597 {
598  // Not implemented yet
599 }
600 
601 // XView
602 
603 Reference< XGraphics > SAL_CALL BaseControl::getGraphics()
604 {
605  // Ready for multithreading
606  MutexGuard aGuard( m_aMutex );
607  return m_xGraphicsView;
608 }
609 
610 // XView
611 
613 {
614  // Ready for multithreading
615  MutexGuard aGuard( m_aMutex );
616  return Size( m_nWidth, m_nHeight );
617 }
618 
619 // XEventListener
620 
621 void SAL_CALL BaseControl::disposing( const EventObject& /*aSource*/ )
622 {
623  // Ready for multithreading
624  MutexGuard aGuard( m_aMutex );
625 
626  // - release ALL references
627  // - it must be !!!
628  if ( m_xGraphicsPeer.is() )
629  {
630  removePaintListener( this );
631  removeWindowListener( this );
632  m_xGraphicsPeer.clear();
633  }
634 
635  if ( m_xGraphicsView.is() )
636  {
637  m_xGraphicsView.clear();
638  }
639 }
640 
641 // XPaintListener
642 
643 void SAL_CALL BaseControl::windowPaint( const PaintEvent& /*aEvent*/ )
644 {
645  // Ready for multithreading
646  MutexGuard aGuard( m_aMutex );
647 
648  // - repaint the peer
649  // - use the method "paint ()" for painting on a peer and a print device !!!
650  // - see also "draw ()"
651  impl_paint( 0, 0, m_xGraphicsPeer );
652 }
653 
654 // XWindowListener
655 
656 void SAL_CALL BaseControl::windowResized( const WindowEvent& aEvent )
657 {
658  // Ready for multithreading
659  MutexGuard aGuard( m_aMutex );
660 
661  m_nWidth = aEvent.Width;
662  m_nHeight = aEvent.Height;
663  WindowEvent aMappedEvent = aEvent;
664  aMappedEvent.X = 0;
665  aMappedEvent.Y = 0;
666  impl_recalcLayout( aMappedEvent );
667 }
668 
669 // XWindowListener
670 
671 void SAL_CALL BaseControl::windowMoved( const WindowEvent& aEvent )
672 {
673  // Ready for multithreading
674  MutexGuard aGuard( m_aMutex );
675 
676  m_nWidth = aEvent.Width;
677  m_nHeight = aEvent.Height;
678  WindowEvent aMappedEvent = aEvent;
679  aMappedEvent.X = 0;
680  aMappedEvent.Y = 0;
681  impl_recalcLayout( aMappedEvent );
682 }
683 
684 // XWindowListener
685 
686 void SAL_CALL BaseControl::windowShown( const EventObject& /*aEvent*/ )
687 {
688 }
689 
690 // XWindowListener
691 
692 void SAL_CALL BaseControl::windowHidden( const EventObject& /*aEvent*/ )
693 {
694 }
695 
696 // protected method
697 
698 WindowDescriptor BaseControl::impl_getWindowDescriptor( const Reference< XWindowPeer >& xParentPeer )
699 {
700  // - used from "createPeer()" to set the values of a css::awt::WindowDescriptor !!!
701  // - if you will change the descriptor-values, you must override this virtual function
702  // - the caller must release the memory for this dynamical descriptor !!!
703 
704  WindowDescriptor aDescriptor;
705 
706  aDescriptor.Type = WindowClass_SIMPLE;
707  aDescriptor.WindowServiceName = "window";
708  aDescriptor.ParentIndex = -1;
709  aDescriptor.Parent = xParentPeer;
710  aDescriptor.Bounds = getPosSize ();
711  aDescriptor.WindowAttributes = 0;
712 
713  return aDescriptor;
714 }
715 
716 // protected method
717 
718 void BaseControl::impl_paint( sal_Int32 /*nX*/ ,
719  sal_Int32 /*nY*/ ,
720  const Reference< XGraphics >& /*xGraphics*/ )
721 {
722  // - one paint method for peer AND view !!!
723  // (see also => "windowPaint()" and "draw()")
724  // - not used in this implementation, but it's not necessary to make it pure virtual !!!
725 }
726 
727 // protected method
728 
729 void BaseControl::impl_recalcLayout( const WindowEvent& /*aEvent*/ )
730 {
731  // We need as virtual function to support automatically resizing of derived controls!
732  // But we make it not pure virtual because it's not necessary for all derived classes!
733 }
734 
735 // private method
736 
738 {
739  if ( !m_xMultiplexer.is() )
740  {
741  m_xMultiplexer = new OMRCListenerMultiplexerHelper( static_cast<XWindow*>(this), m_xPeerWindow );
742  }
743 
744  return m_xMultiplexer.get();
745 }
746 
747 } // namespace unocontrols
748 
749 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Type
OMRCListenerMultiplexerHelper * impl_getMultiplexer()
css::uno::Reference< css::uno::XComponentContext > m_xComponentContext
void unadvise(const css::uno::Type &aType, const css::uno::Reference< css::uno::XInterface > &xListener)
Remove the specified listener from the source.
virtual void SAL_CALL acquire() noexcept override
increment refcount XInterface release() A RuntimeException is thrown.
Definition: basecontrol.cxx:90
rtl::Reference< OMRCListenerMultiplexerHelper > m_xMultiplexer
void advise(const css::uno::Type &aType, const css::uno::Reference< css::uno::XInterface > &xListener)
Add the specified listener to the source.
virtual void SAL_CALL windowPaint(const css::awt::PaintEvent &rEvent) override
virtual void SAL_CALL setContext(const css::uno::Reference< css::uno::XInterface > &xContext) override
virtual void impl_paint(sal_Int32 nX, sal_Int32 nY, const css::uno::Reference< css::awt::XGraphics > &xGraphics)
virtual void SAL_CALL setEnable(sal_Bool bEnable) override
virtual sal_Bool SAL_CALL supportsService(const OUString &sServiceName) override
virtual void SAL_CALL setVisible(sal_Bool bVisible) override
virtual void SAL_CALL windowMoved(const css::awt::WindowEvent &aEvent) override
constexpr bool DEFAULT_VISIBLE
Definition: basecontrol.cxx:45
mutable::osl::Mutex m_aMutex
virtual void SAL_CALL removePaintListener(const css::uno::Reference< css::awt::XPaintListener > &xListener) override
virtual void SAL_CALL setZoom(float fZoomX, float fZoomY) override
virtual void SAL_CALL windowResized(const css::awt::WindowEvent &aEvent) override
css::uno::Reference< css::awt::XGraphics > m_xGraphicsView
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 dispose() override
virtual OUString SAL_CALL getImplementationName() override
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
std::mutex m_aMutex
css::uno::Reference< css::awt::XWindowPeer > m_xPeer
virtual void SAL_CALL addWindowListener(const css::uno::Reference< css::awt::XWindowListener > &xListener) override
virtual css::uno::Reference< css::awt::XView > SAL_CALL getView() override
css::uno::Reference< css::awt::XGraphics > m_xGraphicsPeer
constexpr sal_Int32 DEFAULT_X
Definition: basecontrol.cxx:41
Reference< XComponentContext > const m_xComponentContext
css::uno::Reference< css::awt::XWindow > m_xPeerWindow
virtual void SAL_CALL disposing()
constexpr bool DEFAULT_ENABLE
Definition: basecontrol.cxx:47
virtual void SAL_CALL addMouseMotionListener(const css::uno::Reference< css::awt::XMouseMotionListener > &xListener) override
virtual void SAL_CALL removeMouseListener(const css::uno::Reference< css::awt::XMouseListener > &xListener) override
constexpr bool DEFAULT_INDESIGNMODE
Definition: basecontrol.cxx:46
virtual void SAL_CALL setDesignMode(sal_Bool bOn) override
virtual css::awt::Size SAL_CALL getSize() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL removeKeyListener(const css::uno::Reference< css::awt::XKeyListener > &xListener) override
virtual void SAL_CALL release() noexcept override
decrement refcount XInterface acquire() A RuntimeException is thrown.
css::uno::Reference< css::uno::XInterface > m_xDelegator
unsigned char sal_Bool
virtual void SAL_CALL setFocus() override
virtual void SAL_CALL setPosSize(sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nFlags) override
virtual void impl_recalcLayout(const css::awt::WindowEvent &aEvent)
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &aType) override
virtual void SAL_CALL removeMouseMotionListener(const css::uno::Reference< css::awt::XMouseMotionListener > &xListener) override
virtual css::awt::WindowDescriptor impl_getWindowDescriptor(const css::uno::Reference< css::awt::XWindowPeer > &xParentPeer)
BaseControl(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
Definition: basecontrol.cxx:51
virtual css::awt::Rectangle SAL_CALL getPosSize() override
constexpr sal_Int32 DEFAULT_Y
Definition: basecontrol.cxx:42
virtual ~BaseControl() override
Definition: basecontrol.cxx:64
virtual css::uno::Reference< css::awt::XWindowPeer > SAL_CALL getPeer() override
virtual void SAL_CALL windowShown(const css::lang::EventObject &aEvent) override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getContext() override
virtual sal_Bool SAL_CALL isDesignMode() override
virtual css::uno::Reference< css::awt::XGraphics > SAL_CALL getGraphics() override
virtual void SAL_CALL addFocusListener(const css::uno::Reference< css::awt::XFocusListener > &xListener) override
constexpr sal_Int32 DEFAULT_HEIGHT
Definition: basecontrol.cxx:44
virtual void SAL_CALL removeFocusListener(const css::uno::Reference< css::awt::XFocusListener > &xListener) override
virtual sal_Bool SAL_CALL setGraphics(const css::uno::Reference< css::awt::XGraphics > &xDevice) override
virtual void SAL_CALL addMouseListener(const css::uno::Reference< css::awt::XMouseListener > &xListener) override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
get information about supported interfaces XTypeProvider
virtual void SAL_CALL addKeyListener(const css::uno::Reference< css::awt::XKeyListener > &xListener) 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.
Definition: basecontrol.cxx:70
virtual void SAL_CALL draw(sal_Int32 nX, sal_Int32 nY) override
virtual void SAL_CALL addPaintListener(const css::uno::Reference< css::awt::XPaintListener > &xListener) override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual sal_Bool SAL_CALL isTransparent() override
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
get implementation id This ID is necessary for UNO-caching.
virtual void SAL_CALL setDelegator(const css::uno::Reference< css::uno::XInterface > &xDelegator) override
constexpr sal_Int32 DEFAULT_WIDTH
Definition: basecontrol.cxx:43
css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType, Interface1 *p1)
virtual void SAL_CALL windowHidden(const css::lang::EventObject &aEvent) override
css::uno::Reference< css::uno::XInterface > m_xContext
virtual void SAL_CALL removeWindowListener(const css::uno::Reference< css::awt::XWindowListener > &xListener) override