var storage; var menubar; function addInheritedMethods() { if(! /\/Classes\/[^\/]+/.test(window.location.pathname)) return; // skip this if not a class doc var doc = docmap["Classes/" + scdoc_title]; if(!doc) return; if(doc.implementor) { var sups = docmap["Classes/"+doc.implementor].superclasses; } else { var sups = doc.superclasses; } if(!sups) return; var divs = [document.getElementById("inheritedclassmets"), document.getElementById("inheritedinstmets")]; for(var i=0;i"+m.slice(2)+""; if(m[1]=="*") { d[0].appendChild(li); } else if(m[1]=="-") { d[1].appendChild(li); } } } for(var j=0;j<2;j++) { var count = d[j].childElementCount; if(count) { var x = document.createElement("div"); var show = "► show"; var hide = "▼ hide"; x.className = "inheritedmets_class"; x.innerHTML = count+" methods from "+s.title+" "; divs[j].appendChild(x); (function(z) { var a = document.createElement("a"); a.className = "inheritedmets_toggle"; a.setAttribute("href","#"); a.innerHTML = show; a.onclick = function() { if(z.style.display == "none") { z.style.display = "block"; a.innerHTML = hide; } else { z.style.display = "none"; a.innerHTML = show; } return false; }; x.appendChild(a); })(d[j]); divs[j].appendChild(d[j]); } } } } function showAllSubclasses(a) { var e = document.getElementById("hiddensubclasses"); e.style.display = ""; a.style.display = "none"; } function create_menubar_item(text, link, post_processing) { var a = $("").text(text).addClass("menu-link").attr("href", link); var li = $("
  • ").addClass("menuitem").append(a); $("#nav").append(li); if (post_processing) { post_processing(a, li); } } escape_regexp = function(str) { var specials = new RegExp("[.*+?|()\\[\\]{}\\\\]", "g"); // .*+?|()[]{}\ return str.replace(specials, "\\$&"); } var toc_items; function toc_search(search_string) { //TODO: on enter, go to first match var re = RegExp("^"+escape_regexp(search_string),"i"); for(var i=0;i=0;i2--) { var e = toc_items[i2]; if(e.className[3]", {id: "toc-container"}) .insertBefore($("#menubar").children().first()); var toc_link = $("", { href: "#", class: "menu-link toc-link", html: "Table Of Contents \u25bc" }).appendTo(toc_container); $("#toc").appendTo(toc_container); toc_items = $("#toc ul").first().find("li"); $("#toc_search").on("keyup", function (e) { var search_string = $("#toc_search").val(); toc_search(search_string); }); $(document).on("click", function (e) { if (!$(e.target).closest(toc_container).length) { $("#toc").hide(); } }); toc_link.on("click", function (e) { e.preventDefault(); $("#toc").toggle(); if ($("#toc").is(":visible")) { $("#toc_search").focus(); } }); } function fixTOC() { addInheritedMethods(); if('localStorage' in window) { storage = window.localStorage; } else { storage = {}; } $("#menubar").append($("