1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef INCLUDED_SLIDESHOW_PAIRANIMATION_HXX
25 #define INCLUDED_SLIDESHOW_PAIRANIMATION_HXX
26 
27 #include "animation.hxx"
28 #include <basegfx/tuple/b2dtuple.hxx>
29 
30 
31 /* Definition of PairAnimation interface */
32 
33 namespace slideshow
34 {
35     namespace internal
36     {
37         /** Interface defining a pair of numbers animation.
38 
39         	This interface is a specialization of the Animation
40         	interface, and is used to animate attributes representable
41         	by a pair of floating point values (e.g. a position or a
42         	size).
43          */
44         class PairAnimation : public Animation
45         {
46         public:
47             typedef ::basegfx::B2DTuple ValueType;
48 
49             /** Set the animation to the given value
50 
51                 @param rValue
52                 Current animation value.
53              */
54             virtual bool operator()( const ValueType& rValue ) = 0;
55 
56             /** Request the underlying value for this animation.
57 
58             	This is necessary for pure To or By animations, as the
59             	Activity cannot determine a sensible start value
60             	otherwise.
61 
62                 @attention Note that you are only permitted to query
63                 for the underlying value, if the animation has actually
64                 been started (via start() call).
65              */
66             virtual ValueType getUnderlyingValue() const = 0;
67         };
68 
69         typedef ::boost::shared_ptr< PairAnimation > PairAnimationSharedPtr;
70 
71     }
72 }
73 
74 #endif /* INCLUDED_SLIDESHOW_PAIRANIMATION_HXX */
75