Version 6.4.0.3, tag libreoffice-6.4.0.3
[LibreOffice.git] / include / toolkit / controls / animatedimages.hxx
blobd6bac5fe600990295e8a58b1599e83711c0d6d6e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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_ANIMATEDIMAGES_HXX
21 #define INCLUDED_TOOLKIT_CONTROLS_ANIMATEDIMAGES_HXX
23 #include <toolkit/controls/unocontrolmodel.hxx>
24 #include <com/sun/star/awt/XAnimatedImages.hpp>
25 #include <cppuhelper/implbase1.hxx>
26 #include <memory>
28 namespace com { namespace sun { namespace star { namespace container { class XContainerListener; } } } }
29 namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
31 namespace toolkit
35 struct AnimatedImagesControlModel_Data;
36 typedef ::cppu::AggImplInheritanceHelper1 < UnoControlModel
37 , css::awt::XAnimatedImages
38 > AnimatedImagesControlModel_Base;
39 class AnimatedImagesControlModel : public AnimatedImagesControlModel_Base
41 public:
42 AnimatedImagesControlModel( css::uno::Reference< css::uno::XComponentContext > const & i_factory );
43 AnimatedImagesControlModel( const AnimatedImagesControlModel& i_copySource );
45 virtual rtl::Reference<UnoControlModel> Clone() const override;
47 // XPropertySet
48 css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
50 // XPersistObject
51 OUString SAL_CALL getServiceName() override;
53 // XServiceInfo
54 OUString SAL_CALL getImplementationName( ) override;
55 css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
57 // XAnimatedImages
58 virtual ::sal_Int32 SAL_CALL getStepTime() override;
59 virtual void SAL_CALL setStepTime( ::sal_Int32 _steptime ) override;
60 virtual sal_Bool SAL_CALL getAutoRepeat() override;
61 virtual void SAL_CALL setAutoRepeat( sal_Bool _autorepeat ) override;
62 virtual ::sal_Int16 SAL_CALL getScaleMode() override;
63 virtual void SAL_CALL setScaleMode( ::sal_Int16 _scalemode ) override;
64 virtual ::sal_Int32 SAL_CALL getImageSetCount( ) override;
65 virtual css::uno::Sequence< OUString > SAL_CALL getImageSet( ::sal_Int32 i_index ) override;
66 virtual void SAL_CALL insertImageSet( ::sal_Int32 i_index, const css::uno::Sequence< OUString >& i_imageURLs ) override;
67 virtual void SAL_CALL replaceImageSet( ::sal_Int32 i_index, const css::uno::Sequence< OUString >& i_imageURLs ) override;
68 virtual void SAL_CALL removeImageSet( ::sal_Int32 i_index ) override;
70 // XAnimatedImages::XContainer
71 virtual void SAL_CALL addContainerListener( const css::uno::Reference< css::container::XContainerListener >& i_listener ) override;
72 virtual void SAL_CALL removeContainerListener( const css::uno::Reference< css::container::XContainerListener >& i_listener ) override;
74 protected:
75 virtual ~AnimatedImagesControlModel() override;
77 css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const override;
78 ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
79 void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const css::uno::Any& rValue ) override;
81 private:
82 std::unique_ptr< AnimatedImagesControlModel_Data > m_xData;
86 } // namespace toolkit
89 #endif // INCLUDED_TOOLKIT_CONTROLS_ANIMATEDIMAGES_HXX
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */