/usr/share/doc/libjuce/apiref/classComponentBuilder.html is in libjuce-doc 4.3.0~repack-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 | <!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.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>JUCE: ComponentBuilder Class 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>
<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 style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">JUCE
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</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">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> |
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-attribs">Public Attributes</a> |
<a href="#pub-static-attribs">Static Public Attributes</a> |
<a href="classComponentBuilder-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">ComponentBuilder Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Loads and maintains a tree of Components from a <a class="el" href="classValueTree.html" title="A powerful tree structure that can be used to hold free-form data, and which can handle its own undo ...">ValueTree</a> that represents them.
<a href="classComponentBuilder.html#details">More...</a></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
<img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for ComponentBuilder:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center">
<img src="classComponentBuilder.png" usemap="#ComponentBuilder_map" alt=""/>
<map id="ComponentBuilder_map" name="ComponentBuilder_map">
<area href="classValueTree_1_1Listener.html" title="Listener class for events that happen to a ValueTree. " alt="ValueTree::Listener" shape="rect" coords="0,0,122,24"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a 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="classComponentBuilder_1_1ImageProvider.html">ImageProvider</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">This class is used when references to images need to be stored in ValueTrees. <a href="classComponentBuilder_1_1ImageProvider.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classComponentBuilder_1_1TypeHandler.html">TypeHandler</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">The class is a base class for objects that manage the loading of a type of component from a <a class="el" href="classValueTree.html" title="A powerful tree structure that can be used to hold free-form data, and which can handle its own undo ...">ValueTree</a>. <a href="classComponentBuilder_1_1TypeHandler.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a129bcaf6b54dba4b8ffd87a3a69db5dc"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classComponentBuilder.html#a129bcaf6b54dba4b8ffd87a3a69db5dc">ComponentBuilder</a> (const <a class="el" href="classValueTree.html">ValueTree</a> &<a class="el" href="classComponentBuilder.html#af09fdfb8bb0edf0a6c2f19d5d54563f4">state</a>)</td></tr>
<tr class="memdesc:a129bcaf6b54dba4b8ffd87a3a69db5dc"><td class="mdescLeft"> </td><td class="mdescRight">Creates a <a class="el" href="classComponentBuilder.html" title="Loads and maintains a tree of Components from a ValueTree that represents them. ">ComponentBuilder</a> that will use the given state. <a href="#a129bcaf6b54dba4b8ffd87a3a69db5dc">More...</a><br /></td></tr>
<tr class="separator:a129bcaf6b54dba4b8ffd87a3a69db5dc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0f565ba5e93bab1e079db4714e7169ca"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classComponentBuilder.html#a0f565ba5e93bab1e079db4714e7169ca">ComponentBuilder</a> ()</td></tr>
<tr class="memdesc:a0f565ba5e93bab1e079db4714e7169ca"><td class="mdescLeft"> </td><td class="mdescRight">Creates a builder that doesn't have a state object. <a href="#a0f565ba5e93bab1e079db4714e7169ca">More...</a><br /></td></tr>
<tr class="separator:a0f565ba5e93bab1e079db4714e7169ca"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a49cd066bf7fe3cb4711c3d68c6087fa3"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classComponentBuilder.html#a49cd066bf7fe3cb4711c3d68c6087fa3">~ComponentBuilder</a> ()</td></tr>
<tr class="memdesc:a49cd066bf7fe3cb4711c3d68c6087fa3"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#a49cd066bf7fe3cb4711c3d68c6087fa3">More...</a><br /></td></tr>
<tr class="separator:a49cd066bf7fe3cb4711c3d68c6087fa3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6d22c2e9d567af9e140ae4200b9dc493"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classComponent.html">Component</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classComponentBuilder.html#a6d22c2e9d567af9e140ae4200b9dc493">getManagedComponent</a> ()</td></tr>
<tr class="memdesc:a6d22c2e9d567af9e140ae4200b9dc493"><td class="mdescLeft"> </td><td class="mdescRight">Returns the builder's component (creating it if necessary). <a href="#a6d22c2e9d567af9e140ae4200b9dc493">More...</a><br /></td></tr>
<tr class="separator:a6d22c2e9d567af9e140ae4200b9dc493"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8758d00b4832dfe9447b0cfa352e8270"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classComponent.html">Component</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classComponentBuilder.html#a8758d00b4832dfe9447b0cfa352e8270">createComponent</a> ()</td></tr>
<tr class="memdesc:a8758d00b4832dfe9447b0cfa352e8270"><td class="mdescLeft"> </td><td class="mdescRight">Creates and returns a new instance of the component that the <a class="el" href="classValueTree.html" title="A powerful tree structure that can be used to hold free-form data, and which can handle its own undo ...">ValueTree</a> represents. <a href="#a8758d00b4832dfe9447b0cfa352e8270">More...</a><br /></td></tr>
<tr class="separator:a8758d00b4832dfe9447b0cfa352e8270"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a97053a0ddf882ea7c6178ad06985865c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classComponentBuilder.html#a97053a0ddf882ea7c6178ad06985865c">registerTypeHandler</a> (<a class="el" href="classComponentBuilder_1_1TypeHandler.html">TypeHandler</a> *type)</td></tr>
<tr class="memdesc:a97053a0ddf882ea7c6178ad06985865c"><td class="mdescLeft"> </td><td class="mdescRight">Adds a type handler that the builder can use when trying to load components. <a href="#a97053a0ddf882ea7c6178ad06985865c">More...</a><br /></td></tr>
<tr class="separator:a97053a0ddf882ea7c6178ad06985865c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a647147ef919f8c50cfb7c8958aa6df2c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classComponentBuilder_1_1TypeHandler.html">TypeHandler</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classComponentBuilder.html#a647147ef919f8c50cfb7c8958aa6df2c">getHandlerForState</a> (const <a class="el" href="classValueTree.html">ValueTree</a> &<a class="el" href="classComponentBuilder.html#af09fdfb8bb0edf0a6c2f19d5d54563f4">state</a>) const</td></tr>
<tr class="memdesc:a647147ef919f8c50cfb7c8958aa6df2c"><td class="mdescLeft"> </td><td class="mdescRight">Tries to find a registered type handler that can load a component from the given <a class="el" href="classValueTree.html" title="A powerful tree structure that can be used to hold free-form data, and which can handle its own undo ...">ValueTree</a>. <a href="#a647147ef919f8c50cfb7c8958aa6df2c">More...</a><br /></td></tr>
<tr class="separator:a647147ef919f8c50cfb7c8958aa6df2c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a31c6a85cefbac6a0647c8c62d730bc90"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classComponentBuilder.html#a31c6a85cefbac6a0647c8c62d730bc90">getNumHandlers</a> () const noexcept</td></tr>
<tr class="memdesc:a31c6a85cefbac6a0647c8c62d730bc90"><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of registered type handlers. <a href="#a31c6a85cefbac6a0647c8c62d730bc90">More...</a><br /></td></tr>
<tr class="separator:a31c6a85cefbac6a0647c8c62d730bc90"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a386ce324816c401a08344991a90adc9b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classComponentBuilder_1_1TypeHandler.html">TypeHandler</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classComponentBuilder.html#a386ce324816c401a08344991a90adc9b">getHandler</a> (int index) const noexcept</td></tr>
<tr class="memdesc:a386ce324816c401a08344991a90adc9b"><td class="mdescLeft"> </td><td class="mdescRight">Returns one of the registered type handlers. <a href="#a386ce324816c401a08344991a90adc9b">More...</a><br /></td></tr>
<tr class="separator:a386ce324816c401a08344991a90adc9b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a94f0dd79ea5bc434bce91e1139e8ccc8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classComponentBuilder.html#a94f0dd79ea5bc434bce91e1139e8ccc8">registerStandardComponentTypes</a> ()</td></tr>
<tr class="memdesc:a94f0dd79ea5bc434bce91e1139e8ccc8"><td class="mdescLeft"> </td><td class="mdescRight">Registers handlers for various standard juce components. <a href="#a94f0dd79ea5bc434bce91e1139e8ccc8">More...</a><br /></td></tr>
<tr class="separator:a94f0dd79ea5bc434bce91e1139e8ccc8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4eac18667dc404ad636bb72d8e836667"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classComponentBuilder.html#a4eac18667dc404ad636bb72d8e836667">setImageProvider</a> (<a class="el" href="classComponentBuilder_1_1ImageProvider.html">ImageProvider</a> *newImageProvider) noexcept</td></tr>
<tr class="memdesc:a4eac18667dc404ad636bb72d8e836667"><td class="mdescLeft"> </td><td class="mdescRight">Gives the builder an <a class="el" href="classComponentBuilder_1_1ImageProvider.html" title="This class is used when references to images need to be stored in ValueTrees. ">ImageProvider</a> object that the type handlers can use when loading images from stored references. <a href="#a4eac18667dc404ad636bb72d8e836667">More...</a><br /></td></tr>
<tr class="separator:a4eac18667dc404ad636bb72d8e836667"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a52784294955a92a505ecdff6347d46e3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classComponentBuilder_1_1ImageProvider.html">ImageProvider</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classComponentBuilder.html#a52784294955a92a505ecdff6347d46e3">getImageProvider</a> () const noexcept</td></tr>
<tr class="memdesc:a52784294955a92a505ecdff6347d46e3"><td class="mdescLeft"> </td><td class="mdescRight">Returns the current image provider that this builder is using, or nullptr if none has been set. <a href="#a52784294955a92a505ecdff6347d46e3">More...</a><br /></td></tr>
<tr class="separator:a52784294955a92a505ecdff6347d46e3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ada58c44d9f924f56b43f9552c537f30a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classComponentBuilder.html#ada58c44d9f924f56b43f9552c537f30a">updateChildComponents</a> (<a class="el" href="classComponent.html">Component</a> &parent, const <a class="el" href="classValueTree.html">ValueTree</a> &children)</td></tr>
<tr class="memdesc:ada58c44d9f924f56b43f9552c537f30a"><td class="mdescLeft"> </td><td class="mdescRight">Updates the children of a parent component by updating them from the children of a given <a class="el" href="classValueTree.html" title="A powerful tree structure that can be used to hold free-form data, and which can handle its own undo ...">ValueTree</a>. <a href="#ada58c44d9f924f56b43f9552c537f30a">More...</a><br /></td></tr>
<tr class="separator:ada58c44d9f924f56b43f9552c537f30a"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:af09fdfb8bb0edf0a6c2f19d5d54563f4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classValueTree.html">ValueTree</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classComponentBuilder.html#af09fdfb8bb0edf0a6c2f19d5d54563f4">state</a></td></tr>
<tr class="memdesc:af09fdfb8bb0edf0a6c2f19d5d54563f4"><td class="mdescLeft"> </td><td class="mdescRight">This is the <a class="el" href="classValueTree.html" title="A powerful tree structure that can be used to hold free-form data, and which can handle its own undo ...">ValueTree</a> data object that the builder is working with. <a href="#af09fdfb8bb0edf0a6c2f19d5d54563f4">More...</a><br /></td></tr>
<tr class="separator:af09fdfb8bb0edf0a6c2f19d5d54563f4"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:aded44aa66f9f06a544e758dc6391664e"><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="classIdentifier.html">Identifier</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classComponentBuilder.html#aded44aa66f9f06a544e758dc6391664e">idProperty</a></td></tr>
<tr class="memdesc:aded44aa66f9f06a544e758dc6391664e"><td class="mdescLeft"> </td><td class="mdescRight">An identifier for the property of the ValueTrees that is used to store a unique ID for that component. <a href="#aded44aa66f9f06a544e758dc6391664e">More...</a><br /></td></tr>
<tr class="separator:aded44aa66f9f06a544e758dc6391664e"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Loads and maintains a tree of Components from a <a class="el" href="classValueTree.html" title="A powerful tree structure that can be used to hold free-form data, and which can handle its own undo ...">ValueTree</a> that represents them. </p>
<p>To allow the state of a tree of components to be saved as a <a class="el" href="classValueTree.html" title="A powerful tree structure that can be used to hold free-form data, and which can handle its own undo ...">ValueTree</a> and re-loaded, this class lets you register a set of type-handlers for the different components that are involved, and then uses these types to re-create a set of components from its stored state.</p>
<p>Essentially, to use this, you need to create a <a class="el" href="classComponentBuilder.html" title="Loads and maintains a tree of Components from a ValueTree that represents them. ">ComponentBuilder</a> with your <a class="el" href="classValueTree.html" title="A powerful tree structure that can be used to hold free-form data, and which can handle its own undo ...">ValueTree</a>, then use <a class="el" href="classComponentBuilder.html#a97053a0ddf882ea7c6178ad06985865c" title="Adds a type handler that the builder can use when trying to load components. ">registerTypeHandler()</a> to give it a set of type handlers that can cope with all the items in your tree. Then you can call getComponent() to build the component. Once you've got the component you can either take it and delete the <a class="el" href="classComponentBuilder.html" title="Loads and maintains a tree of Components from a ValueTree that represents them. ">ComponentBuilder</a> object, or if you keep the <a class="el" href="classComponentBuilder.html" title="Loads and maintains a tree of Components from a ValueTree that represents them. ">ComponentBuilder</a> around, it'll monitor any changes in the <a class="el" href="classValueTree.html" title="A powerful tree structure that can be used to hold free-form data, and which can handle its own undo ...">ValueTree</a> and automatically update the component to reflect these changes. </p>
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a id="a129bcaf6b54dba4b8ffd87a3a69db5dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a129bcaf6b54dba4b8ffd87a3a69db5dc">§ </a></span>ComponentBuilder() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">ComponentBuilder::ComponentBuilder </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classValueTree.html">ValueTree</a> & </td>
<td class="paramname"><em>state</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a <a class="el" href="classComponentBuilder.html" title="Loads and maintains a tree of Components from a ValueTree that represents them. ">ComponentBuilder</a> that will use the given state. </p>
<p>Once you've created your builder, you should use <a class="el" href="classComponentBuilder.html#a97053a0ddf882ea7c6178ad06985865c" title="Adds a type handler that the builder can use when trying to load components. ">registerTypeHandler()</a> to register some type handlers for it, and then you can call <a class="el" href="classComponentBuilder.html#a8758d00b4832dfe9447b0cfa352e8270" title="Creates and returns a new instance of the component that the ValueTree represents. ">createComponent()</a> or <a class="el" href="classComponentBuilder.html#a6d22c2e9d567af9e140ae4200b9dc493" title="Returns the builder's component (creating it if necessary). ">getManagedComponent()</a> to get the actual component. </p>
</div>
</div>
<a id="a0f565ba5e93bab1e079db4714e7169ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f565ba5e93bab1e079db4714e7169ca">§ </a></span>ComponentBuilder() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ComponentBuilder::ComponentBuilder </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a builder that doesn't have a state object. </p>
</div>
</div>
<a id="a49cd066bf7fe3cb4711c3d68c6087fa3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49cd066bf7fe3cb4711c3d68c6087fa3">§ </a></span>~ComponentBuilder()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ComponentBuilder::~ComponentBuilder </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Destructor. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a6d22c2e9d567af9e140ae4200b9dc493"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6d22c2e9d567af9e140ae4200b9dc493">§ </a></span>getManagedComponent()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classComponent.html">Component</a>* ComponentBuilder::getManagedComponent </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the builder's component (creating it if necessary). </p>
<p>The first time that this method is called, the builder will attempt to create a component from the <a class="el" href="classValueTree.html" title="A powerful tree structure that can be used to hold free-form data, and which can handle its own undo ...">ValueTree</a>, so you must have registered some suitable type handlers before calling this. If there's a problem and the component can't be created, this method returns nullptr.</p>
<p>The component that is returned is owned by this <a class="el" href="classComponentBuilder.html" title="Loads and maintains a tree of Components from a ValueTree that represents them. ">ComponentBuilder</a>, so you can put it inside your own parent components, but don't delete it! The <a class="el" href="classComponentBuilder.html" title="Loads and maintains a tree of Components from a ValueTree that represents them. ">ComponentBuilder</a> will delete it automatically when the builder is destroyed. If you want to get a component that you can delete yourself, call <a class="el" href="classComponentBuilder.html#a8758d00b4832dfe9447b0cfa352e8270" title="Creates and returns a new instance of the component that the ValueTree represents. ">createComponent()</a> instead.</p>
<p>The <a class="el" href="classComponentBuilder.html" title="Loads and maintains a tree of Components from a ValueTree that represents them. ">ComponentBuilder</a> will update this component if any changes are made to the <a class="el" href="classValueTree.html" title="A powerful tree structure that can be used to hold free-form data, and which can handle its own undo ...">ValueTree</a>, so if there's a chance that the tree might change, be careful not to keep any pointers to sub-components, as they may be changed or removed. </p>
</div>
</div>
<a id="a8758d00b4832dfe9447b0cfa352e8270"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8758d00b4832dfe9447b0cfa352e8270">§ </a></span>createComponent()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classComponent.html">Component</a>* ComponentBuilder::createComponent </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates and returns a new instance of the component that the <a class="el" href="classValueTree.html" title="A powerful tree structure that can be used to hold free-form data, and which can handle its own undo ...">ValueTree</a> represents. </p>
<p>The caller is responsible for using and deleting the object that is returned. Unlike <a class="el" href="classComponentBuilder.html#a6d22c2e9d567af9e140ae4200b9dc493" title="Returns the builder's component (creating it if necessary). ">getManagedComponent()</a>, the component that is returned will not be updated by the builder. </p>
</div>
</div>
<a id="a97053a0ddf882ea7c6178ad06985865c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a97053a0ddf882ea7c6178ad06985865c">§ </a></span>registerTypeHandler()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ComponentBuilder::registerTypeHandler </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classComponentBuilder_1_1TypeHandler.html">TypeHandler</a> * </td>
<td class="paramname"><em>type</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Adds a type handler that the builder can use when trying to load components. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classDrawable.html#a53870971c976cb6a7f37b67bc1e1929c" title="Registers a set of ComponentBuilder::TypeHandler objects that can be used to load all the different D...">Drawable::registerDrawableTypeHandlers()</a> </dd></dl>
</div>
</div>
<a id="a647147ef919f8c50cfb7c8958aa6df2c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a647147ef919f8c50cfb7c8958aa6df2c">§ </a></span>getHandlerForState()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classComponentBuilder_1_1TypeHandler.html">TypeHandler</a>* ComponentBuilder::getHandlerForState </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classValueTree.html">ValueTree</a> & </td>
<td class="paramname"><em>state</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Tries to find a registered type handler that can load a component from the given <a class="el" href="classValueTree.html" title="A powerful tree structure that can be used to hold free-form data, and which can handle its own undo ...">ValueTree</a>. </p>
</div>
</div>
<a id="a31c6a85cefbac6a0647c8c62d730bc90"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a31c6a85cefbac6a0647c8c62d730bc90">§ </a></span>getNumHandlers()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int ComponentBuilder::getNumHandlers </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the number of registered type handlers. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classComponentBuilder.html#a386ce324816c401a08344991a90adc9b" title="Returns one of the registered type handlers. ">getHandler</a>, <a class="el" href="classComponentBuilder.html#a97053a0ddf882ea7c6178ad06985865c" title="Adds a type handler that the builder can use when trying to load components. ">registerTypeHandler</a> </dd></dl>
</div>
</div>
<a id="a386ce324816c401a08344991a90adc9b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a386ce324816c401a08344991a90adc9b">§ </a></span>getHandler()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classComponentBuilder_1_1TypeHandler.html">TypeHandler</a>* ComponentBuilder::getHandler </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>index</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns one of the registered type handlers. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classComponentBuilder.html#a31c6a85cefbac6a0647c8c62d730bc90" title="Returns the number of registered type handlers. ">getNumHandlers</a>, <a class="el" href="classComponentBuilder.html#a97053a0ddf882ea7c6178ad06985865c" title="Adds a type handler that the builder can use when trying to load components. ">registerTypeHandler</a> </dd></dl>
</div>
</div>
<a id="a94f0dd79ea5bc434bce91e1139e8ccc8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a94f0dd79ea5bc434bce91e1139e8ccc8">§ </a></span>registerStandardComponentTypes()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ComponentBuilder::registerStandardComponentTypes </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Registers handlers for various standard juce components. </p>
</div>
</div>
<a id="a4eac18667dc404ad636bb72d8e836667"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4eac18667dc404ad636bb72d8e836667">§ </a></span>setImageProvider()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void ComponentBuilder::setImageProvider </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classComponentBuilder_1_1ImageProvider.html">ImageProvider</a> * </td>
<td class="paramname"><em>newImageProvider</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gives the builder an <a class="el" href="classComponentBuilder_1_1ImageProvider.html" title="This class is used when references to images need to be stored in ValueTrees. ">ImageProvider</a> object that the type handlers can use when loading images from stored references. </p>
<p>The object that is passed in is not owned by the builder, so the caller must delete it when it is no longer needed, but not while the builder may still be using it. To clear the image provider, just call setImageProvider (nullptr). </p>
</div>
</div>
<a id="a52784294955a92a505ecdff6347d46e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a52784294955a92a505ecdff6347d46e3">§ </a></span>getImageProvider()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classComponentBuilder_1_1ImageProvider.html">ImageProvider</a>* ComponentBuilder::getImageProvider </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the current image provider that this builder is using, or nullptr if none has been set. </p>
</div>
</div>
<a id="ada58c44d9f924f56b43f9552c537f30a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ada58c44d9f924f56b43f9552c537f30a">§ </a></span>updateChildComponents()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ComponentBuilder::updateChildComponents </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classComponent.html">Component</a> & </td>
<td class="paramname"><em>parent</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classValueTree.html">ValueTree</a> & </td>
<td class="paramname"><em>children</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Updates the children of a parent component by updating them from the children of a given <a class="el" href="classValueTree.html" title="A powerful tree structure that can be used to hold free-form data, and which can handle its own undo ...">ValueTree</a>. </p>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="af09fdfb8bb0edf0a6c2f19d5d54563f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af09fdfb8bb0edf0a6c2f19d5d54563f4">§ </a></span>state</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classValueTree.html">ValueTree</a> ComponentBuilder::state</td>
</tr>
</table>
</div><div class="memdoc">
<p>This is the <a class="el" href="classValueTree.html" title="A powerful tree structure that can be used to hold free-form data, and which can handle its own undo ...">ValueTree</a> data object that the builder is working with. </p>
</div>
</div>
<a id="aded44aa66f9f06a544e758dc6391664e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aded44aa66f9f06a544e758dc6391664e">§ </a></span>idProperty</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classIdentifier.html">Identifier</a> ComponentBuilder::idProperty</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>An identifier for the property of the ValueTrees that is used to store a unique ID for that component. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="juce__ComponentBuilder_8h.html">juce_ComponentBuilder.h</a></li>
</ul>
</div><!-- contents -->
<hr class="footer"/>
<address class="footer"><small>All content © ROLI Ltd.</small></address><br/>
</body>
</html>
|