supernova: fix for small audio vector sizes
[supercollider.git] / HelpSource / Overviews / Methods.html
blob17ae7f6c1a7696864cd60504fa74f50526901d8d
1 <html>
2 <head>
3 <title>Methods</title>
4 <link rel='stylesheet' href='../scdoc.css' type='text/css' />
5 <meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
6 <script src="../docmap.js" type="text/javascript"></script>
7 <script src="../scdoc.js" type="text/javascript"></script>
8 <style>
9 .method_item {
10 margin-top: 1em;
13 .method_doc {
14 margin-bottom: 0.2em;
15 margin-left: 2em;
17 div.met_subclasses {
18 font-size: 9pt;
19 color: #777;
20 margin-left: 3em;
21 text-align: left;
23 div.met_subclasses a {
24 color: #444;
26 div.met_subclasses a.seemore {
27 margin-left: 0.2em;
28 color: #558;
31 .method_name {
32 font-family: Andale Mono, monospace;
33 font-size: 9.5pt;
35 #method_note {
36 font-size: 9pt;
37 color: #777;
38 border-top: 1px solid #ddd;
39 text-align: center;
40 margin-top: 2em;
42 #total_count {
43 font-size: 9pt;
44 color: #777;
46 </style>
47 <noscript>
48 <p>The method index needs JavaScript.
49 </noscript>
51 <script type="text/javascript">
52 var methods;
53 var subclassCache = {};
55 function buildMethodList() {
56 methods = {};
57 for(var k in docmap) {
58 var doc = docmap[k];
59 var mets = doc.methods;
60 if(mets) {
61 for(var j=0;j<mets.length;j++) {
62 var m = mets[j];
63 var mname = m.slice(2);
64 var pfx = m[1];
65 var ext = m[0]=="+";
66 if(!methods.hasOwnProperty(mname))
67 methods[mname] = [];
68 methods[mname].push({doc:doc,pfx:pfx,ext:ext});
73 function getSubClasses(doc) {
74 var a = [];
75 if(doc.subclasses) {
76 for(var i=0;i<doc.subclasses.length;i++) {
77 var x = doc.subclasses[i];
78 var v = docmap["Classes/"+x];
79 a.push(x);
80 if(v)
81 a = a.concat(getSubClasses(v));
84 return a;
87 function showMethod(mname, node) {
88 var div = document.createElement("div");
89 div.className = "method_item";
90 var x = document.createElement("div");
91 x.className = "method_name";
92 x.appendChild(document.createTextNode(mname));
93 div.appendChild(x);
95 var x = methods[mname].sort(function(a,b) {
96 a = a.pfx + a.doc.title;
97 b = b.pfx + b.doc.title;
98 if(a<b) return -1;
99 else
100 if(a>b) return +1;
101 else
102 return 0;
105 for(var i=0;i<x.length;i++) {
106 var m = x[i];
107 var v = m.doc;
109 var div2 = document.createElement("div");
110 div2.className = "method_doc";
111 div.appendChild(div2);
113 var p = m.pfx;
114 if(p==".") p=" ";
115 div2.appendChild(document.createTextNode(p+" "));
116 var a = document.createElement("a");
117 a.setAttribute("href",helpRoot+"/"+v.path+".html#"+m.pfx+mname);
118 a.innerHTML = v.title;
119 div2.appendChild(a);
120 if(m.ext)
121 div2.appendChild(document.createTextNode("+"));
122 div2.appendChild(document.createTextNode(" - "+v.summary+" "));
123 var n = document.createElement("span");
124 n.className = "soft";
125 var res = "["+v.path.split("/")[0];
126 if(v.installed=="extension")
127 res += " +";
128 else if(v.installed=="missing")
129 res += " - missing!";
130 n.innerHTML = res+"]";
131 div2.appendChild(n);
133 if(v.path=="Classes/Object") {
134 var n = document.createElement("div");
135 n.className = "met_subclasses";
136 n.appendChild(document.createTextNode("Inherited by: All classes"));
137 div2.appendChild(n);
138 } else {
139 if(v.subclasses && v.subclasses.length>0) {
140 var n;
141 if(subclassCache[v.path]) {
142 n = subclassCache[v.path].cloneNode(true);
143 } else {
144 var subs = getSubClasses(v);
145 n = document.createElement("div");
146 var m = n;
147 n.className = "met_subclasses";
148 n.appendChild(document.createTextNode("Inherited by: "));
149 for(var j=0;j<subs.length;j++) {
150 var a = document.createElement("a");
151 a.setAttribute("href", helpRoot+"/Classes/"+subs[j]+".html");
152 if(j==10 && subs.length > 14) {
153 m = document.createElement("span");
154 m.className = "hiddenspan";
155 m.style.display = "none";
156 n.appendChild(m);
157 var a2 = document.createElement("a");
158 a2.setAttribute("href","#");
159 a2.className = "seemore";
160 a2.innerHTML = "&hellip; see "+(subs.length-10)+" more";
161 n.appendChild(document.createTextNode(" "));
162 n.appendChild(a2);
164 if(j>0)
165 m.appendChild(document.createTextNode(", "));
166 a.innerHTML = subs[j];
167 m.appendChild(a);
169 subclassCache[v.path] = n;
171 (function() {
172 var a = n.getElementsByClassName("seemore")[0];
173 if(a) {
174 var m = n.getElementsByClassName("hiddenspan")[0];
175 a.onclick = function() {
176 m.style.display = "";
177 a.parentNode.removeChild(a);
178 return false;
181 })();
182 div2.appendChild(n);
187 node.appendChild(div);
190 function did_load() {
191 var hash = unescape(window.location.hash.slice(1));
193 if(hash && ! /^section_/.test(hash)) {
194 location.replace("../Search.html?check_title=false&check_summary=false&check_prefix=true&check_suffix=true&ignore_case=false#"+hash);
195 return;
197 helpRoot=".."; fixTOC();
199 buildMethodList();
201 showmethods();
204 function showmethods() {
205 var hash = unescape(window.location.hash.slice(1));
206 var res = document.getElementById("methods");
207 res.innerHTML = "";
209 var section = undefined;
210 if(/^section_/.test(hash))
211 section = hash[8];
213 var cap = undefined;
214 var div = document.createElement("p");
215 div.className = "jump";
216 div.innerHTML = "Show section: ";
218 var mets = [];
219 for(var k in methods) {
220 mets.push(k);
222 mets = mets.sort();
224 for(var i=0;i<mets.length;i++) {
225 var k = mets[i];
226 if(cap != k[0]) {
227 cap = k[0];
228 if(section == undefined)
229 section = cap;
230 var a = document.createElement("a");
231 a.setAttribute("href","#section_"+cap);
232 a.innerHTML=cap.toUpperCase();
233 div.appendChild(a);
234 div.appendChild(document.createTextNode(" "));
237 res.appendChild(div);
239 var x = document.createElement("h2");
240 x.innerHTML = section.toUpperCase();
241 res.appendChild(x);
243 var count = 0;
244 for(var i = 0; i<mets.length;i++) {
245 var k = mets[i];
246 if(k[0]==section) {
247 showMethod(k, res);
248 count++;
251 document.getElementById("total_count").innerHTML = count + " methods (" + mets.length + " total)";
254 window.onhashchange = showmethods;
255 </script>
257 </head>
258 <ul id="menubar"></ul>
260 <body onload="did_load()">
261 <div class='contents'>
262 <div class='header'>
263 <div id='label'>SuperCollider OVERVIEWS</div>
264 <h1>Methods</h1>
265 <div id='summary'>Alphabetical index of all methods</div>
266 </div>
267 <div id="total_count"></div>
268 <div id='methods'>
269 Generating method index, please wait...
270 </div>
271 <div id='method_note'>
272 You can show a specific method by appending '#NAME' to this page url, where NAME is the name of the method.
273 </div>
274 </div>
275 </body>
276 </html>