Crazy Eddie's GUI System  0.8.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Animation_xmlHandler.h
1 /***********************************************************************
2  filename: CEGUIAnimation_xmlHandler.h
3  created: Wed Aug 11 2010
4  author: Paul D Turner <paul@cegui.org.uk>
5 *************************************************************************/
6 /***************************************************************************
7  * Copyright (C) 2004 - 2010 Paul D Turner & The CEGUI Development Team
8  *
9  * Permission is hereby granted, free of charge, to any person obtaining
10  * a copy of this software and associated documentation files (the
11  * "Software"), to deal in the Software without restriction, including
12  * without limitation the rights to use, copy, modify, merge, publish,
13  * distribute, sublicense, and/or sell copies of the Software, and to
14  * permit persons to whom the Software is furnished to do so, subject to
15  * the following conditions:
16  *
17  * The above copyright notice and this permission notice shall be
18  * included in all copies or substantial portions of the Software.
19  *
20  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23  * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
24  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26  * OTHER DEALINGS IN THE SOFTWARE.
27  ***************************************************************************/
28 #ifndef _CEGUIAnimation_xmlHandler_h_
29 #define _CEGUIAnimation_xmlHandler_h_
30 
31 #include "CEGUI/ChainedXMLHandler.h"
32 #include "CEGUI/String.h"
33 
34 // Start of CEGUI namespace section
35 namespace CEGUI
36 {
38 class CEGUIEXPORT Animation_xmlHandler : public ChainedXMLHandler
39 {
40 public:
42  static const String ElementName;
43 
45  virtual ~Animation_xmlHandler();
46 
47  // XMLHandler overrides
48  const String& getSchemaName() const;
49  const String& getDefaultResourceGroup() const;
50 
51 protected:
52  // implement ChainedXMLHandler interface.
53  void elementStartLocal(const String& element,
54  const XMLAttributes& attributes);
55  void elementEndLocal(const String& element);
56 };
57 
58 //----------------------------------------------------------------------------//
61 {
62 public:
64  static const String ElementName;
65 
66  static const String NameAttribute;
67  static const String DurationAttribute;
68 
69  static const String ReplayModeAttribute;
70  static const String ReplayModeOnce;
71  static const String ReplayModeLoop;
72  static const String ReplayModeBounce;
73 
74  static const String AutoStartAttribute;
75 
76  AnimationDefinitionHandler(const XMLAttributes& attributes,
77  const String& name_prefix);
78  virtual ~AnimationDefinitionHandler();
79 
80 protected:
81  // implement ChainedXMLHandler interface.
82  void elementStartLocal(const String& element,
83  const XMLAttributes& attributes);
84  void elementEndLocal(const String& element);
85 
88 };
89 
90 //----------------------------------------------------------------------------//
92 class CEGUIEXPORT AnimationAffectorHandler : public ChainedXMLHandler
93 {
94 public:
96  static const String ElementName;
97 
98  static const String TargetPropertyAttribute;
99  static const String InterpolatorAttribute;
100 
101  static const String ApplicationMethodAttribute;
102  static const String ApplicationMethodAbsolute;
103  static const String ApplicationMethodRelative;
104  static const String ApplicationMethodRelativeMultiply;
105 
106  AnimationAffectorHandler(const XMLAttributes& attributes,
107  Animation& anim);
108  virtual ~AnimationAffectorHandler();
109 
110 protected:
111  // implement ChainedXMLHandler interface.
112  void elementStartLocal(const String& element,
113  const XMLAttributes& attributes);
114  void elementEndLocal(const String& element);
115 
118 };
119 
120 //----------------------------------------------------------------------------//
122 class CEGUIEXPORT AnimationKeyFrameHandler : public ChainedXMLHandler
123 {
124 public:
126  static const String ElementName;
127 
128  static const String PositionAttribute;
129  static const String ValueAttribute;
130  static const String SourcePropertyAttribute;
131 
132  static const String ProgressionAttribute;
133  static const String ProgressionLinear;
134  static const String ProgressionDiscrete;
135  static const String ProgressionQuadraticAccelerating;
136  static const String ProgressionQuadraticDecelerating;
137 
138  AnimationKeyFrameHandler(const XMLAttributes& attributes,
139  Affector& affector);
140  virtual ~AnimationKeyFrameHandler();
141 
142 protected:
143  // implement ChainedXMLHandler interface.
144  void elementStartLocal(const String& element,
145  const XMLAttributes& attributes);
146  void elementEndLocal(const String& element);
147 };
148 
149 //----------------------------------------------------------------------------//
152 {
153 public:
155  static const String ElementName;
156 
157  static const String EventAttribute;
158  static const String ActionAttribute;
159 
161  Animation& anim);
162  virtual ~AnimationSubscriptionHandler();
163 
164 protected:
165  // implement ChainedXMLHandler interface.
166  void elementStartLocal(const String& element,
167  const XMLAttributes& attributes);
168  void elementEndLocal(const String& element);
169 };
170 
171 } // End of CEGUI namespace section
172 
173 #endif // end of guard _CEGUIAnimation_xmlHandler_h_
174