/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 3 * only, as published by the Free Software Foundation. * * OpenOffice.org is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License version 3 for more details * (a copy is included in the LICENSE file that accompanied this code). * * You should have received a copy of the GNU Lesser General Public License * version 3 along with OpenOffice.org. If not, see * * for a copy of the LGPLv3 License. * ************************************************************************/ #ifndef _UNOCONTROLS_BASECONTAINERCONTROL_CTRL_HXX #define _UNOCONTROLS_BASECONTAINERCONTROL_CTRL_HXX //____________________________________________________________________________________________________________ // includes of other projects //____________________________________________________________________________________________________________ #include #include #include #include #include #include #include #include #include #include #include //____________________________________________________________________________________________________________ // includes of my own project //____________________________________________________________________________________________________________ #include "basecontrol.hxx" //____________________________________________________________________________________________________________ // "namespaces" //____________________________________________________________________________________________________________ namespace unocontrols{ //____________________________________________________________________________________________________________ // structs, types, forwards //____________________________________________________________________________________________________________ struct IMPL_ControlInfo { ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > xControl ; ::rtl::OUString sName ; }; //____________________________________________________________________________________________________________ // classes //____________________________________________________________________________________________________________ class BaseContainerControl : public ::com::sun::star::awt::XControlModel , public ::com::sun::star::awt::XControlContainer , public BaseControl { //____________________________________________________________________________________________________________ // public methods //____________________________________________________________________________________________________________ public: //________________________________________________________________________________________________________ // construct/destruct //________________________________________________________________________________________________________ /**_______________________________________________________________________________________________________ @short - @descr - @seealso - @param - @return - @onerror - */ BaseContainerControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory ); /**_______________________________________________________________________________________________________ @short - @descr - @seealso - @param - @return - @onerror - */ virtual ~BaseContainerControl(); //________________________________________________________________________________________________________ // XInterface //________________________________________________________________________________________________________ /**_______________________________________________________________________________________________________ @short give answer, if interface is supported @descr The interfaces are searched by type. @seealso XInterface @param "rType" is the type of searched interface. @return Any information about found interface @onerror A RuntimeException is thrown. */ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw( ::com::sun::star::uno::RuntimeException ); //________________________________________________________________________________________________________ // XTypeProvider //________________________________________________________________________________________________________ /**_______________________________________________________________________________________________________ @short get information about supported interfaces @descr - @seealso XTypeProvider @param - @return Sequence of types of all supported interfaces @onerror A RuntimeException is thrown. */ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw( ::com::sun::star::uno::RuntimeException ); //________________________________________________________________________________________________________ // XAggregation //________________________________________________________________________________________________________ /**_______________________________________________________________________________________________________ @short - @descr - @seealso - @param - @return - @onerror - */ virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& aType ) throw( ::com::sun::star::uno::RuntimeException ); //________________________________________________________________________________________________________ // XControl //________________________________________________________________________________________________________ /**_______________________________________________________________________________________________________ @short - @descr - @seealso - @param - @return - @onerror - */ 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 >& xParent ) throw( ::com::sun::star::uno::RuntimeException ); /**_______________________________________________________________________________________________________ @short - @descr - @seealso - @param - @return - @onerror - */ virtual sal_Bool SAL_CALL setModel( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& xModel ) throw( ::com::sun::star::uno::RuntimeException ); /**_______________________________________________________________________________________________________ @short - @descr - @seealso - @param - @return - @onerror - */ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > SAL_CALL getModel() throw( ::com::sun::star::uno::RuntimeException ); //________________________________________________________________________________________________________ // XComponent //________________________________________________________________________________________________________ /**_______________________________________________________________________________________________________ @short - @descr - @seealso - @param - @return - @onerror - */ virtual void SAL_CALL dispose() throw( ::com::sun::star::uno::RuntimeException ); //________________________________________________________________________________________________________ // XEventListener //________________________________________________________________________________________________________ /**_______________________________________________________________________________________________________ @short - @descr - @seealso - @param - @return - @onerror - */ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& rEvent ) throw( ::com::sun::star::uno::RuntimeException ); //________________________________________________________________________________________________________ // XControlContainer //________________________________________________________________________________________________________ /**_______________________________________________________________________________________________________ @short - @descr - @seealso - @param - @return - @onerror - */ virtual void SAL_CALL addControl( const ::rtl::OUString& sName , const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& xControl ) throw( ::com::sun::star::uno::RuntimeException ); /**_______________________________________________________________________________________________________ @short - @descr - @seealso - @param - @return - @onerror - */ virtual void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw( ::com::sun::star::uno::RuntimeException ); /**_______________________________________________________________________________________________________ @short - @descr - @seealso - @param - @return - @onerror - */ virtual void SAL_CALL removeControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& xControl ) throw( ::com::sun::star::uno::RuntimeException ); /**_______________________________________________________________________________________________________ @short - @descr - @seealso - @param - @return - @onerror - */ virtual void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw( ::com::sun::star::uno::RuntimeException ); /**_______________________________________________________________________________________________________ @short - @descr - @seealso - @param - @return - @onerror - */ virtual void SAL_CALL setStatusText( const ::rtl::OUString& sStatusText ) throw( ::com::sun::star::uno::RuntimeException ); /**_______________________________________________________________________________________________________ @short - @descr - @seealso - @param - @return - @onerror - */ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > SAL_CALL getControl( const ::rtl::OUString& sName ) throw( ::com::sun::star::uno::RuntimeException ); /**_______________________________________________________________________________________________________ @short - @descr - @seealso - @param - @return - @onerror - */ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > > SAL_CALL getControls() throw( ::com::sun::star::uno::RuntimeException ); //________________________________________________________________________________________________________ // XUnoControlContainer //________________________________________________________________________________________________________ /**_______________________________________________________________________________________________________ @short - @descr - @seealso - @param - @return - @onerror - */ virtual void SAL_CALL addTabController( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController >& xTabController ) throw( ::com::sun::star::uno::RuntimeException ); /**_______________________________________________________________________________________________________ @short - @descr - @seealso - @param - @return - @onerror - */ virtual void SAL_CALL removeTabController( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController >& xTabController ) throw( ::com::sun::star::uno::RuntimeException ); /**_______________________________________________________________________________________________________ @short - @descr - @seealso - @param - @return - @onerror - */ virtual void SAL_CALL setTabControllers( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController > >& xTabControllers ) throw( ::com::sun::star::uno::RuntimeException ); /**_______________________________________________________________________________________________________ @short - @descr - @seealso - @param - @return - @onerror - */ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController > > SAL_CALL getTabControllers() throw( ::com::sun::star::uno::RuntimeException ); //________________________________________________________________________________________________________ // XWindow //________________________________________________________________________________________________________ /**_______________________________________________________________________________________________________ @short - @descr - @seealso - @param - @return - @onerror - */ virtual void SAL_CALL setVisible( sal_Bool bVisible ) throw( ::com::sun::star::uno::RuntimeException ); //____________________________________________________________________________________________________________ // protected methods //____________________________________________________________________________________________________________ protected: using OComponentHelper::disposing; /**_______________________________________________________________________________________________________ @short @descr @seealso @param @return @onerror */ virtual ::com::sun::star::awt::WindowDescriptor* impl_getWindowDescriptor( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& xParentPeer ); /**_______________________________________________________________________________________________________ @short @descr @seealso @param @return @onerror */ virtual void impl_paint( sal_Int32 nX , sal_Int32 nY , const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics >& xGraphics ); //____________________________________________________________________________________________________________ // private methods //____________________________________________________________________________________________________________ private: /**_______________________________________________________________________________________________________ @short @descr @seealso @param @return @onerror */ void impl_activateTabControllers(); /**_______________________________________________________________________________________________________ @short @descr @seealso @param @return @onerror */ void impl_cleanMemory(); //____________________________________________________________________________________________________________ // private variables //____________________________________________________________________________________________________________ private: // list of pointer of "struct IMPL_ControlInfo" to hold child-controls ::std::vector< IMPL_ControlInfo* > maControlInfoList; // list of references of XTabController to hold tab-order in this container ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController > > m_xTabControllerList ; ::cppu::OMultiTypeInterfaceContainerHelper m_aListeners ; }; // class BaseContainerControl } // namespace unocontrols #endif // ifndef _UNOCONTROLS_BASECONTAINERCONTROL_CTRL_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */