1 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
4 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8">
5 <meta http-equiv=
"Content-Style-Type" content=
"text/css">
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
}
33 <p class=
"p1"><span class=
"s1"><b>SCMenuSeparator
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b></span><b>represents a separator in a menu
</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">SCMenuSeparator allows users to add separators (a horizontal line) to custom menus.
</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=
"SCMenuGroup.html">SCMenuGroup
</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, 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 menu separator.
</p>
46 <p class=
"p9"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>parent
</b>- The menu or submenu in which to add this separator. This should be an instance of
<a href=
"SCMenuGroup.html"><span class=
"s3">SCMenuGroup
</span></a>.
</p>
47 <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>
48 <p class=
"p8"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
49 <p class=
"p10"><b>Examples
</b></p>
50 <p class=
"p4"><br></p>
51 <p class=
"p11">// Simple example
</p>
52 <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>
53 <p class=
"p13">i =
<span class=
"s5">SCMenuItem
</span>(g,
<span class=
"s4">"foo"</span>);
</p>
54 <p class=
"p13">j =
<span class=
"s5">SCMenuItem
</span>(g,
<span class=
"s4">"bar"</span>);
</p>
55 <p class=
"p13">j.action = {
<span class=
"s4">"bar!!"</span>.postln};
</p>
56 <p class=
"p11"><span class=
"s2">k =
</span><span class=
"s5">SCMenuSeparator
</span><span class=
"s2">(g,
1);
</span>// add a separator
</p>
57 <p class=
"p13">i.enabled =
<span class=
"s5">false
</span>;
</p>
58 <p class=
"p13">j.state =
<span class=
"s5">true
</span>;
</p>
59 <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>
60 <p class=
"p4"><br></p>
61 <p class=
"p13"><span class=
"s5">CocoaMenuItem
</span>.clearCustomItems;
</p>