Mercurial > hg > vamp-docs
comparison code-docs/navtree.js @ 3:5c2683745b33 vamp-plugin-sdk-v2.4
Update for 2.4
author | Chris Cannam |
---|---|
date | Fri, 13 Jul 2012 13:30:27 +0100 |
parents | 3c430ef1ed66 |
children | 27319718b1f8 |
comparison
equal
deleted
inserted
replaced
2:52d16fb98e80 | 3:5c2683745b33 |
---|---|
1 var NAVTREE = | 1 var NAVTREE = |
2 [ | 2 [ |
3 [ "VampPluginSDK", "index.html", [ | 3 [ "VampPluginSDK", "index.html", [ |
4 [ "Vamp Plugin SDK", "index.html", null ], | 4 [ "Vamp Plugin SDK", "index.html", null ], |
5 [ "Class List", "annotated.html", [ | 5 [ "Namespaces", null, [ |
6 [ "_VampFeature", "struct__VampFeature.html", null ], | 6 [ "Namespace List", "namespaces.html", "namespaces" ], |
7 [ "_VampFeatureList", "struct__VampFeatureList.html", null ], | 7 [ "Namespace Members", "namespacemembers.html", [ |
8 [ "_VampFeatureUnion", "union__VampFeatureUnion.html", null ], | 8 [ "All", "namespacemembers.html", null ], |
9 [ "_VampFeatureV2", "struct__VampFeatureV2.html", null ], | 9 [ "Functions", "namespacemembers_func.html", null ] |
10 [ "_VampOutputDescriptor", "struct__VampOutputDescriptor.html", null ], | 10 ] ] |
11 [ "_VampParameterDescriptor", "struct__VampParameterDescriptor.html", null ], | |
12 [ "_VampPluginDescriptor", "struct__VampPluginDescriptor.html", null ], | |
13 [ "AmplitudeFollower", "classAmplitudeFollower.html", null ], | |
14 [ "FixedTempoEstimator::D", "classFixedTempoEstimator_1_1D.html", null ], | |
15 [ "Vamp::Plugin::Feature", "structVamp_1_1Plugin_1_1Feature.html", null ], | |
16 [ "FixedTempoEstimator", "classFixedTempoEstimator.html", null ], | |
17 [ "Vamp::Plugin::OutputDescriptor", "structVamp_1_1Plugin_1_1OutputDescriptor.html", null ], | |
18 [ "Vamp::PluginBase::ParameterDescriptor", "structVamp_1_1PluginBase_1_1ParameterDescriptor.html", null ], | |
19 [ "PercussionOnsetDetector", "classPercussionOnsetDetector.html", null ], | |
20 [ "Vamp::Plugin", "classVamp_1_1Plugin.html", null ], | |
21 [ "Vamp::PluginAdapter< P >", "classVamp_1_1PluginAdapter.html", null ], | |
22 [ "Vamp::PluginAdapterBase", "classVamp_1_1PluginAdapterBase.html", null ], | |
23 [ "Vamp::PluginBase", "classVamp_1_1PluginBase.html", null ], | |
24 [ "Vamp::HostExt::PluginBufferingAdapter", "classVamp_1_1HostExt_1_1PluginBufferingAdapter.html", null ], | |
25 [ "Vamp::HostExt::PluginChannelAdapter", "classVamp_1_1HostExt_1_1PluginChannelAdapter.html", null ], | |
26 [ "Vamp::PluginHostAdapter", "classVamp_1_1PluginHostAdapter.html", null ], | |
27 [ "Vamp::HostExt::PluginInputDomainAdapter", "classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html", null ], | |
28 [ "Vamp::HostExt::PluginLoader", "classVamp_1_1HostExt_1_1PluginLoader.html", null ], | |
29 [ "Vamp::HostExt::PluginSummarisingAdapter", "classVamp_1_1HostExt_1_1PluginSummarisingAdapter.html", null ], | |
30 [ "Vamp::HostExt::PluginWrapper", "classVamp_1_1HostExt_1_1PluginWrapper.html", null ], | |
31 [ "PowerSpectrum", "classPowerSpectrum.html", null ], | |
32 [ "Vamp::RealTime", "structVamp_1_1RealTime.html", null ], | |
33 [ "SpectralCentroid", "classSpectralCentroid.html", null ], | |
34 [ "ZeroCrossing", "classZeroCrossing.html", null ] | |
35 ] ], | 11 ] ], |
36 [ "Class Index", "classes.html", null ], | 12 [ "Classes", null, [ |
37 [ "Class Hierarchy", "hierarchy.html", [ | 13 [ "Class List", "annotated.html", "annotated" ], |
38 [ "_VampFeature", "struct__VampFeature.html", null ], | 14 [ "Class Hierarchy", "hierarchy.html", "hierarchy" ], |
39 [ "_VampFeatureList", "struct__VampFeatureList.html", null ], | 15 [ "Class Members", "functions.html", [ |
40 [ "_VampFeatureUnion", "union__VampFeatureUnion.html", null ], | 16 [ "All", "functions.html", "functions_dup" ], |
41 [ "_VampFeatureV2", "struct__VampFeatureV2.html", null ], | 17 [ "Functions", "functions_func.html", "functions_func" ], |
42 [ "_VampOutputDescriptor", "struct__VampOutputDescriptor.html", null ], | 18 [ "Variables", "functions_vars.html", null ], |
43 [ "_VampParameterDescriptor", "struct__VampParameterDescriptor.html", null ], | 19 [ "Typedefs", "functions_type.html", null ], |
44 [ "_VampPluginDescriptor", "struct__VampPluginDescriptor.html", null ], | 20 [ "Enumerations", "functions_enum.html", null ], |
45 [ "FixedTempoEstimator::D", "classFixedTempoEstimator_1_1D.html", null ], | 21 [ "Enumerator", "functions_eval.html", null ] |
46 [ "Vamp::Plugin::Feature", "structVamp_1_1Plugin_1_1Feature.html", null ], | 22 ] ] |
47 [ "Vamp::Plugin::OutputDescriptor", "structVamp_1_1Plugin_1_1OutputDescriptor.html", null ], | |
48 [ "Vamp::PluginBase::ParameterDescriptor", "structVamp_1_1PluginBase_1_1ParameterDescriptor.html", null ], | |
49 [ "Vamp::PluginAdapterBase", "classVamp_1_1PluginAdapterBase.html", [ | |
50 [ "Vamp::PluginAdapter< P >", "classVamp_1_1PluginAdapter.html", null ] | |
51 ] ], | |
52 [ "Vamp::PluginBase", "classVamp_1_1PluginBase.html", [ | |
53 [ "Vamp::Plugin", "classVamp_1_1Plugin.html", [ | |
54 [ "AmplitudeFollower", "classAmplitudeFollower.html", null ], | |
55 [ "FixedTempoEstimator", "classFixedTempoEstimator.html", null ], | |
56 [ "PercussionOnsetDetector", "classPercussionOnsetDetector.html", null ], | |
57 [ "PowerSpectrum", "classPowerSpectrum.html", null ], | |
58 [ "SpectralCentroid", "classSpectralCentroid.html", null ], | |
59 [ "Vamp::HostExt::PluginWrapper", "classVamp_1_1HostExt_1_1PluginWrapper.html", [ | |
60 [ "Vamp::HostExt::PluginBufferingAdapter", "classVamp_1_1HostExt_1_1PluginBufferingAdapter.html", null ], | |
61 [ "Vamp::HostExt::PluginChannelAdapter", "classVamp_1_1HostExt_1_1PluginChannelAdapter.html", null ], | |
62 [ "Vamp::HostExt::PluginInputDomainAdapter", "classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html", null ], | |
63 [ "Vamp::HostExt::PluginSummarisingAdapter", "classVamp_1_1HostExt_1_1PluginSummarisingAdapter.html", null ] | |
64 ] ], | |
65 [ "Vamp::PluginHostAdapter", "classVamp_1_1PluginHostAdapter.html", null ], | |
66 [ "ZeroCrossing", "classZeroCrossing.html", null ] | |
67 ] ] | |
68 ] ], | |
69 [ "Vamp::HostExt::PluginLoader", "classVamp_1_1HostExt_1_1PluginLoader.html", null ], | |
70 [ "Vamp::RealTime", "structVamp_1_1RealTime.html", null ] | |
71 ] ], | 23 ] ], |
72 [ "Class Members", "functions.html", null ], | 24 [ "Files", null, [ |
73 [ "Namespace List", "namespaces.html", [ | 25 [ "File List", "files.html", "files" ], |
74 [ "Vamp", "namespaceVamp.html", null ], | 26 [ "File Members", "globals.html", [ |
75 [ "Vamp::HostExt", "namespaceVamp_1_1HostExt.html", null ] | 27 [ "All", "globals.html", null ], |
28 [ "Functions", "globals_func.html", null ], | |
29 [ "Variables", "globals_vars.html", null ], | |
30 [ "Typedefs", "globals_type.html", null ], | |
31 [ "Enumerations", "globals_enum.html", null ], | |
32 [ "Enumerator", "globals_eval.html", null ], | |
33 [ "Defines", "globals_defs.html", null ] | |
34 ] ] | |
76 ] ], | 35 ] ], |
77 [ "Namespace Members", "namespacemembers.html", null ], | 36 [ "Directories", "dirs.html", "dirs" ] |
78 [ "File List", "files.html", [ | |
79 [ "AmplitudeFollower.cpp", "AmplitudeFollower_8cpp.html", null ], | |
80 [ "AmplitudeFollower.h", "AmplitudeFollower_8h.html", null ], | |
81 [ "doc-overview", "doc-overview.html", null ], | |
82 [ "FixedTempoEstimator.cpp", "FixedTempoEstimator_8cpp.html", null ], | |
83 [ "FixedTempoEstimator.h", "FixedTempoEstimator_8h.html", null ], | |
84 [ "hostguard.h", "hostguard_8h.html", null ], | |
85 [ "PercussionOnsetDetector.cpp", "PercussionOnsetDetector_8cpp.html", null ], | |
86 [ "PercussionOnsetDetector.h", "PercussionOnsetDetector_8h.html", null ], | |
87 [ "plugguard.h", "plugguard_8h.html", null ], | |
88 [ "vamp-sdk/Plugin.h", "vamp-sdk_2Plugin_8h.html", null ], | |
89 [ "vamp-hostsdk/Plugin.h", "vamp-hostsdk_2Plugin_8h.html", null ], | |
90 [ "PluginAdapter.h", "PluginAdapter_8h.html", null ], | |
91 [ "vamp-sdk/PluginBase.h", "vamp-sdk_2PluginBase_8h.html", null ], | |
92 [ "vamp-hostsdk/PluginBase.h", "vamp-hostsdk_2PluginBase_8h.html", null ], | |
93 [ "PluginBufferingAdapter.h", "PluginBufferingAdapter_8h.html", null ], | |
94 [ "PluginChannelAdapter.h", "PluginChannelAdapter_8h.html", null ], | |
95 [ "PluginHostAdapter.h", "PluginHostAdapter_8h.html", null ], | |
96 [ "PluginInputDomainAdapter.h", "PluginInputDomainAdapter_8h.html", null ], | |
97 [ "PluginLoader.h", "PluginLoader_8h.html", null ], | |
98 [ "plugins.cpp", "plugins_8cpp.html", null ], | |
99 [ "PluginSummarisingAdapter.h", "PluginSummarisingAdapter_8h.html", null ], | |
100 [ "PluginWrapper.h", "PluginWrapper_8h.html", null ], | |
101 [ "PowerSpectrum.cpp", "PowerSpectrum_8cpp.html", null ], | |
102 [ "PowerSpectrum.h", "PowerSpectrum_8h.html", null ], | |
103 [ "vamp-sdk/RealTime.h", "vamp-sdk_2RealTime_8h.html", null ], | |
104 [ "vamp-hostsdk/RealTime.h", "vamp-hostsdk_2RealTime_8h.html", null ], | |
105 [ "SpectralCentroid.cpp", "SpectralCentroid_8cpp.html", null ], | |
106 [ "SpectralCentroid.h", "SpectralCentroid_8h.html", null ], | |
107 [ "system.h", "system_8h.html", null ], | |
108 [ "vamp-hostsdk.h", "vamp-hostsdk_8h.html", null ], | |
109 [ "vamp-sdk.h", "vamp-sdk_8h.html", null ], | |
110 [ "vamp-simple-host.cpp", "vamp-simple-host_8cpp.html", null ], | |
111 [ "vamp.h", "vamp_8h.html", null ], | |
112 [ "ZeroCrossing.cpp", "ZeroCrossing_8cpp.html", null ], | |
113 [ "ZeroCrossing.h", "ZeroCrossing_8h.html", null ] | |
114 ] ], | |
115 [ "Directories", "dirs.html", [ | |
116 [ "examples", "dir_4ec587bfce30b9b784fbf1cea7303b09.html", null ], | |
117 [ "host", "dir_6fbd4b7d3be43d486a3cce3231e92c53.html", null ], | |
118 [ "src", "dir_629e1dda0168f818e2ee3ab23f68039a.html", null ], | |
119 [ "vamp", "dir_09d7d2829940fe46b7bc0eab58bbbc83.html", null ], | |
120 [ "vamp-hostsdk", "dir_878d155c6c7dea35ce3fc23c898c55e3.html", null ], | |
121 [ "vamp-sdk", "dir_fc29d784de6894b015ce0522888485dd.html", null ] | |
122 ] ], | |
123 [ "File Members", "globals.html", null ] | |
124 ] ] | 37 ] ] |
125 ]; | 38 ]; |
126 | 39 |
40 function getData(varName) | |
41 { | |
42 var i = varName.lastIndexOf('/'); | |
43 var n = i>=0 ? varName.substring(i+1) : varName; | |
44 return eval(n); | |
45 } | |
46 | |
47 function stripPath(uri) | |
48 { | |
49 return uri.substring(uri.lastIndexOf('/')+1); | |
50 } | |
51 | |
52 function getScript(scriptName,func,show) | |
53 { | |
54 var head = document.getElementsByTagName("head")[0]; | |
55 var script = document.createElement('script'); | |
56 script.id = scriptName; | |
57 script.type = 'text/javascript'; | |
58 script.onload = func; | |
59 script.src = scriptName+'.js'; | |
60 script.onreadystatechange = function() { | |
61 if (script.readyState=='complete' || script.readyState=='loaded') { | |
62 func(); if (show) showRoot(); | |
63 } | |
64 }; | |
65 head.appendChild(script); | |
66 } | |
67 | |
127 function createIndent(o,domNode,node,level) | 68 function createIndent(o,domNode,node,level) |
128 { | 69 { |
129 if (node.parentNode && node.parentNode.parentNode) | 70 if (node.parentNode && node.parentNode.parentNode) { |
130 { | |
131 createIndent(o,domNode,node.parentNode,level+1); | 71 createIndent(o,domNode,node.parentNode,level+1); |
132 } | 72 } |
133 var imgNode = document.createElement("img"); | 73 var imgNode = document.createElement("img"); |
134 if (level==0 && node.childrenData) | 74 imgNode.width = 16; |
135 { | 75 imgNode.height = 22; |
76 if (level==0 && node.childrenData) { | |
136 node.plus_img = imgNode; | 77 node.plus_img = imgNode; |
137 node.expandToggle = document.createElement("a"); | 78 node.expandToggle = document.createElement("a"); |
138 node.expandToggle.href = "javascript:void(0)"; | 79 node.expandToggle.href = "javascript:void(0)"; |
139 node.expandToggle.onclick = function() | 80 node.expandToggle.onclick = function() { |
140 { | 81 if (node.expanded) { |
141 if (node.expanded) | |
142 { | |
143 $(node.getChildrenUL()).slideUp("fast"); | 82 $(node.getChildrenUL()).slideUp("fast"); |
144 if (node.isLast) | 83 if (node.isLast) { |
145 { | |
146 node.plus_img.src = node.relpath+"ftv2plastnode.png"; | 84 node.plus_img.src = node.relpath+"ftv2plastnode.png"; |
147 } | 85 } else { |
148 else | |
149 { | |
150 node.plus_img.src = node.relpath+"ftv2pnode.png"; | 86 node.plus_img.src = node.relpath+"ftv2pnode.png"; |
151 } | 87 } |
152 node.expanded = false; | 88 node.expanded = false; |
153 } | 89 } else { |
154 else | 90 expandNode(o, node, false, false); |
155 { | |
156 expandNode(o, node, false); | |
157 } | 91 } |
158 } | 92 } |
159 node.expandToggle.appendChild(imgNode); | 93 node.expandToggle.appendChild(imgNode); |
160 domNode.appendChild(node.expandToggle); | 94 domNode.appendChild(node.expandToggle); |
161 } | 95 } else { |
162 else | |
163 { | |
164 domNode.appendChild(imgNode); | 96 domNode.appendChild(imgNode); |
165 } | 97 } |
166 if (level==0) | 98 if (level==0) { |
167 { | 99 if (node.isLast) { |
168 if (node.isLast) | 100 if (node.childrenData) { |
169 { | |
170 if (node.childrenData) | |
171 { | |
172 imgNode.src = node.relpath+"ftv2plastnode.png"; | 101 imgNode.src = node.relpath+"ftv2plastnode.png"; |
173 } | 102 } else { |
174 else | |
175 { | |
176 imgNode.src = node.relpath+"ftv2lastnode.png"; | 103 imgNode.src = node.relpath+"ftv2lastnode.png"; |
177 domNode.appendChild(imgNode); | 104 domNode.appendChild(imgNode); |
178 } | 105 } |
179 } | 106 } else { |
180 else | 107 if (node.childrenData) { |
181 { | |
182 if (node.childrenData) | |
183 { | |
184 imgNode.src = node.relpath+"ftv2pnode.png"; | 108 imgNode.src = node.relpath+"ftv2pnode.png"; |
185 } | 109 } else { |
186 else | |
187 { | |
188 imgNode.src = node.relpath+"ftv2node.png"; | 110 imgNode.src = node.relpath+"ftv2node.png"; |
189 domNode.appendChild(imgNode); | 111 domNode.appendChild(imgNode); |
190 } | 112 } |
191 } | 113 } |
192 } | 114 } else { |
193 else | 115 if (node.isLast) { |
194 { | |
195 if (node.isLast) | |
196 { | |
197 imgNode.src = node.relpath+"ftv2blank.png"; | 116 imgNode.src = node.relpath+"ftv2blank.png"; |
198 } | 117 } else { |
199 else | |
200 { | |
201 imgNode.src = node.relpath+"ftv2vertline.png"; | 118 imgNode.src = node.relpath+"ftv2vertline.png"; |
202 } | 119 } |
203 } | 120 } |
204 imgNode.border = "0"; | 121 imgNode.border = "0"; |
205 } | 122 } |
228 node.li.appendChild(node.itemDiv); | 145 node.li.appendChild(node.itemDiv); |
229 | 146 |
230 var a = document.createElement("a"); | 147 var a = document.createElement("a"); |
231 node.labelSpan.appendChild(a); | 148 node.labelSpan.appendChild(a); |
232 node.label = document.createTextNode(text); | 149 node.label = document.createTextNode(text); |
150 node.expanded = false; | |
233 a.appendChild(node.label); | 151 a.appendChild(node.label); |
234 if (link) | 152 if (link) { |
235 { | 153 var url; |
236 a.href = node.relpath+link; | 154 if (link.substring(0,1)=='^') { |
237 } | 155 url = link.substring(1); |
238 else | 156 link = url; |
239 { | 157 } else { |
158 url = node.relpath+link; | |
159 } | |
160 a.className = stripPath(link.replace('#',':')); | |
161 if (link.indexOf('#')!=-1) { | |
162 var aname = '#'+link.split('#')[1]; | |
163 var srcPage = stripPath($(location).attr('pathname')); | |
164 var targetPage = stripPath(link.split('#')[0]); | |
165 a.href = srcPage!=targetPage ? url : '#'; | |
166 a.onclick = function(){ | |
167 if (!$(a).parent().parent().hasClass('selected')) | |
168 { | |
169 $('.item').removeClass('selected'); | |
170 $('.item').removeAttr('id'); | |
171 $(a).parent().parent().addClass('selected'); | |
172 $(a).parent().parent().attr('id','selected'); | |
173 } | |
174 var pos, anchor = $(aname), docContent = $('#doc-content'); | |
175 if (anchor.parent().attr('class')=='memItemLeft') { | |
176 pos = anchor.parent().position().top; | |
177 } else { | |
178 pos = anchor.position().top; | |
179 } | |
180 var dist = Math.abs(Math.min( | |
181 pos-docContent.offset().top, | |
182 docContent[0].scrollHeight- | |
183 docContent.height()-docContent.scrollTop())); | |
184 docContent.animate({ | |
185 scrollTop: pos + docContent.scrollTop() - docContent.offset().top | |
186 },Math.max(50,Math.min(500,dist)),function(){ | |
187 window.location.replace(aname); | |
188 }); | |
189 }; | |
190 } else { | |
191 a.href = url; | |
192 } | |
193 } else { | |
240 if (childrenData != null) | 194 if (childrenData != null) |
241 { | 195 { |
242 a.className = "nolink"; | 196 a.className = "nolink"; |
243 a.href = "javascript:void(0)"; | 197 a.href = "javascript:void(0)"; |
244 a.onclick = node.expandToggle.onclick; | 198 a.onclick = node.expandToggle.onclick; |
245 node.expanded = false; | |
246 } | 199 } |
247 } | 200 } |
248 | 201 |
249 node.childrenUL = null; | 202 node.childrenUL = null; |
250 node.getChildrenUL = function() | 203 node.getChildrenUL = function() { |
251 { | 204 if (!node.childrenUL) { |
252 if (!node.childrenUL) | |
253 { | |
254 node.childrenUL = document.createElement("ul"); | 205 node.childrenUL = document.createElement("ul"); |
255 node.childrenUL.className = "children_ul"; | 206 node.childrenUL.className = "children_ul"; |
256 node.childrenUL.style.display = "none"; | 207 node.childrenUL.style.display = "none"; |
257 node.li.appendChild(node.childrenUL); | 208 node.li.appendChild(node.childrenUL); |
258 } | 209 } |
265 function showRoot() | 216 function showRoot() |
266 { | 217 { |
267 var headerHeight = $("#top").height(); | 218 var headerHeight = $("#top").height(); |
268 var footerHeight = $("#nav-path").height(); | 219 var footerHeight = $("#nav-path").height(); |
269 var windowHeight = $(window).height() - headerHeight - footerHeight; | 220 var windowHeight = $(window).height() - headerHeight - footerHeight; |
270 navtree.scrollTo('#selected',0,{offset:-windowHeight/2}); | 221 (function (){ // retry until we can scroll to the selected item |
271 } | 222 try { |
272 | 223 navtree.scrollTo('#selected',0,{offset:-windowHeight/2}); |
273 function expandNode(o, node, imm) | 224 } catch (err) { |
274 { | 225 setTimeout(arguments.callee, 0); |
275 if (node.childrenData && !node.expanded) | 226 } |
276 { | 227 })(); |
277 if (!node.childrenVisited) | 228 } |
278 { | 229 |
279 getNode(o, node); | 230 function expandNode(o, node, imm, showRoot) |
280 } | 231 { |
281 if (imm) | 232 if (node.childrenData && !node.expanded) { |
282 { | 233 if (typeof(node.childrenData)==='string') { |
234 var varName = node.childrenData; | |
235 getScript(node.relpath+varName,function(){ | |
236 node.childrenData = getData(varName); | |
237 expandNode(o, node, imm, showRoot); | |
238 }, showRoot); | |
239 } else { | |
240 if (!node.childrenVisited) { | |
241 getNode(o, node); | |
242 } if (imm) { | |
243 $(node.getChildrenUL()).show(); | |
244 } else { | |
245 $(node.getChildrenUL()).slideDown("fast"); | |
246 } | |
247 if (node.isLast) { | |
248 node.plus_img.src = node.relpath+"ftv2mlastnode.png"; | |
249 } else { | |
250 node.plus_img.src = node.relpath+"ftv2mnode.png"; | |
251 } | |
252 node.expanded = true; | |
253 } | |
254 } | |
255 } | |
256 | |
257 function highlightAnchor() | |
258 { | |
259 var anchor = $($(location).attr('hash')); | |
260 if (anchor.parent().attr('class')=='memItemLeft'){ | |
261 var rows = $('.memberdecls tr[class$=\""'+ | |
262 window.location.hash.substring(1)+'"\"]').children(); | |
263 rows.effect('highlight',{},1500); | |
264 } else if (anchor.parent().is(":header")) { | |
265 anchor.parent().effect('highlight',{},1500); | |
266 } else { | |
267 var targetDiv = anchor.next(); | |
268 $(targetDiv).children('.memproto,.memdoc').effect("highlight",{},1500); | |
269 } | |
270 } | |
271 | |
272 function showNode(o, node, index) | |
273 { | |
274 if (node.childrenData /*&& !node.expanded*/) { | |
275 if (typeof(node.childrenData)==='string') { | |
276 var varName = node.childrenData; | |
277 getScript(node.relpath+varName,function(){ | |
278 node.childrenData = getData(varName); | |
279 showNode(o,node,index); | |
280 },true); | |
281 } else { | |
282 if (!node.childrenVisited) { | |
283 getNode(o, node); | |
284 } | |
283 $(node.getChildrenUL()).show(); | 285 $(node.getChildrenUL()).show(); |
284 } | 286 if (node.isLast) { |
285 else | 287 node.plus_img.src = node.relpath+"ftv2mlastnode.png"; |
286 { | 288 } else { |
287 $(node.getChildrenUL()).slideDown("fast",showRoot); | 289 node.plus_img.src = node.relpath+"ftv2mnode.png"; |
288 } | 290 } |
289 if (node.isLast) | 291 node.expanded = true; |
290 { | 292 var n = node.children[o.breadcrumbs[index]]; |
291 node.plus_img.src = node.relpath+"ftv2mlastnode.png"; | 293 if (index+1<o.breadcrumbs.length) { |
292 } | 294 showNode(o,n,index+1); |
293 else | 295 } else { |
294 { | 296 if (typeof(n.childrenData)==='string') { |
295 node.plus_img.src = node.relpath+"ftv2mnode.png"; | 297 var varName = n.childrenData; |
296 } | 298 getScript(n.relpath+varName,function(){ |
297 node.expanded = true; | 299 n.childrenData = getData(varName); |
300 node.expanded=false; | |
301 showNode(o,node,index); // retry with child node expanded | |
302 },true); | |
303 } else { | |
304 if (o.toroot=="index.html" || n.childrenData) { | |
305 expandNode(o, n, true, true); | |
306 } | |
307 var a; | |
308 if ($(location).attr('hash')) { | |
309 var link=stripPath($(location).attr('pathname'))+':'+ | |
310 $(location).attr('hash').substring(1); | |
311 a=$('.item a[class$=\""'+link+'"\"]'); | |
312 } | |
313 if (a && a.length) { | |
314 a.parent().parent().addClass('selected'); | |
315 a.parent().parent().attr('id','selected'); | |
316 highlightAnchor(); | |
317 } else { | |
318 $(n.itemDiv).addClass('selected'); | |
319 $(n.itemDiv).attr('id','selected'); | |
320 } | |
321 showRoot(); | |
322 } | |
323 } | |
324 } | |
298 } | 325 } |
299 } | 326 } |
300 | 327 |
301 function getNode(o, po) | 328 function getNode(o, po) |
302 { | 329 { |
303 po.childrenVisited = true; | 330 po.childrenVisited = true; |
304 var l = po.childrenData.length-1; | 331 var l = po.childrenData.length-1; |
305 for (var i in po.childrenData) | 332 for (var i in po.childrenData) { |
306 { | |
307 var nodeData = po.childrenData[i]; | 333 var nodeData = po.childrenData[i]; |
308 po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2], | 334 po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2], |
309 i==l); | 335 i==l); |
310 } | 336 } |
311 } | 337 } |
312 | 338 |
313 function findNavTreePage(url, data) | 339 function navTo(o,root,hash,relpath) |
314 { | 340 { |
315 var nodes = data; | 341 getScript(relpath+"navtreeindex",function(){ |
316 var result = null; | 342 var navTreeIndex = eval('NAVTREEINDEX'); |
317 for (var i in nodes) | 343 if (navTreeIndex) { |
318 { | 344 var nti = navTreeIndex[root+hash]; |
319 var d = nodes[i]; | 345 o.breadcrumbs = nti ? nti : navTreeIndex[root]; |
320 if (d[1] == url) | 346 if (o.breadcrumbs==null) o.breadcrumbs = navTreeIndex["index.html"]; |
321 { | 347 o.breadcrumbs.unshift(0); |
322 return new Array(i); | 348 showNode(o, o.node, 0); |
323 } | 349 } |
324 else if (d[2] != null) // array of children | 350 },true); |
325 { | |
326 result = findNavTreePage(url, d[2]); | |
327 if (result != null) | |
328 { | |
329 return (new Array(i).concat(result)); | |
330 } | |
331 } | |
332 } | |
333 return null; | |
334 } | 351 } |
335 | 352 |
336 function initNavTree(toroot,relpath) | 353 function initNavTree(toroot,relpath) |
337 { | 354 { |
338 var o = new Object(); | 355 var o = new Object(); |
344 o.node.childrenUL = document.createElement("ul"); | 361 o.node.childrenUL = document.createElement("ul"); |
345 o.node.getChildrenUL = function() { return o.node.childrenUL; }; | 362 o.node.getChildrenUL = function() { return o.node.childrenUL; }; |
346 o.node.li.appendChild(o.node.childrenUL); | 363 o.node.li.appendChild(o.node.childrenUL); |
347 o.node.depth = 0; | 364 o.node.depth = 0; |
348 o.node.relpath = relpath; | 365 o.node.relpath = relpath; |
349 | 366 o.node.expanded = false; |
350 getNode(o, o.node); | 367 o.node.isLast = true; |
351 | 368 o.node.plus_img = document.createElement("img"); |
352 o.breadcrumbs = findNavTreePage(toroot, NAVTREE); | 369 o.node.plus_img.src = relpath+"ftv2pnode.png"; |
353 if (o.breadcrumbs == null) | 370 o.node.plus_img.width = 16; |
354 { | 371 o.node.plus_img.height = 22; |
355 o.breadcrumbs = findNavTreePage("index.html",NAVTREE); | 372 |
356 } | 373 navTo(o,toroot,window.location.hash,relpath); |
357 if (o.breadcrumbs != null && o.breadcrumbs.length>0) | 374 |
358 { | 375 $(window).bind('hashchange', function(){ |
359 var p = o.node; | 376 if (window.location.hash && window.location.hash.length>1){ |
360 for (var i in o.breadcrumbs) | 377 var a; |
361 { | 378 if ($(location).attr('hash')){ |
362 var j = o.breadcrumbs[i]; | 379 var clslink=stripPath($(location).attr('pathname'))+':'+ |
363 p = p.children[j]; | 380 $(location).attr('hash').substring(1); |
364 expandNode(o,p,true); | 381 a=$('.item a[class$=\""'+clslink+'"\"]'); |
365 } | 382 } |
366 p.itemDiv.className = p.itemDiv.className + " selected"; | 383 if (a==null || !$(a).parent().parent().hasClass('selected')){ |
367 p.itemDiv.id = "selected"; | 384 $('.item').removeClass('selected'); |
368 $(window).load(showRoot); | 385 $('.item').removeAttr('id'); |
369 } | 386 } |
370 } | 387 var link=stripPath($(location).attr('pathname')); |
371 | 388 navTo(o,link,$(location).attr('hash'),relpath); |
389 } | |
390 }) | |
391 | |
392 $(window).load(showRoot); | |
393 } | |
394 |