Initial release
This commit is contained in:
@@ -0,0 +1,177 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>VSTGUI: Animations</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<script type="text/javascript" src="clipboard.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="cookie.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">VSTGUI<span id="projectnumber"> 4.10</span>
|
||||
</div>
|
||||
<div id="projectbrief">Graphical User Interface Framework not only for VST plugins</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() { codefold.init(0); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search',true);
|
||||
$(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function(){initNavTree('page_animation.html',''); initResizable(true); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div><div class="header">
|
||||
<div class="headertitle"><div class="title">Animations</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p><a class="el" href="namespace_v_s_t_g_u_i.html">VSTGUI</a> version 4 adds simple to use view animation support.</p>
|
||||
<p>The source can be found under /lib/animation/</p>
|
||||
<h1><a class="anchor" id="the_animator"></a>
|
||||
The Animator</h1>
|
||||
<p>Every <a class="el" href="class_v_s_t_g_u_i_1_1_c_frame.html#aa7609ca92096612f85c0fa58058bd2f8">CFrame </a> object can have one <a class="el" href="class_v_s_t_g_u_i_1_1_animation_1_1_animator.html">Animator </a> object which runs animations at 60 Hz.</p>
|
||||
<p>The animator is responsible for running animations. You can add and remove animations. Animations are identified by a view and a name.</p>
|
||||
<p>To add an animation you just call <a class="el" href="class_v_s_t_g_u_i_1_1_c_view.html#a010ce28e94879ec8a025e2052e1ccec0">CView::addAnimation (name, target, timing)</a>. The animation will start immediately and will automatically be removed if it has finished. If you want to stop it before it has finished you can use <a class="el" href="class_v_s_t_g_u_i_1_1_c_view.html#a35880645f06796dbb9dab26f1df5d209">CView::removeAnimation (name)</a>. You can also stop all animations for a view with <a class="el" href="class_v_s_t_g_u_i_1_1_c_view.html#a2e2b03fdb07587b7595e7e9343312309">CView::removeAllAnimations ()</a>.</p>
|
||||
<p>The animator is the owner of the target and timing function objects and will destroy these objects when the animation has finished. This means that the animator will call delete on these objects or if they are inherited from CBaseObject it will call forget() on them.</p>
|
||||
<h1><a class="anchor" id="the_animation"></a>
|
||||
The Animation</h1>
|
||||
<p>An animation is made up by an <a class="el" href="class_v_s_t_g_u_i_1_1_animation_1_1_i_animation_target.html">IAnimationTarget </a> and an <a class="el" href="class_v_s_t_g_u_i_1_1_animation_1_1_i_timing_function.html">ITimingFunction </a> object.</p>
|
||||
<h2><a class="anchor" id="animation_target"></a>
|
||||
The Animation Target</h2>
|
||||
<p>The animation target is responsible for changing the view from one state to another state.</p>
|
||||
<p>The animation target interface consists of 3 methods:</p><ul>
|
||||
<li><a class="el" href="class_v_s_t_g_u_i_1_1_animation_1_1_i_animation_target.html#a6d7cfb190ce3bcfcdb0787c676a7aba1">animationStart (view, name) </a></li>
|
||||
<li><a class="el" href="class_v_s_t_g_u_i_1_1_animation_1_1_i_animation_target.html#a23da353233eebc71189a2e296b71efb0">animationTick (view, name, pos) </a></li>
|
||||
<li><a class="el" href="class_v_s_t_g_u_i_1_1_animation_1_1_i_animation_target.html#a4dd2012172ed0741fbf3fd481ecaa157">animationFinished (view, name, wasCanceled) </a></li>
|
||||
</ul>
|
||||
<p>All these methods have the view and the animation name as arguments to identify the animation within the target. The animationTick method in addition has the normalized animation position as argument and the animationFinished method has a bool argument indicating if the animation was canceled.</p>
|
||||
<p>see <a class="el" href="group___animation_targets.html">included animation target classes </a></p>
|
||||
<h2><a class="anchor" id="animation_timing"></a>
|
||||
The Animation Timing Function</h2>
|
||||
<p>the animation timing function maps elapsed time to a normalized position.</p>
|
||||
<p>see <a class="el" href="group___animation_timing_functions.html">included animation timing function classes </a></p>
|
||||
<h1><a class="anchor" id="simple_example"></a>
|
||||
Simple Usage Example</h1>
|
||||
<p>In this example the custom view animates it's alpha value when the mouse moves inside or outside the view.</p>
|
||||
<div class="fragment"><div class="line"><span class="keyword">using namespace </span><a class="code hl_namespace" href="namespace_v_s_t_g_u_i_1_1_animation.html">VSTGUI::Animation</a>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="keyword">class </span>MyView : <span class="keyword">public</span> <a class="code hl_class" href="class_v_s_t_g_u_i_1_1_c_view.html">CView</a></div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"><span class="keyword">public</span>:</div>
|
||||
<div class="line"> MyView (<span class="keyword">const</span> <a class="code hl_struct" href="struct_v_s_t_g_u_i_1_1_c_rect.html">CRect</a>& r) : <a class="code hl_class" href="class_v_s_t_g_u_i_1_1_c_view.html">CView</a> (r) { setAlphaValue (0.5f); }</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <a class="code hl_enumeration" href="namespace_v_s_t_g_u_i.html#ac49f4c9b44d5ce2870a1790690bc1092">CMouseEventResult</a> onMouseEntered (<a class="code hl_struct" href="struct_v_s_t_g_u_i_1_1_c_point.html">CPoint</a> &where, <span class="keyword">const</span> <a class="code hl_struct" href="struct_v_s_t_g_u_i_1_1_c_button_state.html">CButtonState</a>& buttons)</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// this adds an animation which takes 200 ms to make a linear alpha fade from the current value to 1</span></div>
|
||||
<div class="line"> addAnimation (<span class="stringliteral">"AlphaValueAnimation"</span>, <span class="keyword">new</span> <a class="code hl_class" href="class_v_s_t_g_u_i_1_1_animation_1_1_alpha_value_animation.html">AlphaValueAnimation</a> (1.f), <span class="keyword">new</span> <a class="code hl_class" href="class_v_s_t_g_u_i_1_1_animation_1_1_linear_timing_function.html">LinearTimingFunction</a> (200));</div>
|
||||
<div class="line"> <span class="keywordflow">return</span> <a class="code hl_enumvalue" href="namespace_v_s_t_g_u_i.html#ac49f4c9b44d5ce2870a1790690bc1092a8bb1ee91a3b1b6baa050d9634f4abcc0">kMouseEventHandled</a>;</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <a class="code hl_enumeration" href="namespace_v_s_t_g_u_i.html#ac49f4c9b44d5ce2870a1790690bc1092">CMouseEventResult</a> onMouseExited (<a class="code hl_struct" href="struct_v_s_t_g_u_i_1_1_c_point.html">CPoint</a> &where, <span class="keyword">const</span> <a class="code hl_struct" href="struct_v_s_t_g_u_i_1_1_c_button_state.html">CButtonState</a>& buttons)</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// this adds an animation which takes 200 ms to make a linear alpha fade from the current value to 0.5</span></div>
|
||||
<div class="line"> addAnimation (<span class="stringliteral">"AlphaValueAnimation"</span>, <span class="keyword">new</span> <a class="code hl_class" href="class_v_s_t_g_u_i_1_1_animation_1_1_alpha_value_animation.html">AlphaValueAnimation</a> (0.5f), <span class="keyword">new</span> <a class="code hl_class" href="class_v_s_t_g_u_i_1_1_animation_1_1_linear_timing_function.html">LinearTimingFunction</a> (200));</div>
|
||||
<div class="line"> <span class="keywordflow">return</span> <a class="code hl_enumvalue" href="namespace_v_s_t_g_u_i.html#ac49f4c9b44d5ce2870a1790690bc1092a8bb1ee91a3b1b6baa050d9634f4abcc0">kMouseEventHandled</a>;</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="keywordtype">void</span> draw (CDrawContext* context)</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// ... any drawing code here</span></div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line">};</div>
|
||||
<div class="ttc" id="aclass_v_s_t_g_u_i_1_1_animation_1_1_alpha_value_animation_html"><div class="ttname"><a href="class_v_s_t_g_u_i_1_1_animation_1_1_alpha_value_animation.html">VSTGUI::Animation::AlphaValueAnimation</a></div><div class="ttdoc">animates the alpha value of the view</div><div class="ttdef"><b>Definition</b> animations.h:20</div></div>
|
||||
<div class="ttc" id="aclass_v_s_t_g_u_i_1_1_animation_1_1_linear_timing_function_html"><div class="ttname"><a href="class_v_s_t_g_u_i_1_1_animation_1_1_linear_timing_function.html">VSTGUI::Animation::LinearTimingFunction</a></div><div class="ttdef"><b>Definition</b> timingfunctions.h:38</div></div>
|
||||
<div class="ttc" id="aclass_v_s_t_g_u_i_1_1_c_view_html"><div class="ttname"><a href="class_v_s_t_g_u_i_1_1_c_view.html">VSTGUI::CView</a></div><div class="ttdoc">Base Class of all view objects.</div><div class="ttdef"><b>Definition</b> cview.h:51</div></div>
|
||||
<div class="ttc" id="anamespace_v_s_t_g_u_i_1_1_animation_html"><div class="ttname"><a href="namespace_v_s_t_g_u_i_1_1_animation.html">VSTGUI::Animation</a></div><div class="ttdef"><b>Definition</b> animations.cpp:13</div></div>
|
||||
<div class="ttc" id="anamespace_v_s_t_g_u_i_html_ac49f4c9b44d5ce2870a1790690bc1092"><div class="ttname"><a href="namespace_v_s_t_g_u_i.html#ac49f4c9b44d5ce2870a1790690bc1092">VSTGUI::CMouseEventResult</a></div><div class="ttdeci">CMouseEventResult</div><div class="ttdef"><b>Definition</b> vstguifwd.h:38</div></div>
|
||||
<div class="ttc" id="anamespace_v_s_t_g_u_i_html_ac49f4c9b44d5ce2870a1790690bc1092a8bb1ee91a3b1b6baa050d9634f4abcc0"><div class="ttname"><a href="namespace_v_s_t_g_u_i.html#ac49f4c9b44d5ce2870a1790690bc1092a8bb1ee91a3b1b6baa050d9634f4abcc0">VSTGUI::kMouseEventHandled</a></div><div class="ttdeci">@ kMouseEventHandled</div><div class="ttdef"><b>Definition</b> vstguifwd.h:40</div></div>
|
||||
<div class="ttc" id="astruct_v_s_t_g_u_i_1_1_c_button_state_html"><div class="ttname"><a href="struct_v_s_t_g_u_i_1_1_c_button_state.html">VSTGUI::CButtonState</a></div><div class="ttdoc">Button and Modifier state.</div><div class="ttdef"><b>Definition</b> cbuttonstate.h:47</div></div>
|
||||
<div class="ttc" id="astruct_v_s_t_g_u_i_1_1_c_point_html"><div class="ttname"><a href="struct_v_s_t_g_u_i_1_1_c_point.html">VSTGUI::CPoint</a></div><div class="ttdoc">Point structure.</div><div class="ttdef"><b>Definition</b> cpoint.h:17</div></div>
|
||||
<div class="ttc" id="astruct_v_s_t_g_u_i_1_1_c_rect_html"><div class="ttname"><a href="struct_v_s_t_g_u_i_1_1_c_rect.html">VSTGUI::CRect</a></div><div class="ttdoc">Rect structure.</div><div class="ttdef"><b>Definition</b> crect.h:17</div></div>
|
||||
</div><!-- fragment --> </div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="page_misc.html">Miscellaneous</a></li>
|
||||
<li class="footer">Generated on Mon Oct 20 2025 17:24:33 for VSTGUI by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user