/usr/share/doc/libjuce/apiref/classApplicationCommandManager.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 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 | <!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: ApplicationCommandManager 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="#pub-methods">Public Member Functions</a> |
<a href="#pub-static-methods">Static Public Member Functions</a> |
<a href="classApplicationCommandManager-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">ApplicationCommandManager Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>One of these objects holds a list of all the commands your app can perform, and despatches these commands when needed.
<a href="classApplicationCommandManager.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 ApplicationCommandManager:</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="classApplicationCommandManager.png" usemap="#ApplicationCommandManager_map" alt=""/>
<map id="ApplicationCommandManager_map" name="ApplicationCommandManager_map">
<area href="classAsyncUpdater.html" title="Has a callback method that is triggered asynchronously. " alt="AsyncUpdater" shape="rect" coords="0,0,181,24"/>
<area href="classFocusChangeListener.html" title="Classes can implement this interface and register themselves with the Desktop class to receive callba..." alt="FocusChangeListener" shape="rect" coords="191,0,372,24"/>
</map>
</div></div>
<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:a71ba22aa70cc12a7ab52c4e531db32ad"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandManager.html#a71ba22aa70cc12a7ab52c4e531db32ad">ApplicationCommandManager</a> ()</td></tr>
<tr class="memdesc:a71ba22aa70cc12a7ab52c4e531db32ad"><td class="mdescLeft"> </td><td class="mdescRight">Creates 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>. <a href="#a71ba22aa70cc12a7ab52c4e531db32ad">More...</a><br /></td></tr>
<tr class="separator:a71ba22aa70cc12a7ab52c4e531db32ad"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:affac02208039201c7e6a59599a1010df"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandManager.html#affac02208039201c7e6a59599a1010df">~ApplicationCommandManager</a> ()</td></tr>
<tr class="memdesc:affac02208039201c7e6a59599a1010df"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#affac02208039201c7e6a59599a1010df">More...</a><br /></td></tr>
<tr class="separator:affac02208039201c7e6a59599a1010df"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a33f916c7f4ac00736958a83883057df0"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandManager.html#a33f916c7f4ac00736958a83883057df0">clearCommands</a> ()</td></tr>
<tr class="memdesc:a33f916c7f4ac00736958a83883057df0"><td class="mdescLeft"> </td><td class="mdescRight">Clears the current list of all commands. <a href="#a33f916c7f4ac00736958a83883057df0">More...</a><br /></td></tr>
<tr class="separator:a33f916c7f4ac00736958a83883057df0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a151be8c30a8339675ad5dcba5a5c4e62"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandManager.html#a151be8c30a8339675ad5dcba5a5c4e62">registerCommand</a> (const <a class="el" href="structApplicationCommandInfo.html">ApplicationCommandInfo</a> &newCommand)</td></tr>
<tr class="memdesc:a151be8c30a8339675ad5dcba5a5c4e62"><td class="mdescLeft"> </td><td class="mdescRight">Adds a command to the list of registered commands. <a href="#a151be8c30a8339675ad5dcba5a5c4e62">More...</a><br /></td></tr>
<tr class="separator:a151be8c30a8339675ad5dcba5a5c4e62"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac3f8c831583499556579848779e030cf"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandManager.html#ac3f8c831583499556579848779e030cf">registerAllCommandsForTarget</a> (<a class="el" href="classApplicationCommandTarget.html">ApplicationCommandTarget</a> *target)</td></tr>
<tr class="memdesc:ac3f8c831583499556579848779e030cf"><td class="mdescLeft"> </td><td class="mdescRight">Adds all the commands that this target publishes to the manager's list. <a href="#ac3f8c831583499556579848779e030cf">More...</a><br /></td></tr>
<tr class="separator:ac3f8c831583499556579848779e030cf"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a910296ce97f93bc7fcd8a24085ac7ca6"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandManager.html#a910296ce97f93bc7fcd8a24085ac7ca6">removeCommand</a> (<a class="el" href="juce__ApplicationCommandID_8h.html#afd69b5d28aad07b587b693925e09308b">CommandID</a> commandID)</td></tr>
<tr class="memdesc:a910296ce97f93bc7fcd8a24085ac7ca6"><td class="mdescLeft"> </td><td class="mdescRight">Removes the command with a specified ID. <a href="#a910296ce97f93bc7fcd8a24085ac7ca6">More...</a><br /></td></tr>
<tr class="separator:a910296ce97f93bc7fcd8a24085ac7ca6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a91fef61705d98da881276733e304e7af"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandManager.html#a91fef61705d98da881276733e304e7af">commandStatusChanged</a> ()</td></tr>
<tr class="memdesc:a91fef61705d98da881276733e304e7af"><td class="mdescLeft"> </td><td class="mdescRight">This should be called to tell the manager that one of its registered commands may have changed its active status. <a href="#a91fef61705d98da881276733e304e7af">More...</a><br /></td></tr>
<tr class="separator:a91fef61705d98da881276733e304e7af"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afe00b76a2faa9b625765d8ceac961d96"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandManager.html#afe00b76a2faa9b625765d8ceac961d96">getNumCommands</a> () const noexcept</td></tr>
<tr class="memdesc:afe00b76a2faa9b625765d8ceac961d96"><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of commands that have been registered. <a href="#afe00b76a2faa9b625765d8ceac961d96">More...</a><br /></td></tr>
<tr class="separator:afe00b76a2faa9b625765d8ceac961d96"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a343d3554ce94762e692d78b7d33d21da"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structApplicationCommandInfo.html">ApplicationCommandInfo</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandManager.html#a343d3554ce94762e692d78b7d33d21da">getCommandForIndex</a> (int index) const noexcept</td></tr>
<tr class="memdesc:a343d3554ce94762e692d78b7d33d21da"><td class="mdescLeft"> </td><td class="mdescRight">Returns the details about one of the registered commands. <a href="#a343d3554ce94762e692d78b7d33d21da">More...</a><br /></td></tr>
<tr class="separator:a343d3554ce94762e692d78b7d33d21da"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9f0d71eba397a4c0fec0193c33fcc9c2"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structApplicationCommandInfo.html">ApplicationCommandInfo</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandManager.html#a9f0d71eba397a4c0fec0193c33fcc9c2">getCommandForID</a> (<a class="el" href="juce__ApplicationCommandID_8h.html#afd69b5d28aad07b587b693925e09308b">CommandID</a> commandID) const noexcept</td></tr>
<tr class="memdesc:a9f0d71eba397a4c0fec0193c33fcc9c2"><td class="mdescLeft"> </td><td class="mdescRight">Returns the details about a given command ID. <a href="#a9f0d71eba397a4c0fec0193c33fcc9c2">More...</a><br /></td></tr>
<tr class="separator:a9f0d71eba397a4c0fec0193c33fcc9c2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac0d3a5fbd431c188c65ac708d245a2bf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classString.html">String</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandManager.html#ac0d3a5fbd431c188c65ac708d245a2bf">getNameOfCommand</a> (<a class="el" href="juce__ApplicationCommandID_8h.html#afd69b5d28aad07b587b693925e09308b">CommandID</a> commandID) const noexcept</td></tr>
<tr class="memdesc:ac0d3a5fbd431c188c65ac708d245a2bf"><td class="mdescLeft"> </td><td class="mdescRight">Returns the name field for a command. <a href="#ac0d3a5fbd431c188c65ac708d245a2bf">More...</a><br /></td></tr>
<tr class="separator:ac0d3a5fbd431c188c65ac708d245a2bf"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab4d21d8f1543a222bde11ba3bc859d03"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classString.html">String</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandManager.html#ab4d21d8f1543a222bde11ba3bc859d03">getDescriptionOfCommand</a> (<a class="el" href="juce__ApplicationCommandID_8h.html#afd69b5d28aad07b587b693925e09308b">CommandID</a> commandID) const noexcept</td></tr>
<tr class="memdesc:ab4d21d8f1543a222bde11ba3bc859d03"><td class="mdescLeft"> </td><td class="mdescRight">Returns the description field for a command. <a href="#ab4d21d8f1543a222bde11ba3bc859d03">More...</a><br /></td></tr>
<tr class="separator:ab4d21d8f1543a222bde11ba3bc859d03"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a49954859e2c4cee4473f814cb1907640"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classStringArray.html">StringArray</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandManager.html#a49954859e2c4cee4473f814cb1907640">getCommandCategories</a> () const</td></tr>
<tr class="memdesc:a49954859e2c4cee4473f814cb1907640"><td class="mdescLeft"> </td><td class="mdescRight">Returns the list of categories. <a href="#a49954859e2c4cee4473f814cb1907640">More...</a><br /></td></tr>
<tr class="separator:a49954859e2c4cee4473f814cb1907640"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8092a131a82d3da1af14995d0bef1685"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classArray.html">Array</a>< <a class="el" href="juce__ApplicationCommandID_8h.html#afd69b5d28aad07b587b693925e09308b">CommandID</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandManager.html#a8092a131a82d3da1af14995d0bef1685">getCommandsInCategory</a> (const <a class="el" href="classString.html">String</a> &categoryName) const</td></tr>
<tr class="memdesc:a8092a131a82d3da1af14995d0bef1685"><td class="mdescLeft"> </td><td class="mdescRight">Returns a list of all the command UIDs in a particular category. <a href="#a8092a131a82d3da1af14995d0bef1685">More...</a><br /></td></tr>
<tr class="separator:a8092a131a82d3da1af14995d0bef1685"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5fea4f129e149062866c0313b29ba976"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classKeyPressMappingSet.html">KeyPressMappingSet</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandManager.html#a5fea4f129e149062866c0313b29ba976">getKeyMappings</a> () const noexcept</td></tr>
<tr class="memdesc:a5fea4f129e149062866c0313b29ba976"><td class="mdescLeft"> </td><td class="mdescRight">Returns the manager's internal set of key mappings. <a href="#a5fea4f129e149062866c0313b29ba976">More...</a><br /></td></tr>
<tr class="separator:a5fea4f129e149062866c0313b29ba976"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a55f04432929174c2de6d622cb2d23c67"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandManager.html#a55f04432929174c2de6d622cb2d23c67">invokeDirectly</a> (<a class="el" href="juce__ApplicationCommandID_8h.html#afd69b5d28aad07b587b693925e09308b">CommandID</a> commandID, bool asynchronously)</td></tr>
<tr class="memdesc:a55f04432929174c2de6d622cb2d23c67"><td class="mdescLeft"> </td><td class="mdescRight">Invokes the given command directly, sending it to the default target. <a href="#a55f04432929174c2de6d622cb2d23c67">More...</a><br /></td></tr>
<tr class="separator:a55f04432929174c2de6d622cb2d23c67"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6b506331c1cfb3d07b2925ac16b8141e"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandManager.html#a6b506331c1cfb3d07b2925ac16b8141e">invoke</a> (const <a class="el" href="structApplicationCommandTarget_1_1InvocationInfo.html">ApplicationCommandTarget::InvocationInfo</a> &invocationInfo, bool asynchronously)</td></tr>
<tr class="memdesc:a6b506331c1cfb3d07b2925ac16b8141e"><td class="mdescLeft"> </td><td class="mdescRight">Sends a command to the default target. <a href="#a6b506331c1cfb3d07b2925ac16b8141e">More...</a><br /></td></tr>
<tr class="separator:a6b506331c1cfb3d07b2925ac16b8141e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a45f5c00e8bb2d670f0931c78dd166d4b"><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="classApplicationCommandManager.html#a45f5c00e8bb2d670f0931c78dd166d4b">getFirstCommandTarget</a> (<a class="el" href="juce__ApplicationCommandID_8h.html#afd69b5d28aad07b587b693925e09308b">CommandID</a> commandID)</td></tr>
<tr class="memdesc:a45f5c00e8bb2d670f0931c78dd166d4b"><td class="mdescLeft"> </td><td class="mdescRight">Chooses the <a class="el" href="classApplicationCommandTarget.html" title="A command target publishes a list of command IDs that it can perform. ">ApplicationCommandTarget</a> to which a command should be sent. <a href="#a45f5c00e8bb2d670f0931c78dd166d4b">More...</a><br /></td></tr>
<tr class="separator:a45f5c00e8bb2d670f0931c78dd166d4b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abebbbdd281b83f02a94c909f93b5347f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandManager.html#abebbbdd281b83f02a94c909f93b5347f">setFirstCommandTarget</a> (<a class="el" href="classApplicationCommandTarget.html">ApplicationCommandTarget</a> *newTarget) noexcept</td></tr>
<tr class="memdesc:abebbbdd281b83f02a94c909f93b5347f"><td class="mdescLeft"> </td><td class="mdescRight">Sets a target to be returned by <a class="el" href="classApplicationCommandManager.html#a45f5c00e8bb2d670f0931c78dd166d4b" title="Chooses the ApplicationCommandTarget to which a command should be sent. ">getFirstCommandTarget()</a>. <a href="#abebbbdd281b83f02a94c909f93b5347f">More...</a><br /></td></tr>
<tr class="separator:abebbbdd281b83f02a94c909f93b5347f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab9fcbf2c2a3b58cf1a54babf906d9e84"><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="classApplicationCommandManager.html#ab9fcbf2c2a3b58cf1a54babf906d9e84">getTargetForCommand</a> (<a class="el" href="juce__ApplicationCommandID_8h.html#afd69b5d28aad07b587b693925e09308b">CommandID</a> commandID, <a class="el" href="structApplicationCommandInfo.html">ApplicationCommandInfo</a> &upToDateInfo)</td></tr>
<tr class="memdesc:ab9fcbf2c2a3b58cf1a54babf906d9e84"><td class="mdescLeft"> </td><td class="mdescRight">Tries to find the best target to use to perform a given command. <a href="#ab9fcbf2c2a3b58cf1a54babf906d9e84">More...</a><br /></td></tr>
<tr class="separator:ab9fcbf2c2a3b58cf1a54babf906d9e84"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ada313b4a4cdd787f5d3786b9102c483e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandManager.html#ada313b4a4cdd787f5d3786b9102c483e">addListener</a> (<a class="el" href="classApplicationCommandManagerListener.html">ApplicationCommandManagerListener</a> *listener)</td></tr>
<tr class="memdesc:ada313b4a4cdd787f5d3786b9102c483e"><td class="mdescLeft"> </td><td class="mdescRight">Registers a listener that will be called when various events occur. <a href="#ada313b4a4cdd787f5d3786b9102c483e">More...</a><br /></td></tr>
<tr class="separator:ada313b4a4cdd787f5d3786b9102c483e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a851148eb572ded776b1ba84a5de178fa"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandManager.html#a851148eb572ded776b1ba84a5de178fa">removeListener</a> (<a class="el" href="classApplicationCommandManagerListener.html">ApplicationCommandManagerListener</a> *listener)</td></tr>
<tr class="memdesc:a851148eb572ded776b1ba84a5de178fa"><td class="mdescLeft"> </td><td class="mdescRight">Deregisters a previously-added listener. <a href="#a851148eb572ded776b1ba84a5de178fa">More...</a><br /></td></tr>
<tr class="separator:a851148eb572ded776b1ba84a5de178fa"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:add1c985aacfb09c72d038e88ce91341a"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classApplicationCommandTarget.html">ApplicationCommandTarget</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandManager.html#add1c985aacfb09c72d038e88ce91341a">findDefaultComponentTarget</a> ()</td></tr>
<tr class="memdesc:add1c985aacfb09c72d038e88ce91341a"><td class="mdescLeft"> </td><td class="mdescRight">Looks for a suitable command target based on which Components have the keyboard focus. <a href="#add1c985aacfb09c72d038e88ce91341a">More...</a><br /></td></tr>
<tr class="separator:add1c985aacfb09c72d038e88ce91341a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a49f4fca677c284452cd148b010958332"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classApplicationCommandTarget.html">ApplicationCommandTarget</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classApplicationCommandManager.html#a49f4fca677c284452cd148b010958332">findTargetForComponent</a> (<a class="el" href="classComponent.html">Component</a> *)</td></tr>
<tr class="memdesc:a49f4fca677c284452cd148b010958332"><td class="mdescLeft"> </td><td class="mdescRight">Examines this component and all its parents in turn, looking for the first one which is an <a class="el" href="classApplicationCommandTarget.html" title="A command target publishes a list of command IDs that it can perform. ">ApplicationCommandTarget</a>. <a href="#a49f4fca677c284452cd148b010958332">More...</a><br /></td></tr>
<tr class="separator:a49f4fca677c284452cd148b010958332"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>One of these objects holds a list of all the commands your app can perform, and despatches these commands when needed. </p>
<p>Application commands are a good way to trigger actions in your app, e.g. "Quit", "Copy", "Paste", etc. Menus, buttons and keypresses can all be given commands to invoke automatically, which means you don't have to handle the result of a menu or button click manually. Commands are despatched to <a class="el" href="classApplicationCommandTarget.html" title="A command target publishes a list of command IDs that it can perform. ">ApplicationCommandTarget</a> objects which can choose which events they want to handle.</p>
<p>This architecture also allows for nested ApplicationCommandTargets, so that for example you could have two different objects, one inside the other, both of which can respond to a "delete" command. Depending on which one has focus, the command will be sent to the appropriate place, regardless of whether it was triggered by a menu, keypress or some other method.</p>
<p>To set up your app to use commands, you'll need to do the following:</p>
<ul>
<li>Create a global <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> to hold the list of all possible commands. (This will also manage a set of key-mappings for them).</li>
<li>Make some of your UI components (or other objects) inherit from <a class="el" href="classApplicationCommandTarget.html" title="A command target publishes a list of command IDs that it can perform. ">ApplicationCommandTarget</a>. This allows the object to provide a list of commands that it can perform, and to handle them.</li>
<li>Register each type of command using <a class="el" href="classApplicationCommandManager.html#ac3f8c831583499556579848779e030cf" title="Adds all the commands that this target publishes to the manager's list. ">ApplicationCommandManager::registerAllCommandsForTarget()</a>, or <a class="el" href="classApplicationCommandManager.html#a151be8c30a8339675ad5dcba5a5c4e62" title="Adds a command to the list of registered commands. ">ApplicationCommandManager::registerCommand()</a>.</li>
<li>If you want key-presses to trigger your commands, use the <a class="el" href="classApplicationCommandManager.html#a5fea4f129e149062866c0313b29ba976" title="Returns the manager's internal set of key mappings. ">ApplicationCommandManager::getKeyMappings()</a> method to access the key-mapper object, which you will need to register as a key-listener in whatever top-level component you're using. See the <a class="el" href="classKeyPressMappingSet.html" title="Manages and edits a list of keypresses, which it uses to invoke the appropriate command in an Applica...">KeyPressMappingSet</a> class for more help about setting this up.</li>
<li>Use methods such as <a class="el" href="classPopupMenu.html#a11c9d3dfcb73bf6c281436147901ed0a" title="Adds an item that represents one of the commands in a command manager object. ">PopupMenu::addCommandItem()</a> or <a class="el" href="classButton.html#a3d29d9c9ab75389a170b67a364e0cb9e" title="Sets a command ID for this button to automatically invoke when it's clicked. ">Button::setCommandToTrigger()</a> to cause these commands to be invoked automatically.</li>
<li>Commands can be invoked directly by your code using <a class="el" href="classApplicationCommandManager.html#a55f04432929174c2de6d622cb2d23c67" title="Invokes the given command directly, sending it to the default target. ">ApplicationCommandManager::invokeDirectly()</a>.</li>
</ul>
<p>When a command is invoked, the <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> will try to choose the best <a class="el" href="classApplicationCommandTarget.html" title="A command target publishes a list of command IDs that it can perform. ">ApplicationCommandTarget</a> to receive the specified command. To do this it will use the current keyboard focus to see which component might be interested, and will search the component hierarchy for those that also implement the <a class="el" href="classApplicationCommandTarget.html" title="A command target publishes a list of command IDs that it can perform. ">ApplicationCommandTarget</a> interface. If an <a class="el" href="classApplicationCommandTarget.html" title="A command target publishes a list of command IDs that it can perform. ">ApplicationCommandTarget</a> isn't interested in the command that is being invoked, then the next one in line will be tried (see the <a class="el" href="classApplicationCommandTarget.html#a540016056ca6fc19818e951359c710da" title="This must return the next target to try after this one. ">ApplicationCommandTarget::getNextCommandTarget()</a> method), and so on until <a class="el" href="classApplicationCommandTarget.html#a540016056ca6fc19818e951359c710da" title="This must return the next target to try after this one. ">ApplicationCommandTarget::getNextCommandTarget()</a> returns nullptr. At this point if the command still hasn't been performed, it will be passed to the current <a class="el" href="classJUCEApplication.html" title="An instance of this class is used to specify initialisation and shutdown code for the application...">JUCEApplication</a> object (which is itself an <a class="el" href="classApplicationCommandTarget.html" title="A command target publishes a list of command IDs that it can perform. ">ApplicationCommandTarget</a>).</p>
<p>To exert some custom control over which <a class="el" href="classApplicationCommandTarget.html" title="A command target publishes a list of command IDs that it can perform. ">ApplicationCommandTarget</a> is chosen to invoke a command, you can override the <a class="el" href="classApplicationCommandManager.html#a45f5c00e8bb2d670f0931c78dd166d4b" title="Chooses the ApplicationCommandTarget to which a command should be sent. ">ApplicationCommandManager::getFirstCommandTarget()</a> method and choose the object yourself.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classApplicationCommandTarget.html" title="A command target publishes a list of command IDs that it can perform. ">ApplicationCommandTarget</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="a71ba22aa70cc12a7ab52c4e531db32ad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a71ba22aa70cc12a7ab52c4e531db32ad">§ </a></span>ApplicationCommandManager()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ApplicationCommandManager::ApplicationCommandManager </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates 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>. </p>
<p>Once created, you'll need to register all your app's commands with it, using <a class="el" href="classApplicationCommandManager.html#ac3f8c831583499556579848779e030cf" title="Adds all the commands that this target publishes to the manager's list. ">ApplicationCommandManager::registerAllCommandsForTarget()</a> or <a class="el" href="classApplicationCommandManager.html#a151be8c30a8339675ad5dcba5a5c4e62" title="Adds a command to the list of registered commands. ">ApplicationCommandManager::registerCommand()</a>. </p>
</div>
</div>
<a id="affac02208039201c7e6a59599a1010df"></a>
<h2 class="memtitle"><span class="permalink"><a href="#affac02208039201c7e6a59599a1010df">§ </a></span>~ApplicationCommandManager()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual ApplicationCommandManager::~ApplicationCommandManager </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>
<p>Make sure that you don't delete this if pointers to it are still being used by objects such as PopupMenus or Buttons. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a33f916c7f4ac00736958a83883057df0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a33f916c7f4ac00736958a83883057df0">§ </a></span>clearCommands()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ApplicationCommandManager::clearCommands </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Clears the current list of all commands. </p>
<p>Note that this will also clear the contents of the <a class="el" href="classKeyPressMappingSet.html" title="Manages and edits a list of keypresses, which it uses to invoke the appropriate command in an Applica...">KeyPressMappingSet</a>. </p>
</div>
</div>
<a id="a151be8c30a8339675ad5dcba5a5c4e62"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a151be8c30a8339675ad5dcba5a5c4e62">§ </a></span>registerCommand()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ApplicationCommandManager::registerCommand </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structApplicationCommandInfo.html">ApplicationCommandInfo</a> & </td>
<td class="paramname"><em>newCommand</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Adds a command to the list of registered commands. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classApplicationCommandManager.html#ac3f8c831583499556579848779e030cf" title="Adds all the commands that this target publishes to the manager's list. ">registerAllCommandsForTarget</a> </dd></dl>
</div>
</div>
<a id="ac3f8c831583499556579848779e030cf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac3f8c831583499556579848779e030cf">§ </a></span>registerAllCommandsForTarget()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ApplicationCommandManager::registerAllCommandsForTarget </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classApplicationCommandTarget.html">ApplicationCommandTarget</a> * </td>
<td class="paramname"><em>target</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Adds all the commands that this target publishes to the manager's list. </p>
<p>This will use <a class="el" href="classApplicationCommandTarget.html#a12b1c7a6abe2e5a5f27fda4a292fe33d" title="This must return a complete list of commands that this target can handle. ">ApplicationCommandTarget::getAllCommands()</a> and <a class="el" href="classApplicationCommandTarget.html#a54171f3ee599f0b508fed08e647edf89" title="This must provide details about one of the commands that this target can perform. ...">ApplicationCommandTarget::getCommandInfo()</a> to get details about all the commands that this target can do, and will call <a class="el" href="classApplicationCommandManager.html#a151be8c30a8339675ad5dcba5a5c4e62" title="Adds a command to the list of registered commands. ">registerCommand()</a> to add each one to the manger's list.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classApplicationCommandManager.html#a151be8c30a8339675ad5dcba5a5c4e62" title="Adds a command to the list of registered commands. ">registerCommand</a> </dd></dl>
</div>
</div>
<a id="a910296ce97f93bc7fcd8a24085ac7ca6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a910296ce97f93bc7fcd8a24085ac7ca6">§ </a></span>removeCommand()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ApplicationCommandManager::removeCommand </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><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Removes the command with a specified ID. </p>
<p>Note that this will also remove any key mappings that are mapped to the command. </p>
</div>
</div>
<a id="a91fef61705d98da881276733e304e7af"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a91fef61705d98da881276733e304e7af">§ </a></span>commandStatusChanged()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ApplicationCommandManager::commandStatusChanged </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This should be called to tell the manager that one of its registered commands may have changed its active status. </p>
<p>Because the command manager only finds out whether a command is active or inactive by querying the current <a class="el" href="classApplicationCommandTarget.html" title="A command target publishes a list of command IDs that it can perform. ">ApplicationCommandTarget</a>, this is used to tell it that things may have changed. It allows things like buttons to update their enablement, etc.</p>
<p>This method will cause an asynchronous call to <a class="el" href="classApplicationCommandManagerListener.html#a918fb2446acd367655fe88815d3be5fe" title="Called when commands are registered or deregistered from the command manager, or when commands are ma...">ApplicationCommandManagerListener::applicationCommandListChanged()</a> for any registered listeners. </p>
</div>
</div>
<a id="afe00b76a2faa9b625765d8ceac961d96"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afe00b76a2faa9b625765d8ceac961d96">§ </a></span>getNumCommands()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int ApplicationCommandManager::getNumCommands </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 commands that have been registered. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classApplicationCommandManager.html#a151be8c30a8339675ad5dcba5a5c4e62" title="Adds a command to the list of registered commands. ">registerCommand</a> </dd></dl>
</div>
</div>
<a id="a343d3554ce94762e692d78b7d33d21da"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a343d3554ce94762e692d78b7d33d21da">§ </a></span>getCommandForIndex()</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="structApplicationCommandInfo.html">ApplicationCommandInfo</a>* ApplicationCommandManager::getCommandForIndex </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 the details about one of the registered commands. </p>
<p>The index is between 0 and (<a class="el" href="classApplicationCommandManager.html#afe00b76a2faa9b625765d8ceac961d96" title="Returns the number of commands that have been registered. ">getNumCommands()</a> - 1). </p>
</div>
</div>
<a id="a9f0d71eba397a4c0fec0193c33fcc9c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9f0d71eba397a4c0fec0193c33fcc9c2">§ </a></span>getCommandForID()</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="structApplicationCommandInfo.html">ApplicationCommandInfo</a>* ApplicationCommandManager::getCommandForID </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><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 details about a given command ID. </p>
<p>This will search the list of registered commands for one with the given command ID number, and return its associated info. If no matching command is found, this will return nullptr. </p>
</div>
</div>
<a id="ac0d3a5fbd431c188c65ac708d245a2bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac0d3a5fbd431c188c65ac708d245a2bf">§ </a></span>getNameOfCommand()</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="classString.html">String</a> ApplicationCommandManager::getNameOfCommand </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><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 name field for a command. </p>
<p>An empty string is returned if no command with this ID has been registered. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="classApplicationCommandManager.html#ab4d21d8f1543a222bde11ba3bc859d03" title="Returns the description field for a command. ">getDescriptionOfCommand</a> </dd></dl>
</div>
</div>
<a id="ab4d21d8f1543a222bde11ba3bc859d03"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab4d21d8f1543a222bde11ba3bc859d03">§ </a></span>getDescriptionOfCommand()</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="classString.html">String</a> ApplicationCommandManager::getDescriptionOfCommand </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><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 description field for a command. </p>
<p>An empty string is returned if no command with this ID has been registered. If the command has no description, this will return its short name field instead.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classApplicationCommandManager.html#ac0d3a5fbd431c188c65ac708d245a2bf" title="Returns the name field for a command. ">getNameOfCommand</a> </dd></dl>
</div>
</div>
<a id="a49954859e2c4cee4473f814cb1907640"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49954859e2c4cee4473f814cb1907640">§ </a></span>getCommandCategories()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classStringArray.html">StringArray</a> ApplicationCommandManager::getCommandCategories </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the list of categories. </p>
<p>This will go through all registered commands, and return a list of all the distinct categoryName values from their <a class="el" href="structApplicationCommandInfo.html" title="Holds information describing an application command. ">ApplicationCommandInfo</a> structure.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classApplicationCommandManager.html#a8092a131a82d3da1af14995d0bef1685" title="Returns a list of all the command UIDs in a particular category. ">getCommandsInCategory()</a> </dd></dl>
</div>
</div>
<a id="a8092a131a82d3da1af14995d0bef1685"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8092a131a82d3da1af14995d0bef1685">§ </a></span>getCommandsInCategory()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classArray.html">Array</a><<a class="el" href="juce__ApplicationCommandID_8h.html#afd69b5d28aad07b587b693925e09308b">CommandID</a>> ApplicationCommandManager::getCommandsInCategory </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classString.html">String</a> & </td>
<td class="paramname"><em>categoryName</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns a list of all the command UIDs in a particular category. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classApplicationCommandManager.html#a49954859e2c4cee4473f814cb1907640" title="Returns the list of categories. ">getCommandCategories()</a> </dd></dl>
</div>
</div>
<a id="a5fea4f129e149062866c0313b29ba976"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5fea4f129e149062866c0313b29ba976">§ </a></span>getKeyMappings()</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="classKeyPressMappingSet.html">KeyPressMappingSet</a>* ApplicationCommandManager::getKeyMappings </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 manager's internal set of key mappings. </p>
<p>This object can be used to edit the keypresses. To actually link this object up to invoke commands when a key is pressed, see the comments for the <a class="el" href="classKeyPressMappingSet.html" title="Manages and edits a list of keypresses, which it uses to invoke the appropriate command in an Applica...">KeyPressMappingSet</a> class.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classKeyPressMappingSet.html" title="Manages and edits a list of keypresses, which it uses to invoke the appropriate command in an Applica...">KeyPressMappingSet</a> </dd></dl>
<p>References <a class="el" href="classFocusChangeListener.html#aea1c72e9c4d918e41c729d79592fa956">FocusChangeListener::globalFocusChanged()</a>, <a class="el" href="classAsyncUpdater.html#a446f3af793131f8772329f1f8b526578">AsyncUpdater::handleAsyncUpdate()</a>, and <a class="el" href="juce__PlatformDefs_8h.html#a851b02724a8158a7f746c66b5758b3dd">JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR</a>.</p>
</div>
</div>
<a id="a55f04432929174c2de6d622cb2d23c67"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a55f04432929174c2de6d622cb2d23c67">§ </a></span>invokeDirectly()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool ApplicationCommandManager::invokeDirectly </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">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 the given command directly, sending it to the default target. </p>
<p>This is just an easy way to call <a class="el" href="classApplicationCommandManager.html#a6b506331c1cfb3d07b2925ac16b8141e" title="Sends a command to the default target. ">invoke()</a> without having to fill out the InvocationInfo structure. </p>
</div>
</div>
<a id="a6b506331c1cfb3d07b2925ac16b8141e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6b506331c1cfb3d07b2925ac16b8141e">§ </a></span>invoke()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool ApplicationCommandManager::invoke </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structApplicationCommandTarget_1_1InvocationInfo.html">ApplicationCommandTarget::InvocationInfo</a> & </td>
<td class="paramname"><em>invocationInfo</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">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>Sends a command to the default target. </p>
<p>This will choose a target using <a class="el" href="classApplicationCommandManager.html#a45f5c00e8bb2d670f0931c78dd166d4b" title="Chooses the ApplicationCommandTarget to which a command should be sent. ">getFirstCommandTarget()</a>, and send the specified command to it using the <a class="el" href="classApplicationCommandTarget.html#aeffaac3af6c4922240e1e5e03ad0a1b5" title="Makes this target invoke a command. ">ApplicationCommandTarget::invoke()</a> method. This means that if the first target can't handle the command, it will be passed on to targets further down the chain (see <a class="el" href="classApplicationCommandTarget.html#aeffaac3af6c4922240e1e5e03ad0a1b5" title="Makes this target invoke a command. ">ApplicationCommandTarget::invoke()</a> for more info).</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#aeffaac3af6c4922240e1e5e03ad0a1b5" title="Makes this target invoke a command. ">ApplicationCommandTarget::invoke</a> </dd></dl>
</div>
</div>
<a id="a45f5c00e8bb2d670f0931c78dd166d4b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a45f5c00e8bb2d670f0931c78dd166d4b">§ </a></span>getFirstCommandTarget()</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>* ApplicationCommandManager::getFirstCommandTarget </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><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>Chooses the <a class="el" href="classApplicationCommandTarget.html" title="A command target publishes a list of command IDs that it can perform. ">ApplicationCommandTarget</a> to which a command should be sent. </p>
<p>Whenever the manager needs to know which target a command should be sent to, it calls this method to determine the first one to try.</p>
<p>By default, this method will return the target that was set by calling <a class="el" href="classApplicationCommandManager.html#abebbbdd281b83f02a94c909f93b5347f" title="Sets a target to be returned by getFirstCommandTarget(). ">setFirstCommandTarget()</a>. If no target is set, it will return the result of <a class="el" href="classApplicationCommandManager.html#add1c985aacfb09c72d038e88ce91341a" title="Looks for a suitable command target based on which Components have the keyboard focus. ">findDefaultComponentTarget()</a>.</p>
<p>If you need to make sure all commands go via your own custom target, then you can either use <a class="el" href="classApplicationCommandManager.html#abebbbdd281b83f02a94c909f93b5347f" title="Sets a target to be returned by getFirstCommandTarget(). ">setFirstCommandTarget()</a> to specify a single target, or override this method if you need more complex logic to choose one.</p>
<p>It may return nullptr if no targets are available.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classApplicationCommandManager.html#ab9fcbf2c2a3b58cf1a54babf906d9e84" title="Tries to find the best target to use to perform a given command. ">getTargetForCommand</a>, <a class="el" href="classApplicationCommandManager.html#a6b506331c1cfb3d07b2925ac16b8141e" title="Sends a command to the default target. ">invoke</a>, <a class="el" href="classApplicationCommandManager.html#a55f04432929174c2de6d622cb2d23c67" title="Invokes the given command directly, sending it to the default target. ">invokeDirectly</a> </dd></dl>
</div>
</div>
<a id="abebbbdd281b83f02a94c909f93b5347f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abebbbdd281b83f02a94c909f93b5347f">§ </a></span>setFirstCommandTarget()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void ApplicationCommandManager::setFirstCommandTarget </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classApplicationCommandTarget.html">ApplicationCommandTarget</a> * </td>
<td class="paramname"><em>newTarget</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>Sets a target to be returned by <a class="el" href="classApplicationCommandManager.html#a45f5c00e8bb2d670f0931c78dd166d4b" title="Chooses the ApplicationCommandTarget to which a command should be sent. ">getFirstCommandTarget()</a>. </p>
<p>If this is set to nullptr, then <a class="el" href="classApplicationCommandManager.html#a45f5c00e8bb2d670f0931c78dd166d4b" title="Chooses the ApplicationCommandTarget to which a command should be sent. ">getFirstCommandTarget()</a> will by default return the result of <a class="el" href="classApplicationCommandManager.html#add1c985aacfb09c72d038e88ce91341a" title="Looks for a suitable command target based on which Components have the keyboard focus. ">findDefaultComponentTarget()</a>.</p>
<p>If you use this to set a target, make sure you call setFirstCommandTarget(nullptr) before deleting the target object. </p>
</div>
</div>
<a id="ab9fcbf2c2a3b58cf1a54babf906d9e84"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab9fcbf2c2a3b58cf1a54babf906d9e84">§ </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>* ApplicationCommandManager::getTargetForCommand </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>upToDateInfo</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Tries to find the best target to use to perform a given command. </p>
<p>This will call <a class="el" href="classApplicationCommandManager.html#a45f5c00e8bb2d670f0931c78dd166d4b" title="Chooses the ApplicationCommandTarget to which a command should be sent. ">getFirstCommandTarget()</a> to find the preferred target, and will check whether that target can handle the given command. If it can't, then it'll use <a class="el" href="classApplicationCommandTarget.html#a540016056ca6fc19818e951359c710da" title="This must return the next target to try after this one. ">ApplicationCommandTarget::getNextCommandTarget()</a> to find the next one to try, and so on until no more are available.</p>
<p>If no targets are found that can perform the command, this method will return nullptr.</p>
<p>If a target is found, then it will get the target to fill-in the upToDateInfo structure with the latest info about that command, so that the caller can see whether the command is disabled, ticked, etc. </p>
</div>
</div>
<a id="ada313b4a4cdd787f5d3786b9102c483e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ada313b4a4cdd787f5d3786b9102c483e">§ </a></span>addListener()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ApplicationCommandManager::addListener </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classApplicationCommandManagerListener.html">ApplicationCommandManagerListener</a> * </td>
<td class="paramname"><em>listener</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Registers a listener that will be called when various events occur. </p>
</div>
</div>
<a id="a851148eb572ded776b1ba84a5de178fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a851148eb572ded776b1ba84a5de178fa">§ </a></span>removeListener()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ApplicationCommandManager::removeListener </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classApplicationCommandManagerListener.html">ApplicationCommandManagerListener</a> * </td>
<td class="paramname"><em>listener</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Deregisters a previously-added listener. </p>
</div>
</div>
<a id="add1c985aacfb09c72d038e88ce91341a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#add1c985aacfb09c72d038e88ce91341a">§ </a></span>findDefaultComponentTarget()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classApplicationCommandTarget.html">ApplicationCommandTarget</a>* ApplicationCommandManager::findDefaultComponentTarget </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></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>Looks for a suitable command target based on which Components have the keyboard focus. </p>
<p>This is used by the default implementation of ApplicationCommandTarget::getFirstCommandTarget(), but is exposed here in case it's useful.</p>
<p>It tries to pick the best <a class="el" href="classApplicationCommandTarget.html" title="A command target publishes a list of command IDs that it can perform. ">ApplicationCommandTarget</a> by looking at focused components, top level windows, etc., and using the <a class="el" href="classApplicationCommandManager.html#a49f4fca677c284452cd148b010958332" title="Examines this component and all its parents in turn, looking for the first one which is an Applicatio...">findTargetForComponent()</a> method. </p>
</div>
</div>
<a id="a49f4fca677c284452cd148b010958332"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49f4fca677c284452cd148b010958332">§ </a></span>findTargetForComponent()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classApplicationCommandTarget.html">ApplicationCommandTarget</a>* ApplicationCommandManager::findTargetForComponent </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classComponent.html">Component</a> * </td>
<td class="paramname"></td><td>)</td>
<td></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>Examines this component and all its parents in turn, looking for the first one which is an <a class="el" href="classApplicationCommandTarget.html" title="A command target publishes a list of command IDs that it can perform. ">ApplicationCommandTarget</a>. </p>
<p>Returns the first <a class="el" href="classApplicationCommandTarget.html" title="A command target publishes a list of command IDs that it can perform. ">ApplicationCommandTarget</a> that it finds, or nullptr if none of them implement that class. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="juce__ApplicationCommandManager_8h.html">juce_ApplicationCommandManager.h</a></li>
</ul>
</div><!-- contents -->
<hr class="footer"/>
<address class="footer"><small>All content © ROLI Ltd.</small></address><br/>
</body>
</html>
|