LCOV - code coverage report
Current view: top level - libreoffice/extensions/source/plugin/inc/plugin - plctrl.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 18 0.0 %
Date: 2012-12-27 Functions: 0 9 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*************************************************************************
       3             :  *
       4             :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5             :  *
       6             :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7             :  *
       8             :  * OpenOffice.org - a multi-platform office productivity suite
       9             :  *
      10             :  * This file is part of OpenOffice.org.
      11             :  *
      12             :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13             :  * it under the terms of the GNU Lesser General Public License version 3
      14             :  * only, as published by the Free Software Foundation.
      15             :  *
      16             :  * OpenOffice.org is distributed in the hope that it will be useful,
      17             :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18             :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19             :  * GNU Lesser General Public License version 3 for more details
      20             :  * (a copy is included in the LICENSE file that accompanied this code).
      21             :  *
      22             :  * You should have received a copy of the GNU Lesser General Public License
      23             :  * version 3 along with OpenOffice.org.  If not, see
      24             :  * <http://www.openoffice.org/license.html>
      25             :  * for a copy of the LGPLv3 License.
      26             :  *
      27             :  ************************************************************************/
      28             : #ifndef __PLCTRL_HXX
      29             : #define __PLCTRL_HXX
      30             : 
      31             : #include <cppuhelper/weak.hxx>
      32             : #include <plugin/multiplx.hxx>
      33             : #include <com/sun/star/beans/PropertyValues.hpp>
      34             : #include <com/sun/star/beans/XPropertySet.hpp>
      35             : #include <com/sun/star/beans/PropertyValue.hpp>
      36             : #include <com/sun/star/beans/PropertyState.hpp>
      37             : #include <com/sun/star/beans/XPropertySetInfo.hpp>
      38             : #include <com/sun/star/beans/XMultiPropertySet.hpp>
      39             : #include <com/sun/star/beans/XFastPropertySet.hpp>
      40             : #include <com/sun/star/beans/XVetoableChangeListener.hpp>
      41             : #include <com/sun/star/beans/XPropertyState.hpp>
      42             : #include <com/sun/star/beans/XPropertyStateChangeListener.hpp>
      43             : #include <com/sun/star/beans/PropertyAttribute.hpp>
      44             : #include <com/sun/star/beans/XPropertiesChangeListener.hpp>
      45             : #include <com/sun/star/beans/XPropertyChangeListener.hpp>
      46             : #include <com/sun/star/beans/XPropertyAccess.hpp>
      47             : #include <com/sun/star/beans/XPropertyContainer.hpp>
      48             : #include <com/sun/star/beans/PropertyStateChangeEvent.hpp>
      49             : #include <com/sun/star/beans/PropertyChangeEvent.hpp>
      50             : #include <com/sun/star/awt/XVclContainerPeer.hpp>
      51             : #include <com/sun/star/awt/XVclWindowPeer.hpp>
      52             : #include <com/sun/star/awt/XControlModel.hpp>
      53             : #include <com/sun/star/awt/XUnoControlContainer.hpp>
      54             : #include <com/sun/star/awt/XControlContainer.hpp>
      55             : #include <com/sun/star/awt/VclWindowPeerAttribute.hpp>
      56             : #include <com/sun/star/awt/XVclContainer.hpp>
      57             : #include <com/sun/star/awt/XControl.hpp>
      58             : #include <com/sun/star/awt/XTopWindow.hpp>
      59             : #include <com/sun/star/awt/XWindow.hpp>
      60             : #include <com/sun/star/awt/PosSize.hpp>
      61             : 
      62             : #include <cppuhelper/implbase4.hxx>
      63             : 
      64             : #include <list>
      65             : 
      66             : class SystemChildWindow;
      67             : 
      68             : //==================================================================================================
      69             : class PluginControl_Impl : public ::cppu::WeakAggImplHelper4<
      70             :       ::com::sun::star::awt::XControl,
      71             :       ::com::sun::star::awt::XWindow,
      72             :       ::com::sun::star::awt::XFocusListener,
      73             :       ::com::sun::star::awt::XView >
      74             : {
      75             : public:
      76             :     // ::com::sun::star::awt::XControl
      77           0 :     virtual void SAL_CALL setContext( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xContext ) throw( ::com::sun::star::uno::RuntimeException )
      78           0 :     { _xContext = xContext; }
      79           0 :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getContext() throw( ::com::sun::star::uno::RuntimeException )
      80           0 :     { return _xContext; }
      81             : 
      82             :     virtual sal_Bool SAL_CALL setModel( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > & Model ) throw( ::com::sun::star::uno::RuntimeException ) = 0;
      83             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > SAL_CALL getModel() throw( ::com::sun::star::uno::RuntimeException ) = 0;
      84             : 
      85           0 :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XView > SAL_CALL getView() throw( ::com::sun::star::uno::RuntimeException )
      86           0 :     { return (::com::sun::star::awt::XView*)this; }
      87             : 
      88           0 :     virtual sal_Bool SAL_CALL isTransparent() throw( ::com::sun::star::uno::RuntimeException )
      89           0 :     { return sal_False; }
      90             : 
      91             :     virtual void SAL_CALL setDesignMode( sal_Bool bOn ) throw( ::com::sun::star::uno::RuntimeException );
      92           0 :     virtual sal_Bool SAL_CALL isDesignMode() throw( ::com::sun::star::uno::RuntimeException )
      93           0 :     { return _bInDesignMode; }
      94             : 
      95             :     virtual void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit > & xToolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > & Parent) throw( ::com::sun::star::uno::RuntimeException );
      96           0 :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > SAL_CALL getPeer() throw( ::com::sun::star::uno::RuntimeException )
      97           0 :     { return _xPeer; }
      98             : 
      99             :     // ::com::sun::star::awt::XWindow
     100             :     virtual void SAL_CALL setVisible( sal_Bool bVisible ) throw( ::com::sun::star::uno::RuntimeException );
     101             :     virtual void SAL_CALL setEnable( sal_Bool bEnable ) throw( ::com::sun::star::uno::RuntimeException );
     102             :     virtual void SAL_CALL setFocus(void) throw( ::com::sun::star::uno::RuntimeException );
     103             : 
     104             :     virtual void SAL_CALL setPosSize( sal_Int32 nX_, sal_Int32 nY_, sal_Int32 nWidth_, sal_Int32 nHeight_, sal_Int16 nFlags ) throw( ::com::sun::star::uno::RuntimeException );
     105             :     virtual ::com::sun::star::awt::Rectangle SAL_CALL getPosSize(void) throw( ::com::sun::star::uno::RuntimeException );
     106             : 
     107             :     virtual void SAL_CALL addWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener > & l ) throw( ::com::sun::star::uno::RuntimeException );
     108             :     virtual void SAL_CALL removeWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener > & l ) throw( ::com::sun::star::uno::RuntimeException );
     109             :     virtual void SAL_CALL addFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener > & l ) throw( ::com::sun::star::uno::RuntimeException );
     110             :     virtual void SAL_CALL removeFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener > & l ) throw( ::com::sun::star::uno::RuntimeException );
     111             :     virtual void SAL_CALL addKeyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener > & l ) throw( ::com::sun::star::uno::RuntimeException );
     112             :     virtual void SAL_CALL removeKeyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener > & l ) throw( ::com::sun::star::uno::RuntimeException );
     113             :     virtual void SAL_CALL addMouseListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener > & l ) throw( ::com::sun::star::uno::RuntimeException );
     114             :     virtual void SAL_CALL removeMouseListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener > & l ) throw( ::com::sun::star::uno::RuntimeException );
     115             :     virtual void SAL_CALL addMouseMotionListener( const Reference< ::com::sun::star::awt::XMouseMotionListener > & l ) throw( RuntimeException );
     116             :     virtual void SAL_CALL removeMouseMotionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener > & l ) throw( ::com::sun::star::uno::RuntimeException );
     117             :     virtual void SAL_CALL addPaintListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener > & l ) throw( ::com::sun::star::uno::RuntimeException );
     118             :     virtual void SAL_CALL removePaintListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener > & l ) throw( ::com::sun::star::uno::RuntimeException );
     119             : 
     120             :     // ::com::sun::star::lang::XEventListener
     121             :     virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject & rSource ) throw( ::com::sun::star::uno::RuntimeException );
     122             :     // ::com::sun::star::awt::XFocusListener
     123             :     virtual void SAL_CALL focusGained( const ::com::sun::star::awt::FocusEvent & rEvt ) throw( ::com::sun::star::uno::RuntimeException );
     124             :     virtual void SAL_CALL focusLost( const ::com::sun::star::awt::FocusEvent & rEvt ) throw( ::com::sun::star::uno::RuntimeException );
     125             : 
     126             :     // ::com::sun::star::lang::XComponent
     127             :     virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & l ) throw( ::com::sun::star::uno::RuntimeException );
     128             :     virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & l ) throw( ::com::sun::star::uno::RuntimeException );
     129             : 
     130             :     virtual void SAL_CALL dispose() throw( ::com::sun::star::uno::RuntimeException );
     131             : 
     132             :     // ::com::sun::star::awt::XView
     133           0 :     virtual sal_Bool SAL_CALL setGraphics( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > & /*aDevice*/ ) throw( ::com::sun::star::uno::RuntimeException )
     134           0 :     { return sal_False; }
     135           0 :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > SAL_CALL getGraphics(void) throw( ::com::sun::star::uno::RuntimeException )
     136           0 :     { return ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > (); }
     137             : 
     138           0 :     virtual ::com::sun::star::awt::Size SAL_CALL getSize(void) throw( ::com::sun::star::uno::RuntimeException )
     139           0 :     { return ::com::sun::star::awt::Size(_nWidth, _nHeight); }
     140             : 
     141             :     virtual void SAL_CALL draw( sal_Int32 x, sal_Int32 y ) throw( ::com::sun::star::uno::RuntimeException );
     142             :     virtual void SAL_CALL setZoom( float ZoomX, float ZoomY ) throw( ::com::sun::star::uno::RuntimeException );
     143             : 
     144             : public:
     145             :                                 PluginControl_Impl();
     146             :     virtual                     ~PluginControl_Impl();
     147             : 
     148             :     MRCListenerMultiplexerHelper* getMultiplexer();
     149             : 
     150             : protected:
     151             :     void                        releasePeer();
     152             : 
     153             : protected:
     154             :     ::std::list< Reference< ::com::sun::star::lang::XEventListener > >  _aDisposeListeners;
     155             :     MRCListenerMultiplexerHelper*       _pMultiplexer;
     156             : 
     157             :     Reference< XInterface >                         _xContext;
     158             : 
     159             :     sal_Int32                               _nX;
     160             :     sal_Int32                               _nY;
     161             :     sal_Int32                               _nWidth;
     162             :     sal_Int32                               _nHeight;
     163             :     sal_Int16                               _nFlags;
     164             : 
     165             :     sal_Bool                                _bVisible;
     166             :     sal_Bool                                _bInDesignMode;
     167             :     sal_Bool                                _bEnable;
     168             : 
     169             :     SystemChildWindow*                  _pSysChild;
     170             :     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >                      _xPeer;
     171             :     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >                          _xPeerWindow;
     172             : 
     173             :     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >                          _xParentWindow;
     174             :     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >                      _xParentPeer;
     175             : };
     176             : 
     177             : #endif
     178             : 
     179             : 
     180             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10