docthemes: Save themes def. to a file when added to ColorSets
[LibreOffice.git] / toolkit / inc / controls / animatedimages.hxx
blobfca49bfa39de54b97aa30594e7b693b9b6fa9ecc
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 #pragma once
22 #include <toolkit/controls/unocontrolmodel.hxx>
23 #include <com/sun/star/awt/XAnimatedImages.hpp>
24 #include <cppuhelper/implbase1.hxx>
26 namespace com::sun::star::container { class XContainerListener; }
27 namespace com::sun::star::uno { class XComponentContext; }
29 namespace toolkit
33 typedef ::cppu::AggImplInheritanceHelper1 < UnoControlModel
34 , css::awt::XAnimatedImages
35 > AnimatedImagesControlModel_Base;
36 class AnimatedImagesControlModel : public AnimatedImagesControlModel_Base
38 public:
39 AnimatedImagesControlModel( css::uno::Reference< css::uno::XComponentContext > const & i_factory );
40 AnimatedImagesControlModel( const AnimatedImagesControlModel& i_copySource );
42 virtual rtl::Reference<UnoControlModel> Clone() const override;
44 // XPropertySet
45 css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
47 // XPersistObject
48 OUString SAL_CALL getServiceName() override;
50 // XServiceInfo
51 OUString SAL_CALL getImplementationName( ) override;
52 css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
54 // XAnimatedImages
55 virtual ::sal_Int32 SAL_CALL getStepTime() override;
56 virtual void SAL_CALL setStepTime( ::sal_Int32 _steptime ) override;
57 virtual sal_Bool SAL_CALL getAutoRepeat() override;
58 virtual void SAL_CALL setAutoRepeat( sal_Bool _autorepeat ) override;
59 virtual ::sal_Int16 SAL_CALL getScaleMode() override;
60 virtual void SAL_CALL setScaleMode( ::sal_Int16 _scalemode ) override;
61 virtual ::sal_Int32 SAL_CALL getImageSetCount( ) override;
62 virtual css::uno::Sequence< OUString > SAL_CALL getImageSet( ::sal_Int32 i_index ) override;
63 virtual void SAL_CALL insertImageSet( ::sal_Int32 i_index, const css::uno::Sequence< OUString >& i_imageURLs ) override;
64 virtual void SAL_CALL replaceImageSet( ::sal_Int32 i_index, const css::uno::Sequence< OUString >& i_imageURLs ) override;
65 virtual void SAL_CALL removeImageSet( ::sal_Int32 i_index ) override;
67 // XAnimatedImages::XContainer
68 virtual void SAL_CALL addContainerListener( const css::uno::Reference< css::container::XContainerListener >& i_listener ) override;
69 virtual void SAL_CALL removeContainerListener( const css::uno::Reference< css::container::XContainerListener >& i_listener ) override;
71 protected:
72 virtual ~AnimatedImagesControlModel() override;
74 css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const override;
75 ::cppu::IPropertyArrayHelper& getInfoHelper() override;
76 void setFastPropertyValue_NoBroadcast(
77 std::unique_lock<std::mutex>& rGuard,
78 sal_Int32 nHandle, const css::uno::Any& rValue ) override;
80 private:
81 comphelper::OInterfaceContainerHelper4<css::container::XContainerListener> maContainerListeners;
82 std::vector< css::uno::Sequence< OUString > > maImageSets;
86 } // namespace toolkit
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */