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