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