animationtiming.hxx (cdf0e10c) | animationtiming.hxx (090f0eb8) |
---|---|
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 * --- 14 unchanged lines hidden (view full) --- 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28#ifndef INCLUDED_DRAWINGLAYER_ANIMATION_ANIMATIONTIMING_HXX 29#define INCLUDED_DRAWINGLAYER_ANIMATION_ANIMATIONTIMING_HXX 30 | 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 * --- 14 unchanged lines hidden (view full) --- 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28#ifndef INCLUDED_DRAWINGLAYER_ANIMATION_ANIMATIONTIMING_HXX 29#define INCLUDED_DRAWINGLAYER_ANIMATION_ANIMATIONTIMING_HXX 30 |
31#include <sal/types.h> | 31#include <drawinglayer/drawinglayerdllapi.h> |
32#include <vector> 33 34////////////////////////////////////////////////////////////////////////////// 35 36namespace drawinglayer 37{ 38 namespace animation 39 { 40 ////////////////////////////////////////////////////////////////////////////// 41 | 32#include <vector> 33 34////////////////////////////////////////////////////////////////////////////// 35 36namespace drawinglayer 37{ 38 namespace animation 39 { 40 ////////////////////////////////////////////////////////////////////////////// 41 |
42 class AnimationEntry | 42 class DRAWINGLAYER_DLLPUBLIC AnimationEntry |
43 { 44 private: 45 AnimationEntry(const AnimationEntry&); 46 AnimationEntry& operator=(const AnimationEntry& rCandidate); 47 48 public: 49 AnimationEntry(); 50 virtual ~AnimationEntry(); 51 virtual AnimationEntry* clone() const = 0; 52 53 virtual bool operator==(const AnimationEntry& rCandidate) const = 0; 54 virtual double getDuration() const = 0; 55 virtual double getStateAtTime(double fTime) const = 0; 56 virtual double getNextEventTime(double fTime) const = 0; 57 }; 58 59 ////////////////////////////////////////////////////////////////////////////// 60 | 43 { 44 private: 45 AnimationEntry(const AnimationEntry&); 46 AnimationEntry& operator=(const AnimationEntry& rCandidate); 47 48 public: 49 AnimationEntry(); 50 virtual ~AnimationEntry(); 51 virtual AnimationEntry* clone() const = 0; 52 53 virtual bool operator==(const AnimationEntry& rCandidate) const = 0; 54 virtual double getDuration() const = 0; 55 virtual double getStateAtTime(double fTime) const = 0; 56 virtual double getNextEventTime(double fTime) const = 0; 57 }; 58 59 ////////////////////////////////////////////////////////////////////////////// 60 |
61 class AnimationEntryFixed : public AnimationEntry | 61 class DRAWINGLAYER_DLLPUBLIC AnimationEntryFixed : public AnimationEntry |
62 { 63 protected: 64 double mfDuration; 65 double mfState; 66 67 public: 68 AnimationEntryFixed(double fDuration, double fState = 0.0); 69 virtual ~AnimationEntryFixed(); 70 virtual AnimationEntry* clone() const; 71 72 virtual bool operator==(const AnimationEntry& rCandidate) const; 73 virtual double getDuration() const; 74 virtual double getStateAtTime(double fTime) const; 75 virtual double getNextEventTime(double fTime) const; 76 }; 77 78 ////////////////////////////////////////////////////////////////////////////// 79 | 62 { 63 protected: 64 double mfDuration; 65 double mfState; 66 67 public: 68 AnimationEntryFixed(double fDuration, double fState = 0.0); 69 virtual ~AnimationEntryFixed(); 70 virtual AnimationEntry* clone() const; 71 72 virtual bool operator==(const AnimationEntry& rCandidate) const; 73 virtual double getDuration() const; 74 virtual double getStateAtTime(double fTime) const; 75 virtual double getNextEventTime(double fTime) const; 76 }; 77 78 ////////////////////////////////////////////////////////////////////////////// 79 |
80 class AnimationEntryLinear : public AnimationEntry | 80 class DRAWINGLAYER_DLLPUBLIC AnimationEntryLinear : public AnimationEntry |
81 { 82 protected: 83 double mfDuration; 84 double mfFrequency; 85 double mfStart; 86 double mfStop; 87 88 public: --- 4 unchanged lines hidden (view full) --- 93 virtual bool operator==(const AnimationEntry& rCandidate) const; 94 virtual double getDuration() const; 95 virtual double getStateAtTime(double fTime) const; 96 virtual double getNextEventTime(double fTime) const; 97 }; 98 99 ////////////////////////////////////////////////////////////////////////////// 100 | 81 { 82 protected: 83 double mfDuration; 84 double mfFrequency; 85 double mfStart; 86 double mfStop; 87 88 public: --- 4 unchanged lines hidden (view full) --- 93 virtual bool operator==(const AnimationEntry& rCandidate) const; 94 virtual double getDuration() const; 95 virtual double getStateAtTime(double fTime) const; 96 virtual double getNextEventTime(double fTime) const; 97 }; 98 99 ////////////////////////////////////////////////////////////////////////////// 100 |
101 class AnimationEntryList : public AnimationEntry | 101 class DRAWINGLAYER_DLLPUBLIC AnimationEntryList : public AnimationEntry |
102 { 103 protected: 104 double mfDuration; 105 ::std::vector< AnimationEntry* > maEntries; 106 107 // helpers 108 sal_uInt32 impGetIndexAtTime(double fTime, double &rfAddedTime) const; 109 --- 6 unchanged lines hidden (view full) --- 116 void append(const AnimationEntry& rCandidate); 117 virtual double getDuration() const; 118 virtual double getStateAtTime(double fTime) const; 119 virtual double getNextEventTime(double fTime) const; 120 }; 121 122 ////////////////////////////////////////////////////////////////////////////// 123 | 102 { 103 protected: 104 double mfDuration; 105 ::std::vector< AnimationEntry* > maEntries; 106 107 // helpers 108 sal_uInt32 impGetIndexAtTime(double fTime, double &rfAddedTime) const; 109 --- 6 unchanged lines hidden (view full) --- 116 void append(const AnimationEntry& rCandidate); 117 virtual double getDuration() const; 118 virtual double getStateAtTime(double fTime) const; 119 virtual double getNextEventTime(double fTime) const; 120 }; 121 122 ////////////////////////////////////////////////////////////////////////////// 123 |
124 class AnimationEntryLoop : public AnimationEntryList | 124 class DRAWINGLAYER_DLLPUBLIC AnimationEntryLoop : public AnimationEntryList |
125 { 126 protected: 127 sal_uInt32 mnRepeat; 128 129 public: 130 AnimationEntryLoop(sal_uInt32 nRepeat = 0xffffffff); 131 virtual ~AnimationEntryLoop(); 132 virtual AnimationEntry* clone() const; --- 16 unchanged lines hidden --- | 125 { 126 protected: 127 sal_uInt32 mnRepeat; 128 129 public: 130 AnimationEntryLoop(sal_uInt32 nRepeat = 0xffffffff); 131 virtual ~AnimationEntryLoop(); 132 virtual AnimationEntry* clone() const; --- 16 unchanged lines hidden --- |