menubutton-help.pd 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. #N canvas 1 53 979 642 10;
  2. #X obj 26 538 tof/menubutton 132 22 \$0s \$0r 1 green red orange purple
  3. 0 \, a \, b \, c \, d \, e \, f \, with spaces;
  4. #X msg 43 66 add a b c d e f;
  5. #X msg 28 46 clear;
  6. #X msg 118 159 saveitems \$1;
  7. #X obj 118 132 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
  8. 1;
  9. #X floatatom 392 560 5 0 0 0 - - -;
  10. #X text 71 45 Clear menu items;
  11. #X text 147 64 Add menu items;
  12. #X obj 242 540 r \$0s;
  13. #X obj 392 589 send \$0r;
  14. #X text 542 315 1: width;
  15. #X text 542 329 2: height;
  16. #X text 542 342 3: send name;
  17. #X text 542 354 4: receive name;
  18. #X text 139 130 Set the saving of the menu items in the patch. Off
  19. by default.;
  20. #X floatatom 188 303 5 0 0 0 - - -;
  21. #X obj 26 574 unpack f s;
  22. #X floatatom 26 597 5 0 0 0 - - -;
  23. #X symbolatom 85 595 10 0 0 0 - - -;
  24. #X floatatom 243 595 5 0 0 0 - - -;
  25. #X symbolatom 300 593 10 0 0 0 - - -;
  26. #X obj 243 564 unpack f s;
  27. #X msg 189 327 set b;
  28. #X msg 189 351 set 2;
  29. #X text 126 196 values can be tk colors(red \, blue \, etc) or html
  30. colors (#ffffff);
  31. #X msg 184 275 colors default;
  32. #X text 125 180 colors: background foreground highlight contour;
  33. #X msg 126 230 colors green red orange purple;
  34. #X msg 146 255 colors #000000 #ffffff #ff0000 #3a12ff;
  35. #X text 145 88 Set its size;
  36. #X msg 66 89 size 102 32;
  37. #X text 165 110 Set its size;
  38. #X msg 86 111 size 132 22;
  39. #X msg 186 421 align -1;
  40. #X msg 188 401 align 0;
  41. #X msg 187 380 align 1;
  42. #X obj 542 224 cnv 15 400 60 empty empty empty 20 12 0 14 -4034 -66577
  43. 0;
  44. #X text 547 232 To move the [menubutton] \, switch to edit mode and
  45. draw a selection rectangle around it. The [menubutton] will temporarly
  46. be disabled allowing you to drag it.;
  47. #X obj 540 295 cnv 15 400 15 empty empty empty 20 12 0 14 -257985 -66577
  48. 0;
  49. #X text 543 293 Creation arguments:;
  50. #X text 542 365 5: save menu items flag;
  51. #X msg 183 510 add \$1;
  52. #X obj 183 487 cyclone/tosymbol;
  53. #X text 543 402 8: highlight color (#000000 html or tk colors);
  54. #X text 543 391 7: foreground color (#000000 hmtl or tk colors);
  55. #X text 541 378 6: background color (#000000 html or tk colors);
  56. #X text 542 415 9: contour color (#000000 html or tk colors);
  57. #X text 541 428 10: horizontal alignement;
  58. #X text 537 443 \, : anything after a comma will be parsed as the menu
  59. items. Each menu item must be separated by a comma.;
  60. #X text 229 348 Select an item by index without outputing it;
  61. #X text 242 380 align right;
  62. #X text 245 398 align center;
  63. #X text 249 418 align left;
  64. #X text 228 302 Select and output a menu item by index;
  65. #X obj 28 9 cnv 15 400 30 empty empty empty 20 12 0 14 -260097 -66577
  66. 0;
  67. #X text 30 8 description: a button with a popup menu;
  68. #X text 31 21 tags: ui;
  69. #X msg 183 464 with spaces;
  70. #X text 180 444 Adding items with spaces;
  71. #X obj 540 521 cnv 15 400 30 empty empty empty 20 12 0 14 -232576 -66577
  72. 0;
  73. #X text 544 499 The [menubutton] at left was created with the following:
  74. ;
  75. #X text 546 519 [tof/menubutton 132 22 \$0s \$0r 1 green red orange
  76. purple 0 \, a \, b \, c \, d \, e \, f \, with spaces];
  77. #X text 105 572 output: index name;
  78. #X text 235 325 Select an item by name without outputing it;
  79. #N canvas 166 140 494 344 META 0;
  80. #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan
  81. Wilkes for Pd version 0.42.;
  82. #X text 12 45 LICENSE GPL v2;
  83. #X text 12 105 AUTHOR Thomas Ouellet Fredericks;
  84. #X text 12 5 KEYWORDS control GUI user_input;
  85. #X text 12 25 DESCRIPTION a button with a popup menu;
  86. #X text 12 65 INLET_0 float clear add size saveitems colors set align
  87. ;
  88. #X text 12 85 OUTLET_0 list;
  89. #X restore 921 581 pd META;
  90. #X connect 0 0 16 0;
  91. #X connect 1 0 0 0;
  92. #X connect 2 0 0 0;
  93. #X connect 3 0 0 0;
  94. #X connect 4 0 3 0;
  95. #X connect 5 0 9 0;
  96. #X connect 8 0 21 0;
  97. #X connect 15 0 0 0;
  98. #X connect 16 0 17 0;
  99. #X connect 16 1 18 0;
  100. #X connect 21 0 19 0;
  101. #X connect 21 1 20 0;
  102. #X connect 22 0 0 0;
  103. #X connect 23 0 0 0;
  104. #X connect 25 0 0 0;
  105. #X connect 27 0 0 0;
  106. #X connect 28 0 0 0;
  107. #X connect 30 0 0 0;
  108. #X connect 32 0 0 0;
  109. #X connect 33 0 0 0;
  110. #X connect 34 0 0 0;
  111. #X connect 35 0 0 0;
  112. #X connect 41 0 0 0;
  113. #X connect 42 0 41 0;
  114. #X connect 57 0 42 0;