-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_i_v_display_control_8h_source.html
260 lines (258 loc) · 38.6 KB
/
_i_v_display_control_8h_source.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
<!-- HTML header for doxygen 1.8.14-->
<!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">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>iPlug 2: IVDisplayControl.h Source File</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>
<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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="style.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 style="height: 80px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">iPlug2 - C++ Audio Plug-in Framework
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.5 -->
<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" 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');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- 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 id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_c70994b0d9919a11b368e677cb7f323c.html">IGraphics</a></li><li class="navelem"><a class="el" href="dir_b13fc9fb79eb1e19d3aa0747e2e621c7.html">Controls</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">IVDisplayControl.h</div></div>
</div><!--header-->
<div class="contents">
<a href="_i_v_display_control_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">/*</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment"> ==============================================================================</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment"></span> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment"> This file is part of the iPlug 2 library. Copyright (C) the iPlug 2 developers.</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment"></span> </div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment"> See LICENSE.txt for more info.</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment"></span> </div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment"> ==============================================================================</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">*/</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> </div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#include "<a class="code" href="_i_control_8h.html">IControl.h</a>"</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include "<a class="code" href="_i_sender_8h.html">ISender.h</a>"</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span>BEGIN_IPLUG_NAMESPACE</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span>BEGIN_IGRAPHICS_NAMESPACE</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"><a class="line" href="class_i_v_display_control.html"> 26</a></span><span class="keyword">class </span><a class="code hl_class" href="class_i_v_display_control.html">IVDisplayControl</a> : <span class="keyword">public</span> <a class="code hl_class" href="class_i_control.html">IControl</a></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> , <span class="keyword">public</span> <a class="code hl_class" href="class_i_vector_base.html">IVectorBase</a></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span>{</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">int</span> MAX_BUFFER_SIZE = 2048;</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <a class="code hl_class" href="class_i_v_display_control.html">IVDisplayControl</a>(<span class="keyword">const</span> <a class="code hl_struct" href="struct_i_r_e_c_t.html">IRECT</a>& bounds, <span class="keyword">const</span> <span class="keywordtype">char</span>* label = <span class="stringliteral">""</span>, <span class="keyword">const</span> <a class="code hl_struct" href="struct_i_v_style.html">IVStyle</a>& style = DEFAULT_STYLE, EDirection dir = EDirection::Horizontal, <span class="keywordtype">float</span> lo = 0., <span class="keywordtype">float</span> hi = 1.f, <span class="keywordtype">float</span> defaultVal = 0., uint32_t bufferSize = 100, <span class="keywordtype">float</span> strokeThickness = 2.f)</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> : <a class="code hl_class" href="class_i_control.html">IControl</a>(bounds)</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> , <a class="code hl_class" href="class_i_vector_base.html">IVectorBase</a>(style)</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> , mBuffer(bufferSize, defaultVal)</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> , mLoValue(lo)</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> , mHiValue(hi)</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> , mStrokeThickness(strokeThickness)</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> , mDirection(dir)</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> {</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> assert(bufferSize > 0 && bufferSize < MAX_BUFFER_SIZE);</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> </div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <a class="code hl_function" href="class_i_vector_base.html#aaeaad70c3715e71344c9e589461483c8">AttachIControl</a>(<span class="keyword">this</span>, label);</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> }</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"><a class="line" href="class_i_v_display_control.html#aba09d9f71e583b6f639f72bcf6c900e2"> 46</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_i_v_display_control.html#aba09d9f71e583b6f639f72bcf6c900e2">OnResize</a>()<span class="keyword"> override</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span><span class="keyword"> </span>{</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <a class="code hl_function" href="class_i_control.html#a74b30c0e170fc9b19180c59565a6375d">SetTargetRECT</a>(<a class="code hl_function" href="class_i_vector_base.html#a2cda013efaff29ffaa0142b5e9bde145">MakeRects</a>(mRECT));</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> </div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> mPlotBounds = mWidgetBounds.<a class="code hl_function" href="struct_i_r_e_c_t.html#af020b51247a87c9427041307c53dd6d7">GetPadded</a>(mDirection == EDirection::Horizontal ? 0.f : -mStrokeThickness,</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> mDirection == EDirection::Horizontal ? -mStrokeThickness : 0.f,</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> mDirection == EDirection::Horizontal ? 0.f : -mStrokeThickness,</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> mDirection == EDirection::Horizontal ? -mStrokeThickness : 0.f);</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> </div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <a class="code hl_function" href="class_i_control.html#af8c805c09b1a89f44aec43026fcb1fe7">SetDirty</a>(<span class="keyword">false</span>);</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> }</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> </div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"><a class="line" href="class_i_v_display_control.html#ab1bcfc1bc22d7e084572ac444d548e93"> 58</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_i_v_display_control.html#ab1bcfc1bc22d7e084572ac444d548e93">Draw</a>(<a class="code hl_class" href="class_i_graphics.html">IGraphics</a>& g)<span class="keyword"> override</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span><span class="keyword"> </span>{</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <a class="code hl_function" href="class_i_vector_base.html#a34ede48b05e8aa446350eaf2e1bfc45a">DrawBackground</a>(g, mRECT);</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <a class="code hl_function" href="class_i_v_display_control.html#aed3a21d5ad7cf24481c7ec261404b66f">DrawWidget</a>(g);</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <a class="code hl_function" href="class_i_vector_base.html#ac0f3b5b90568f751a2a4e2b12f4f18e8">DrawLabel</a>(g);</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keywordflow">if</span>(mStyle.drawFrame)</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> g.<a class="code hl_function" href="class_i_graphics.html#a0a7bba668c103968e96fad159173eff3">DrawRect</a>(<a class="code hl_function" href="class_i_vector_base.html#ac7bbfa5e773c9c8bd2e76319aa5c58b5">GetColor</a>(kFR), mWidgetBounds, &mBlend, mStyle.frameThickness);</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> }</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> </div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"><a class="line" href="class_i_v_display_control.html#aed3a21d5ad7cf24481c7ec261404b66f"> 68</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_i_v_display_control.html#aed3a21d5ad7cf24481c7ec261404b66f">DrawWidget</a>(<a class="code hl_class" href="class_i_graphics.html">IGraphics</a>& g)<span class="keyword"> override</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span><span class="keyword"> </span>{</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keywordtype">float</span> x = mPlotBounds.L;</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keywordtype">float</span> y = mPlotBounds.T;</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keywordtype">float</span> w = mPlotBounds.<a class="code hl_function" href="struct_i_r_e_c_t.html#a9d21ea21ff622e370664267c12cc7c24">W</a>();</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keywordtype">float</span> h = mPlotBounds.<a class="code hl_function" href="struct_i_r_e_c_t.html#ac7252cd16f74972ce29d481f47d4a784">H</a>();</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> </div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="keyword">const</span> <span class="keywordtype">int</span> sz = <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(mBuffer.size());</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keyword">auto</span> getPlotPos = [&](<span class="keywordtype">int</span> pos, <span class="keywordtype">float</span> axis, <span class="keywordtype">float</span> extrem) {</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <span class="keywordtype">float</span> v = mBuffer[(mReadPos+pos) % sz];</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> v = (v - mLoValue) / (mHiValue - mLoValue);</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keywordflow">return</span> axis + extrem - (v * extrem);</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> };</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> </div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="keywordflow">if</span>(mDirection == EDirection::Horizontal)</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> {</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> g.<a class="code hl_function" href="class_i_graphics.html#aafa78e8658ed993d876cbb4d91397043">PathMoveTo</a>(x, getPlotPos(0, y, h));</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> </div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < sz; i++)</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> {</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="keywordtype">float</span> vx = x + ((float)i/(sz-1)) * w;</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keywordtype">float</span> vy = getPlotPos(i, y, h);</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> g.<a class="code hl_function" href="class_i_graphics.html#acd575e0411509a2fe05495ef05198a8d">PathLineTo</a>(vx, vy);</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> }</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> }</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="keywordflow">else</span></div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> {</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> g.<a class="code hl_function" href="class_i_graphics.html#aafa78e8658ed993d876cbb4d91397043">PathMoveTo</a>(getPlotPos(0, x, w), y);</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> </div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < sz; i++)</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> {</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <span class="keywordtype">float</span> vx = getPlotPos(i, x, w);</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keywordtype">float</span> vy = y + ((float)i/(sz-1)) * h;</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> g.<a class="code hl_function" href="class_i_graphics.html#acd575e0411509a2fe05495ef05198a8d">PathLineTo</a>(vx, vy);</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> }</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> }</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <a class="code hl_struct" href="group___i_graphics_structs.html#struct_i_stroke_options">IStrokeOptions</a> strokeOptions;</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> strokeOptions.mJoinOption = ELineJoin::Bevel;</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> g.<a class="code hl_function" href="class_i_graphics.html#a5b28bcb1e3e7e72307ceee71ab7fbb5a">PathStroke</a>(<a class="code hl_function" href="struct_i_pattern.html#a7d87f119ecd420d14b421d66c453c746">IPattern::CreateLinearGradient</a>(mPlotBounds, mDirection, {{COLOR_TRANSPARENT, 0.f}, {<a class="code hl_function" href="class_i_vector_base.html#ac7bbfa5e773c9c8bd2e76319aa5c58b5">GetColor</a>(kX1), 1.f}}), mStrokeThickness, strokeOptions, &mBlend);</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> }</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> </div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"><a class="line" href="class_i_v_display_control.html#aa1ebd1026d2642b8c8008e2cc50a0433"> 110</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_i_v_display_control.html#aa1ebd1026d2642b8c8008e2cc50a0433">OnMsgFromDelegate</a>(<span class="keywordtype">int</span> msgTag, <span class="keywordtype">int</span> dataSize, <span class="keyword">const</span> <span class="keywordtype">void</span>* pData)<span class="keyword"> override</span></div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span><span class="keyword"> </span>{</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <span class="keyword">auto</span> Update = [&](<span class="keywordtype">float</span> v) {</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> mBuffer[mReadPos] = v;</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> mReadPos = (mReadPos+1) % mBuffer.size();</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <a class="code hl_function" href="class_i_control.html#af8c805c09b1a89f44aec43026fcb1fe7">SetDirty</a>(<span class="keyword">false</span>);</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> };</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> </div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="keywordflow">if</span> (!<a class="code hl_function" href="class_i_control.html#a498bd0f85778e3c4205b0b7158361b48">IsDisabled</a>() && msgTag == <a class="code hl_class" href="class_i_sender.html">ISender<>::kUpdateMessage</a>)</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> {</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <a class="code hl_class" href="class_i_byte_stream.html">IByteStream</a> stream(pData, dataSize);</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> </div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="keywordtype">int</span> pos = 0;</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <a class="code hl_struct" href="struct_i_sender_data.html">ISenderData<1></a> d;</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> pos = stream.<a class="code hl_function" href="class_i_byte_stream.html#a6a559e06ec65ba71667b37265c1061da">Get</a>(&d, pos);</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> Update(d.vals[0]);</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> }</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> }</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> </div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> std::vector<float> mBuffer;</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="keywordtype">float</span> mLoValue = 0.f;</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <span class="keywordtype">float</span> mHiValue = 1.f;</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="keywordtype">int</span> mReadPos = 0;</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <span class="keywordtype">float</span> mStrokeThickness = 2.f;</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> EDirection mDirection;</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <a class="code hl_struct" href="struct_i_r_e_c_t.html">IRECT</a> mPlotBounds;</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span>};</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> </div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span>END_IGRAPHICS_NAMESPACE</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span>END_IPLUG_NAMESPACE</div>
<div class="ttc" id="a_i_control_8h_html"><div class="ttname"><a href="_i_control_8h.html">IControl.h</a></div><div class="ttdoc">This file contains the base IControl implementation, along with some base classes for specific types ...</div></div>
<div class="ttc" id="a_i_sender_8h_html"><div class="ttname"><a href="_i_sender_8h.html">ISender.h</a></div></div>
<div class="ttc" id="aclass_i_byte_stream_html"><div class="ttname"><a href="class_i_byte_stream.html">IByteStream</a></div><div class="ttdoc">Manages a non-owned block of memory, for receiving arbitrary message byte streams.</div><div class="ttdef"><b>Definition:</b> <a href="_i_plug_structs_8h_source.html#l00267">IPlugStructs.h:268</a></div></div>
<div class="ttc" id="aclass_i_byte_stream_html_a6a559e06ec65ba71667b37265c1061da"><div class="ttname"><a href="class_i_byte_stream.html#a6a559e06ec65ba71667b37265c1061da">IByteStream::Get</a></div><div class="ttdeci">int Get(T *pDst, int startPos) const</div><div class="ttdoc">Get arbitary typed data from the stream.</div><div class="ttdef"><b>Definition:</b> <a href="_i_plug_structs_8h_source.html#l00289">IPlugStructs.h:289</a></div></div>
<div class="ttc" id="aclass_i_control_html"><div class="ttname"><a href="class_i_control.html">IControl</a></div><div class="ttdoc">The lowest level base class of an IGraphics control.</div><div class="ttdef"><b>Definition:</b> <a href="_i_control_8h_source.html#l00044">IControl.h:49</a></div></div>
<div class="ttc" id="aclass_i_control_html_a498bd0f85778e3c4205b0b7158361b48"><div class="ttname"><a href="class_i_control.html#a498bd0f85778e3c4205b0b7158361b48">IControl::IsDisabled</a></div><div class="ttdeci">bool IsDisabled() const</div><div class="ttdef"><b>Definition:</b> <a href="_i_control_8h_source.html#l00367">IControl.h:367</a></div></div>
<div class="ttc" id="aclass_i_control_html_a74b30c0e170fc9b19180c59565a6375d"><div class="ttname"><a href="class_i_control.html#a74b30c0e170fc9b19180c59565a6375d">IControl::SetTargetRECT</a></div><div class="ttdeci">void SetTargetRECT(const IRECT &bounds)</div><div class="ttdoc">Set the rectangular mouse tracking target area, within the graphics context for this control.</div><div class="ttdef"><b>Definition:</b> <a href="_i_control_8h_source.html#l00328">IControl.h:328</a></div></div>
<div class="ttc" id="aclass_i_control_html_af8c805c09b1a89f44aec43026fcb1fe7"><div class="ttname"><a href="class_i_control.html#af8c805c09b1a89f44aec43026fcb1fe7">IControl::SetDirty</a></div><div class="ttdeci">virtual void SetDirty(bool triggerAction=true, int valIdx=kNoValIdx)</div><div class="ttdoc">Mark the control as dirty, i.e.</div><div class="ttdef"><b>Definition:</b> <a href="_i_control_8cpp_source.html#l00198">IControl.cpp:198</a></div></div>
<div class="ttc" id="aclass_i_graphics_html"><div class="ttname"><a href="class_i_graphics.html">IGraphics</a></div><div class="ttdoc">The lowest level base class of an IGraphics context.</div><div class="ttdef"><b>Definition:</b> <a href="_i_graphics_8h_source.html#l00082">IGraphics.h:86</a></div></div>
<div class="ttc" id="aclass_i_graphics_html_a0a7bba668c103968e96fad159173eff3"><div class="ttname"><a href="class_i_graphics.html#a0a7bba668c103968e96fad159173eff3">IGraphics::DrawRect</a></div><div class="ttdeci">virtual void DrawRect(const IColor &color, const IRECT &bounds, const IBlend *pBlend=0, float thickness=1.f)</div><div class="ttdoc">Draw a rectangle to the graphics context.</div><div class="ttdef"><b>Definition:</b> <a href="_i_graphics_8cpp_source.html#l02505">IGraphics.cpp:2505</a></div></div>
<div class="ttc" id="aclass_i_graphics_html_a5b28bcb1e3e7e72307ceee71ab7fbb5a"><div class="ttname"><a href="class_i_graphics.html#a5b28bcb1e3e7e72307ceee71ab7fbb5a">IGraphics::PathStroke</a></div><div class="ttdeci">virtual void PathStroke(const IPattern &pattern, float thickness, const IStrokeOptions &options=IStrokeOptions(), const IBlend *pBlend=0)=0</div><div class="ttdoc">Stroke the current current path.</div></div>
<div class="ttc" id="aclass_i_graphics_html_aafa78e8658ed993d876cbb4d91397043"><div class="ttname"><a href="class_i_graphics.html#aafa78e8658ed993d876cbb4d91397043">IGraphics::PathMoveTo</a></div><div class="ttdeci">virtual void PathMoveTo(float x, float y)=0</div><div class="ttdoc">Move the current point in the current path.</div></div>
<div class="ttc" id="aclass_i_graphics_html_acd575e0411509a2fe05495ef05198a8d"><div class="ttname"><a href="class_i_graphics.html#acd575e0411509a2fe05495ef05198a8d">IGraphics::PathLineTo</a></div><div class="ttdeci">virtual void PathLineTo(float x, float y)=0</div><div class="ttdoc">Add a line to the current path from the current point to the specified location.</div></div>
<div class="ttc" id="aclass_i_sender_html"><div class="ttname"><a href="class_i_sender.html">ISender</a></div><div class="ttdoc">ISender is a utility class which can be used to defer data from the realtime audio processing and sen...</div><div class="ttdef"><b>Definition:</b> <a href="_i_sender_8h_source.html#l00065">ISender.h:66</a></div></div>
<div class="ttc" id="aclass_i_v_display_control_html"><div class="ttname"><a href="class_i_v_display_control.html">IVDisplayControl</a></div><div class="ttdoc">A control to display a rolling graphics of historical values.</div><div class="ttdef"><b>Definition:</b> <a href="_i_v_display_control_8h_source.html#l00026">IVDisplayControl.h:28</a></div></div>
<div class="ttc" id="aclass_i_v_display_control_html_aa1ebd1026d2642b8c8008e2cc50a0433"><div class="ttname"><a href="class_i_v_display_control.html#aa1ebd1026d2642b8c8008e2cc50a0433">IVDisplayControl::OnMsgFromDelegate</a></div><div class="ttdeci">void OnMsgFromDelegate(int msgTag, int dataSize, const void *pData) override</div><div class="ttdoc">Implement to receive messages sent to the control, see IEditorDelegate:SendControlMsgFromDelegate()</div><div class="ttdef"><b>Definition:</b> <a href="_i_v_display_control_8h_source.html#l00110">IVDisplayControl.h:110</a></div></div>
<div class="ttc" id="aclass_i_v_display_control_html_ab1bcfc1bc22d7e084572ac444d548e93"><div class="ttname"><a href="class_i_v_display_control.html#ab1bcfc1bc22d7e084572ac444d548e93">IVDisplayControl::Draw</a></div><div class="ttdeci">void Draw(IGraphics &g) override</div><div class="ttdoc">Draw the control to the graphics context.</div><div class="ttdef"><b>Definition:</b> <a href="_i_v_display_control_8h_source.html#l00058">IVDisplayControl.h:58</a></div></div>
<div class="ttc" id="aclass_i_v_display_control_html_aba09d9f71e583b6f639f72bcf6c900e2"><div class="ttname"><a href="class_i_v_display_control.html#aba09d9f71e583b6f639f72bcf6c900e2">IVDisplayControl::OnResize</a></div><div class="ttdeci">void OnResize() override</div><div class="ttdoc">Called when IControl is constructed or resized using SetRect().</div><div class="ttdef"><b>Definition:</b> <a href="_i_v_display_control_8h_source.html#l00046">IVDisplayControl.h:46</a></div></div>
<div class="ttc" id="aclass_i_v_display_control_html_aed3a21d5ad7cf24481c7ec261404b66f"><div class="ttname"><a href="class_i_v_display_control.html#aed3a21d5ad7cf24481c7ec261404b66f">IVDisplayControl::DrawWidget</a></div><div class="ttdeci">void DrawWidget(IGraphics &g) override</div><div class="ttdoc">Draw the IVControl main widget (override)</div><div class="ttdef"><b>Definition:</b> <a href="_i_v_display_control_8h_source.html#l00068">IVDisplayControl.h:68</a></div></div>
<div class="ttc" id="aclass_i_vector_base_html"><div class="ttname"><a href="class_i_vector_base.html">IVectorBase</a></div><div class="ttdoc">A base interface to be combined with IControl for vectorial controls "IVControls",...</div><div class="ttdef"><b>Definition:</b> <a href="_i_control_8h_source.html#l00761">IControl.h:762</a></div></div>
<div class="ttc" id="aclass_i_vector_base_html_a2cda013efaff29ffaa0142b5e9bde145"><div class="ttname"><a href="class_i_vector_base.html#a2cda013efaff29ffaa0142b5e9bde145">IVectorBase::MakeRects</a></div><div class="ttdeci">IRECT MakeRects(const IRECT &parent, bool hasHandle=false)</div><div class="ttdoc">Calculate the rectangles for the various areas, depending on the style.</div><div class="ttdef"><b>Definition:</b> <a href="_i_control_8h_source.html#l01163">IControl.h:1163</a></div></div>
<div class="ttc" id="aclass_i_vector_base_html_a34ede48b05e8aa446350eaf2e1bfc45a"><div class="ttname"><a href="class_i_vector_base.html#a34ede48b05e8aa446350eaf2e1bfc45a">IVectorBase::DrawBackground</a></div><div class="ttdeci">virtual void DrawBackground(IGraphics &g, const IRECT &rect)</div><div class="ttdoc">Draw the IVControl background (usually transparent)</div><div class="ttdef"><b>Definition:</b> <a href="_i_control_8h_source.html#l00881">IControl.h:881</a></div></div>
<div class="ttc" id="aclass_i_vector_base_html_aaeaad70c3715e71344c9e589461483c8"><div class="ttname"><a href="class_i_vector_base.html#aaeaad70c3715e71344c9e589461483c8">IVectorBase::AttachIControl</a></div><div class="ttdeci">void AttachIControl(IControl *pControl, const char *label)</div><div class="ttdoc">Call in the constructor of your IVControl to link the IVectorBase and IControl.</div><div class="ttdef"><b>Definition:</b> <a href="_i_control_8h_source.html#l00780">IControl.h:780</a></div></div>
<div class="ttc" id="aclass_i_vector_base_html_ac0f3b5b90568f751a2a4e2b12f4f18e8"><div class="ttname"><a href="class_i_vector_base.html#ac0f3b5b90568f751a2a4e2b12f4f18e8">IVectorBase::DrawLabel</a></div><div class="ttdeci">virtual void DrawLabel(IGraphics &g)</div><div class="ttdoc">Draw the IVControl label text.</div><div class="ttdef"><b>Definition:</b> <a href="_i_control_8h_source.html#l00894">IControl.h:894</a></div></div>
<div class="ttc" id="aclass_i_vector_base_html_ac7bbfa5e773c9c8bd2e76319aa5c58b5"><div class="ttname"><a href="class_i_vector_base.html#ac7bbfa5e773c9c8bd2e76319aa5c58b5">IVectorBase::GetColor</a></div><div class="ttdeci">const IColor & GetColor(EVColor color) const</div><div class="ttdoc">Get value of a specific EVColor in the IVControl.</div><div class="ttdef"><b>Definition:</b> <a href="_i_control_8h_source.html#l00806">IControl.h:806</a></div></div>
<div class="ttc" id="agroup___i_graphics_structs_html_struct_i_stroke_options"><div class="ttname"><a href="group___i_graphics_structs.html#struct_i_stroke_options">IStrokeOptions</a></div><div class="ttdoc">Used to manage stroke behaviour for path based drawing back ends.</div><div class="ttdef"><b>Definition:</b> <a href="_i_graphics_structs_8h_source.html#l00589">IGraphicsStructs.h:590</a></div></div>
<div class="ttc" id="astruct_i_pattern_html_a7d87f119ecd420d14b421d66c453c746"><div class="ttname"><a href="struct_i_pattern.html#a7d87f119ecd420d14b421d66c453c746">IPattern::CreateLinearGradient</a></div><div class="ttdeci">static IPattern CreateLinearGradient(float x1, float y1, float x2, float y2, const std::initializer_list< IColorStop > &stops={})</div><div class="ttdoc">Create a linear gradient IPattern.</div><div class="ttdef"><b>Definition:</b> <a href="_i_graphics_structs_8h_source.html#l02176">IGraphicsStructs.h:2176</a></div></div>
<div class="ttc" id="astruct_i_r_e_c_t_html"><div class="ttname"><a href="struct_i_r_e_c_t.html">IRECT</a></div><div class="ttdoc">Used to manage a rectangular area, independent of draw class/platform.</div><div class="ttdef"><b>Definition:</b> <a href="_i_graphics_structs_8h_source.html#l00748">IGraphicsStructs.h:749</a></div></div>
<div class="ttc" id="astruct_i_r_e_c_t_html_a9d21ea21ff622e370664267c12cc7c24"><div class="ttname"><a href="struct_i_r_e_c_t.html#a9d21ea21ff622e370664267c12cc7c24">IRECT::W</a></div><div class="ttdeci">float W() const</div><div class="ttdef"><b>Definition:</b> <a href="_i_graphics_structs_8h_source.html#l00824">IGraphicsStructs.h:824</a></div></div>
<div class="ttc" id="astruct_i_r_e_c_t_html_ac7252cd16f74972ce29d481f47d4a784"><div class="ttname"><a href="struct_i_r_e_c_t.html#ac7252cd16f74972ce29d481f47d4a784">IRECT::H</a></div><div class="ttdeci">float H() const</div><div class="ttdef"><b>Definition:</b> <a href="_i_graphics_structs_8h_source.html#l00827">IGraphicsStructs.h:827</a></div></div>
<div class="ttc" id="astruct_i_r_e_c_t_html_af020b51247a87c9427041307c53dd6d7"><div class="ttname"><a href="struct_i_r_e_c_t.html#af020b51247a87c9427041307c53dd6d7">IRECT::GetPadded</a></div><div class="ttdeci">IRECT GetPadded(float padding) const</div><div class="ttdoc">Get a copy of this IRECT with each value padded by padding N.B.</div><div class="ttdef"><b>Definition:</b> <a href="_i_graphics_structs_8h_source.html#l01340">IGraphicsStructs.h:1340</a></div></div>
<div class="ttc" id="astruct_i_sender_data_html"><div class="ttname"><a href="struct_i_sender_data.html">ISenderData</a></div><div class="ttdoc">ISenderData is used to represent a typed data packet, that may contain values for multiple channels.</div><div class="ttdef"><b>Definition:</b> <a href="_i_sender_8h_source.html#l00034">ISender.h:35</a></div></div>
<div class="ttc" id="astruct_i_v_style_html"><div class="ttname"><a href="struct_i_v_style.html">IVStyle</a></div><div class="ttdoc">A struct encapsulating a set of properties used to configure IVControls.</div><div class="ttdef"><b>Definition:</b> <a href="_i_graphics_structs_8h_source.html#l02484">IGraphicsStructs.h:2485</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>