Crazy Eddie's GUI System
0.8.4
|
00001 /*********************************************************************** 00002 created: Wed Aug 11 2010 00003 author: Paul D Turner <paul@cegui.org.uk> 00004 *************************************************************************/ 00005 /*************************************************************************** 00006 * Copyright (C) 2004 - 2010 Paul D Turner & The CEGUI Development Team 00007 * 00008 * Permission is hereby granted, free of charge, to any person obtaining 00009 * a copy of this software and associated documentation files (the 00010 * "Software"), to deal in the Software without restriction, including 00011 * without limitation the rights to use, copy, modify, merge, publish, 00012 * distribute, sublicense, and/or sell copies of the Software, and to 00013 * permit persons to whom the Software is furnished to do so, subject to 00014 * the following conditions: 00015 * 00016 * The above copyright notice and this permission notice shall be 00017 * included in all copies or substantial portions of the Software. 00018 * 00019 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00020 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00021 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 00022 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 00023 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 00024 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 00025 * OTHER DEALINGS IN THE SOFTWARE. 00026 ***************************************************************************/ 00027 #ifndef _CEGUIAnimation_xmlHandler_h_ 00028 #define _CEGUIAnimation_xmlHandler_h_ 00029 00030 #include "CEGUI/ChainedXMLHandler.h" 00031 #include "CEGUI/String.h" 00032 00033 // Start of CEGUI namespace section 00034 namespace CEGUI 00035 { 00037 class CEGUIEXPORT Animation_xmlHandler : public ChainedXMLHandler 00038 { 00039 public: 00041 static const String ElementName; 00042 00043 Animation_xmlHandler(); 00044 virtual ~Animation_xmlHandler(); 00045 00046 // XMLHandler overrides 00047 const String& getSchemaName() const; 00048 const String& getDefaultResourceGroup() const; 00049 00050 protected: 00051 // implement ChainedXMLHandler interface. 00052 void elementStartLocal(const String& element, 00053 const XMLAttributes& attributes); 00054 void elementEndLocal(const String& element); 00055 }; 00056 00057 //----------------------------------------------------------------------------// 00059 class CEGUIEXPORT AnimationDefinitionHandler : public ChainedXMLHandler 00060 { 00061 public: 00063 static const String ElementName; 00064 00065 static const String NameAttribute; 00066 static const String DurationAttribute; 00067 00068 static const String ReplayModeAttribute; 00069 static const String ReplayModeOnce; 00070 static const String ReplayModeLoop; 00071 static const String ReplayModeBounce; 00072 00073 static const String AutoStartAttribute; 00074 00075 AnimationDefinitionHandler(const XMLAttributes& attributes, 00076 const String& name_prefix); 00077 virtual ~AnimationDefinitionHandler(); 00078 00079 protected: 00080 // implement ChainedXMLHandler interface. 00081 void elementStartLocal(const String& element, 00082 const XMLAttributes& attributes); 00083 void elementEndLocal(const String& element); 00084 00086 Animation* d_anim; 00087 }; 00088 00089 //----------------------------------------------------------------------------// 00091 class CEGUIEXPORT AnimationAffectorHandler : public ChainedXMLHandler 00092 { 00093 public: 00095 static const String ElementName; 00096 00097 static const String TargetPropertyAttribute; 00098 static const String InterpolatorAttribute; 00099 00100 static const String ApplicationMethodAttribute; 00101 static const String ApplicationMethodAbsolute; 00102 static const String ApplicationMethodRelative; 00103 static const String ApplicationMethodRelativeMultiply; 00104 00105 AnimationAffectorHandler(const XMLAttributes& attributes, 00106 Animation& anim); 00107 virtual ~AnimationAffectorHandler(); 00108 00109 protected: 00110 // implement ChainedXMLHandler interface. 00111 void elementStartLocal(const String& element, 00112 const XMLAttributes& attributes); 00113 void elementEndLocal(const String& element); 00114 00116 Affector* d_affector; 00117 }; 00118 00119 //----------------------------------------------------------------------------// 00121 class CEGUIEXPORT AnimationKeyFrameHandler : public ChainedXMLHandler 00122 { 00123 public: 00125 static const String ElementName; 00126 00127 static const String PositionAttribute; 00128 static const String ValueAttribute; 00129 static const String SourcePropertyAttribute; 00130 00131 static const String ProgressionAttribute; 00132 static const String ProgressionLinear; 00133 static const String ProgressionDiscrete; 00134 static const String ProgressionQuadraticAccelerating; 00135 static const String ProgressionQuadraticDecelerating; 00136 00137 AnimationKeyFrameHandler(const XMLAttributes& attributes, 00138 Affector& affector); 00139 virtual ~AnimationKeyFrameHandler(); 00140 00141 protected: 00142 // implement ChainedXMLHandler interface. 00143 void elementStartLocal(const String& element, 00144 const XMLAttributes& attributes); 00145 void elementEndLocal(const String& element); 00146 }; 00147 00148 //----------------------------------------------------------------------------// 00150 class CEGUIEXPORT AnimationSubscriptionHandler : public ChainedXMLHandler 00151 { 00152 public: 00154 static const String ElementName; 00155 00156 static const String EventAttribute; 00157 static const String ActionAttribute; 00158 00159 AnimationSubscriptionHandler(const XMLAttributes& attributes, 00160 Animation& anim); 00161 virtual ~AnimationSubscriptionHandler(); 00162 00163 protected: 00164 // implement ChainedXMLHandler interface. 00165 void elementStartLocal(const String& element, 00166 const XMLAttributes& attributes); 00167 void elementEndLocal(const String& element); 00168 }; 00169 00170 } // End of CEGUI namespace section 00171 00172 #endif // end of guard _CEGUIAnimation_xmlHandler_h_ 00173