|
| 1 | +<!-- HTML header for doxygen 1.8.14--> |
| 2 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 | +<html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 | +<head> |
| 5 | +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 6 | +<meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| 7 | +<meta name="generator" content="Doxygen 1.9.5"/> |
| 8 | +<meta name="viewport" content="width=device-width, initial-scale=1"/> |
| 9 | +<title>iPlug 2: IAboutBoxControl.h File Reference</title> |
| 10 | +<link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 11 | +<script type="text/javascript" src="jquery.js"></script> |
| 12 | +<script type="text/javascript" src="dynsections.js"></script> |
| 13 | +<link href="search/search.css" rel="stylesheet" type="text/css"/> |
| 14 | +<script type="text/javascript" src="search/searchdata.js"></script> |
| 15 | +<script type="text/javascript" src="search/search.js"></script> |
| 16 | +<script type="text/x-mathjax-config"> |
| 17 | +MathJax.Hub.Config({ |
| 18 | + extensions: ["tex2jax.js"], |
| 19 | + jax: ["input/TeX","output/HTML-CSS"], |
| 20 | +}); |
| 21 | +</script> |
| 22 | +<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js"></script> |
| 23 | +<link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 24 | +<link href="style.css" rel="stylesheet" type="text/css"/> |
| 25 | +</head> |
| 26 | +<body> |
| 27 | +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 28 | +<div id="titlearea"> |
| 29 | +<table cellspacing="0" cellpadding="0"> |
| 30 | + <tbody> |
| 31 | + <tr style="height: 80px;"> |
| 32 | + <td id="projectalign" style="padding-left: 0.5em;"> |
| 33 | + <div id="projectname">iPlug2 - C++ Audio Plug-in Framework |
| 34 | + </div> |
| 35 | + </td> |
| 36 | + </tr> |
| 37 | + </tbody> |
| 38 | +</table> |
| 39 | +</div> |
| 40 | +<!-- end header part --> |
| 41 | +<!-- Generated by Doxygen 1.9.5 --> |
| 42 | +<script type="text/javascript"> |
| 43 | +/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ |
| 44 | +var searchBox = new SearchBox("searchBox", "search/",'.html'); |
| 45 | +/* @license-end */ |
| 46 | +</script> |
| 47 | +<script type="text/javascript" src="menudata.js"></script> |
| 48 | +<script type="text/javascript" src="menu.js"></script> |
| 49 | +<script type="text/javascript"> |
| 50 | +/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ |
| 51 | +$(function() { |
| 52 | + initMenu('',true,false,'search.php','Search'); |
| 53 | + $(document).ready(function() { init_search(); }); |
| 54 | +}); |
| 55 | +/* @license-end */ |
| 56 | +</script> |
| 57 | +<div id="main-nav"></div> |
| 58 | +<!-- window showing the filter options --> |
| 59 | +<div id="MSearchSelectWindow" |
| 60 | + onmouseover="return searchBox.OnSearchSelectShow()" |
| 61 | + onmouseout="return searchBox.OnSearchSelectHide()" |
| 62 | + onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| 63 | +</div> |
| 64 | + |
| 65 | +<!-- iframe showing the search results (closed by default) --> |
| 66 | +<div id="MSearchResultsWindow"> |
| 67 | +<div id="MSearchResults"> |
| 68 | +<div class="SRPage"> |
| 69 | +<div id="SRIndex"> |
| 70 | +<div id="SRResults"></div> |
| 71 | +<div class="SRStatus" id="Loading">Loading...</div> |
| 72 | +<div class="SRStatus" id="Searching">Searching...</div> |
| 73 | +<div class="SRStatus" id="NoMatches">No Matches</div> |
| 74 | +</div> |
| 75 | +</div> |
| 76 | +</div> |
| 77 | +</div> |
| 78 | + |
| 79 | +<div id="nav-path" class="navpath"> |
| 80 | + <ul> |
| 81 | +<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> |
| 82 | +</div> |
| 83 | +</div><!-- top --> |
| 84 | +<div class="header"> |
| 85 | + <div class="summary"> |
| 86 | +<a href="#nested-classes">Classes</a> </div> |
| 87 | + <div class="headertitle"><div class="title">IAboutBoxControl.h File Reference</div></div> |
| 88 | +</div><!--header--> |
| 89 | +<div class="contents"> |
| 90 | +<div class="textblock"><code>#include "<a class="el" href="_i_controls_8h_source.html">IControls.h</a>"</code><br /> |
| 91 | +</div> |
| 92 | +<p><a href="_i_about_box_control_8h_source.html">Go to the source code of this file.</a></p> |
| 93 | +<table class="memberdecls"> |
| 94 | +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a> |
| 95 | +Classes</h2></td></tr> |
| 96 | +<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> |
| 97 | +<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> |
| 98 | +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
| 99 | +</table> |
| 100 | +<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| 101 | +<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> |
| 102 | +<p >You can then call Show() to reveal it. When the control is dismissed, there is no animation.</p><ul> |
| 103 | +<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> |
| 104 | +<div class="line">COLOR_BLACK,</div> |
| 105 | +<div class="line"><span class="comment">// AttachFunc</span></div> |
| 106 | +<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> |
| 107 | +<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> |
| 108 | +<div class="line"> WDL_String versionStr {<span class="stringliteral">"Version "</span>};</div> |
| 109 | +<div class="line"> versionStr.Append(PLUG_VERSION_STR);</div> |
| 110 | +<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> |
| 111 | +<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> |
| 112 | +<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> |
| 113 | +<div class="line"> <span class="stringliteral">"https://www.acmeinc.com"</span>,</div> |
| 114 | +<div class="line"> <span class="stringliteral">"https://www.acmeinc.com"</span>, {DEFAULT_TEXT_SIZE, COLOR_WHITE}));</div> |
| 115 | +<div class="line">},</div> |
| 116 | +<div class="line"><span class="comment">// ResizeFunc</span></div> |
| 117 | +<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> |
| 118 | +<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> |
| 119 | +<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> |
| 120 | +<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> |
| 121 | +<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> |
| 122 | +<div class="line"> pParent->GetChild(0)->SetTargetAndDrawRECTs(logo);</div> |
| 123 | +<div class="line"> pParent->GetChild(1)->SetTargetAndDrawRECTs(links.SubRectVertical(4, 0));</div> |
| 124 | +<div class="line"> pParent->GetChild(2)-><a class="code hl_function" href="class_i_control.html#adbacb08c7d1ca89c7ca29a464bdfd15a">SetTargetAndDrawRECTs</a>(links.SubRectVertical(4, 2));</div> |
| 125 | +<div class="line"> pParent->GetChild(3)-><a class="code hl_function" href="class_i_control.html#adbacb08c7d1ca89c7ca29a464bdfd15a">SetTargetAndDrawRECTs</a>(links.SubRectVertical(4, 3));</div> |
| 126 | +<div class="line">}, 200), kCtrlTagAboutBox)->Hide(<span class="keyword">true</span>);</div> |
| 127 | +<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> |
| 128 | +<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#l00604">IControl.h:605</a></div></div> |
| 129 | +<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#l00326">IControl.h:326</a></div></div> |
| 130 | +<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#l02120">IControl.h:2121</a></div></div> |
| 131 | +<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#l02174">IControl.h:2175</a></div></div> |
| 132 | +<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> |
| 133 | +<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#l00747">IGraphicsStructs.h:748</a></div></div> |
| 134 | +<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#l00953">IGraphicsStructs.h:953</a></div></div> |
| 135 | +<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#l01033">IGraphicsStructs.h:1033</a></div></div> |
| 136 | +<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#l01328">IGraphicsStructs.h:1328</a></div></div> |
| 137 | +</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> |
| 138 | +</ul> |
| 139 | + |
| 140 | +<p class="definition">Definition in file <a class="el" href="_i_about_box_control_8h_source.html">IAboutBoxControl.h</a>.</p> |
| 141 | +</div></div><!-- contents --> |
| 142 | +<!-- start footer part --> |
| 143 | +<hr class="footer"/><address class="footer"><small> |
| 144 | +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 |
| 145 | +</small></address> |
| 146 | +</body> |
| 147 | +</html> |
0 commit comments