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