/usr/share/doc/libjuce/apiref/classApplicationCommandTarget.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 | <!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: ApplicationCommandTarget 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="classApplicationCommandTarget-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">ApplicationCommandTarget Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p>A command target publishes a list of command IDs that it can perform.
<a href="classApplicationCommandTarget.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 ApplicationCommandTarget:</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="classApplicationCommandTarget.png" usemap="#ApplicationCommandTarget_map" alt=""/>
<map id="ApplicationCommandTarget_map" name="ApplicationCommandTarget_map">
<area href="classCodeEditorComponent.html" title="A text editor component designed specifically for source code. " alt="CodeEditorComponent" shape="rect" coords="0,56,166,80"/>
<area href="classJUCEApplication.html" title="An instance of this class is used to specify initialisation and shutdown code for the application..." alt="JUCEApplication" shape="rect" coords="176,56,342,80"/>
</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">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structApplicationCommandTarget_1_1InvocationInfo.html">InvocationInfo</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Contains contextual details about the invocation of a command. <a href="structApplicationCommandTarget_1_1InvocationInfo.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:a87a924f9667311234b74292dcd737a98"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandTarget.html#a87a924f9667311234b74292dcd737a98">ApplicationCommandTarget</a> ()</td></tr>
<tr class="memdesc:a87a924f9667311234b74292dcd737a98"><td class="mdescLeft"> </td><td class="mdescRight">Creates a command target. <a href="#a87a924f9667311234b74292dcd737a98">More...</a><br /></td></tr>
<tr class="separator:a87a924f9667311234b74292dcd737a98"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aedcfa2f5c7f9798eaa717579d3d6e12a"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandTarget.html#aedcfa2f5c7f9798eaa717579d3d6e12a">~ApplicationCommandTarget</a> ()</td></tr>
<tr class="memdesc:aedcfa2f5c7f9798eaa717579d3d6e12a"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#aedcfa2f5c7f9798eaa717579d3d6e12a">More...</a><br /></td></tr>
<tr class="separator:aedcfa2f5c7f9798eaa717579d3d6e12a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a540016056ca6fc19818e951359c710da"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classApplicationCommandTarget.html">ApplicationCommandTarget</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandTarget.html#a540016056ca6fc19818e951359c710da">getNextCommandTarget</a> ()=0</td></tr>
<tr class="memdesc:a540016056ca6fc19818e951359c710da"><td class="mdescLeft"> </td><td class="mdescRight">This must return the next target to try after this one. <a href="#a540016056ca6fc19818e951359c710da">More...</a><br /></td></tr>
<tr class="separator:a540016056ca6fc19818e951359c710da"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a12b1c7a6abe2e5a5f27fda4a292fe33d"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandTarget.html#a12b1c7a6abe2e5a5f27fda4a292fe33d">getAllCommands</a> (<a class="el" href="classArray.html">Array</a>< <a class="el" href="juce__ApplicationCommandID_8h.html#afd69b5d28aad07b587b693925e09308b">CommandID</a> > &commands)=0</td></tr>
<tr class="memdesc:a12b1c7a6abe2e5a5f27fda4a292fe33d"><td class="mdescLeft"> </td><td class="mdescRight">This must return a complete list of commands that this target can handle. <a href="#a12b1c7a6abe2e5a5f27fda4a292fe33d">More...</a><br /></td></tr>
<tr class="separator:a12b1c7a6abe2e5a5f27fda4a292fe33d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a54171f3ee599f0b508fed08e647edf89"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandTarget.html#a54171f3ee599f0b508fed08e647edf89">getCommandInfo</a> (<a class="el" href="juce__ApplicationCommandID_8h.html#afd69b5d28aad07b587b693925e09308b">CommandID</a> commandID, <a class="el" href="structApplicationCommandInfo.html">ApplicationCommandInfo</a> &result)=0</td></tr>
<tr class="memdesc:a54171f3ee599f0b508fed08e647edf89"><td class="mdescLeft"> </td><td class="mdescRight">This must provide details about one of the commands that this target can perform. <a href="#a54171f3ee599f0b508fed08e647edf89">More...</a><br /></td></tr>
<tr class="separator:a54171f3ee599f0b508fed08e647edf89"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0e8f962cda82e8aa1207d38361ff96f9"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandTarget.html#a0e8f962cda82e8aa1207d38361ff96f9">perform</a> (const <a class="el" href="structApplicationCommandTarget_1_1InvocationInfo.html">InvocationInfo</a> &info)=0</td></tr>
<tr class="memdesc:a0e8f962cda82e8aa1207d38361ff96f9"><td class="mdescLeft"> </td><td class="mdescRight">This must actually perform the specified command. <a href="#a0e8f962cda82e8aa1207d38361ff96f9">More...</a><br /></td></tr>
<tr class="separator:a0e8f962cda82e8aa1207d38361ff96f9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aeffaac3af6c4922240e1e5e03ad0a1b5"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandTarget.html#aeffaac3af6c4922240e1e5e03ad0a1b5">invoke</a> (const <a class="el" href="structApplicationCommandTarget_1_1InvocationInfo.html">InvocationInfo</a> &invocationInfo, const bool asynchronously)</td></tr>
<tr class="memdesc:aeffaac3af6c4922240e1e5e03ad0a1b5"><td class="mdescLeft"> </td><td class="mdescRight">Makes this target invoke a command. <a href="#aeffaac3af6c4922240e1e5e03ad0a1b5">More...</a><br /></td></tr>
<tr class="separator:aeffaac3af6c4922240e1e5e03ad0a1b5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a93daac13c40f226ccab1e92a390ad61a"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandTarget.html#a93daac13c40f226ccab1e92a390ad61a">invokeDirectly</a> (const <a class="el" href="juce__ApplicationCommandID_8h.html#afd69b5d28aad07b587b693925e09308b">CommandID</a> commandID, const bool asynchronously)</td></tr>
<tr class="memdesc:a93daac13c40f226ccab1e92a390ad61a"><td class="mdescLeft"> </td><td class="mdescRight">Invokes a given command directly on this target. <a href="#a93daac13c40f226ccab1e92a390ad61a">More...</a><br /></td></tr>
<tr class="separator:a93daac13c40f226ccab1e92a390ad61a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aee836277019ca8182636e32701d814d7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classApplicationCommandTarget.html">ApplicationCommandTarget</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandTarget.html#aee836277019ca8182636e32701d814d7">getTargetForCommand</a> (const <a class="el" href="juce__ApplicationCommandID_8h.html#afd69b5d28aad07b587b693925e09308b">CommandID</a> commandID)</td></tr>
<tr class="memdesc:aee836277019ca8182636e32701d814d7"><td class="mdescLeft"> </td><td class="mdescRight">Searches this target and all subsequent ones for the first one that can handle the specified command. <a href="#aee836277019ca8182636e32701d814d7">More...</a><br /></td></tr>
<tr class="separator:aee836277019ca8182636e32701d814d7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab5ee995932e10bd18dc6fff111f3835e"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandTarget.html#ab5ee995932e10bd18dc6fff111f3835e">isCommandActive</a> (const <a class="el" href="juce__ApplicationCommandID_8h.html#afd69b5d28aad07b587b693925e09308b">CommandID</a> commandID)</td></tr>
<tr class="memdesc:ab5ee995932e10bd18dc6fff111f3835e"><td class="mdescLeft"> </td><td class="mdescRight">Checks whether this command can currently be performed by this target. <a href="#ab5ee995932e10bd18dc6fff111f3835e">More...</a><br /></td></tr>
<tr class="separator:ab5ee995932e10bd18dc6fff111f3835e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa8fb128295bd2117cfdc982db022ef6a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classApplicationCommandTarget.html">ApplicationCommandTarget</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandTarget.html#aa8fb128295bd2117cfdc982db022ef6a">findFirstTargetParentComponent</a> ()</td></tr>
<tr class="memdesc:aa8fb128295bd2117cfdc982db022ef6a"><td class="mdescLeft"> </td><td class="mdescRight">If this object is a <a class="el" href="classComponent.html" title="The base class for all JUCE user-interface objects. ">Component</a>, this method will search upwards in its current UI hierarchy for the next parent component that implements the <a class="el" href="classApplicationCommandTarget.html" title="A command target publishes a list of command IDs that it can perform. ">ApplicationCommandTarget</a> class. <a href="#aa8fb128295bd2117cfdc982db022ef6a">More...</a><br /></td></tr>
<tr class="separator:aa8fb128295bd2117cfdc982db022ef6a"><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 command target publishes a list of command IDs that it can perform. </p>
<p>An <a class="el" href="classApplicationCommandManager.html" title="One of these objects holds a list of all the commands your app can perform, and despatches these comm...">ApplicationCommandManager</a> despatches commands to targets, which must be able to provide information about what commands they can handle.</p>
<p>To create a target, you'll need to inherit from this class, implementing all of its pure virtual methods.</p>
<p>For info about how a target is chosen to receive a command, see <a class="el" href="classApplicationCommandManager.html#a45f5c00e8bb2d670f0931c78dd166d4b" title="Chooses the ApplicationCommandTarget to which a command should be sent. ">ApplicationCommandManager::getFirstCommandTarget()</a>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classApplicationCommandManager.html" title="One of these objects holds a list of all the commands your app can perform, and despatches these comm...">ApplicationCommandManager</a>, <a class="el" href="structApplicationCommandInfo.html" title="Holds information describing an application command. ">ApplicationCommandInfo</a> </dd></dl>
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a id="a87a924f9667311234b74292dcd737a98"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a87a924f9667311234b74292dcd737a98">§ </a></span>ApplicationCommandTarget()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ApplicationCommandTarget::ApplicationCommandTarget </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a command target. </p>
</div>
</div>
<a id="aedcfa2f5c7f9798eaa717579d3d6e12a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aedcfa2f5c7f9798eaa717579d3d6e12a">§ </a></span>~ApplicationCommandTarget()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual ApplicationCommandTarget::~ApplicationCommandTarget </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Destructor. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a540016056ca6fc19818e951359c710da"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a540016056ca6fc19818e951359c710da">§ </a></span>getNextCommandTarget()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classApplicationCommandTarget.html">ApplicationCommandTarget</a>* ApplicationCommandTarget::getNextCommandTarget </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This must return the next target to try after this one. </p>
<p>When a command is being sent, and the first target can't handle that command, this method is used to determine the next target that should be tried.</p>
<p>It may return nullptr if it doesn't know of another target.</p>
<p>If your target is a <a class="el" href="classComponent.html" title="The base class for all JUCE user-interface objects. ">Component</a>, you would usually use the <a class="el" href="classApplicationCommandTarget.html#aa8fb128295bd2117cfdc982db022ef6a" title="If this object is a Component, this method will search upwards in its current UI hierarchy for the ne...">findFirstTargetParentComponent()</a> method to return a parent component that might want to handle it.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classApplicationCommandTarget.html#aeffaac3af6c4922240e1e5e03ad0a1b5" title="Makes this target invoke a command. ">invoke</a> </dd></dl>
<p>Implemented in <a class="el" href="classCodeEditorComponent.html#a830b370576d782d2e75f33164322e012">CodeEditorComponent</a>, and <a class="el" href="classJUCEApplication.html#ad1c117f0c85adf4cd41cbd3a629a0d80">JUCEApplication</a>.</p>
</div>
</div>
<a id="a12b1c7a6abe2e5a5f27fda4a292fe33d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a12b1c7a6abe2e5a5f27fda4a292fe33d">§ </a></span>getAllCommands()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void ApplicationCommandTarget::getAllCommands </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classArray.html">Array</a>< <a class="el" href="juce__ApplicationCommandID_8h.html#afd69b5d28aad07b587b693925e09308b">CommandID</a> > & </td>
<td class="paramname"><em>commands</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This must return a complete list of commands that this target can handle. </p>
<p>Your target should add all the command IDs that it handles to the array that is passed-in. </p>
<p>Implemented in <a class="el" href="classCodeEditorComponent.html#ac37e3ec835e0672ac9fd24a574d67c87">CodeEditorComponent</a>, and <a class="el" href="classJUCEApplication.html#a72ea0c210591a07bee0bb47a1a3a0db2">JUCEApplication</a>.</p>
</div>
</div>
<a id="a54171f3ee599f0b508fed08e647edf89"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a54171f3ee599f0b508fed08e647edf89">§ </a></span>getCommandInfo()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void ApplicationCommandTarget::getCommandInfo </td>
<td>(</td>
<td class="paramtype"><a class="el" href="juce__ApplicationCommandID_8h.html#afd69b5d28aad07b587b693925e09308b">CommandID</a> </td>
<td class="paramname"><em>commandID</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structApplicationCommandInfo.html">ApplicationCommandInfo</a> & </td>
<td class="paramname"><em>result</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This must provide details about one of the commands that this target can perform. </p>
<p>This will be called with one of the command IDs that the target provided in its <a class="el" href="classApplicationCommandTarget.html#a12b1c7a6abe2e5a5f27fda4a292fe33d" title="This must return a complete list of commands that this target can handle. ">getAllCommands()</a> methods.</p>
<p>It should fill-in all appropriate fields of the <a class="el" href="structApplicationCommandInfo.html" title="Holds information describing an application command. ">ApplicationCommandInfo</a> structure with suitable information about the command. (The commandID field will already have been filled-in by the caller).</p>
<p>The easiest way to set the info is using the <a class="el" href="structApplicationCommandInfo.html#a3e9cd7e72fbf617a0d70d6be3d513b82" title="Sets a number of the structures values at once. ">ApplicationCommandInfo::setInfo()</a> method to set all the fields at once.</p>
<p>If the command is currently inactive for some reason, this method must use <a class="el" href="structApplicationCommandInfo.html#a68a043a95e058beeeddfba2441ee7306" title="An easy way to set or remove the isDisabled bit in the structure's flags field. ">ApplicationCommandInfo::setActive()</a> to make that clear, (or it should set the isDisabled bit of the <a class="el" href="structApplicationCommandInfo.html#a45fa351a09f7a6df3e76fe466c476905" title="A bitwise-OR of the values specified in the CommandFlags enum. ">ApplicationCommandInfo::flags</a> field).</p>
<p>Any default key-presses for the command should be appended to the <a class="el" href="structApplicationCommandInfo.html#acae1903bdfd8214162adb8326d1ee9da" title="A list of zero or more keypresses that should be used as the default keys for this command...">ApplicationCommandInfo::defaultKeypresses</a> field.</p>
<p>Note that if you change something that affects the status of the commands that would be returned by this method (e.g. something that makes some commands active or inactive), you should call <a class="el" href="classApplicationCommandManager.html#a91fef61705d98da881276733e304e7af" title="This should be called to tell the manager that one of its registered commands may have changed its ac...">ApplicationCommandManager::commandStatusChanged()</a> to cause the manager to refresh its status. </p>
<p>Implemented in <a class="el" href="classCodeEditorComponent.html#a9454244abc456d67d191c4f294858ad8">CodeEditorComponent</a>, and <a class="el" href="classJUCEApplication.html#ae3222d0245de1d1baf346addf9d00f2e">JUCEApplication</a>.</p>
</div>
</div>
<a id="a0e8f962cda82e8aa1207d38361ff96f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e8f962cda82e8aa1207d38361ff96f9">§ </a></span>perform()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual bool ApplicationCommandTarget::perform </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structApplicationCommandTarget_1_1InvocationInfo.html">InvocationInfo</a> & </td>
<td class="paramname"><em>info</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This must actually perform the specified command. </p>
<p>If this target is able to perform the command specified by the commandID field of the <a class="el" href="structApplicationCommandTarget_1_1InvocationInfo.html" title="Contains contextual details about the invocation of a command. ">InvocationInfo</a> structure, then it should do so, and must return true.</p>
<p>If it can't handle this command, it should return false, which tells the caller to pass the command on to the next target in line.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classApplicationCommandTarget.html#aeffaac3af6c4922240e1e5e03ad0a1b5" title="Makes this target invoke a command. ">invoke</a>, <a class="el" href="classApplicationCommandManager.html#a6b506331c1cfb3d07b2925ac16b8141e" title="Sends a command to the default target. ">ApplicationCommandManager::invoke</a> </dd></dl>
<p>Implemented in <a class="el" href="classCodeEditorComponent.html#ae46081c4bb11e732058659d10aa9ef8c">CodeEditorComponent</a>, and <a class="el" href="classJUCEApplication.html#a039df30ba3fa0291a8d0c0cde1e80312">JUCEApplication</a>.</p>
</div>
</div>
<a id="aeffaac3af6c4922240e1e5e03ad0a1b5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeffaac3af6c4922240e1e5e03ad0a1b5">§ </a></span>invoke()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool ApplicationCommandTarget::invoke </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structApplicationCommandTarget_1_1InvocationInfo.html">InvocationInfo</a> & </td>
<td class="paramname"><em>invocationInfo</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool </td>
<td class="paramname"><em>asynchronously</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Makes this target invoke a command. </p>
<p>Your code can call this method to invoke a command on this target, but normally you'd call it indirectly via <a class="el" href="classApplicationCommandManager.html#a6b506331c1cfb3d07b2925ac16b8141e" title="Sends a command to the default target. ">ApplicationCommandManager::invoke()</a> or <a class="el" href="classApplicationCommandManager.html#a55f04432929174c2de6d622cb2d23c67" title="Invokes the given command directly, sending it to the default target. ">ApplicationCommandManager::invokeDirectly()</a>.</p>
<p>If this target can perform the given command, it will call its <a class="el" href="classApplicationCommandTarget.html#a0e8f962cda82e8aa1207d38361ff96f9" title="This must actually perform the specified command. ">perform()</a> method to do so. If not, then <a class="el" href="classApplicationCommandTarget.html#a540016056ca6fc19818e951359c710da" title="This must return the next target to try after this one. ">getNextCommandTarget()</a> will be used to determine the next target to try, and the command will be passed along to it.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">invocationInfo</td><td>this must be correctly filled-in, describing the context for the invocation. </td></tr>
<tr><td class="paramname">asynchronously</td><td>if false, the command will be performed before this method returns. If true, a message will be posted so that the command will be performed later on the message thread, and this method will return immediately. </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classApplicationCommandTarget.html#a0e8f962cda82e8aa1207d38361ff96f9" title="This must actually perform the specified command. ">perform</a>, <a class="el" href="classApplicationCommandManager.html#a6b506331c1cfb3d07b2925ac16b8141e" title="Sends a command to the default target. ">ApplicationCommandManager::invoke</a> </dd></dl>
</div>
</div>
<a id="a93daac13c40f226ccab1e92a390ad61a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a93daac13c40f226ccab1e92a390ad61a">§ </a></span>invokeDirectly()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool ApplicationCommandTarget::invokeDirectly </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="juce__ApplicationCommandID_8h.html#afd69b5d28aad07b587b693925e09308b">CommandID</a> </td>
<td class="paramname"><em>commandID</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool </td>
<td class="paramname"><em>asynchronously</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Invokes a given command directly on this target. </p>
<p>This is just an easy way to call <a class="el" href="classApplicationCommandTarget.html#aeffaac3af6c4922240e1e5e03ad0a1b5" title="Makes this target invoke a command. ">invoke()</a> without having to fill out the <a class="el" href="structApplicationCommandTarget_1_1InvocationInfo.html" title="Contains contextual details about the invocation of a command. ">InvocationInfo</a> structure. </p>
</div>
</div>
<a id="aee836277019ca8182636e32701d814d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aee836277019ca8182636e32701d814d7">§ </a></span>getTargetForCommand()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classApplicationCommandTarget.html">ApplicationCommandTarget</a>* ApplicationCommandTarget::getTargetForCommand </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="juce__ApplicationCommandID_8h.html#afd69b5d28aad07b587b693925e09308b">CommandID</a> </td>
<td class="paramname"><em>commandID</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Searches this target and all subsequent ones for the first one that can handle the specified command. </p>
<p>This will use <a class="el" href="classApplicationCommandTarget.html#a540016056ca6fc19818e951359c710da" title="This must return the next target to try after this one. ">getNextCommandTarget()</a> to determine the chain of targets to try after this one. </p>
</div>
</div>
<a id="ab5ee995932e10bd18dc6fff111f3835e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab5ee995932e10bd18dc6fff111f3835e">§ </a></span>isCommandActive()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool ApplicationCommandTarget::isCommandActive </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="juce__ApplicationCommandID_8h.html#afd69b5d28aad07b587b693925e09308b">CommandID</a> </td>
<td class="paramname"><em>commandID</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks whether this command can currently be performed by this target. </p>
<p>This will return true only if a call to <a class="el" href="classApplicationCommandTarget.html#a54171f3ee599f0b508fed08e647edf89" title="This must provide details about one of the commands that this target can perform. ...">getCommandInfo()</a> doesn't set the isDisabled flag to indicate that the command is inactive. </p>
</div>
</div>
<a id="aa8fb128295bd2117cfdc982db022ef6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8fb128295bd2117cfdc982db022ef6a">§ </a></span>findFirstTargetParentComponent()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classApplicationCommandTarget.html">ApplicationCommandTarget</a>* ApplicationCommandTarget::findFirstTargetParentComponent </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>If this object is a <a class="el" href="classComponent.html" title="The base class for all JUCE user-interface objects. ">Component</a>, this method will search upwards in its current UI hierarchy for the next parent component that implements the <a class="el" href="classApplicationCommandTarget.html" title="A command target publishes a list of command IDs that it can perform. ">ApplicationCommandTarget</a> class. </p>
<p>If your target is a <a class="el" href="classComponent.html" title="The base class for all JUCE user-interface objects. ">Component</a>, this is a very handy method to use in your <a class="el" href="classApplicationCommandTarget.html#a540016056ca6fc19818e951359c710da" title="This must return the next target to try after this one. ">getNextCommandTarget()</a> implementation. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="juce__ApplicationCommandTarget_8h.html">juce_ApplicationCommandTarget.h</a></li>
</ul>
</div><!-- contents -->
<hr class="footer"/>
<address class="footer"><small>All content © ROLI Ltd.</small></address><br/>
</body>
</html>
|