Branch data 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 TOOLKIT_ANIMATEDIMAGES_HXX
21 : : #define TOOLKIT_ANIMATEDIMAGES_HXX
22 : :
23 : : #include "toolkit/controls/unocontrolbase.hxx"
24 : : #include "toolkit/controls/unocontrolmodel.hxx"
25 : :
26 : : #include <com/sun/star/awt/XAnimation.hpp>
27 : : #include <com/sun/star/awt/XAnimatedImages.hpp>
28 : : #include <com/sun/star/container/XContainerListener.hpp>
29 : :
30 : : #include <cppuhelper/implbase1.hxx>
31 : : #include <cppuhelper/implbase2.hxx>
32 : :
33 : : #include <boost/scoped_ptr.hpp>
34 : :
35 : : //......................................................................................................................
36 : : namespace toolkit
37 : : {
38 : : //......................................................................................................................
39 : :
40 : : //==================================================================================================================
41 : : //=
42 : : //==================================================================================================================
43 : : typedef ::cppu::AggImplInheritanceHelper2 < UnoControlBase
44 : : , ::com::sun::star::awt::XAnimation
45 : : , ::com::sun::star::container::XContainerListener
46 : : > AnimatedImagesControl_Base;
47 : :
48 [ # # ]: 0 : class AnimatedImagesControl : public AnimatedImagesControl_Base
49 : : {
50 : : public:
51 : : AnimatedImagesControl( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > const & i_factory );
52 : : ::rtl::OUString GetComponentServiceName();
53 : :
54 : : // XAnimation
55 : : virtual void SAL_CALL startAnimation( ) throw (::com::sun::star::uno::RuntimeException);
56 : : virtual void SAL_CALL stopAnimation( ) throw (::com::sun::star::uno::RuntimeException);
57 : : virtual ::sal_Bool SAL_CALL isAnimationRunning( ) throw (::com::sun::star::uno::RuntimeException);
58 : :
59 : : // XServiceInfo
60 : : ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
61 : : ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
62 : :
63 : : // XControl
64 : : sal_Bool SAL_CALL setModel( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& i_rModel ) throw ( ::com::sun::star::uno::RuntimeException );
65 : : void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& i_toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& i_parentPeer ) throw(::com::sun::star::uno::RuntimeException);
66 : :
67 : :
68 : : // XContainerListener
69 : : virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
70 : : virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
71 : : virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
72 : :
73 : : // XEventListener
74 : : virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& i_event ) throw (::com::sun::star::uno::RuntimeException);
75 : : };
76 : :
77 : : //==================================================================================================================
78 : : //= AnimatedImagesControlModel
79 : : //==================================================================================================================
80 : : struct AnimatedImagesControlModel_Data;
81 : : typedef ::cppu::AggImplInheritanceHelper1 < UnoControlModel
82 : : , ::com::sun::star::awt::XAnimatedImages
83 : : > AnimatedImagesControlModel_Base;
84 : : class AnimatedImagesControlModel : public AnimatedImagesControlModel_Base
85 : : {
86 : : public:
87 : : AnimatedImagesControlModel( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > const & i_factory );
88 : : AnimatedImagesControlModel( const AnimatedImagesControlModel& i_copySource );
89 : :
90 : : virtual UnoControlModel* Clone() const;
91 : :
92 : : // XPropertySet
93 : : ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
94 : :
95 : : // XPersistObject
96 : : ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
97 : :
98 : : // XServiceInfo
99 : : ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
100 : : ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
101 : :
102 : : // XAnimatedImages
103 : : virtual ::sal_Int32 SAL_CALL getStepTime() throw (::com::sun::star::uno::RuntimeException);
104 : : virtual void SAL_CALL setStepTime( ::sal_Int32 _steptime ) throw (::com::sun::star::uno::RuntimeException);
105 : : virtual ::sal_Bool SAL_CALL getAutoRepeat() throw (::com::sun::star::uno::RuntimeException);
106 : : virtual void SAL_CALL setAutoRepeat( ::sal_Bool _autorepeat ) throw (::com::sun::star::uno::RuntimeException);
107 : : virtual ::sal_Int16 SAL_CALL getScaleMode() throw (::com::sun::star::uno::RuntimeException);
108 : : virtual void SAL_CALL setScaleMode( ::sal_Int16 _scalemode ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
109 : : virtual ::sal_Int32 SAL_CALL getImageSetCount( ) throw (::com::sun::star::uno::RuntimeException);
110 : : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getImageSet( ::sal_Int32 i_index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
111 : : virtual void SAL_CALL insertImageSet( ::sal_Int32 i_index, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& i_imageURLs ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
112 : : virtual void SAL_CALL replaceImageSet( ::sal_Int32 i_index, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& i_imageURLs ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
113 : : virtual void SAL_CALL removeImageSet( ::sal_Int32 i_index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
114 : :
115 : : // XAnimatedImages::XContainer
116 : : virtual void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& i_listener ) throw (::com::sun::star::uno::RuntimeException);
117 : : virtual void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& i_listener ) throw (::com::sun::star::uno::RuntimeException);
118 : :
119 : : protected:
120 : : ~AnimatedImagesControlModel();
121 : :
122 : : ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
123 : : ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
124 : : void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception);
125 : :
126 : : private:
127 : : ::boost::scoped_ptr< AnimatedImagesControlModel_Data >
128 : : m_pData;
129 : : };
130 : :
131 : : //......................................................................................................................
132 : : } // namespace toolkit
133 : : //......................................................................................................................
134 : :
135 : : #endif // TOOLKIT_ANIMATEDIMAGES_HXX
136 : :
137 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|