xref: /AOO41X/main/UnoControls/inc/basecontrol.hxx (revision ff0525f24f03981d56b7579b645949f111420994)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _UNOCONTROLS_BASECONTROL_CTRL_HXX
25 #define _UNOCONTROLS_BASECONTROL_CTRL_HXX
26 
27 //____________________________________________________________________________________________________________
28 //  includes of other projects
29 //____________________________________________________________________________________________________________
30 
31 #include <com/sun/star/awt/XKeyListener.hpp>
32 #include <com/sun/star/awt/XPaintListener.hpp>
33 #include <com/sun/star/awt/KeyEvent.hpp>
34 #include <com/sun/star/awt/KeyModifier.hpp>
35 #include <com/sun/star/awt/XMouseMotionListener.hpp>
36 #include <com/sun/star/awt/FocusEvent.hpp>
37 #include <com/sun/star/awt/XWindowListener.hpp>
38 #include <com/sun/star/awt/XActivateListener.hpp>
39 #include <com/sun/star/awt/MouseEvent.hpp>
40 #include <com/sun/star/awt/XTopWindowListener.hpp>
41 #include <com/sun/star/awt/PaintEvent.hpp>
42 #include <com/sun/star/awt/InputEvent.hpp>
43 #include <com/sun/star/awt/KeyGroup.hpp>
44 #include <com/sun/star/awt/Key.hpp>
45 #include <com/sun/star/awt/WindowEvent.hpp>
46 #include <com/sun/star/awt/XMouseListener.hpp>
47 #include <com/sun/star/awt/KeyFunction.hpp>
48 #include <com/sun/star/awt/FocusChangeReason.hpp>
49 #include <com/sun/star/awt/MouseButton.hpp>
50 #include <com/sun/star/awt/XFocusListener.hpp>
51 #include <com/sun/star/awt/XFileDialog.hpp>
52 #include <com/sun/star/awt/XTextComponent.hpp>
53 #include <com/sun/star/awt/XListBox.hpp>
54 #include <com/sun/star/awt/XProgressMonitor.hpp>
55 #include <com/sun/star/awt/TextAlign.hpp>
56 #include <com/sun/star/awt/XScrollBar.hpp>
57 #include <com/sun/star/awt/XVclContainerPeer.hpp>
58 #include <com/sun/star/awt/XTabControllerModel.hpp>
59 #include <com/sun/star/awt/XMessageBox.hpp>
60 #include <com/sun/star/awt/XTextEditField.hpp>
61 #include <com/sun/star/awt/Style.hpp>
62 #include <com/sun/star/awt/XTimeField.hpp>
63 #include <com/sun/star/awt/XVclWindowPeer.hpp>
64 #include <com/sun/star/awt/XControlModel.hpp>
65 #include <com/sun/star/awt/XSpinField.hpp>
66 #include <com/sun/star/awt/XUnoControlContainer.hpp>
67 #include <com/sun/star/awt/XTextLayoutConstrains.hpp>
68 #include <com/sun/star/awt/XNumericField.hpp>
69 #include <com/sun/star/awt/XButton.hpp>
70 #include <com/sun/star/awt/XTextArea.hpp>
71 #include <com/sun/star/awt/XImageButton.hpp>
72 #include <com/sun/star/awt/XFixedText.hpp>
73 #include <com/sun/star/awt/XControlContainer.hpp>
74 #include <com/sun/star/awt/XDialog.hpp>
75 #include <com/sun/star/awt/ScrollBarOrientation.hpp>
76 #include <com/sun/star/awt/XRadioButton.hpp>
77 #include <com/sun/star/awt/XCurrencyField.hpp>
78 #include <com/sun/star/awt/XPatternField.hpp>
79 #include <com/sun/star/awt/VclWindowPeerAttribute.hpp>
80 #include <com/sun/star/awt/XTabController.hpp>
81 #include <com/sun/star/awt/XVclContainer.hpp>
82 #include <com/sun/star/awt/XDateField.hpp>
83 #include <com/sun/star/awt/XComboBox.hpp>
84 #include <com/sun/star/awt/XControl.hpp>
85 #include <com/sun/star/awt/XCheckBox.hpp>
86 #include <com/sun/star/awt/MessageBoxCommand.hpp>
87 #include <com/sun/star/awt/XLayoutConstrains.hpp>
88 #include <com/sun/star/awt/XProgressBar.hpp>
89 #include <com/sun/star/awt/XTopWindow.hpp>
90 #include <com/sun/star/awt/XWindow.hpp>
91 #include <com/sun/star/awt/PosSize.hpp>
92 #include <com/sun/star/awt/XView.hpp>
93 #include <com/sun/star/lang/XServiceInfo.hpp>
94 #include <osl/mutex.hxx>
95 #include <cppuhelper/weak.hxx>
96 #include <cppuhelper/component.hxx>
97 
98 //____________________________________________________________________________________________________________
99 //  includes of my project
100 //____________________________________________________________________________________________________________
101 #include "multiplexer.hxx"
102 
103 //____________________________________________________________________________________________________________
104 //  "namespaces"
105 //____________________________________________________________________________________________________________
106 
107 namespace unocontrols{
108 
109 #define UNO3_ANY                                    ::com::sun::star::uno::Any
110 #define UNO3_EVENTOBJECT                            ::com::sun::star::lang::EventObject
111 #define UNO3_MUTEX                                  ::osl::Mutex
112 #define UNO3_OCOMPONENTHELPER                       ::cppu::OComponentHelper
113 #define UNO3_OUSTRING                               ::rtl::OUString
114 #define UNO3_PAINTEVENT                             ::com::sun::star::awt::PaintEvent
115 #define UNO3_RECTANGLE                              ::com::sun::star::awt::Rectangle
116 #define UNO3_REFERENCE                              ::com::sun::star::uno::Reference
117 #define UNO3_RUNTIMEEXCEPTION                       ::com::sun::star::uno::RuntimeException
118 #define UNO3_SEQUENCE                               ::com::sun::star::uno::Sequence
119 #define UNO3_SIZE                                   ::com::sun::star::awt::Size
120 #define UNO3_TYPE                                   ::com::sun::star::uno::Type
121 #define UNO3_WINDOWDESCRIPTOR                       ::com::sun::star::awt::WindowDescriptor
122 #define UNO3_XCONTROL                               ::com::sun::star::awt::XControl
123 #define UNO3_XCONTROLMODEL                          ::com::sun::star::awt::XControlModel
124 #define UNO3_XEVENTLISTENER                         ::com::sun::star::lang::XEventListener
125 #define UNO3_XFOCUSLISTENER                         ::com::sun::star::awt::XFocusListener
126 #define UNO3_XGRAPHICS                              ::com::sun::star::awt::XGraphics
127 #define UNO3_XKEYLISTENER                           ::com::sun::star::awt::XKeyListener
128 #define UNO3_XMOUSELISTENER                         ::com::sun::star::awt::XMouseListener
129 #define UNO3_XMOUSEMOTIONLISTENER                   ::com::sun::star::awt::XMouseMotionListener
130 #define UNO3_XMULTISERVICEFACTORY                   ::com::sun::star::lang::XMultiServiceFactory
131 #define UNO3_XPAINTLISTENER                         ::com::sun::star::awt::XPaintListener
132 #define UNO3_XSERVICEINFO                           ::com::sun::star::lang::XServiceInfo
133 #define UNO3_XTOOLKIT                               ::com::sun::star::awt::XToolkit
134 #define UNO3_XVIEW                                  ::com::sun::star::awt::XView
135 #define UNO3_XWINDOW                                ::com::sun::star::awt::XWindow
136 #define UNO3_XWINDOWLISTENER                        ::com::sun::star::awt::XWindowListener
137 #define UNO3_XWINDOWPEER                            ::com::sun::star::awt::XWindowPeer
138 #define UNO3_XINTERFACE                             ::com::sun::star::uno::XInterface
139 
140 //____________________________________________________________________________________________________________
141 //  macros
142 //____________________________________________________________________________________________________________
143 
144 #define TRGB_COLORDATA(TRANSPARENCE,RED,GREEN,BLUE) \
145         ((sal_Int32)(((sal_uInt32)((sal_uInt8)(BLUE))))|(((sal_uInt32)((sal_uInt8)(GREEN)))<<8)|(((sal_uInt32)((sal_uInt8)(RED)))<<16)|(((sal_uInt32)((sal_uInt8)(TRANSPARENCE)))<<24))
146 
147 //____________________________________________________________________________________________________________
148 //  structs
149 //____________________________________________________________________________________________________________
150 
151 struct IMPL_MutexContainer
152 {
153     // Is necassery to initialize "BaseControl" and make this class thread-safe.
154     UNO3_MUTEX m_aMutex ;
155 };
156 
157 //____________________________________________________________________________________________________________
158 //  classes
159 //____________________________________________________________________________________________________________
160 
161 class BaseControl   : public UNO3_XSERVICEINFO
162                     , public UNO3_XPAINTLISTENER
163                     , public UNO3_XWINDOWLISTENER
164                     , public UNO3_XVIEW
165                     , public UNO3_XWINDOW
166                     , public UNO3_XCONTROL
167                     , public IMPL_MutexContainer
168                     , public UNO3_OCOMPONENTHELPER
169 {
170 //____________________________________________________________________________________________________________
171 //  public methods
172 //____________________________________________________________________________________________________________
173 
174 public:
175 
176     //________________________________________________________________________________________________________
177     //  construct/destruct
178     //________________________________________________________________________________________________________
179 
180     /**_______________________________________________________________________________________________________
181         @short      -
182         @descr      -
183 
184         @seealso    -
185 
186         @param      -
187 
188         @return     -
189 
190         @onerror    -
191     */
192 
193     BaseControl( const UNO3_REFERENCE< UNO3_XMULTISERVICEFACTORY >& xFactory );
194 
195     /**_______________________________________________________________________________________________________
196         @short      -
197         @descr      -
198 
199         @seealso    -
200 
201         @param      -
202 
203         @return     -
204 
205         @onerror    -
206     */
207 
208     virtual ~BaseControl();
209 
210     //________________________________________________________________________________________________________
211     //  XInterface
212     //________________________________________________________________________________________________________
213 
214     /**_______________________________________________________________________________________________________
215         @short      give answer, if interface is supported
216         @descr      The interfaces are searched by type.
217 
218         @seealso    XInterface
219 
220         @param      "rType" is the type of searched interface.
221 
222         @return     Any     information about found interface
223 
224         @onerror    A RuntimeException is thrown.
225     */
226 
227     virtual UNO3_ANY SAL_CALL queryInterface( const UNO3_TYPE& aType ) throw( UNO3_RUNTIMEEXCEPTION );
228 
229     /**_______________________________________________________________________________________________________
230         @short      increment refcount
231         @descr      -
232 
233         @seealso    XInterface
234         @seealso    release()
235 
236         @param      -
237 
238         @return     -
239 
240         @onerror    A RuntimeException is thrown.
241     */
242 
243     virtual void SAL_CALL acquire() throw();
244 
245     /**_______________________________________________________________________________________________________
246         @short      decrement refcount
247         @descr      -
248 
249         @seealso    XInterface
250         @seealso    acquire()
251 
252         @param      -
253 
254         @return     -
255 
256         @onerror    A RuntimeException is thrown.
257     */
258 
259     virtual void SAL_CALL release() throw();
260 
261     //________________________________________________________________________________________________________
262     //  XTypeProvider
263     //________________________________________________________________________________________________________
264 
265     /**_______________________________________________________________________________________________________
266         @short      get information about supported interfaces
267         @descr      -
268 
269         @seealso    XTypeProvider
270 
271         @param      -
272 
273         @return     Sequence of types of all supported interfaces
274 
275         @onerror    A RuntimeException is thrown.
276     */
277 
278     virtual UNO3_SEQUENCE< UNO3_TYPE > SAL_CALL getTypes() throw( UNO3_RUNTIMEEXCEPTION );
279 
280     /**_______________________________________________________________________________________________________
281         @short      get implementation id
282         @descr      This ID is neccessary for UNO-caching. If there no ID, cache is disabled.
283                     Another way, cache is enabled.
284 
285         @seealso    XTypeProvider
286 
287         @param      -
288 
289         @return     ID as Sequence of byte
290 
291         @onerror    A RuntimeException is thrown.
292     */
293 
294     virtual UNO3_SEQUENCE< sal_Int8 > SAL_CALL getImplementationId() throw( UNO3_RUNTIMEEXCEPTION );
295 
296     //________________________________________________________________________________________________________
297     //  XAggregation
298     //________________________________________________________________________________________________________
299 
300     /**_______________________________________________________________________________________________________
301         @short      -
302         @descr      -
303 
304         @seealso    -
305 
306         @param      -
307 
308         @return     -
309 
310         @onerror    -
311     */
312 
313     virtual void SAL_CALL setDelegator( const UNO3_REFERENCE< UNO3_XINTERFACE >& xDelegator ) throw( UNO3_RUNTIMEEXCEPTION );
314 
315     /**_______________________________________________________________________________________________________
316         @short      -
317         @descr      -
318 
319         @seealso    -
320 
321         @param      -
322 
323         @return     -
324 
325         @onerror    -
326     */
327 
328     virtual UNO3_ANY SAL_CALL queryAggregation( const UNO3_TYPE& aType ) throw( UNO3_RUNTIMEEXCEPTION );
329 
330     //________________________________________________________________________________________________________
331     //  XServiceInfo
332     //________________________________________________________________________________________________________
333 
334     /**_______________________________________________________________________________________________________
335         @short      -
336         @descr      -
337 
338         @seealso    -
339 
340         @param      -
341 
342         @return     -
343 
344         @onerror    -
345     */
346 
347     virtual sal_Bool SAL_CALL supportsService( const UNO3_OUSTRING& sServiceName ) throw( UNO3_RUNTIMEEXCEPTION );
348 
349     /**_______________________________________________________________________________________________________
350         @short      -
351         @descr      -
352 
353         @seealso    -
354 
355         @param      -
356 
357         @return     -
358 
359         @onerror    -
360     */
361 
362     virtual UNO3_OUSTRING SAL_CALL getImplementationName() throw( UNO3_RUNTIMEEXCEPTION );
363 
364     /**_______________________________________________________________________________________________________
365         @short      -
366         @descr      -
367 
368         @seealso    -
369 
370         @param      -
371 
372         @return     -
373 
374         @onerror    -
375     */
376 
377     virtual UNO3_SEQUENCE< UNO3_OUSTRING > SAL_CALL getSupportedServiceNames() throw( UNO3_RUNTIMEEXCEPTION );
378 
379     //________________________________________________________________________________________________________
380     //  XComponent
381     //________________________________________________________________________________________________________
382 
383     /**_______________________________________________________________________________________________________
384         @short      -
385         @descr      -
386 
387         @seealso    -
388 
389         @param      -
390 
391         @return     -
392 
393         @onerror    -
394     */
395 
396     virtual void SAL_CALL dispose() throw( UNO3_RUNTIMEEXCEPTION );
397 
398     /**_______________________________________________________________________________________________________
399         @short      -
400         @descr      -
401 
402         @seealso    -
403 
404         @param      -
405 
406         @return     -
407 
408         @onerror    -
409     */
410 
411     virtual void SAL_CALL addEventListener( const UNO3_REFERENCE< UNO3_XEVENTLISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
412 
413     /**_______________________________________________________________________________________________________
414         @short      -
415         @descr      -
416 
417         @seealso    -
418 
419         @param      -
420 
421         @return     -
422 
423         @onerror    -
424     */
425 
426     virtual void SAL_CALL removeEventListener( const UNO3_REFERENCE< UNO3_XEVENTLISTENER >& xListener   ) throw( UNO3_RUNTIMEEXCEPTION );
427 
428     //________________________________________________________________________________________________________
429     //  XControl
430     //________________________________________________________________________________________________________
431 
432     /**_______________________________________________________________________________________________________
433         @short      -
434         @descr      -
435 
436         @seealso    -
437 
438         @param      -
439 
440         @return     -
441 
442         @onerror    -
443     */
444 
445     virtual void SAL_CALL createPeer( const UNO3_REFERENCE< UNO3_XTOOLKIT >& xToolkit, const UNO3_REFERENCE< UNO3_XWINDOWPEER >& xParent ) throw( UNO3_RUNTIMEEXCEPTION );
446 
447     /**_______________________________________________________________________________________________________
448         @short      -
449         @descr      -
450 
451         @seealso    -
452 
453         @param      -
454 
455         @return     -
456 
457         @onerror    -
458     */
459 
460     virtual void SAL_CALL setContext( const UNO3_REFERENCE< UNO3_XINTERFACE >& xContext ) throw( UNO3_RUNTIMEEXCEPTION );
461 
462     /**_______________________________________________________________________________________________________
463         @short      -
464         @descr      -
465 
466         @seealso    -
467 
468         @param      -
469 
470         @return     -
471 
472         @onerror    -
473     */
474 
475     virtual sal_Bool SAL_CALL setModel( const UNO3_REFERENCE< UNO3_XCONTROLMODEL >& xModel ) throw( UNO3_RUNTIMEEXCEPTION ) = 0 ;
476 
477     /**_______________________________________________________________________________________________________
478         @short      -
479         @descr      -
480 
481         @seealso    -
482 
483         @param      -
484 
485         @return     -
486 
487         @onerror    -
488     */
489 
490     virtual void SAL_CALL setDesignMode( sal_Bool bOn ) throw( UNO3_RUNTIMEEXCEPTION );
491 
492     /**_______________________________________________________________________________________________________
493         @short      -
494         @descr      -
495 
496         @seealso    -
497 
498         @param      -
499 
500         @return     -
501 
502         @onerror    -
503     */
504 
505     virtual UNO3_REFERENCE< UNO3_XINTERFACE > SAL_CALL getContext() throw( UNO3_RUNTIMEEXCEPTION );
506 
507     /**_______________________________________________________________________________________________________
508         @short      -
509         @descr      -
510 
511         @seealso    -
512 
513         @param      -
514 
515         @return     -
516 
517         @onerror    -
518     */
519 
520     virtual UNO3_REFERENCE< UNO3_XCONTROLMODEL > SAL_CALL getModel() throw( UNO3_RUNTIMEEXCEPTION ) = 0;
521 
522     /**_______________________________________________________________________________________________________
523         @short      -
524         @descr      -
525 
526         @seealso    -
527 
528         @param      -
529 
530         @return     -
531 
532         @onerror    -
533     */
534 
535     virtual UNO3_REFERENCE< UNO3_XWINDOWPEER > SAL_CALL getPeer() throw( UNO3_RUNTIMEEXCEPTION );
536 
537     /**_______________________________________________________________________________________________________
538         @short      -
539         @descr      -
540 
541         @seealso    -
542 
543         @param      -
544 
545         @return     -
546 
547         @onerror    -
548     */
549 
550     virtual UNO3_REFERENCE< UNO3_XVIEW > SAL_CALL getView() throw( UNO3_RUNTIMEEXCEPTION );
551 
552     /**_______________________________________________________________________________________________________
553         @short      -
554         @descr      -
555 
556         @seealso    -
557 
558         @param      -
559 
560         @return     -
561 
562         @onerror    -
563     */
564 
565     virtual sal_Bool SAL_CALL isDesignMode() throw( UNO3_RUNTIMEEXCEPTION );
566 
567     /**_______________________________________________________________________________________________________
568         @short      -
569         @descr      -
570 
571         @seealso    -
572 
573         @param      -
574 
575         @return     -
576 
577         @onerror    -
578     */
579 
580     virtual sal_Bool SAL_CALL isTransparent() throw( UNO3_RUNTIMEEXCEPTION );
581 
582     //________________________________________________________________________________________________________
583     //  XWindow
584     //________________________________________________________________________________________________________
585 
586     /**_______________________________________________________________________________________________________
587         @short      -
588         @descr      -
589 
590         @seealso    -
591 
592         @param      -
593 
594         @return     -
595 
596         @onerror    -
597     */
598 
599     virtual void SAL_CALL setPosSize(   sal_Int32   nX      ,
600                                         sal_Int32   nY      ,
601                                         sal_Int32   nWidth  ,
602                                         sal_Int32   nHeight ,
603                                         sal_Int16   nFlags  ) throw( UNO3_RUNTIMEEXCEPTION );
604 
605     /**_______________________________________________________________________________________________________
606         @short      -
607         @descr      -
608 
609         @seealso    -
610 
611         @param      -
612 
613         @return     -
614 
615         @onerror    -
616     */
617 
618     virtual void SAL_CALL setVisible( sal_Bool bVisible ) throw( UNO3_RUNTIMEEXCEPTION );
619 
620     /**_______________________________________________________________________________________________________
621         @short      -
622         @descr      -
623 
624         @seealso    -
625 
626         @param      -
627 
628         @return     -
629 
630         @onerror    -
631     */
632 
633     virtual void SAL_CALL setEnable( sal_Bool bEnable ) throw( UNO3_RUNTIMEEXCEPTION );
634 
635     /**_______________________________________________________________________________________________________
636         @short      -
637         @descr      -
638 
639         @seealso    -
640 
641         @param      -
642 
643         @return     -
644 
645         @onerror    -
646     */
647 
648     virtual void SAL_CALL setFocus() throw( UNO3_RUNTIMEEXCEPTION );
649 
650     /**_______________________________________________________________________________________________________
651         @short      -
652         @descr      -
653 
654         @seealso    -
655 
656         @param      -
657 
658         @return     -
659 
660         @onerror    -
661     */
662 
663     virtual UNO3_RECTANGLE SAL_CALL getPosSize() throw( UNO3_RUNTIMEEXCEPTION );
664 
665     /**_______________________________________________________________________________________________________
666         @short      -
667         @descr      -
668 
669         @seealso    -
670 
671         @param      -
672 
673         @return     -
674 
675         @onerror    -
676     */
677 
678     virtual void SAL_CALL addWindowListener( const UNO3_REFERENCE< UNO3_XWINDOWLISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
679 
680     /**_______________________________________________________________________________________________________
681         @short      -
682         @descr      -
683 
684         @seealso    -
685 
686         @param      -
687 
688         @return     -
689 
690         @onerror    -
691     */
692 
693     virtual void SAL_CALL addFocusListener( const UNO3_REFERENCE< UNO3_XFOCUSLISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
694 
695     /**_______________________________________________________________________________________________________
696         @short      -
697         @descr      -
698 
699         @seealso    -
700 
701         @param      -
702 
703         @return     -
704 
705         @onerror    -
706     */
707 
708     virtual void SAL_CALL addKeyListener( const UNO3_REFERENCE< UNO3_XKEYLISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
709 
710     /**_______________________________________________________________________________________________________
711         @short      -
712         @descr      -
713 
714         @seealso    -
715 
716         @param      -
717 
718         @return     -
719 
720         @onerror    -
721     */
722 
723     virtual void SAL_CALL addMouseListener( const UNO3_REFERENCE< UNO3_XMOUSELISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
724 
725     /**_______________________________________________________________________________________________________
726         @short      -
727         @descr      -
728 
729         @seealso    -
730 
731         @param      -
732 
733         @return     -
734 
735         @onerror    -
736     */
737 
738     virtual void SAL_CALL addMouseMotionListener( const UNO3_REFERENCE< UNO3_XMOUSEMOTIONLISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
739 
740     /**_______________________________________________________________________________________________________
741         @short      -
742         @descr      -
743 
744         @seealso    -
745 
746         @param      -
747 
748         @return     -
749 
750         @onerror    -
751     */
752 
753     virtual void SAL_CALL addPaintListener( const UNO3_REFERENCE< UNO3_XPAINTLISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
754 
755     /**_______________________________________________________________________________________________________
756         @short      -
757         @descr      -
758 
759         @seealso    -
760 
761         @param      -
762 
763         @return     -
764 
765         @onerror    -
766     */
767 
768     virtual void SAL_CALL removeWindowListener( const UNO3_REFERENCE< UNO3_XWINDOWLISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
769 
770     /**_______________________________________________________________________________________________________
771         @short      -
772         @descr      -
773 
774         @seealso    -
775 
776         @param      -
777 
778         @return     -
779 
780         @onerror    -
781     */
782 
783     virtual void SAL_CALL removeFocusListener( const UNO3_REFERENCE< UNO3_XFOCUSLISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
784 
785     /**_______________________________________________________________________________________________________
786         @short      -
787         @descr      -
788 
789         @seealso    -
790 
791         @param      -
792 
793         @return     -
794 
795         @onerror    -
796     */
797 
798     virtual void SAL_CALL removeKeyListener( const UNO3_REFERENCE< UNO3_XKEYLISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
799 
800     /**_______________________________________________________________________________________________________
801         @short      -
802         @descr      -
803 
804         @seealso    -
805 
806         @param      -
807 
808         @return     -
809 
810         @onerror    -
811     */
812 
813     virtual void SAL_CALL removeMouseListener( const UNO3_REFERENCE< UNO3_XMOUSELISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
814 
815     /**_______________________________________________________________________________________________________
816         @short      -
817         @descr      -
818 
819         @seealso    -
820 
821         @param      -
822 
823         @return     -
824 
825         @onerror    -
826     */
827 
828     virtual void SAL_CALL removeMouseMotionListener( const UNO3_REFERENCE< UNO3_XMOUSEMOTIONLISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
829 
830     /**_______________________________________________________________________________________________________
831         @short      -
832         @descr      -
833 
834         @seealso    -
835 
836         @param      -
837 
838         @return     -
839 
840         @onerror    -
841     */
842 
843     virtual void SAL_CALL removePaintListener( const UNO3_REFERENCE< UNO3_XPAINTLISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
844 
845     //________________________________________________________________________________________________________
846     //  XView
847     //________________________________________________________________________________________________________
848 
849     /**_______________________________________________________________________________________________________
850         @short      -
851         @descr      -
852 
853         @seealso    -
854 
855         @param      -
856 
857         @return     -
858 
859         @onerror    -
860     */
861 
862     virtual void SAL_CALL draw( sal_Int32   nX  ,
863                                 sal_Int32   nY  ) throw( UNO3_RUNTIMEEXCEPTION );
864 
865     /**_______________________________________________________________________________________________________
866         @short      -
867         @descr      -
868 
869         @seealso    -
870 
871         @param      -
872 
873         @return     -
874 
875         @onerror    -
876     */
877 
878     virtual sal_Bool SAL_CALL setGraphics( const UNO3_REFERENCE< UNO3_XGRAPHICS >& xDevice ) throw( UNO3_RUNTIMEEXCEPTION );
879 
880     /**_______________________________________________________________________________________________________
881         @short      -
882         @descr      -
883 
884         @seealso    -
885 
886         @param      -
887 
888         @return     -
889 
890         @onerror    -
891     */
892 
893     virtual void SAL_CALL setZoom(  float   fZoomX  ,
894                                     float   fZoomY  ) throw( UNO3_RUNTIMEEXCEPTION );
895 
896     /**_______________________________________________________________________________________________________
897         @short      -
898         @descr      -
899 
900         @seealso    -
901 
902         @param      -
903 
904         @return     -
905 
906         @onerror    -
907     */
908 
909     virtual UNO3_REFERENCE< UNO3_XGRAPHICS > SAL_CALL getGraphics() throw( UNO3_RUNTIMEEXCEPTION );
910 
911     /**_______________________________________________________________________________________________________
912         @short      -
913         @descr      -
914 
915         @seealso    -
916 
917         @param      -
918 
919         @return     -
920 
921         @onerror    -
922     */
923 
924     virtual UNO3_SIZE SAL_CALL getSize() throw( UNO3_RUNTIMEEXCEPTION );
925 
926     //________________________________________________________________________________________________________
927     //  UNO3_XEVENTLISTENER
928     //________________________________________________________________________________________________________
929 
930     /**_______________________________________________________________________________________________________
931         @short      -
932         @descr      -
933 
934         @seealso    -
935 
936         @param      -
937 
938         @return     -
939 
940         @onerror    -
941     */
942 
943     virtual void SAL_CALL disposing( const UNO3_EVENTOBJECT& rSource    ) throw( UNO3_RUNTIMEEXCEPTION );
944 
945     //________________________________________________________________________________________________________
946     //  XPaintListener
947     //________________________________________________________________________________________________________
948 
949     /**_______________________________________________________________________________________________________
950         @short      -
951         @descr      -
952 
953         @seealso    -
954 
955         @param      -
956 
957         @return     -
958 
959         @onerror    -
960     */
961 
962     virtual void SAL_CALL windowPaint( const UNO3_PAINTEVENT& rEvent ) throw( UNO3_RUNTIMEEXCEPTION );
963 
964     //________________________________________________________________________________________________________
965     //  XWindowListener
966     //________________________________________________________________________________________________________
967 
968     /**_______________________________________________________________________________________________________
969         @short      -
970         @descr      -
971 
972         @seealso    -
973 
974         @param      -
975 
976         @return     -
977 
978         @onerror    -
979     */
980 
981     virtual void SAL_CALL windowResized( const UNO3_WINDOWEVENT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION );
982     virtual void SAL_CALL windowMoved( const UNO3_WINDOWEVENT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION );
983     virtual void SAL_CALL windowShown( const UNO3_EVENTOBJECT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION );
984     virtual void SAL_CALL windowHidden( const UNO3_EVENTOBJECT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION );
985 
986     //________________________________________________________________________________________________________
987     //  impl but public method to register service
988     //________________________________________________________________________________________________________
989 
990     /**_______________________________________________________________________________________________________
991         @short      -
992         @descr      -
993 
994         @seealso    -
995 
996         @param      -
997 
998         @return     -
999 
1000         @onerror    -
1001     */
1002 
1003     static const UNO3_SEQUENCE< UNO3_OUSTRING > impl_getStaticSupportedServiceNames();
1004 
1005     /**_______________________________________________________________________________________________________
1006         @short      -
1007         @descr      -
1008 
1009         @seealso    -
1010 
1011         @param      -
1012 
1013         @return     -
1014 
1015         @onerror    -
1016     */
1017 
1018     static const UNO3_OUSTRING impl_getStaticImplementationName();
1019 
1020 //____________________________________________________________________________________________________________
1021 //  protected methods
1022 //____________________________________________________________________________________________________________
1023 
1024 protected:
1025     using OComponentHelper::disposing;
1026 
1027     /**_______________________________________________________________________________________________________
1028         @short      -
1029         @descr      -
1030 
1031         @seealso    -
1032 
1033         @param      -
1034 
1035         @return     -
1036 
1037         @onerror    -
1038     */
1039 
1040     const UNO3_REFERENCE< UNO3_XMULTISERVICEFACTORY > impl_getMultiServiceFactory();
1041 
1042     /**_______________________________________________________________________________________________________
1043         @short      -
1044         @descr      -
1045 
1046         @seealso    -
1047 
1048         @param      -
1049 
1050         @return     -
1051 
1052         @onerror    -
1053     */
1054 
1055     const UNO3_REFERENCE< UNO3_XWINDOW > impl_getPeerWindow();
1056 
1057     /**_______________________________________________________________________________________________________
1058         @short      -
1059         @descr      -
1060 
1061         @seealso    -
1062 
1063         @param      -
1064 
1065         @return     -
1066 
1067         @onerror    -
1068     */
1069 
1070     const UNO3_REFERENCE< UNO3_XGRAPHICS > impl_getGraphicsPeer();
1071 
1072     /**_______________________________________________________________________________________________________
1073         @short      -
1074         @descr      -
1075 
1076         @seealso    -
1077 
1078         @param      -
1079 
1080         @return     -
1081 
1082         @onerror    -
1083     */
1084 
1085     const sal_Int32& impl_getWidth();
1086 
1087     /**_______________________________________________________________________________________________________
1088         @short      -
1089         @descr      -
1090 
1091         @seealso    -
1092 
1093         @param      -
1094 
1095         @return     -
1096 
1097         @onerror    -
1098     */
1099 
1100     const sal_Int32& impl_getHeight();
1101 
1102     /**_______________________________________________________________________________________________________
1103         @short      -
1104         @descr      -
1105 
1106         @seealso    -
1107 
1108         @param      -
1109 
1110         @return     -
1111 
1112         @onerror    -
1113     */
1114 
1115     virtual UNO3_WINDOWDESCRIPTOR* impl_getWindowDescriptor( const UNO3_REFERENCE< UNO3_XWINDOWPEER >& xParentPeer );
1116 
1117     /**_______________________________________________________________________________________________________
1118         @short      -
1119         @descr      -
1120 
1121         @seealso    -
1122 
1123         @param      -
1124 
1125         @return     -
1126 
1127         @onerror    -
1128     */
1129 
1130     virtual void impl_paint(        sal_Int32               nX          ,
1131                                     sal_Int32               nY          ,
1132                             const   UNO3_REFERENCE< UNO3_XGRAPHICS >&   xGraphics   );
1133 
1134     /**_______________________________________________________________________________________________________
1135         @short      -
1136         @descr      -
1137 
1138         @seealso    -
1139 
1140         @param      -
1141 
1142         @return     -
1143 
1144         @onerror    -
1145     */
1146 
1147     virtual void impl_recalcLayout( const UNO3_WINDOWEVENT& aEvent );
1148 
1149     /**_______________________________________________________________________________________________________
1150         @short      -
1151         @descr      -
1152 
1153         @seealso    -
1154 
1155         @param      -
1156 
1157         @return     -
1158 
1159         @onerror    -
1160     */
1161 
1162     UNO3_REFERENCE< UNO3_XINTERFACE > impl_getDelegator();
1163 
1164 //____________________________________________________________________________________________________________
1165 //  private methods
1166 //____________________________________________________________________________________________________________
1167 
1168 private:
1169 
1170     /**_______________________________________________________________________________________________________
1171         @short      -
1172         @descr      -
1173 
1174         @seealso    -
1175 
1176         @param      -
1177 
1178         @return     -
1179 
1180         @onerror    -
1181     */
1182 
1183     void impl_releasePeer();
1184 
1185     /**_______________________________________________________________________________________________________
1186         @short      -
1187         @descr      -
1188 
1189         @seealso    -
1190 
1191         @param      -
1192 
1193         @return     -
1194 
1195         @onerror    -
1196     */
1197 
1198     OMRCListenerMultiplexerHelper* impl_getMultiplexer();
1199 
1200 //____________________________________________________________________________________________________________
1201 //  private variables
1202 //____________________________________________________________________________________________________________
1203 
1204 private:
1205 
1206     UNO3_REFERENCE< UNO3_XMULTISERVICEFACTORY >     m_xFactory              ;
1207     UNO3_REFERENCE< UNO3_XINTERFACE >               m_xDelegator            ;
1208     OMRCListenerMultiplexerHelper*                  m_pMultiplexer          ;   // multiplex events
1209     UNO3_REFERENCE< UNO3_XINTERFACE >               m_xMultiplexer          ;
1210     UNO3_REFERENCE< UNO3_XINTERFACE >               m_xContext              ;
1211     UNO3_REFERENCE< UNO3_XWINDOWPEER >              m_xPeer                 ;
1212     UNO3_REFERENCE< UNO3_XWINDOW >                  m_xPeerWindow           ;
1213     UNO3_REFERENCE< UNO3_XGRAPHICS >                m_xGraphicsView         ;   // graphics for ::com::sun::star::awt::XView-operations
1214     UNO3_REFERENCE< UNO3_XGRAPHICS >                m_xGraphicsPeer         ;   // graphics for painting on a peer
1215     sal_Int32                                       m_nX                    ;   // Position ...
1216     sal_Int32                                       m_nY                    ;
1217     sal_Int32                                       m_nWidth                ;   // ... and size of window
1218     sal_Int32                                       m_nHeight               ;
1219     sal_Bool                                        m_bVisible              ;   // Some state flags
1220     sal_Bool                                        m_bInDesignMode         ;
1221     sal_Bool                                        m_bEnable               ;
1222 
1223 };  // class BaseControl
1224 
1225 }   // namespace unocontrols
1226 
1227 #endif  // ifndef _UNOCONTROLS_BASECONTROL_CTRL_HXX
1228