Include a header file required for build on mac 10.4
[supercollider.git] / Help / GUI / Cocoa-GUI / SCMenuItem.html
blob707899e0bf14592fc6c98a2254435b14667d0390
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; color: #000000}
23 p.p14 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco}
24 span.s1 {font: 18.0px Helvetica}
25 span.s2 {color: #000000}
26 span.s3 {color: #0000ff}
27 span.s4 {color: #606060}
28 span.s5 {color: #0000bf}
29 span.s6 {color: #bf0000}
30 span.Apple-tab-span {white-space:pre}
31 </style>
32 </head>
33 <body>
34 <p class="p1"><span class="s1"><b>SCMenuItem<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b></span><b>represents an item in a menu</b><span class="s1"><b><span class="Apple-tab-span"> </span></b></span></p>
35 <p class="p2"><br></p>
36 <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>
37 <p class="p4"><br></p>
38 <p class="p1">SCMenuItem and its siblings allow users to create custom menus. Many methods are defined in its superclass.</p>
39 <p class="p2"><br></p>
40 <p class="p3"><span class="s2"><b>See also:</b> <a href="CocoaMenuItem.html">CocoaMenuItem</a>, <a href="SCMenuGroup.html">SCMenuGroup</a>, <a href="SCMenuSeparator.html">SCMenuSeparator</a></span></p>
41 <p class="p2"><br></p>
42 <p class="p2"><br></p>
43 <p class="p5"><b>Creation</b></p>
44 <p class="p6"><br></p>
45 <p class="p7"><b><span class="Apple-tab-span"> </span>*new (parent, name, index)</b></p>
46 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
47 <p class="p7"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>Create a new menu item.</p>
48 <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>
49 <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>
50 <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>
51 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
52 <p class="p6"><br></p>
53 <p class="p10"><b>Examples</b></p>
54 <p class="p4"><br></p>
55 <p class="p11">// Simple example</p>
56 <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>
57 <p class="p13">i = <span class="s5">SCMenuItem</span>(g, <span class="s4">"foo"</span>);</p>
58 <p class="p13">j = <span class="s5">SCMenuItem</span>(g, <span class="s4">"bar"</span>);</p>
59 <p class="p13">j.action = {<span class="s4">"bar!!"</span>.postln};</p>
60 <p class="p11"><span class="s2">k = </span><span class="s5">SCMenuSeparator</span><span class="s2">(g, 1); </span>// add a separator</p>
61 <p class="p13">i.enabled = <span class="s5">false</span>;</p>
62 <p class="p13">j.state = <span class="s5">true</span>;</p>
63 <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>
64 <p class="p4"><br></p>
65 <p class="p14"><span class="s5">CocoaMenuItem</span>.clearCustomItems;</p>
66 </body>
67 </html>