Changeset 1342

Show
Ignore:
Timestamp:
03/24/08 03:19:03 (3 months ago)
Author:
cederberg@gmail.com
Message:

Added API doc for MochiKit.Visual.Transitions.
Minor other API doc adjustments.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • mochikit/trunk/doc/html/MochiKit/Visual.html

    r1341 r1342  
    531531<table border="1" class="last docutils"> 
    532532<colgroup> 
     533<col width="30%" /> 
     534<col width="70%" /> 
     535</colgroup> 
     536<tbody valign="top"> 
     537<tr><td>direction</td> 
     538<td><tt class="docutils literal"><span class="pre">&quot;center&quot;</span></tt></td> 
     539</tr> 
     540<tr><td>moveTransition</td> 
     541<td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.sinoidal</span></tt></td> 
     542</tr> 
     543<tr><td>scaleTransition</td> 
     544<td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.sinoidal</span></tt></td> 
     545</tr> 
     546<tr><td>opacityTransition</td> 
     547<td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.full</span></tt></td> 
     548</tr> 
     549</tbody> 
     550</table> 
     551</dd> 
     552</dl> 
     553<p>The <tt class="docutils literal"><span class="pre">direction</span></tt> option controls the origin point of the effect. 
     554The following values are allowed:</p> 
     555<blockquote> 
     556<table border="1" class="docutils"> 
     557<colgroup> 
    533558<col width="34%" /> 
    534559<col width="66%" /> 
    535560</colgroup> 
    536561<tbody valign="top"> 
    537 <tr><td><tt class="docutils literal"><span class="pre">direction</span></tt></td> 
    538 <td><tt class="docutils literal"><span class="pre">center</span></tt></td> 
    539 </tr> 
    540 <tr><td><tt class="docutils literal"><span class="pre">moveTransition</span></tt></td> 
    541 <td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.sinoidal</span></tt></td> 
    542 </tr> 
    543 <tr><td><tt class="docutils literal"><span class="pre">scaleTransition</span></tt></td> 
    544 <td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.sinoidal</span></tt></td> 
    545 </tr> 
    546 <tr><td><tt class="docutils literal"><span class="pre">opacityTransition</span></tt></td> 
    547 <td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.full</span></tt></td> 
    548 </tr> 
    549 </tbody> 
    550 </table> 
    551 </dd> 
    552 </dl> 
    553 <p>The <tt class="docutils literal"><span class="pre">direction</span></tt> option controls the origin point of the effect. 
    554 The following values are allowed:</p> 
    555 <blockquote> 
    556 <table border="1" class="docutils"> 
    557 <colgroup> 
    558 <col width="34%" /> 
    559 <col width="66%" /> 
    560 </colgroup> 
    561 <tbody valign="top"> 
    562 <tr><td><tt class="docutils literal"><span class="pre">center</span></tt></td> 
     562<tr><td><tt class="docutils literal"><span class="pre">&quot;center&quot;</span></tt></td> 
    563563<td>Grows from the center</td> 
    564564</tr> 
    565 <tr><td><tt class="docutils literal"><span class="pre">top-left</span></tt></td> 
     565<tr><td><tt class="docutils literal"><span class="pre">&quot;top-left&quot;</span></tt></td> 
    566566<td>Grows from the top left corner</td> 
    567567</tr> 
    568 <tr><td><tt class="docutils literal"><span class="pre">top-right</span></tt></td> 
     568<tr><td><tt class="docutils literal"><span class="pre">&quot;top-right&quot;</span></tt></td> 
    569569<td>Grows from the top right corner</td> 
    570570</tr> 
    571 <tr><td><tt class="docutils literal"><span class="pre">bottom-left</span></tt></td> 
     571<tr><td><tt class="docutils literal"><span class="pre">&quot;bottom-left&quot;</span></tt></td> 
    572572<td>Grows from the bottom left corner</td> 
    573573</tr> 
    574 <tr><td><tt class="docutils literal"><span class="pre">bottom-right</span></tt></td> 
     574<tr><td><tt class="docutils literal"><span class="pre">&quot;bottom-right&quot;</span></tt></td> 
    575575<td>Grows from the bottom right corner</td> 
    576576</tr> 
     
    603603<table border="1" class="last docutils"> 
    604604<colgroup> 
     605<col width="30%" /> 
     606<col width="70%" /> 
     607</colgroup> 
     608<tbody valign="top"> 
     609<tr><td>direction</td> 
     610<td><tt class="docutils literal"><span class="pre">&quot;center&quot;</span></tt></td> 
     611</tr> 
     612<tr><td>moveTransition</td> 
     613<td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.sinoidal</span></tt></td> 
     614</tr> 
     615<tr><td>scaleTransition</td> 
     616<td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.sinoidal</span></tt></td> 
     617</tr> 
     618<tr><td>opacityTransition</td> 
     619<td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.full</span></tt></td> 
     620</tr> 
     621</tbody> 
     622</table> 
     623</dd> 
     624</dl> 
     625<p>The <tt class="docutils literal"><span class="pre">direction</span></tt> option controls the destination point of the 
     626effect. The following values are allowed:</p> 
     627<blockquote> 
     628<table border="1" class="docutils"> 
     629<colgroup> 
    605630<col width="34%" /> 
    606631<col width="66%" /> 
    607632</colgroup> 
    608633<tbody valign="top"> 
    609 <tr><td><tt class="docutils literal"><span class="pre">direction</span></tt></td> 
    610 <td><tt class="docutils literal"><span class="pre">center</span></tt></td> 
    611 </tr> 
    612 <tr><td><tt class="docutils literal"><span class="pre">moveTransition</span></tt></td> 
    613 <td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.sinoidal</span></tt></td> 
    614 </tr> 
    615 <tr><td><tt class="docutils literal"><span class="pre">scaleTransition</span></tt></td> 
    616 <td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.sinoidal</span></tt></td> 
    617 </tr> 
    618 <tr><td><tt class="docutils literal"><span class="pre">opacityTransition</span></tt></td> 
    619 <td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.none</span></tt></td> 
    620 </tr> 
    621 </tbody> 
    622 </table> 
    623 </dd> 
    624 </dl> 
    625 <p>The <tt class="docutils literal"><span class="pre">direction</span></tt> option controls the destination point of the 
    626 effect. The following values are allowed:</p> 
    627 <blockquote> 
    628 <table border="1" class="docutils"> 
    629 <colgroup> 
    630 <col width="34%" /> 
    631 <col width="66%" /> 
    632 </colgroup> 
    633 <tbody valign="top"> 
    634 <tr><td><tt class="docutils literal"><span class="pre">center</span></tt></td> 
    635 <td>Shrinks to the center</td> 
    636 </tr> 
    637 <tr><td><tt class="docutils literal"><span class="pre">top-left</span></tt></td> 
    638 <td>Shrinks to the top left corner</td> 
    639 </tr> 
    640 <tr><td><tt class="docutils literal"><span class="pre">top-right</span></tt></td> 
    641 <td>Shrinks to the top right corner</td> 
    642 </tr> 
    643 <tr><td><tt class="docutils literal"><span class="pre">bottom-left</span></tt></td> 
    644 <td>Shrinks to the bottom left corner</td> 
    645 </tr> 
    646 <tr><td><tt class="docutils literal"><span class="pre">bottom-right</span></tt></td> 
    647 <td>Shrinks to the bottom right corner</td> 
     634<tr><td><tt class="docutils literal"><span class="pre">&quot;center&quot;</span></tt></td> 
     635<td>Grows from the center</td> 
     636</tr> 
     637<tr><td><tt class="docutils literal"><span class="pre">&quot;top-left&quot;</span></tt></td> 
     638<td>Grows from the top left corner</td> 
     639</tr> 
     640<tr><td><tt class="docutils literal"><span class="pre">&quot;top-right&quot;</span></tt></td> 
     641<td>Grows from the top right corner</td> 
     642</tr> 
     643<tr><td><tt class="docutils literal"><span class="pre">&quot;bottom-left&quot;</span></tt></td> 
     644<td>Grows from the bottom left corner</td> 
     645</tr> 
     646<tr><td><tt class="docutils literal"><span class="pre">&quot;bottom-right&quot;</span></tt></td> 
     647<td>Grows from the bottom right corner</td> 
    648648</tr> 
    649649</tbody> 
     
    711711<h2><a id="basic-effects-classes" name="basic-effects-classes">Basic Effects classes</a></h2> 
    712712<p> 
     713<a name="fn-transitions"></a> 
     714<a class="mochidef reference" href="#fn-transitions">Transitions</a>:</p> 
     715<blockquote> 
     716<p>Default transition functions available for all effects. A transition 
     717function adjusts the current position value between 0 and 1 in order 
     718to achieve a non-linear sequence of position values for the effect.</p> 
     719<table border="1" class="docutils"> 
     720<colgroup> 
     721<col width="21%" /> 
     722<col width="79%" /> 
     723</colgroup> 
     724<tbody valign="top"> 
     725<tr><td>linear</td> 
     726<td>A straight linear transition.</td> 
     727</tr> 
     728<tr><td>sinoidal</td> 
     729<td>A smooth sine value transition.</td> 
     730</tr> 
     731<tr><td>reverse</td> 
     732<td>A reverse linear transition.</td> 
     733</tr> 
     734<tr><td>flicker</td> 
     735<td>A sine transition with random additions.</td> 
     736</tr> 
     737<tr><td>wobble</td> 
     738<td>A multi-period sine curve transition.</td> 
     739</tr> 
     740<tr><td>pulse</td> 
     741<td>A multi-period triangle curve transition.</td> 
     742</tr> 
     743<tr><td>none</td> 
     744<td>A fixed zero (0) value transition.</td> 
     745</tr> 
     746<tr><td>full</td> 
     747<td>A fixed one (1) value transition.</td> 
     748</tr> 
     749</tbody> 
     750</table> 
     751<dl class="docutils"> 
     752<dt><em>Availability</em>:</dt> 
     753<dd>Available in MochiKit 1.4+</dd> 
     754</dl> 
     755</blockquote> 
     756<p> 
    713757<a name="fn-defaultoptions"></a> 
    714758<a class="mochidef reference" href="#fn-defaultoptions">DefaultOptions</a>:</p> 
    715759<blockquote> 
    716 <p>Default options for all Effect creation.</p> 
     760<p>Default options for all effects. Note that all effects inherit 
     761the <a class="mochiref reference" href="#fn-base">Base</a> class and thereby also support a number of 
     762events, that can be specified as callback functions among the 
     763effect options.</p> 
    717764<table border="1" class="docutils"> 
    718765<colgroup> 
    719 <col width="22%" /> 
    720 <col width="78%" /> 
     766<col width="17%" /> 
     767<col width="83%" /> 
    721768</colgroup> 
    722769<tbody valign="top"> 
     
    725772</tr> 
    726773<tr><td>duration</td> 
    727 <td><tt class="docutils literal"><span class="pre">1.0</span></tt></td> 
     774<td><tt class="docutils literal"><span class="pre">1.0</span></tt> (seconds)</td> 
    728775</tr> 
    729776<tr><td>fps</td> 
     
    731778</tr> 
    732779<tr><td>sync</td> 
    733 <td><tt class="docutils literal"><span class="pre">false</span></tt></td> 
     780<td><tt class="docutils literal"><span class="pre">false</span></tt> (only set for <a class="mochiref reference" href="#fn-parallel">Parallel</a> effects)</td> 
    734781</tr> 
    735782<tr><td>from</td> 
     
    758805<p>Base class to all effects. Define a basic looping service, use it 
    759806for creating new effects.</p> 
    760 <p>You can override the methods <tt class="docutils literal"><span class="pre">setup</span></tt>, <tt class="docutils literal"><span class="pre">update</span></tt> and <tt class="docutils literal"><span class="pre">finish`</span></tt>.</p> 
     807<p>You can override the methods <tt class="docutils literal"><span class="pre">setup</span></tt>, <tt class="docutils literal"><span class="pre">update</span></tt> and <tt class="docutils literal"><span class="pre">finish</span></tt>.</p> 
    761808<p>The class defines a number of events that will be called during effect 
    762809life. The events are:</p> 
  • mochikit/trunk/doc/rst/MochiKit/Visual.rst

    r1341 r1342  
    456456        off by default. See also the :mochiref:`DefaultOptions`. 
    457457 
    458         ===================== ======================================== 
    459         ``direction``         ``center`` 
    460         ``moveTransition``    ``MochiKit.Visual.Transitions.sinoidal``     
    461         ``scaleTransition``   ``MochiKit.Visual.Transitions.sinoidal``     
    462         ``opacityTransition`` ``MochiKit.Visual.Transitions.full``     
    463         ===================== ======================================== 
     458        ================= ======================================== 
     459        direction         ``"center"`` 
     460        moveTransition    ``MochiKit.Visual.Transitions.sinoidal``     
     461        scaleTransition   ``MochiKit.Visual.Transitions.sinoidal``     
     462        opacityTransition ``MochiKit.Visual.Transitions.full``     
     463        ================= ======================================== 
    464464 
    465465    The ``direction`` option controls the origin point of the effect. 
     
    467467 
    468468        ===================== ======================================== 
    469         ``center``            Grows from the center 
    470         ``top-left``          Grows from the top left corner 
    471         ``top-right``         Grows from the top right corner 
    472         ``bottom-left``       Grows from the bottom left corner 
    473         ``bottom-right``      Grows from the bottom right corner 
     469        ``"center"``          Grows from the center 
     470        ``"top-left"``        Grows from the top left corner 
     471        ``"top-right"``       Grows from the top right corner 
     472        ``"bottom-left"``     Grows from the bottom left corner 
     473        ``"bottom-right"``    Grows from the bottom right corner 
    474474        ===================== ======================================== 
    475475 
     
    496496        off by default. See also the :mochiref:`DefaultOptions`. 
    497497 
    498         ===================== ======================================== 
    499         ``direction``         ``center`` 
    500         ``moveTransition``    ``MochiKit.Visual.Transitions.sinoidal``     
    501         ``scaleTransition``   ``MochiKit.Visual.Transitions.sinoidal``     
    502         ``opacityTransition`` ``MochiKit.Visual.Transitions.none``     
    503         ===================== ======================================== 
     498        ================= ======================================== 
     499        direction         ``"center"`` 
     500        moveTransition    ``MochiKit.Visual.Transitions.sinoidal``     
     501        scaleTransition   ``MochiKit.Visual.Transitions.sinoidal``     
     502        opacityTransition ``MochiKit.Visual.Transitions.full``     
     503        ================= ======================================== 
    504504 
    505505    The ``direction`` option controls the destination point of the 
     
    507507 
    508508        ===================== ======================================== 
    509         ``center``            Shrinks to the center 
    510         ``top-left``          Shrinks to the top left corner 
    511         ``top-right``         Shrinks to the top right corner 
    512         ``bottom-left``       Shrinks to the bottom left corner 
    513         ``bottom-right``      Shrinks to the bottom right corner 
     509        ``"center"``          Grows from the center 
     510        ``"top-left"``        Grows from the top left corner 
     511        ``"top-right"``       Grows from the top right corner 
     512        ``"bottom-left"``     Grows from the bottom left corner 
     513        ``"bottom-right"``    Grows from the bottom right corner 
    514514        ===================== ======================================== 
    515515 
     
    565565--------------------- 
    566566 
     567:mochidef:`Transitions`: 
     568 
     569    Default transition functions available for all effects. A transition 
     570    function adjusts the current position value between 0 and 1 in order 
     571    to achieve a non-linear sequence of position values for the effect. 
     572 
     573    =========== ======================================== 
     574    linear      A straight linear transition. 
     575    sinoidal    A smooth sine value transition. 
     576    reverse     A reverse linear transition. 
     577    flicker     A sine transition with random additions. 
     578    wobble      A multi-period sine curve transition. 
     579    pulse       A multi-period triangle curve transition. 
     580    none        A fixed zero (0) value transition. 
     581    full        A fixed one (1) value transition. 
     582    =========== ======================================== 
     583 
     584    *Availability*: 
     585        Available in MochiKit 1.4+ 
     586 
     587 
    567588:mochidef:`DefaultOptions`: 
    568589 
    569     Default options for all Effect creation. 
     590    Default options for all effects. Note that all effects inherit 
     591    the :mochiref:`Base` class and thereby also support a number of 
     592    events, that can be specified as callback functions among the 
     593    effect options. 
    570594 
    571595    =========== ======================================== 
    572596    transition  ``MochiKit.Visual.Transitions.sinoidal`` 
    573     duration    ``1.0`` 
     597    duration    ``1.0`` (seconds) 
    574598    fps         ``25.0`` 
    575     sync        ``false`` 
     599    sync        ``false`` (only set for :mochiref:`Parallel` effects) 
    576600    from        ``0.0`` 
    577601    to          ``1.0`` 
     
    589613    for creating new effects. 
    590614 
    591     You can override the methods ``setup``, ``update`` and ``finish```
     615    You can override the methods ``setup``, ``update`` and ``finish``
    592616 
    593617    The class defines a number of events that will be called during effect