update dev300-m58
[ooovba.git] / UnoControls / inc / basecontrol.hxx
blob2a8816116786d62909d2feaf4a05bd0d22d25016
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: basecontrol.hxx,v $
10 * $Revision: 1.7 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _UNOCONTROLS_BASECONTROL_CTRL_HXX
32 #define _UNOCONTROLS_BASECONTROL_CTRL_HXX
34 //____________________________________________________________________________________________________________
35 // includes of other projects
36 //____________________________________________________________________________________________________________
38 #include <com/sun/star/awt/XKeyListener.hpp>
39 #include <com/sun/star/awt/XPaintListener.hpp>
40 #include <com/sun/star/awt/KeyEvent.hpp>
41 #include <com/sun/star/awt/KeyModifier.hpp>
42 #include <com/sun/star/awt/XMouseMotionListener.hpp>
43 #include <com/sun/star/awt/FocusEvent.hpp>
44 #include <com/sun/star/awt/XWindowListener.hpp>
45 #include <com/sun/star/awt/XActivateListener.hpp>
46 #include <com/sun/star/awt/MouseEvent.hpp>
47 #include <com/sun/star/awt/XTopWindowListener.hpp>
48 #include <com/sun/star/awt/PaintEvent.hpp>
49 #include <com/sun/star/awt/InputEvent.hpp>
50 #include <com/sun/star/awt/KeyGroup.hpp>
51 #include <com/sun/star/awt/Key.hpp>
52 #include <com/sun/star/awt/WindowEvent.hpp>
53 #include <com/sun/star/awt/XMouseListener.hpp>
54 #include <com/sun/star/awt/KeyFunction.hpp>
55 #include <com/sun/star/awt/FocusChangeReason.hpp>
56 #include <com/sun/star/awt/MouseButton.hpp>
57 #include <com/sun/star/awt/XFocusListener.hpp>
58 #include <com/sun/star/awt/XFileDialog.hpp>
59 #include <com/sun/star/awt/XTextComponent.hpp>
60 #include <com/sun/star/awt/XListBox.hpp>
61 #include <com/sun/star/awt/XProgressMonitor.hpp>
62 #include <com/sun/star/awt/TextAlign.hpp>
63 #include <com/sun/star/awt/XScrollBar.hpp>
64 #include <com/sun/star/awt/XVclContainerPeer.hpp>
65 #include <com/sun/star/awt/XTabControllerModel.hpp>
66 #include <com/sun/star/awt/XMessageBox.hpp>
67 #include <com/sun/star/awt/XTextEditField.hpp>
68 #include <com/sun/star/awt/Style.hpp>
69 #include <com/sun/star/awt/XTimeField.hpp>
70 #include <com/sun/star/awt/XVclWindowPeer.hpp>
71 #include <com/sun/star/awt/XControlModel.hpp>
72 #include <com/sun/star/awt/XSpinField.hpp>
73 #include <com/sun/star/awt/XUnoControlContainer.hpp>
74 #include <com/sun/star/awt/XTextLayoutConstrains.hpp>
75 #include <com/sun/star/awt/XNumericField.hpp>
76 #include <com/sun/star/awt/XButton.hpp>
77 #include <com/sun/star/awt/XTextArea.hpp>
78 #include <com/sun/star/awt/XImageButton.hpp>
79 #include <com/sun/star/awt/XFixedText.hpp>
80 #include <com/sun/star/awt/XControlContainer.hpp>
81 #include <com/sun/star/awt/XDialog.hpp>
82 #include <com/sun/star/awt/ScrollBarOrientation.hpp>
83 #include <com/sun/star/awt/XRadioButton.hpp>
84 #include <com/sun/star/awt/XCurrencyField.hpp>
85 #include <com/sun/star/awt/XPatternField.hpp>
86 #include <com/sun/star/awt/VclWindowPeerAttribute.hpp>
87 #include <com/sun/star/awt/XTabController.hpp>
88 #include <com/sun/star/awt/XVclContainer.hpp>
89 #include <com/sun/star/awt/XDateField.hpp>
90 #include <com/sun/star/awt/XComboBox.hpp>
91 #include <com/sun/star/awt/XControl.hpp>
92 #include <com/sun/star/awt/XCheckBox.hpp>
93 #include <com/sun/star/awt/MessageBoxCommand.hpp>
94 #include <com/sun/star/awt/XLayoutConstrains.hpp>
95 #include <com/sun/star/awt/XProgressBar.hpp>
96 #include <com/sun/star/awt/XTopWindow.hpp>
97 #include <com/sun/star/awt/XWindow.hpp>
98 #include <com/sun/star/awt/PosSize.hpp>
99 #include <com/sun/star/awt/XView.hpp>
100 #include <com/sun/star/lang/XServiceInfo.hpp>
101 #include <osl/mutex.hxx>
102 #include <cppuhelper/weak.hxx>
103 #include <cppuhelper/component.hxx>
105 //____________________________________________________________________________________________________________
106 // includes of my project
107 //____________________________________________________________________________________________________________
108 #include "multiplexer.hxx"
110 //____________________________________________________________________________________________________________
111 // "namespaces"
112 //____________________________________________________________________________________________________________
114 namespace unocontrols{
116 #define UNO3_ANY ::com::sun::star::uno::Any
117 #define UNO3_EVENTOBJECT ::com::sun::star::lang::EventObject
118 #define UNO3_MUTEX ::osl::Mutex
119 #define UNO3_OCOMPONENTHELPER ::cppu::OComponentHelper
120 #define UNO3_OUSTRING ::rtl::OUString
121 #define UNO3_PAINTEVENT ::com::sun::star::awt::PaintEvent
122 #define UNO3_RECTANGLE ::com::sun::star::awt::Rectangle
123 #define UNO3_REFERENCE ::com::sun::star::uno::Reference
124 #define UNO3_RUNTIMEEXCEPTION ::com::sun::star::uno::RuntimeException
125 #define UNO3_SEQUENCE ::com::sun::star::uno::Sequence
126 #define UNO3_SIZE ::com::sun::star::awt::Size
127 #define UNO3_TYPE ::com::sun::star::uno::Type
128 #define UNO3_WINDOWDESCRIPTOR ::com::sun::star::awt::WindowDescriptor
129 #define UNO3_XCONTROL ::com::sun::star::awt::XControl
130 #define UNO3_XCONTROLMODEL ::com::sun::star::awt::XControlModel
131 #define UNO3_XEVENTLISTENER ::com::sun::star::lang::XEventListener
132 #define UNO3_XFOCUSLISTENER ::com::sun::star::awt::XFocusListener
133 #define UNO3_XGRAPHICS ::com::sun::star::awt::XGraphics
134 #define UNO3_XKEYLISTENER ::com::sun::star::awt::XKeyListener
135 #define UNO3_XMOUSELISTENER ::com::sun::star::awt::XMouseListener
136 #define UNO3_XMOUSEMOTIONLISTENER ::com::sun::star::awt::XMouseMotionListener
137 #define UNO3_XMULTISERVICEFACTORY ::com::sun::star::lang::XMultiServiceFactory
138 #define UNO3_XPAINTLISTENER ::com::sun::star::awt::XPaintListener
139 #define UNO3_XSERVICEINFO ::com::sun::star::lang::XServiceInfo
140 #define UNO3_XTOOLKIT ::com::sun::star::awt::XToolkit
141 #define UNO3_XVIEW ::com::sun::star::awt::XView
142 #define UNO3_XWINDOW ::com::sun::star::awt::XWindow
143 #define UNO3_XWINDOWLISTENER ::com::sun::star::awt::XWindowListener
144 #define UNO3_XWINDOWPEER ::com::sun::star::awt::XWindowPeer
145 #define UNO3_XINTERFACE ::com::sun::star::uno::XInterface
147 //____________________________________________________________________________________________________________
148 // macros
149 //____________________________________________________________________________________________________________
151 #define TRGB_COLORDATA(TRANSPARENCE,RED,GREEN,BLUE) \
152 ((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))
154 //____________________________________________________________________________________________________________
155 // structs
156 //____________________________________________________________________________________________________________
158 struct IMPL_MutexContainer
160 // Is necassery to initialize "BaseControl" and make this class thread-safe.
161 UNO3_MUTEX m_aMutex ;
164 //____________________________________________________________________________________________________________
165 // classes
166 //____________________________________________________________________________________________________________
168 class BaseControl : public UNO3_XSERVICEINFO
169 , public UNO3_XPAINTLISTENER
170 , public UNO3_XWINDOWLISTENER
171 , public UNO3_XVIEW
172 , public UNO3_XWINDOW
173 , public UNO3_XCONTROL
174 , public IMPL_MutexContainer
175 , public UNO3_OCOMPONENTHELPER
177 //____________________________________________________________________________________________________________
178 // public methods
179 //____________________________________________________________________________________________________________
181 public:
183 //________________________________________________________________________________________________________
184 // construct/destruct
185 //________________________________________________________________________________________________________
187 /**_______________________________________________________________________________________________________
188 @short -
189 @descr -
191 @seealso -
193 @param -
195 @return -
197 @onerror -
200 BaseControl( const UNO3_REFERENCE< UNO3_XMULTISERVICEFACTORY >& xFactory );
202 /**_______________________________________________________________________________________________________
203 @short -
204 @descr -
206 @seealso -
208 @param -
210 @return -
212 @onerror -
215 virtual ~BaseControl();
217 //________________________________________________________________________________________________________
218 // XInterface
219 //________________________________________________________________________________________________________
221 /**_______________________________________________________________________________________________________
222 @short give answer, if interface is supported
223 @descr The interfaces are searched by type.
225 @seealso XInterface
227 @param "rType" is the type of searched interface.
229 @return Any information about found interface
231 @onerror A RuntimeException is thrown.
234 virtual UNO3_ANY SAL_CALL queryInterface( const UNO3_TYPE& aType ) throw( UNO3_RUNTIMEEXCEPTION );
236 /**_______________________________________________________________________________________________________
237 @short increment refcount
238 @descr -
240 @seealso XInterface
241 @seealso release()
243 @param -
245 @return -
247 @onerror A RuntimeException is thrown.
250 virtual void SAL_CALL acquire() throw();
252 /**_______________________________________________________________________________________________________
253 @short decrement refcount
254 @descr -
256 @seealso XInterface
257 @seealso acquire()
259 @param -
261 @return -
263 @onerror A RuntimeException is thrown.
266 virtual void SAL_CALL release() throw();
268 //________________________________________________________________________________________________________
269 // XTypeProvider
270 //________________________________________________________________________________________________________
272 /**_______________________________________________________________________________________________________
273 @short get information about supported interfaces
274 @descr -
276 @seealso XTypeProvider
278 @param -
280 @return Sequence of types of all supported interfaces
282 @onerror A RuntimeException is thrown.
285 virtual UNO3_SEQUENCE< UNO3_TYPE > SAL_CALL getTypes() throw( UNO3_RUNTIMEEXCEPTION );
287 /**_______________________________________________________________________________________________________
288 @short get implementation id
289 @descr This ID is neccessary for UNO-caching. If there no ID, cache is disabled.
290 Another way, cache is enabled.
292 @seealso XTypeProvider
294 @param -
296 @return ID as Sequence of byte
298 @onerror A RuntimeException is thrown.
301 virtual UNO3_SEQUENCE< sal_Int8 > SAL_CALL getImplementationId() throw( UNO3_RUNTIMEEXCEPTION );
303 //________________________________________________________________________________________________________
304 // XAggregation
305 //________________________________________________________________________________________________________
307 /**_______________________________________________________________________________________________________
308 @short -
309 @descr -
311 @seealso -
313 @param -
315 @return -
317 @onerror -
320 virtual void SAL_CALL setDelegator( const UNO3_REFERENCE< UNO3_XINTERFACE >& xDelegator ) throw( UNO3_RUNTIMEEXCEPTION );
322 /**_______________________________________________________________________________________________________
323 @short -
324 @descr -
326 @seealso -
328 @param -
330 @return -
332 @onerror -
335 virtual UNO3_ANY SAL_CALL queryAggregation( const UNO3_TYPE& aType ) throw( UNO3_RUNTIMEEXCEPTION );
337 //________________________________________________________________________________________________________
338 // XServiceInfo
339 //________________________________________________________________________________________________________
341 /**_______________________________________________________________________________________________________
342 @short -
343 @descr -
345 @seealso -
347 @param -
349 @return -
351 @onerror -
354 virtual sal_Bool SAL_CALL supportsService( const UNO3_OUSTRING& sServiceName ) throw( UNO3_RUNTIMEEXCEPTION );
356 /**_______________________________________________________________________________________________________
357 @short -
358 @descr -
360 @seealso -
362 @param -
364 @return -
366 @onerror -
369 virtual UNO3_OUSTRING SAL_CALL getImplementationName() throw( UNO3_RUNTIMEEXCEPTION );
371 /**_______________________________________________________________________________________________________
372 @short -
373 @descr -
375 @seealso -
377 @param -
379 @return -
381 @onerror -
384 virtual UNO3_SEQUENCE< UNO3_OUSTRING > SAL_CALL getSupportedServiceNames() throw( UNO3_RUNTIMEEXCEPTION );
386 //________________________________________________________________________________________________________
387 // XComponent
388 //________________________________________________________________________________________________________
390 /**_______________________________________________________________________________________________________
391 @short -
392 @descr -
394 @seealso -
396 @param -
398 @return -
400 @onerror -
403 virtual void SAL_CALL dispose() throw( UNO3_RUNTIMEEXCEPTION );
405 /**_______________________________________________________________________________________________________
406 @short -
407 @descr -
409 @seealso -
411 @param -
413 @return -
415 @onerror -
418 virtual void SAL_CALL addEventListener( const UNO3_REFERENCE< UNO3_XEVENTLISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
420 /**_______________________________________________________________________________________________________
421 @short -
422 @descr -
424 @seealso -
426 @param -
428 @return -
430 @onerror -
433 virtual void SAL_CALL removeEventListener( const UNO3_REFERENCE< UNO3_XEVENTLISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
435 //________________________________________________________________________________________________________
436 // XControl
437 //________________________________________________________________________________________________________
439 /**_______________________________________________________________________________________________________
440 @short -
441 @descr -
443 @seealso -
445 @param -
447 @return -
449 @onerror -
452 virtual void SAL_CALL createPeer( const UNO3_REFERENCE< UNO3_XTOOLKIT >& xToolkit, const UNO3_REFERENCE< UNO3_XWINDOWPEER >& xParent ) throw( UNO3_RUNTIMEEXCEPTION );
454 /**_______________________________________________________________________________________________________
455 @short -
456 @descr -
458 @seealso -
460 @param -
462 @return -
464 @onerror -
467 virtual void SAL_CALL setContext( const UNO3_REFERENCE< UNO3_XINTERFACE >& xContext ) throw( UNO3_RUNTIMEEXCEPTION );
469 /**_______________________________________________________________________________________________________
470 @short -
471 @descr -
473 @seealso -
475 @param -
477 @return -
479 @onerror -
482 virtual sal_Bool SAL_CALL setModel( const UNO3_REFERENCE< UNO3_XCONTROLMODEL >& xModel ) throw( UNO3_RUNTIMEEXCEPTION ) = 0 ;
484 /**_______________________________________________________________________________________________________
485 @short -
486 @descr -
488 @seealso -
490 @param -
492 @return -
494 @onerror -
497 virtual void SAL_CALL setDesignMode( sal_Bool bOn ) throw( UNO3_RUNTIMEEXCEPTION );
499 /**_______________________________________________________________________________________________________
500 @short -
501 @descr -
503 @seealso -
505 @param -
507 @return -
509 @onerror -
512 virtual UNO3_REFERENCE< UNO3_XINTERFACE > SAL_CALL getContext() throw( UNO3_RUNTIMEEXCEPTION );
514 /**_______________________________________________________________________________________________________
515 @short -
516 @descr -
518 @seealso -
520 @param -
522 @return -
524 @onerror -
527 virtual UNO3_REFERENCE< UNO3_XCONTROLMODEL > SAL_CALL getModel() throw( UNO3_RUNTIMEEXCEPTION ) = 0;
529 /**_______________________________________________________________________________________________________
530 @short -
531 @descr -
533 @seealso -
535 @param -
537 @return -
539 @onerror -
542 virtual UNO3_REFERENCE< UNO3_XWINDOWPEER > SAL_CALL getPeer() throw( UNO3_RUNTIMEEXCEPTION );
544 /**_______________________________________________________________________________________________________
545 @short -
546 @descr -
548 @seealso -
550 @param -
552 @return -
554 @onerror -
557 virtual UNO3_REFERENCE< UNO3_XVIEW > SAL_CALL getView() throw( UNO3_RUNTIMEEXCEPTION );
559 /**_______________________________________________________________________________________________________
560 @short -
561 @descr -
563 @seealso -
565 @param -
567 @return -
569 @onerror -
572 virtual sal_Bool SAL_CALL isDesignMode() throw( UNO3_RUNTIMEEXCEPTION );
574 /**_______________________________________________________________________________________________________
575 @short -
576 @descr -
578 @seealso -
580 @param -
582 @return -
584 @onerror -
587 virtual sal_Bool SAL_CALL isTransparent() throw( UNO3_RUNTIMEEXCEPTION );
589 //________________________________________________________________________________________________________
590 // XWindow
591 //________________________________________________________________________________________________________
593 /**_______________________________________________________________________________________________________
594 @short -
595 @descr -
597 @seealso -
599 @param -
601 @return -
603 @onerror -
606 virtual void SAL_CALL setPosSize( sal_Int32 nX ,
607 sal_Int32 nY ,
608 sal_Int32 nWidth ,
609 sal_Int32 nHeight ,
610 sal_Int16 nFlags ) throw( UNO3_RUNTIMEEXCEPTION );
612 /**_______________________________________________________________________________________________________
613 @short -
614 @descr -
616 @seealso -
618 @param -
620 @return -
622 @onerror -
625 virtual void SAL_CALL setVisible( sal_Bool bVisible ) throw( UNO3_RUNTIMEEXCEPTION );
627 /**_______________________________________________________________________________________________________
628 @short -
629 @descr -
631 @seealso -
633 @param -
635 @return -
637 @onerror -
640 virtual void SAL_CALL setEnable( sal_Bool bEnable ) throw( UNO3_RUNTIMEEXCEPTION );
642 /**_______________________________________________________________________________________________________
643 @short -
644 @descr -
646 @seealso -
648 @param -
650 @return -
652 @onerror -
655 virtual void SAL_CALL setFocus() throw( UNO3_RUNTIMEEXCEPTION );
657 /**_______________________________________________________________________________________________________
658 @short -
659 @descr -
661 @seealso -
663 @param -
665 @return -
667 @onerror -
670 virtual UNO3_RECTANGLE SAL_CALL getPosSize() throw( UNO3_RUNTIMEEXCEPTION );
672 /**_______________________________________________________________________________________________________
673 @short -
674 @descr -
676 @seealso -
678 @param -
680 @return -
682 @onerror -
685 virtual void SAL_CALL addWindowListener( const UNO3_REFERENCE< UNO3_XWINDOWLISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
687 /**_______________________________________________________________________________________________________
688 @short -
689 @descr -
691 @seealso -
693 @param -
695 @return -
697 @onerror -
700 virtual void SAL_CALL addFocusListener( const UNO3_REFERENCE< UNO3_XFOCUSLISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
702 /**_______________________________________________________________________________________________________
703 @short -
704 @descr -
706 @seealso -
708 @param -
710 @return -
712 @onerror -
715 virtual void SAL_CALL addKeyListener( const UNO3_REFERENCE< UNO3_XKEYLISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
717 /**_______________________________________________________________________________________________________
718 @short -
719 @descr -
721 @seealso -
723 @param -
725 @return -
727 @onerror -
730 virtual void SAL_CALL addMouseListener( const UNO3_REFERENCE< UNO3_XMOUSELISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
732 /**_______________________________________________________________________________________________________
733 @short -
734 @descr -
736 @seealso -
738 @param -
740 @return -
742 @onerror -
745 virtual void SAL_CALL addMouseMotionListener( const UNO3_REFERENCE< UNO3_XMOUSEMOTIONLISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
747 /**_______________________________________________________________________________________________________
748 @short -
749 @descr -
751 @seealso -
753 @param -
755 @return -
757 @onerror -
760 virtual void SAL_CALL addPaintListener( const UNO3_REFERENCE< UNO3_XPAINTLISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
762 /**_______________________________________________________________________________________________________
763 @short -
764 @descr -
766 @seealso -
768 @param -
770 @return -
772 @onerror -
775 virtual void SAL_CALL removeWindowListener( const UNO3_REFERENCE< UNO3_XWINDOWLISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
777 /**_______________________________________________________________________________________________________
778 @short -
779 @descr -
781 @seealso -
783 @param -
785 @return -
787 @onerror -
790 virtual void SAL_CALL removeFocusListener( const UNO3_REFERENCE< UNO3_XFOCUSLISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
792 /**_______________________________________________________________________________________________________
793 @short -
794 @descr -
796 @seealso -
798 @param -
800 @return -
802 @onerror -
805 virtual void SAL_CALL removeKeyListener( const UNO3_REFERENCE< UNO3_XKEYLISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
807 /**_______________________________________________________________________________________________________
808 @short -
809 @descr -
811 @seealso -
813 @param -
815 @return -
817 @onerror -
820 virtual void SAL_CALL removeMouseListener( const UNO3_REFERENCE< UNO3_XMOUSELISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
822 /**_______________________________________________________________________________________________________
823 @short -
824 @descr -
826 @seealso -
828 @param -
830 @return -
832 @onerror -
835 virtual void SAL_CALL removeMouseMotionListener( const UNO3_REFERENCE< UNO3_XMOUSEMOTIONLISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
837 /**_______________________________________________________________________________________________________
838 @short -
839 @descr -
841 @seealso -
843 @param -
845 @return -
847 @onerror -
850 virtual void SAL_CALL removePaintListener( const UNO3_REFERENCE< UNO3_XPAINTLISTENER >& xListener ) throw( UNO3_RUNTIMEEXCEPTION );
852 //________________________________________________________________________________________________________
853 // XView
854 //________________________________________________________________________________________________________
856 /**_______________________________________________________________________________________________________
857 @short -
858 @descr -
860 @seealso -
862 @param -
864 @return -
866 @onerror -
869 virtual void SAL_CALL draw( sal_Int32 nX ,
870 sal_Int32 nY ) throw( UNO3_RUNTIMEEXCEPTION );
872 /**_______________________________________________________________________________________________________
873 @short -
874 @descr -
876 @seealso -
878 @param -
880 @return -
882 @onerror -
885 virtual sal_Bool SAL_CALL setGraphics( const UNO3_REFERENCE< UNO3_XGRAPHICS >& xDevice ) throw( UNO3_RUNTIMEEXCEPTION );
887 /**_______________________________________________________________________________________________________
888 @short -
889 @descr -
891 @seealso -
893 @param -
895 @return -
897 @onerror -
900 virtual void SAL_CALL setZoom( float fZoomX ,
901 float fZoomY ) throw( UNO3_RUNTIMEEXCEPTION );
903 /**_______________________________________________________________________________________________________
904 @short -
905 @descr -
907 @seealso -
909 @param -
911 @return -
913 @onerror -
916 virtual UNO3_REFERENCE< UNO3_XGRAPHICS > SAL_CALL getGraphics() throw( UNO3_RUNTIMEEXCEPTION );
918 /**_______________________________________________________________________________________________________
919 @short -
920 @descr -
922 @seealso -
924 @param -
926 @return -
928 @onerror -
931 virtual UNO3_SIZE SAL_CALL getSize() throw( UNO3_RUNTIMEEXCEPTION );
933 //________________________________________________________________________________________________________
934 // UNO3_XEVENTLISTENER
935 //________________________________________________________________________________________________________
937 /**_______________________________________________________________________________________________________
938 @short -
939 @descr -
941 @seealso -
943 @param -
945 @return -
947 @onerror -
950 virtual void SAL_CALL disposing( const UNO3_EVENTOBJECT& rSource ) throw( UNO3_RUNTIMEEXCEPTION );
952 //________________________________________________________________________________________________________
953 // XPaintListener
954 //________________________________________________________________________________________________________
956 /**_______________________________________________________________________________________________________
957 @short -
958 @descr -
960 @seealso -
962 @param -
964 @return -
966 @onerror -
969 virtual void SAL_CALL windowPaint( const UNO3_PAINTEVENT& rEvent ) throw( UNO3_RUNTIMEEXCEPTION );
971 //________________________________________________________________________________________________________
972 // XWindowListener
973 //________________________________________________________________________________________________________
975 /**_______________________________________________________________________________________________________
976 @short -
977 @descr -
979 @seealso -
981 @param -
983 @return -
985 @onerror -
988 virtual void SAL_CALL windowResized( const UNO3_WINDOWEVENT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION );
989 virtual void SAL_CALL windowMoved( const UNO3_WINDOWEVENT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION );
990 virtual void SAL_CALL windowShown( const UNO3_EVENTOBJECT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION );
991 virtual void SAL_CALL windowHidden( const UNO3_EVENTOBJECT& aEvent ) throw( UNO3_RUNTIMEEXCEPTION );
993 //________________________________________________________________________________________________________
994 // impl but public method to register service
995 //________________________________________________________________________________________________________
997 /**_______________________________________________________________________________________________________
998 @short -
999 @descr -
1001 @seealso -
1003 @param -
1005 @return -
1007 @onerror -
1010 static const UNO3_SEQUENCE< UNO3_OUSTRING > impl_getStaticSupportedServiceNames();
1012 /**_______________________________________________________________________________________________________
1013 @short -
1014 @descr -
1016 @seealso -
1018 @param -
1020 @return -
1022 @onerror -
1025 static const UNO3_OUSTRING impl_getStaticImplementationName();
1027 //____________________________________________________________________________________________________________
1028 // protected methods
1029 //____________________________________________________________________________________________________________
1031 protected:
1032 using OComponentHelper::disposing;
1034 /**_______________________________________________________________________________________________________
1035 @short -
1036 @descr -
1038 @seealso -
1040 @param -
1042 @return -
1044 @onerror -
1047 const UNO3_REFERENCE< UNO3_XMULTISERVICEFACTORY > impl_getMultiServiceFactory();
1049 /**_______________________________________________________________________________________________________
1050 @short -
1051 @descr -
1053 @seealso -
1055 @param -
1057 @return -
1059 @onerror -
1062 const UNO3_REFERENCE< UNO3_XWINDOW > impl_getPeerWindow();
1064 /**_______________________________________________________________________________________________________
1065 @short -
1066 @descr -
1068 @seealso -
1070 @param -
1072 @return -
1074 @onerror -
1077 const UNO3_REFERENCE< UNO3_XGRAPHICS > impl_getGraphicsPeer();
1079 /**_______________________________________________________________________________________________________
1080 @short -
1081 @descr -
1083 @seealso -
1085 @param -
1087 @return -
1089 @onerror -
1092 const sal_Int32& impl_getWidth();
1094 /**_______________________________________________________________________________________________________
1095 @short -
1096 @descr -
1098 @seealso -
1100 @param -
1102 @return -
1104 @onerror -
1107 const sal_Int32& impl_getHeight();
1109 /**_______________________________________________________________________________________________________
1110 @short -
1111 @descr -
1113 @seealso -
1115 @param -
1117 @return -
1119 @onerror -
1122 virtual UNO3_WINDOWDESCRIPTOR* impl_getWindowDescriptor( const UNO3_REFERENCE< UNO3_XWINDOWPEER >& xParentPeer );
1124 /**_______________________________________________________________________________________________________
1125 @short -
1126 @descr -
1128 @seealso -
1130 @param -
1132 @return -
1134 @onerror -
1137 virtual void impl_paint( sal_Int32 nX ,
1138 sal_Int32 nY ,
1139 const UNO3_REFERENCE< UNO3_XGRAPHICS >& xGraphics );
1141 /**_______________________________________________________________________________________________________
1142 @short -
1143 @descr -
1145 @seealso -
1147 @param -
1149 @return -
1151 @onerror -
1154 virtual void impl_recalcLayout( const UNO3_WINDOWEVENT& aEvent );
1156 /**_______________________________________________________________________________________________________
1157 @short -
1158 @descr -
1160 @seealso -
1162 @param -
1164 @return -
1166 @onerror -
1169 UNO3_REFERENCE< UNO3_XINTERFACE > impl_getDelegator();
1171 //____________________________________________________________________________________________________________
1172 // private methods
1173 //____________________________________________________________________________________________________________
1175 private:
1177 /**_______________________________________________________________________________________________________
1178 @short -
1179 @descr -
1181 @seealso -
1183 @param -
1185 @return -
1187 @onerror -
1190 void impl_releasePeer();
1192 /**_______________________________________________________________________________________________________
1193 @short -
1194 @descr -
1196 @seealso -
1198 @param -
1200 @return -
1202 @onerror -
1205 OMRCListenerMultiplexerHelper* impl_getMultiplexer();
1207 //____________________________________________________________________________________________________________
1208 // private variables
1209 //____________________________________________________________________________________________________________
1211 private:
1213 UNO3_REFERENCE< UNO3_XMULTISERVICEFACTORY > m_xFactory ;
1214 UNO3_REFERENCE< UNO3_XINTERFACE > m_xDelegator ;
1215 OMRCListenerMultiplexerHelper* m_pMultiplexer ; // multiplex events
1216 UNO3_REFERENCE< UNO3_XINTERFACE > m_xMultiplexer ;
1217 UNO3_REFERENCE< UNO3_XINTERFACE > m_xContext ;
1218 UNO3_REFERENCE< UNO3_XWINDOWPEER > m_xPeer ;
1219 UNO3_REFERENCE< UNO3_XWINDOW > m_xPeerWindow ;
1220 UNO3_REFERENCE< UNO3_XGRAPHICS > m_xGraphicsView ; // graphics for ::com::sun::star::awt::XView-operations
1221 UNO3_REFERENCE< UNO3_XGRAPHICS > m_xGraphicsPeer ; // graphics for painting on a peer
1222 sal_Int32 m_nX ; // Position ...
1223 sal_Int32 m_nY ;
1224 sal_Int32 m_nWidth ; // ... and size of window
1225 sal_Int32 m_nHeight ;
1226 sal_Bool m_bVisible ; // Some state flags
1227 sal_Bool m_bInDesignMode ;
1228 sal_Bool m_bEnable ;
1230 }; // class BaseControl
1232 } // namespace unocontrols
1234 #endif // ifndef _UNOCONTROLS_BASECONTROL_CTRL_HXX