Crazy Eddie's GUI System  0.8.7
KeyFrame.h
1 /***********************************************************************
2  created: 7/8/2010
3  author: Martin Preisler
4 
5  purpose: Defines the interface for the KeyFrame class
6 *************************************************************************/
7 /***************************************************************************
8  * Copyright (C) 2004 - 2010 Paul D Turner & The CEGUI Development Team
9  *
10  * Permission is hereby granted, free of charge, to any person obtaining
11  * a copy of this software and associated documentation files (the
12  * "Software"), to de/al in the Software without restriction, including
13  * without limitation the rights to use, copy, modify, merge, publish,
14  * distribute, sublicense, and/or sell copies of the Software, and to
15  * permit persons to whom the Software is furnished to do so, subject to
16  * the following conditions:
17  *
18  * The above copyright notice and this permission notice shall be
19  * included in all copies or substantial portions of the Software.
20  *
21  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24  * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
25  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
26  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27  * OTHER DEALINGS IN THE SOFTWARE.
28  ***************************************************************************/
29 #ifndef _CEGUIKeyFrame_h_
30 #define _CEGUIKeyFrame_h_
31 
32 #include "CEGUI/String.h"
33 
34 // Start of CEGUI namespace section
35 namespace CEGUI
36 {
37 
49 class CEGUIEXPORT KeyFrame :
50  public AllocatedObject<KeyFrame>
51 {
52 public:
57  {
68  P_Discrete
69  };
70 
72  KeyFrame(Affector* parent, float position);
73 
75  ~KeyFrame(void);
76 
81  Affector* getParent() const;
82 
90  size_t getIdxInParent() const;
91 
96  void moveToPosition(float newPosition);
97 
102  float getPosition() const;
103 
114  void setValue(const String& value);
115 
120  const String& getValue() const;
121 
134  void setSourceProperty(const String& sourceProperty);
135 
140  const String& getSourceProperty() const;
141 
153  const String& getValueForAnimation(AnimationInstance* instance) const;
154 
167  void setProgression(Progression p);
168 
173  Progression getProgression() const;
174 
180  float alterInterpolationPosition(float position);
181 
187  void savePropertyValue(AnimationInstance* instance);
188 
199  void notifyPositionChanged(float newPosition);
200 
208  void writeXMLToStream(XMLSerializer& xml_stream) const;
209 
210 private:
212  Affector* d_parent;
214  float d_position;
215 
217  String d_value;
219  String d_sourceProperty;
221  Progression d_progression;
222 };
223 
224 } // End of CEGUI namespace section
225 
226 #endif // end of guard _CEGUIKeyFrame_h_
227 
Progression
Definition: KeyFrame.h:56
Definition: MemoryAllocatedObject.h:109
Defines a 'key frame' class.
Definition: KeyFrame.h:49
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
Defines an 'affector' class.
Definition: Affector.h:55
progress is accelerated, starts slow and speeds up
Definition: KeyFrame.h:61
Class used to create XML Document.
Definition: XMLSerializer.h:85
linear progression
Definition: KeyFrame.h:59
Defines an 'animation instance' class.
Definition: AnimationInstance.h:73
String class used within the GUI system.
Definition: String.h:62
progress is decelerated, starts fast and slows down
Definition: KeyFrame.h:63