Source

cappuccino-docs / cappuccino docs / cappuccino.org / learn / documentation / _c_a_animation_8j_source.html

Full commit
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<!-- Mirrored from cappuccino.org/learn/documentation/_c_a_animation_8j_source.html by HTTrack Website Copier/3.x [XR&CO'2006], Mon, 20 Sep 2010 02:19:28 GMT -->
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Cappuccino API: AppKit/CoreAnimation/CAAnimation.j Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>AppKit/CoreAnimation/CAAnimation.j</h1><a href="_c_a_animation_8j.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * CAAnimation.j</span>
<a name="l00003"></a>00003 <span class="comment"> * AppKit</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * Created by Francisco Tolmasky.</span>
<a name="l00006"></a>00006 <span class="comment"> * Copyright 2008, 280 North, Inc.</span>
<a name="l00007"></a>00007 <span class="comment"> *</span>
<a name="l00008"></a>00008 <span class="comment"> * This library is free software; you can redistribute it and/or</span>
<a name="l00009"></a>00009 <span class="comment"> * modify it under the terms of the GNU Lesser General Public</span>
<a name="l00010"></a>00010 <span class="comment"> * License as published by the Free Software Foundation; either</span>
<a name="l00011"></a>00011 <span class="comment"> * version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00012"></a>00012 <span class="comment"> *</span>
<a name="l00013"></a>00013 <span class="comment"> * This library is distributed in the hope that it will be useful,</span>
<a name="l00014"></a>00014 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00015"></a>00015 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
<a name="l00016"></a>00016 <span class="comment"> * Lesser General Public License for more details.</span>
<a name="l00017"></a>00017 <span class="comment"> *</span>
<a name="l00018"></a>00018 <span class="comment"> * You should have received a copy of the GNU Lesser General Public</span>
<a name="l00019"></a>00019 <span class="comment"> * License along with this library; if not, write to the Free Software</span>
<a name="l00020"></a>00020 <span class="comment"> * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA</span>
<a name="l00021"></a>00021 <span class="comment"> */</span>
<a name="l00022"></a>00022 
<a name="l00023"></a>00023 @<span class="keyword">import</span> &lt;Foundation/<a class="code" href="class_c_p_object.html" title="The root class from which most classes are subclassed.">CPObject</a>.j&gt;
<a name="l00024"></a>00024 @<span class="keyword">import</span> &lt;Foundation/<a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>.j&gt;
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 @<span class="keyword">import</span> <span class="stringliteral">&quot;CAMediaTimingFunction.j&quot;</span>
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 <span class="comment">/*</span>
<a name="l00029"></a>00029 <span class="comment">    This is an animation class.</span>
<a name="l00030"></a>00030 <span class="comment">*/</span>
<a name="l00031"></a><a class="code" href="class_c_a_animation.html">00031</a> <span class="keyword">@implementation </span><a class="code" href="class_c_a_animation.html">CAAnimation</a> : <a class="code" href="class_c_p_object.html" title="The root class from which most classes are subclassed.">CPObject</a>
<a name="l00032"></a>00032 {
<a name="l00033"></a>00033     BOOL    _isRemovedOnCompletion;
<a name="l00034"></a>00034     <span class="keywordtype">id</span>      _delegate;
<a name="l00035"></a>00035 }
<a name="l00036"></a>00036 
<a name="l00041"></a><a class="code" href="class_c_a_animation.html#a4ebdc294d783ea0fb1670d5266b2f992">00041</a> + (id)animation
<a name="l00042"></a>00042 {
<a name="l00043"></a>00043     <span class="keywordflow">return</span> [[<span class="keyword">self</span> alloc] init];
<a name="l00044"></a>00044 }
<a name="l00045"></a>00045 
<a name="l00046"></a><a class="code" href="class_c_a_animation.html#a474cc91d6325a94ecf1676ccc749697f">00046</a> - (id)init
<a name="l00047"></a>00047 {
<a name="l00048"></a>00048     <span class="keyword">self</span> = [<span class="keyword">super</span> init];
<a name="l00049"></a>00049     
<a name="l00050"></a>00050     <span class="keywordflow">if</span> (<span class="keyword">self</span>)
<a name="l00051"></a>00051         _isRemovedOnCompletion = YES;
<a name="l00052"></a>00052         
<a name="l00053"></a>00053     <span class="keywordflow">return</span> <span class="keyword">self</span>;
<a name="l00054"></a>00054 }
<a name="l00055"></a>00055 
<a name="l00060"></a><a class="code" href="class_c_a_animation.html#ae242f5f0e6bc988d6a4607dcc5948738">00060</a> - (void)shouldArchiveValueForKey:(<a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>)aKey
<a name="l00061"></a>00061 {
<a name="l00062"></a>00062     <span class="keywordflow">return</span> YES;
<a name="l00063"></a>00063 }
<a name="l00064"></a>00064 
<a name="l00069"></a><a class="code" href="class_c_a_animation.html#ad96b909754da3aee44e2b2c7b04100ca">00069</a> + (id)defaultValueForKey:(<a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>)aKey
<a name="l00070"></a>00070 {
<a name="l00071"></a>00071     <span class="keywordflow">return</span> nil;
<a name="l00072"></a>00072 }
<a name="l00073"></a>00073 
<a name="l00078"></a><a class="code" href="class_c_a_animation.html#af2136aa95b9f9640be6704d637f94550">00078</a> - (void)setRemovedOnCompletion:(BOOL)isRemovedOnCompletion
<a name="l00079"></a>00079 {
<a name="l00080"></a>00080     _isRemovedOnCompletion = isRemovedOnCompletion;
<a name="l00081"></a>00081 }
<a name="l00082"></a>00082 
<a name="l00086"></a><a class="code" href="class_c_a_animation.html#a1b7e2a3fea54c6738a2993f34f4d4194">00086</a> - (BOOL)removedOnCompletion
<a name="l00087"></a>00087 {
<a name="l00088"></a>00088     <span class="keywordflow">return</span> _isRemovedOnCompletion;
<a name="l00089"></a>00089 }
<a name="l00090"></a>00090 
<a name="l00094"></a><a class="code" href="class_c_a_animation.html#a8ddb5e925bb0443499fabf406c2a9d34">00094</a> - (BOOL)isRemovedOnCompletion
<a name="l00095"></a>00095 {
<a name="l00096"></a>00096     <span class="keywordflow">return</span> _isRemovedOnCompletion;
<a name="l00097"></a>00097 }
<a name="l00098"></a>00098 
<a name="l00102"></a><a class="code" href="class_c_a_animation.html#a038696455e2c50e79bf26b80b31834f6">00102</a> - (<a class="code" href="class_c_a_media_timing_function.html">CAMediaTimingFunction</a>)timingFunction
<a name="l00103"></a>00103 {
<a name="l00104"></a>00104     <span class="comment">// Linear Pacing</span>
<a name="l00105"></a>00105     <span class="keywordflow">return</span> nil;
<a name="l00106"></a>00106 }
<a name="l00107"></a>00107 
<a name="l00112"></a><a class="code" href="class_c_a_animation.html#a60338c8fbeb2b693053c9989ed9d5ee5">00112</a> - (void)setDelegate:(<span class="keywordtype">id</span>)aDelegate
<a name="l00113"></a>00113 {
<a name="l00114"></a>00114     _delegate = aDelegate;
<a name="l00115"></a>00115 }
<a name="l00116"></a>00116 
<a name="l00120"></a><a class="code" href="class_c_a_animation.html#a63b166d22f8bc387c9fa1c8512253afe">00120</a> - (id)delegate
<a name="l00121"></a>00121 {
<a name="l00122"></a>00122     <span class="keywordflow">return</span> _delegate;
<a name="l00123"></a>00123 }
<a name="l00124"></a>00124 
<a name="l00125"></a><a class="code" href="class_c_a_animation.html#aed478284a5dc544f2ba31097a9958b60">00125</a> - (void)runActionForKey:(<a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>)aKey object:(<span class="keywordtype">id</span>)anObject arguments:(<a class="code" href="class_c_p_dictionary.html" title="A mutable key-value pair collection.">CPDictionary</a>)arguments
<a name="l00126"></a>00126 {
<a name="l00127"></a>00127     [anObject addAnimation:self forKey:aKey];
<a name="l00128"></a>00128 }
<a name="l00129"></a>00129 
<a name="l00130"></a>00130 <span class="keyword">@end</span>
<a name="l00131"></a>00131 
<a name="l00132"></a>00132 <span class="comment">/*</span>
<a name="l00133"></a>00133 <span class="comment">    </span>
<a name="l00134"></a>00134 <span class="comment">*/</span>
<a name="l00135"></a><a class="code" href="class_c_a_property_animation.html">00135</a> <span class="keyword">@implementation </span><a class="code" href="class_c_a_property_animation.html">CAPropertyAnimation</a> : <a class="code" href="class_c_a_animation.html">CAAnimation</a>
<a name="l00136"></a>00136 {
<a name="l00137"></a>00137     <a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>    _keyPath;
<a name="l00138"></a>00138     
<a name="l00139"></a>00139     BOOL        _isCumulative;
<a name="l00140"></a>00140     BOOL        _isAdditive;
<a name="l00141"></a>00141 }
<a name="l00142"></a>00142 
<a name="l00143"></a><a class="code" href="class_c_a_property_animation.html#af75112feb146e94c965f80fc536f586c">00143</a> + (id)animationWithKeyPath:(<a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>)aKeyPath
<a name="l00144"></a>00144 {
<a name="l00145"></a>00145     var animation = [<span class="keyword">self</span> animation];
<a name="l00146"></a>00146     
<a name="l00147"></a>00147     [animation setKeyPath:aKeyPath];
<a name="l00148"></a>00148     
<a name="l00149"></a>00149     <span class="keywordflow">return</span> animation;
<a name="l00150"></a>00150 }
<a name="l00151"></a>00151 
<a name="l00152"></a><a class="code" href="class_c_a_property_animation.html#a8af186e4ec83ce16f7a5c2374515f207">00152</a> - (void)setKeyPath:(<a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>)aKeyPath
<a name="l00153"></a>00153 {
<a name="l00154"></a>00154     _keyPath = aKeyPath;
<a name="l00155"></a>00155 }
<a name="l00156"></a>00156 
<a name="l00157"></a><a class="code" href="class_c_a_property_animation.html#a5dc8b9494487e639bcce6a27304a94b8">00157</a> - (<a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>)keyPath
<a name="l00158"></a>00158 {
<a name="l00159"></a>00159     <span class="keywordflow">return</span> _keyPath;
<a name="l00160"></a>00160 }
<a name="l00161"></a>00161 
<a name="l00162"></a><a class="code" href="class_c_a_property_animation.html#a0e57b916f1d3e30d60c10dd6c9d18dbd">00162</a> - (void)setCumulative:(BOOL)isCumulative
<a name="l00163"></a>00163 {
<a name="l00164"></a>00164     _isCumulative = isCumulative;
<a name="l00165"></a>00165 }
<a name="l00166"></a>00166 
<a name="l00167"></a><a class="code" href="class_c_a_property_animation.html#a5b0f4d01333d0df95b8a6a9bddcbd704">00167</a> - (BOOL)cumulative
<a name="l00168"></a>00168 {
<a name="l00169"></a>00169     <span class="keywordflow">return</span> _isCumulative;
<a name="l00170"></a>00170 }
<a name="l00171"></a>00171 
<a name="l00172"></a><a class="code" href="class_c_a_property_animation.html#a39c724c8832e70129caa7827d5d79d37">00172</a> - (BOOL)isCumulative
<a name="l00173"></a>00173 {
<a name="l00174"></a>00174     <span class="keywordflow">return</span> _isCumulative;
<a name="l00175"></a>00175 }
<a name="l00176"></a>00176 
<a name="l00177"></a><a class="code" href="class_c_a_property_animation.html#ad93bbcd79daf708ea077915a6caf246b">00177</a> - (void)setAdditive:(BOOL)isAdditive
<a name="l00178"></a>00178 {
<a name="l00179"></a>00179     _isAdditive = isAdditive;
<a name="l00180"></a>00180 }
<a name="l00181"></a>00181 
<a name="l00182"></a><a class="code" href="class_c_a_property_animation.html#a396dbaf9fd50a21875539ada51c32ec7">00182</a> - (BOOL)additive
<a name="l00183"></a>00183 {
<a name="l00184"></a>00184     <span class="keywordflow">return</span> _isAdditive;
<a name="l00185"></a>00185 }
<a name="l00186"></a>00186 
<a name="l00187"></a><a class="code" href="class_c_a_property_animation.html#aa1cf15fb0e203f759132a3a9cc148745">00187</a> - (BOOL)isAdditive
<a name="l00188"></a>00188 {
<a name="l00189"></a>00189     <span class="keywordflow">return</span> _isAdditive;
<a name="l00190"></a>00190 }
<a name="l00191"></a>00191 
<a name="l00192"></a>00192 <span class="keyword">@end</span>
<a name="l00193"></a>00193 
<a name="l00199"></a><a class="code" href="class_c_a_basic_animation.html">00199</a> <span class="keyword">@implementation </span><a class="code" href="class_c_a_basic_animation.html">CABasicAnimation</a> : <a class="code" href="class_c_a_property_animation.html">CAPropertyAnimation</a>
<a name="l00200"></a>00200 {
<a name="l00201"></a>00201     <span class="keywordtype">id</span>  _fromValue;
<a name="l00202"></a>00202     <span class="keywordtype">id</span>  _toValue;
<a name="l00203"></a>00203     <span class="keywordtype">id</span>  _byValue;
<a name="l00204"></a>00204 }
<a name="l00205"></a>00205 
<a name="l00210"></a><a class="code" href="class_c_a_basic_animation.html#adbbf44eb52dd8b6983aa6c5d1b77dd38">00210</a> - (void)setFromValue:(<span class="keywordtype">id</span>)aValue
<a name="l00211"></a>00211 {
<a name="l00212"></a>00212     _fromValue = aValue;
<a name="l00213"></a>00213 }
<a name="l00214"></a>00214 
<a name="l00218"></a><a class="code" href="class_c_a_basic_animation.html#a715d8560b584b670847cd0ce0b2adf1d">00218</a> - (id)fromValue
<a name="l00219"></a>00219 {
<a name="l00220"></a>00220     <span class="keywordflow">return</span> _fromValue;
<a name="l00221"></a>00221 }
<a name="l00222"></a>00222 
<a name="l00227"></a><a class="code" href="class_c_a_basic_animation.html#aceaadddb6c1a7017b846529472075b09">00227</a> - (void)setToValue:(<span class="keywordtype">id</span>)aValue
<a name="l00228"></a>00228 {
<a name="l00229"></a>00229     _toValue = aValue;
<a name="l00230"></a>00230 }
<a name="l00231"></a>00231 
<a name="l00235"></a><a class="code" href="class_c_a_basic_animation.html#a36e44f4982346c953dfd3c1691e98f81">00235</a> - (id)toValue
<a name="l00236"></a>00236 {
<a name="l00237"></a>00237     <span class="keywordflow">return</span> _toValue;
<a name="l00238"></a>00238 }
<a name="l00239"></a>00239 
<a name="l00244"></a><a class="code" href="class_c_a_basic_animation.html#ad88720ac59dcc2c1dc2703b10828bd11">00244</a> - (void)setByValue:(<span class="keywordtype">id</span>)aValue
<a name="l00245"></a>00245 {
<a name="l00246"></a>00246     _byValue = aValue;
<a name="l00247"></a>00247 }
<a name="l00248"></a>00248 
<a name="l00252"></a><a class="code" href="class_c_a_basic_animation.html#af29a5bc54cd6695fbfd0bac84deb4fd1">00252</a> - (id)byValue
<a name="l00253"></a>00253 {
<a name="l00254"></a>00254     <span class="keywordflow">return</span> _byValue;
<a name="l00255"></a>00255 }
<a name="l00256"></a>00256 
<a name="l00257"></a>00257 <span class="keyword">@end</span>
</pre></div></div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 10:32:54 2010 for Cappuccino API by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>

<!-- Mirrored from cappuccino.org/learn/documentation/_c_a_animation_8j_source.html by HTTrack Website Copier/3.x [XR&CO'2006], Mon, 20 Sep 2010 02:19:28 GMT -->
</html>