1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef INCLUDED_SLIDESHOW_CONTINUOUSKEYTIMEACTIVITYBASE_HXX 29 #define INCLUDED_SLIDESHOW_CONTINUOUSKEYTIMEACTIVITYBASE_HXX 30 31 #include "simplecontinuousactivitybase.hxx" 32 33 #include <basegfx/tools/keystoplerp.hxx> 34 #include <vector> 35 36 37 namespace slideshow 38 { 39 namespace internal 40 { 41 /** Interpolated, key-times animation. 42 43 This class implements an interpolated key-times 44 animation, with continuous time. 45 */ 46 class ContinuousKeyTimeActivityBase : public SimpleContinuousActivityBase 47 { 48 public: 49 ContinuousKeyTimeActivityBase( const ActivityParameters& rParms ); 50 51 using SimpleContinuousActivityBase::perform; 52 53 /** Hook for derived classes 54 55 This method will be called from perform(), already 56 equipped with the modified time (nMinNumberOfFrames, repeat, 57 acceleration and deceleration taken into account). 58 59 @param nIndex 60 Current index of the key times/key values. 61 62 @param nFractionalIndex 63 Fractional value from the [0,1] range, specifying 64 the position between nIndex and nIndex+1. 65 66 @param nRepeatCount 67 Number of full repeats already performed 68 */ 69 virtual void perform( sal_uInt32 nIndex, 70 double nFractionalIndex, 71 sal_uInt32 nRepeatCount ) const = 0; 72 73 /// From SimpleContinuousActivityBase class 74 virtual void simplePerform( double nSimpleTime, 75 sal_uInt32 nRepeatCount ) const; 76 77 private: 78 const ::basegfx::tools::KeyStopLerp maLerper; 79 }; 80 } 81 } 82 83 #endif /* INCLUDED_SLIDESHOW_CONTINUOUSKEYTIMEACTIVITYBASE_HXX */ 84