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 _SDR_ANIMATION_ANIMATIONSTATE_HXX 25 #define _SDR_ANIMATION_ANIMATIONSTATE_HXX 26 27 #include <sal/types.h> 28 #include <vector> 29 #include <svx/sdr/animation/scheduler.hxx> 30 #include <drawinglayer/primitive2d/baseprimitive2d.hxx> 31 32 ////////////////////////////////////////////////////////////////////////////// 33 // predeclarations 34 35 namespace sdr 36 { 37 namespace contact 38 { 39 class ViewObjectContact; 40 } // end of namespace contact 41 } // end of namespace sdr 42 43 ////////////////////////////////////////////////////////////////////////////// 44 45 namespace sdr 46 { 47 namespace animation 48 { 49 class PrimitiveAnimation : public Event 50 { 51 protected: 52 // the animated VOC 53 sdr::contact::ViewObjectContact& mrVOContact; 54 55 // the vetor of animated primitives 56 drawinglayer::primitive2d::Primitive2DSequence maAnimatedPrimitives; 57 58 // local helpers 59 double getSmallestNextTime(double fCurrentTime); 60 void prepareNextEvent(); 61 62 public: 63 // basic constructor. 64 PrimitiveAnimation(sdr::contact::ViewObjectContact& rVOContact, const drawinglayer::primitive2d::Primitive2DSequence& rAnimatedPrimitives); 65 66 // destructor 67 virtual ~PrimitiveAnimation(); 68 69 // execute event, from base class Event 70 virtual void Trigger(sal_uInt32 nTime); 71 }; 72 } // end of namespace animation 73 } // end of namespace sdr 74 75 ////////////////////////////////////////////////////////////////////////////// 76 77 #endif //_SDR_ANIMATION_ANIMATIONSTATE_HXX 78 79 // eof 80