Chris@1: var NAVTREE = Chris@1: [ Chris@1: [ "VampPluginSDK", "index.html", [ Chris@1: [ "Vamp Plugin SDK", "index.html", null ], Chris@3: [ "Namespaces", null, [ Chris@3: [ "Namespace List", "namespaces.html", "namespaces" ], Chris@3: [ "Namespace Members", "namespacemembers.html", [ Chris@3: [ "All", "namespacemembers.html", null ], Chris@3: [ "Functions", "namespacemembers_func.html", null ] Chris@3: ] ] Chris@1: ] ], Chris@3: [ "Classes", null, [ Chris@3: [ "Class List", "annotated.html", "annotated" ], Chris@3: [ "Class Hierarchy", "hierarchy.html", "hierarchy" ], Chris@3: [ "Class Members", "functions.html", [ Chris@3: [ "All", "functions.html", "functions_dup" ], Chris@3: [ "Functions", "functions_func.html", "functions_func" ], Chris@3: [ "Variables", "functions_vars.html", null ], Chris@3: [ "Typedefs", "functions_type.html", null ], Chris@3: [ "Enumerations", "functions_enum.html", null ], Chris@3: [ "Enumerator", "functions_eval.html", null ] Chris@3: ] ] Chris@1: ] ], Chris@3: [ "Files", null, [ Chris@3: [ "File List", "files.html", "files" ], Chris@3: [ "File Members", "globals.html", [ Chris@3: [ "All", "globals.html", null ], Chris@3: [ "Functions", "globals_func.html", null ], Chris@3: [ "Variables", "globals_vars.html", null ], Chris@3: [ "Typedefs", "globals_type.html", null ], Chris@3: [ "Enumerations", "globals_enum.html", null ], Chris@3: [ "Enumerator", "globals_eval.html", null ], Chris@3: [ "Defines", "globals_defs.html", null ] Chris@3: ] ] Chris@1: ] ], Chris@3: [ "Directories", "dirs.html", "dirs" ] Chris@1: ] ] Chris@1: ]; Chris@1: Chris@3: function getData(varName) Chris@3: { Chris@3: var i = varName.lastIndexOf('/'); Chris@3: var n = i>=0 ? varName.substring(i+1) : varName; Chris@3: return eval(n); Chris@3: } Chris@3: Chris@3: function stripPath(uri) Chris@3: { Chris@3: return uri.substring(uri.lastIndexOf('/')+1); Chris@3: } Chris@3: Chris@3: function getScript(scriptName,func,show) Chris@3: { Chris@3: var head = document.getElementsByTagName("head")[0]; Chris@3: var script = document.createElement('script'); Chris@3: script.id = scriptName; Chris@3: script.type = 'text/javascript'; Chris@3: script.onload = func; Chris@3: script.src = scriptName+'.js'; Chris@3: script.onreadystatechange = function() { Chris@3: if (script.readyState=='complete' || script.readyState=='loaded') { Chris@3: func(); if (show) showRoot(); Chris@3: } Chris@3: }; Chris@3: head.appendChild(script); Chris@3: } Chris@3: Chris@1: function createIndent(o,domNode,node,level) Chris@1: { Chris@3: if (node.parentNode && node.parentNode.parentNode) { Chris@1: createIndent(o,domNode,node.parentNode,level+1); Chris@1: } Chris@1: var imgNode = document.createElement("img"); Chris@3: imgNode.width = 16; Chris@3: imgNode.height = 22; Chris@3: if (level==0 && node.childrenData) { Chris@1: node.plus_img = imgNode; Chris@1: node.expandToggle = document.createElement("a"); Chris@1: node.expandToggle.href = "javascript:void(0)"; Chris@3: node.expandToggle.onclick = function() { Chris@3: if (node.expanded) { Chris@1: $(node.getChildrenUL()).slideUp("fast"); Chris@3: if (node.isLast) { Chris@1: node.plus_img.src = node.relpath+"ftv2plastnode.png"; Chris@3: } else { Chris@1: node.plus_img.src = node.relpath+"ftv2pnode.png"; Chris@1: } Chris@1: node.expanded = false; Chris@3: } else { Chris@3: expandNode(o, node, false, false); Chris@1: } Chris@1: } Chris@1: node.expandToggle.appendChild(imgNode); Chris@1: domNode.appendChild(node.expandToggle); Chris@3: } else { Chris@1: domNode.appendChild(imgNode); Chris@1: } Chris@3: if (level==0) { Chris@3: if (node.isLast) { Chris@3: if (node.childrenData) { Chris@1: imgNode.src = node.relpath+"ftv2plastnode.png"; Chris@3: } else { Chris@1: imgNode.src = node.relpath+"ftv2lastnode.png"; Chris@1: domNode.appendChild(imgNode); Chris@1: } Chris@3: } else { Chris@3: if (node.childrenData) { Chris@1: imgNode.src = node.relpath+"ftv2pnode.png"; Chris@3: } else { Chris@1: imgNode.src = node.relpath+"ftv2node.png"; Chris@1: domNode.appendChild(imgNode); Chris@1: } Chris@1: } Chris@3: } else { Chris@3: if (node.isLast) { Chris@1: imgNode.src = node.relpath+"ftv2blank.png"; Chris@3: } else { Chris@1: imgNode.src = node.relpath+"ftv2vertline.png"; Chris@1: } Chris@1: } Chris@1: imgNode.border = "0"; Chris@1: } Chris@1: Chris@1: function newNode(o, po, text, link, childrenData, lastNode) Chris@1: { Chris@1: var node = new Object(); Chris@1: node.children = Array(); Chris@1: node.childrenData = childrenData; Chris@1: node.depth = po.depth + 1; Chris@1: node.relpath = po.relpath; Chris@1: node.isLast = lastNode; Chris@1: Chris@1: node.li = document.createElement("li"); Chris@1: po.getChildrenUL().appendChild(node.li); Chris@1: node.parentNode = po; Chris@1: Chris@1: node.itemDiv = document.createElement("div"); Chris@1: node.itemDiv.className = "item"; Chris@1: Chris@1: node.labelSpan = document.createElement("span"); Chris@1: node.labelSpan.className = "label"; Chris@1: Chris@1: createIndent(o,node.itemDiv,node,0); Chris@1: node.itemDiv.appendChild(node.labelSpan); Chris@1: node.li.appendChild(node.itemDiv); Chris@1: Chris@1: var a = document.createElement("a"); Chris@1: node.labelSpan.appendChild(a); Chris@1: node.label = document.createTextNode(text); Chris@3: node.expanded = false; Chris@1: a.appendChild(node.label); Chris@3: if (link) { Chris@3: var url; Chris@3: if (link.substring(0,1)=='^') { Chris@3: url = link.substring(1); Chris@3: link = url; Chris@3: } else { Chris@3: url = node.relpath+link; Chris@3: } Chris@3: a.className = stripPath(link.replace('#',':')); Chris@3: if (link.indexOf('#')!=-1) { Chris@3: var aname = '#'+link.split('#')[1]; Chris@3: var srcPage = stripPath($(location).attr('pathname')); Chris@3: var targetPage = stripPath(link.split('#')[0]); Chris@3: a.href = srcPage!=targetPage ? url : '#'; Chris@3: a.onclick = function(){ Chris@3: if (!$(a).parent().parent().hasClass('selected')) Chris@3: { Chris@3: $('.item').removeClass('selected'); Chris@3: $('.item').removeAttr('id'); Chris@3: $(a).parent().parent().addClass('selected'); Chris@3: $(a).parent().parent().attr('id','selected'); Chris@3: } Chris@3: var pos, anchor = $(aname), docContent = $('#doc-content'); Chris@3: if (anchor.parent().attr('class')=='memItemLeft') { Chris@3: pos = anchor.parent().position().top; Chris@3: } else { Chris@3: pos = anchor.position().top; Chris@3: } Chris@3: var dist = Math.abs(Math.min( Chris@3: pos-docContent.offset().top, Chris@3: docContent[0].scrollHeight- Chris@3: docContent.height()-docContent.scrollTop())); Chris@3: docContent.animate({ Chris@3: scrollTop: pos + docContent.scrollTop() - docContent.offset().top Chris@3: },Math.max(50,Math.min(500,dist)),function(){ Chris@3: window.location.replace(aname); Chris@3: }); Chris@3: }; Chris@3: } else { Chris@3: a.href = url; Chris@3: } Chris@3: } else { Chris@1: if (childrenData != null) Chris@1: { Chris@1: a.className = "nolink"; Chris@1: a.href = "javascript:void(0)"; Chris@1: a.onclick = node.expandToggle.onclick; Chris@1: } Chris@1: } Chris@1: Chris@1: node.childrenUL = null; Chris@3: node.getChildrenUL = function() { Chris@3: if (!node.childrenUL) { Chris@1: node.childrenUL = document.createElement("ul"); Chris@1: node.childrenUL.className = "children_ul"; Chris@1: node.childrenUL.style.display = "none"; Chris@1: node.li.appendChild(node.childrenUL); Chris@1: } Chris@1: return node.childrenUL; Chris@1: }; Chris@1: Chris@1: return node; Chris@1: } Chris@1: Chris@1: function showRoot() Chris@1: { Chris@1: var headerHeight = $("#top").height(); Chris@1: var footerHeight = $("#nav-path").height(); Chris@1: var windowHeight = $(window).height() - headerHeight - footerHeight; Chris@3: (function (){ // retry until we can scroll to the selected item Chris@3: try { Chris@3: navtree.scrollTo('#selected',0,{offset:-windowHeight/2}); Chris@3: } catch (err) { Chris@3: setTimeout(arguments.callee, 0); Chris@3: } Chris@3: })(); Chris@1: } Chris@1: Chris@3: function expandNode(o, node, imm, showRoot) Chris@1: { Chris@3: if (node.childrenData && !node.expanded) { Chris@3: if (typeof(node.childrenData)==='string') { Chris@3: var varName = node.childrenData; Chris@3: getScript(node.relpath+varName,function(){ Chris@3: node.childrenData = getData(varName); Chris@3: expandNode(o, node, imm, showRoot); Chris@3: }, showRoot); Chris@3: } else { Chris@3: if (!node.childrenVisited) { Chris@3: getNode(o, node); Chris@3: } if (imm) { Chris@3: $(node.getChildrenUL()).show(); Chris@3: } else { Chris@3: $(node.getChildrenUL()).slideDown("fast"); Chris@3: } Chris@3: if (node.isLast) { Chris@3: node.plus_img.src = node.relpath+"ftv2mlastnode.png"; Chris@3: } else { Chris@3: node.plus_img.src = node.relpath+"ftv2mnode.png"; Chris@3: } Chris@3: node.expanded = true; Chris@1: } Chris@3: } Chris@3: } Chris@3: Chris@3: function highlightAnchor() Chris@3: { Chris@3: var anchor = $($(location).attr('hash')); Chris@3: if (anchor.parent().attr('class')=='memItemLeft'){ Chris@3: var rows = $('.memberdecls tr[class$=\""'+ Chris@3: window.location.hash.substring(1)+'"\"]').children(); Chris@3: rows.effect('highlight',{},1500); Chris@3: } else if (anchor.parent().is(":header")) { Chris@3: anchor.parent().effect('highlight',{},1500); Chris@3: } else { Chris@3: var targetDiv = anchor.next(); Chris@3: $(targetDiv).children('.memproto,.memdoc').effect("highlight",{},1500); Chris@3: } Chris@3: } Chris@3: Chris@3: function showNode(o, node, index) Chris@3: { Chris@3: if (node.childrenData /*&& !node.expanded*/) { Chris@3: if (typeof(node.childrenData)==='string') { Chris@3: var varName = node.childrenData; Chris@3: getScript(node.relpath+varName,function(){ Chris@3: node.childrenData = getData(varName); Chris@3: showNode(o,node,index); Chris@3: },true); Chris@3: } else { Chris@3: if (!node.childrenVisited) { Chris@3: getNode(o, node); Chris@3: } Chris@1: $(node.getChildrenUL()).show(); Chris@3: if (node.isLast) { Chris@3: node.plus_img.src = node.relpath+"ftv2mlastnode.png"; Chris@3: } else { Chris@3: node.plus_img.src = node.relpath+"ftv2mnode.png"; Chris@3: } Chris@3: node.expanded = true; Chris@3: var n = node.children[o.breadcrumbs[index]]; Chris@3: if (index+11){ Chris@3: var a; Chris@3: if ($(location).attr('hash')){ Chris@3: var clslink=stripPath($(location).attr('pathname'))+':'+ Chris@3: $(location).attr('hash').substring(1); Chris@3: a=$('.item a[class$=\""'+clslink+'"\"]'); Chris@3: } Chris@3: if (a==null || !$(a).parent().parent().hasClass('selected')){ Chris@3: $('.item').removeClass('selected'); Chris@3: $('.item').removeAttr('id'); Chris@3: } Chris@3: var link=stripPath($(location).attr('pathname')); Chris@3: navTo(o,link,$(location).attr('hash'),relpath); Chris@3: } Chris@3: }) Chris@3: Chris@3: $(window).load(showRoot); Chris@1: } Chris@1: