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 INCLUDED_TOOLKIT_AWT_VCLXTABPAGECONTAINER_HXX
21 : #define INCLUDED_TOOLKIT_AWT_VCLXTABPAGECONTAINER_HXX
22 :
23 : #include <toolkit/dllapi.h>
24 : #include <com/sun/star/beans/PropertyValues.hpp>
25 : #include <com/sun/star/beans/XPropertySet.hpp>
26 : #include <com/sun/star/beans/PropertyValue.hpp>
27 : #include <com/sun/star/beans/PropertyState.hpp>
28 : #include <com/sun/star/beans/XPropertySetInfo.hpp>
29 : #include <com/sun/star/container/XContainerListener.hpp>
30 : #include <toolkit/awt/vclxwindow.hxx>
31 : #include <com/sun/star/awt/tab/XTabPageContainer.hpp>
32 : #include <toolkit/helper/listenermultiplexer.hxx>
33 : #include <cppuhelper/implbase2.hxx>
34 : #include <toolkit/awt/vclxcontainer.hxx>
35 :
36 :
37 : typedef ::cppu::ImplInheritanceHelper2 < VCLXContainer
38 : , ::com::sun::star::awt::tab::XTabPageContainer
39 : , ::com::sun::star::container::XContainerListener
40 : > VCLXTabPageContainer_Base;
41 : class VCLXTabPageContainer : public VCLXTabPageContainer_Base
42 : {
43 : public:
44 : VCLXTabPageContainer();
45 : virtual ~VCLXTabPageContainer();
46 :
47 : // ::com::sun::star::awt::XView
48 : void SAL_CALL draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
49 :
50 : // ::com::sun::star::awt::XDevice,
51 : ::com::sun::star::awt::DeviceInfo SAL_CALL getInfo() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
52 :
53 : // ::com::sun::star::awt::grid::XTabPageContainer
54 : virtual ::sal_Int16 SAL_CALL getActiveTabPageID() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
55 : virtual void SAL_CALL setActiveTabPageID( ::sal_Int16 _activetabpageid ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
56 : virtual ::sal_Int16 SAL_CALL getTabPageCount( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
57 : virtual sal_Bool SAL_CALL isTabPageActive( ::sal_Int16 tabPageIndex ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
58 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL getTabPage( ::sal_Int16 tabPageIndex ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
59 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL getTabPageByID( ::sal_Int16 tabPageID ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
60 : virtual void SAL_CALL addTabPageContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
61 : virtual void SAL_CALL removeTabPageContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
62 :
63 : static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds );
64 0 : virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) SAL_OVERRIDE { return ImplGetPropertyIds( aIds ); }
65 :
66 : virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
67 : virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
68 : virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
69 : virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
70 :
71 : // ::com::sun::star::awt::XVclWindowPeer
72 : void SAL_CALL setProperty( const OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
73 : protected:
74 : virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) SAL_OVERRIDE;
75 : private:
76 : TabPageListenerMultiplexer m_aTabPageListeners;
77 : ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPage > > m_aTabPages;
78 : };
79 : #endif // INCLUDED_TOOLKIT_AWT_VCLXTABPAGECONTAINER_HXX
80 :
81 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|