-
Notifications
You must be signed in to change notification settings - Fork 0
/
_i_about_box_control_8h.html
147 lines (144 loc) · 13.7 KB
/
_i_about_box_control_8h.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
<!-- 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: IAboutBoxControl.h File Reference</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="summary">
<a href="#nested-classes">Classes</a> </div>
<div class="headertitle"><div class="title">IAboutBoxControl.h File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include "<a class="el" href="_i_controls_8h_source.html">IControls.h</a>"</code><br />
</div>
<p><a href="_i_about_box_control_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_i_about_box_control.html">IAboutBoxControl</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">A "meta control" which you can attach child controls to display an about box, or preferences panel When you attach the control to the <a class="el" href="class_i_graphics.html" title="The lowest level base class of an IGraphics context.">IGraphics</a> context, it should be added last so it sits on top of other controls, and set hidden. <a href="class_i_about_box_control.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >A "meta control" which you can attach child controls to display an about box, or preferences panel When you attach the control to the <a class="el" href="class_i_graphics.html" title="The lowest level base class of an IGraphics context.">IGraphics</a> context, it should be added last so it sits on top of other controls, and set hidden. </p>
<p >You can then call Show() to reveal it. When the control is dismissed, there is no animation.</p><ul>
<li>Basic usage example: <div class="fragment"><div class="line">pGraphics->AttachControl(<span class="keyword">new</span> <a class="code hl_class" href="class_i_about_box_control.html">IAboutBoxControl</a>(b,</div>
<div class="line">COLOR_BLACK,</div>
<div class="line"><span class="comment">// AttachFunc</span></div>
<div class="line">[](<a class="code hl_class" href="class_i_container_base.html">IContainerBase</a>* pParent, <span class="keyword">const</span> <a class="code hl_struct" href="struct_i_r_e_c_t.html">IRECT</a>& r) {</div>
<div class="line"> pParent->AddChildControl(<span class="keyword">new</span> <a class="code hl_class" href="class_i_text_control.html">ITextControl</a>(<a class="code hl_struct" href="struct_i_r_e_c_t.html">IRECT</a>(), <span class="stringliteral">"MyPlugin"</span>, {DEFAULT_TEXT_SIZE * 5, COLOR_WHITE}));</div>
<div class="line"> WDL_String versionStr {<span class="stringliteral">"Version "</span>};</div>
<div class="line"> versionStr.Append(PLUG_VERSION_STR);</div>
<div class="line"> pParent->AddChildControl(<span class="keyword">new</span> <a class="code hl_class" href="class_i_v_label_control.html">IVLabelControl</a>(<a class="code hl_struct" href="struct_i_r_e_c_t.html">IRECT</a>(), versionStr.Get()));</div>
<div class="line"> pParent->AddChildControl(<span class="keyword">new</span> <a class="code hl_class" href="class_i_v_label_control.html">IVLabelControl</a>(<a class="code hl_struct" href="struct_i_r_e_c_t.html">IRECT</a>(), <span class="stringliteral">"By Manufacturer"</span>));</div>
<div class="line"> pParent->AddChildControl(<span class="keyword">new</span> <a class="code hl_class" href="class_i_u_r_l_control.html">IURLControl</a>(<a class="code hl_struct" href="struct_i_r_e_c_t.html">IRECT</a>(),</div>
<div class="line"> <span class="stringliteral">"https://www.acmeinc.com"</span>,</div>
<div class="line"> <span class="stringliteral">"https://www.acmeinc.com"</span>, {DEFAULT_TEXT_SIZE, COLOR_WHITE}));</div>
<div class="line">},</div>
<div class="line"><span class="comment">// ResizeFunc</span></div>
<div class="line">[](<a class="code hl_class" href="class_i_container_base.html">IContainerBase</a>* pParent, <span class="keyword">const</span> <a class="code hl_struct" href="struct_i_r_e_c_t.html">IRECT</a>& r) {</div>
<div class="line"> <span class="keyword">const</span> <a class="code hl_struct" href="struct_i_r_e_c_t.html">IRECT</a> mainArea = r.<a class="code hl_function" href="struct_i_r_e_c_t.html#af020b51247a87c9427041307c53dd6d7">GetPadded</a>(-20);</div>
<div class="line"> <span class="keyword">const</span> <span class="keyword">auto</span> content = mainArea.<a class="code hl_function" href="struct_i_r_e_c_t.html#af020b51247a87c9427041307c53dd6d7">GetPadded</a>(-10);</div>
<div class="line"> <span class="keyword">const</span> <span class="keyword">auto</span> logo = content.<a class="code hl_function" href="struct_i_r_e_c_t.html#ac4efaa8048ca977199fec8ab573db59f">GetFromTop</a>(300).GetCentredInside(300, 100);</div>
<div class="line"> <span class="keyword">const</span> <span class="keyword">auto</span> links = content.<a class="code hl_function" href="struct_i_r_e_c_t.html#a77788285c639d095713c204adc635624">FracRectVertical</a>(0.75).GetCentredInside(300, 100);</div>
<div class="line"> pParent->GetChild(0)->SetTargetAndDrawRECTs(logo);</div>
<div class="line"> pParent->GetChild(1)->SetTargetAndDrawRECTs(links.SubRectVertical(4, 0));</div>
<div class="line"> pParent->GetChild(2)-><a class="code hl_function" href="class_i_control.html#adbacb08c7d1ca89c7ca29a464bdfd15a">SetTargetAndDrawRECTs</a>(links.SubRectVertical(4, 2));</div>
<div class="line"> pParent->GetChild(3)-><a class="code hl_function" href="class_i_control.html#adbacb08c7d1ca89c7ca29a464bdfd15a">SetTargetAndDrawRECTs</a>(links.SubRectVertical(4, 3));</div>
<div class="line">}, 200), kCtrlTagAboutBox)->Hide(<span class="keyword">true</span>);</div>
<div class="ttc" id="aclass_i_about_box_control_html"><div class="ttname"><a href="class_i_about_box_control.html">IAboutBoxControl</a></div><div class="ttdoc">A "meta control" which you can attach child controls to display an about box, or preferences panel Wh...</div><div class="ttdef"><b>Definition:</b> <a href="_i_about_box_control_8h_source.html#l00057">IAboutBoxControl.h:58</a></div></div>
<div class="ttc" id="aclass_i_container_base_html"><div class="ttname"><a href="class_i_container_base.html">IContainerBase</a></div><div class="ttdoc">IContainerBase allows a control to nest sub controls and it clips the drawing of those subcontrols In...</div><div class="ttdef"><b>Definition:</b> <a href="_i_control_8h_source.html#l00610">IControl.h:611</a></div></div>
<div class="ttc" id="aclass_i_control_html_adbacb08c7d1ca89c7ca29a464bdfd15a"><div class="ttname"><a href="class_i_control.html#adbacb08c7d1ca89c7ca29a464bdfd15a">IControl::SetTargetAndDrawRECTs</a></div><div class="ttdeci">void SetTargetAndDrawRECTs(const IRECT &bounds)</div><div class="ttdoc">Set BOTH the draw rect and the target area, within the graphics context for this control.</div><div class="ttdef"><b>Definition:</b> <a href="_i_control_8h_source.html#l00332">IControl.h:332</a></div></div>
<div class="ttc" id="aclass_i_text_control_html"><div class="ttname"><a href="class_i_text_control.html">ITextControl</a></div><div class="ttdoc">A basic control to display some text.</div><div class="ttdef"><b>Definition:</b> <a href="_i_control_8h_source.html#l02156">IControl.h:2157</a></div></div>
<div class="ttc" id="aclass_i_u_r_l_control_html"><div class="ttname"><a href="class_i_u_r_l_control.html">IURLControl</a></div><div class="ttdoc">A control to show a clickable URL, that changes color after clicking.</div><div class="ttdef"><b>Definition:</b> <a href="_i_control_8h_source.html#l02227">IControl.h:2228</a></div></div>
<div class="ttc" id="aclass_i_v_label_control_html"><div class="ttname"><a href="class_i_v_label_control.html">IVLabelControl</a></div><div class="ttdoc">A vector label control that can display text with a shadow.</div><div class="ttdef"><b>Definition:</b> <a href="_i_controls_8h_source.html#l00042">IControls.h:44</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_a77788285c639d095713c204adc635624"><div class="ttname"><a href="struct_i_r_e_c_t.html#a77788285c639d095713c204adc635624">IRECT::FracRectVertical</a></div><div class="ttdeci">IRECT FracRectVertical(float frac, bool fromTop=false) const</div><div class="ttdoc">Returns a new IRECT with a height that is multiplied by frac.</div><div class="ttdef"><b>Definition:</b> <a href="_i_graphics_structs_8h_source.html#l00954">IGraphicsStructs.h:954</a></div></div>
<div class="ttc" id="astruct_i_r_e_c_t_html_ac4efaa8048ca977199fec8ab573db59f"><div class="ttname"><a href="struct_i_r_e_c_t.html#ac4efaa8048ca977199fec8ab573db59f">IRECT::GetFromTop</a></div><div class="ttdeci">IRECT GetFromTop(float amount) const</div><div class="ttdoc">Get a subrect of this IRECT bounded in Y by the top edge and 'amount'.</div><div class="ttdef"><b>Definition:</b> <a href="_i_graphics_structs_8h_source.html#l01034">IGraphicsStructs.h:1034</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#l01329">IGraphicsStructs.h:1329</a></div></div>
</div><!-- fragment --> In a button control somewhere on the UI, call pGraphics->GetControlWithTag(kCtrlTagAboutBox)->As<IAboutBoxControl>()->Show(); in order to get the about box to appear. </li>
</ul>
<p class="definition">Definition in file <a class="el" href="_i_about_box_control_8h_source.html">IAboutBoxControl.h</a>.</p>
</div></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>