Removing an old, cherished, yet pointless caveat "This documentation is
[supercollider.git] / Help / GUI / Cocoa-GUI / SCMenuGroup.html
blob40db5aad0aab009f3434c6825f00f30d99b86eba
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta http-equiv="Content-Style-Type" content="text/css">
6 <title></title>
7 <meta name="Generator" content="Cocoa HTML Writer">
8 <meta name="CocoaVersion" content="949.35">
9 <style type="text/css">
10 p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
11 p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
12 p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #0000ff}
13 p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; min-height: 12.0px}
14 p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica}
15 p.p6 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco; min-height: 12.0px}
16 p.p7 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica}
17 p.p8 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica; min-height: 14.0px}
18 p.p9 {margin: 0.0px 0.0px 0.0px 85.0px; text-indent: -85.0px; font: 12.0px Helvetica}
19 p.p10 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 14.0px Helvetica}
20 p.p11 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #bf0000}
21 p.p12 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #0000bf}
22 p.p13 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco}
23 span.s1 {font: 18.0px Helvetica}
24 span.s2 {color: #000000}
25 span.s3 {color: #0000ff}
26 span.s4 {color: #606060}
27 span.s5 {color: #0000bf}
28 span.s6 {color: #bf0000}
29 span.Apple-tab-span {white-space:pre}
30 </style>
31 </head>
32 <body>
33 <p class="p1"><span class="s1"><b>SCMenuGroup<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b></span><b>represents a named submenu</b><span class="s1"><b><span class="Apple-tab-span"> </span></b></span></p>
34 <p class="p2"><br></p>
35 <p class="p3"><span class="s2"><b>Inherits from: </b><a href="../../Core/Object.html"><b>Object</b></a><b> : </b><a href="CocoaMenuItem.html"><b>CocoaMenuItem</b></a></span></p>
36 <p class="p4"><br></p>
37 <p class="p1">SCMenuGroup and its siblings allow users to create custom menus. Many methods are defined in its superclass.</p>
38 <p class="p2"><br></p>
39 <p class="p3"><span class="s2"><b>See also:</b> <a href="CocoaMenuItem.html">CocoaMenuItem</a>, <a href="SCMenuItem.html">SCMenuItem</a>, <a href="SCMenuSeparator.html">SCMenuSeparator</a></span></p>
40 <p class="p2"><br></p>
41 <p class="p5"><b>Creation</b></p>
42 <p class="p6"><br></p>
43 <p class="p7"><b><span class="Apple-tab-span"> </span>*new (parent, name, index)</b></p>
44 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
45 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Create a new sub-menu.</p>
46 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>parent </b>- The parent menu. The default value is nil, which indicates the application menu.</p>
47 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>name </b>- A <a href="../../Collections/String.html"><span class="s3">String</span></a> indicating the label for this menu item.</p>
48 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>index </b>- The index at which to insert this item in its parent.</p>
49 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
50 <p class="p6"><br></p>
51 <p class="p10"><b>Examples</b></p>
52 <p class="p4"><br></p>
53 <p class="p11">// Simple example</p>
54 <p class="p12"><span class="s2">g = </span>SCMenuGroup<span class="s2">(</span>nil<span class="s2">, </span><span class="s4">"stuff"</span><span class="s2">, 10);</span></p>
55 <p class="p13">i = <span class="s5">SCMenuItem</span>(g, <span class="s4">"foo"</span>);</p>
56 <p class="p13">j = <span class="s5">SCMenuItem</span>(g, <span class="s4">"bar"</span>);</p>
57 <p class="p13">j.action = {<span class="s4">"bar!!"</span>.postln};</p>
58 <p class="p11"><span class="s2">k = </span><span class="s5">SCMenuSeparator</span><span class="s2">(g, 1); </span>// add a separator</p>
59 <p class="p13">i.enabled = <span class="s5">false</span>;</p>
60 <p class="p13">j.state = <span class="s5">true</span>;</p>
61 <p class="p13">j.setShortCut(<span class="s4">"$"</span>, <span class="s5">true</span>, <span class="s5">true</span>); <span class="s6">// Cmd-ctrl-alt-$</span></p>
62 <p class="p4"><br></p>
63 <p class="p13"><span class="s5">CocoaMenuItem</span>.clearCustomItems;</p>
64 </body>
65 </html>