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