1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_TOOLKIT_CONTROLS_TABPAGEMODEL_HXX
21 #define INCLUDED_TOOLKIT_CONTROLS_TABPAGEMODEL_HXX
23 #include <toolkit/controls/controlmodelcontainerbase.hxx>
24 #include <com/sun/star/awt/tab/XTabPageModel.hpp>
25 #include <com/sun/star/awt/tab/XTabPage.hpp>
26 #include <com/sun/star/resource/XStringResourceResolver.hpp>
27 #include <com/sun/star/lang/XInitialization.hpp>
28 #include <toolkit/helper/servicenames.hxx>
29 #include <toolkit/helper/macros.hxx>
30 #include <toolkit/controls/unocontrolcontainer.hxx>
31 #include <cppuhelper/basemutex.hxx>
33 #include <cppuhelper/implbase2.hxx>
35 class UnoControlTabPageModel
: public ControlModelContainerBase
38 ::com::sun::star::uno::Any
ImplGetDefaultValue( sal_uInt16 nPropId
) const SAL_OVERRIDE
;
39 ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper() SAL_OVERRIDE
;
41 UnoControlTabPageModel( ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
> const & i_factory
);
43 // ::com::sun::star::io::XPersistObject
44 OUString SAL_CALL
getServiceName() throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
46 // ::com::sun::star::beans::XMultiPropertySet
47 ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
49 virtual void SAL_CALL
initialize (const com::sun::star::uno::Sequence
<com::sun::star::uno::Any
>& rArguments
)
50 throw (com::sun::star::uno::Exception
, com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
53 OUString SAL_CALL
getImplementationName() throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
55 css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
59 // class UnoTabPageControl
61 typedef ::cppu::AggImplInheritanceHelper2
< ControlContainerBase
62 , ::com::sun::star::awt::tab::XTabPage
63 , ::com::sun::star::awt::XWindowListener
64 > UnoControlTabPage_Base
;
65 class UnoControlTabPage
: public UnoControlTabPage_Base
68 bool m_bWindowListener
;
71 UnoControlTabPage( const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& rxContext
);
72 virtual ~UnoControlTabPage();
73 OUString
GetComponentServiceName() SAL_OVERRIDE
;
75 void SAL_CALL
createPeer( const ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XToolkit
>& Toolkit
, const ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XWindowPeer
>& Parent
) throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
76 void SAL_CALL
disposing( const ::com::sun::star::lang::EventObject
& Source
) throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
77 void SAL_CALL
dispose() throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
79 // ::com::sun::star::awt::XWindowListener
80 virtual void SAL_CALL
windowResized( const ::com::sun::star::awt::WindowEvent
& e
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
81 virtual void SAL_CALL
windowMoved( const ::com::sun::star::awt::WindowEvent
& e
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
82 virtual void SAL_CALL
windowShown( const ::com::sun::star::lang::EventObject
& e
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
83 virtual void SAL_CALL
windowHidden( const ::com::sun::star::lang::EventObject
& e
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
84 // ::com::sun::star::lang::XServiceInfo
85 virtual OUString SAL_CALL
getImplementationName()
86 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
88 virtual sal_Bool SAL_CALL
supportsService(OUString
const & ServiceName
)
89 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
91 virtual css::uno::Sequence
<OUString
> SAL_CALL
getSupportedServiceNames()
92 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
95 #endif // INCLUDED_TOOLKIT_CONTROLS_TABPAGEMODEL_HXX
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */