3 [ "Property proxy API", "index.html", [
4 [ "Data Structures", null, [
5 [ "Data Structures", "annotated.html", "annotated" ],
6 [ "Data Structure Index", "classes.html", null ],
7 [ "Data Fields", "functions.html", [
8 [ "All", "functions.html", null ],
9 [ "Variables", "functions_vars.html", null ]
13 [ "File List", "files.html", "files" ],
14 [ "Globals", "globals.html", [
15 [ "All", "globals.html", null ],
16 [ "Functions", "globals_func.html", null ],
17 [ "Typedefs", "globals_type.html", null ]
28 var SYNCONMSG
= 'click to disable panel synchronisation';
29 var SYNCOFFMSG
= 'click to enable panel synchronisation';
30 var SYNCONMSG
= 'click to disable panel synchronisation';
31 var SYNCOFFMSG
= 'click to enable panel synchronisation';
32 var navTreeSubIndices
= new Array();
34 function getData(varName
)
36 var i
= varName
.lastIndexOf('/');
37 var n
= i
>=0 ? varName
.substring(i
+1) : varName
;
38 return eval(n
.replace(/\-/g,'_'));
41 function stripPath(uri
)
43 return uri
.substring(uri
.lastIndexOf('/')+1);
46 function stripPath2(uri
)
48 var i
= uri
.lastIndexOf('/');
49 var s
= uri
.substring(i
+1);
50 var m
= uri
.substring(0,i
+1).match(/\/d\w\/d\w\w\/$/);
51 return m
? uri
.substring(i
-6) : s
;
54 function localStorageSupported()
57 return 'localStorage' in window
&& window
['localStorage'] !== null && window
.localStorage
.getItem
;
65 function storeLink(link
)
67 if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) {
68 window
.localStorage
.setItem('navpath',link
);
74 if (localStorageSupported()) {
75 window
.localStorage
.setItem('navpath','');
81 if (localStorageSupported()) {
82 return window
.localStorage
.getItem('navpath');
88 function getScript(scriptName
,func
,show
)
90 var head
= document
.getElementsByTagName("head")[0];
91 var script
= document
.createElement('script');
92 script
.id
= scriptName
;
93 script
.type
= 'text/javascript';
95 script
.src
= scriptName
+'.js';
96 if ($.browser
.msie
&& $.browser
.version
<=8) {
97 // script.onload does not work with older versions of IE
98 script
.onreadystatechange = function() {
99 if (script
.readyState
=='complete' || script
.readyState
=='loaded') {
100 func(); if (show
) showRoot();
104 head
.appendChild(script
);
107 function createIndent(o
,domNode
,node
,level
)
111 while (n
.parentNode
) { level
++; n
=n
.parentNode
; }
112 if (node
.childrenData
) {
113 var imgNode
= document
.createElement("img");
114 imgNode
.style
.paddingLeft
=(16*level
).toString()+'px';
118 node
.plus_img
= imgNode
;
119 node
.expandToggle
= document
.createElement("a");
120 node
.expandToggle
.href
= "javascript:void(0)";
121 node
.expandToggle
.onclick = function() {
123 $(node
.getChildrenUL()).slideUp("fast");
124 node
.plus_img
.src
= node
.relpath
+"ftv2pnode.png";
125 node
.expanded
= false;
127 expandNode(o
, node
, false, false);
130 node
.expandToggle
.appendChild(imgNode
);
131 domNode
.appendChild(node
.expandToggle
);
132 imgNode
.src
= node
.relpath
+"ftv2pnode.png";
134 var span
= document
.createElement("span");
135 span
.style
.display
= 'inline-block';
136 span
.style
.width
= 16*(level
+1)+'px';
137 span
.style
.height
= '22px';
138 span
.innerHTML
= ' ';
139 domNode
.appendChild(span
);
143 var animationInProgress
= false;
145 function gotoAnchor(anchor
,aname
,updateLocation
)
147 var pos
, docContent
= $('#doc-content');
148 if (anchor
.parent().attr('class')=='memItemLeft' ||
149 anchor
.parent().attr('class')=='fieldtype' ||
150 anchor
.parent().is(':header'))
152 pos
= anchor
.parent().position().top
;
153 } else if (anchor
.position()) {
154 pos
= anchor
.position().top
;
157 var dist
= Math
.abs(Math
.min(
158 pos
-docContent
.offset().top
,
159 docContent
[0].scrollHeight
-
160 docContent
.height()-docContent
.scrollTop()));
161 animationInProgress
=true;
163 scrollTop
: pos
+ docContent
.scrollTop() - docContent
.offset().top
164 },Math
.max(50,Math
.min(500,dist
)),function(){
165 if (updateLocation
) window
.location
.href
=aname
;
166 animationInProgress
=false;
171 function newNode(o
, po
, text
, link
, childrenData
, lastNode
)
173 var node
= new Object();
174 node
.children
= Array();
175 node
.childrenData
= childrenData
;
176 node
.depth
= po
.depth
+ 1;
177 node
.relpath
= po
.relpath
;
178 node
.isLast
= lastNode
;
180 node
.li
= document
.createElement("li");
181 po
.getChildrenUL().appendChild(node
.li
);
182 node
.parentNode
= po
;
184 node
.itemDiv
= document
.createElement("div");
185 node
.itemDiv
.className
= "item";
187 node
.labelSpan
= document
.createElement("span");
188 node
.labelSpan
.className
= "label";
190 createIndent(o
,node
.itemDiv
,node
,0);
191 node
.itemDiv
.appendChild(node
.labelSpan
);
192 node
.li
.appendChild(node
.itemDiv
);
194 var a
= document
.createElement("a");
195 node
.labelSpan
.appendChild(a
);
196 node
.label
= document
.createTextNode(text
);
197 node
.expanded
= false;
198 a
.appendChild(node
.label
);
201 if (link
.substring(0,1)=='^') {
202 url
= link
.substring(1);
205 url
= node
.relpath
+link
;
207 a
.className
= stripPath(link
.replace('#',':'));
208 if (link
.indexOf('#')!=-1) {
209 var aname
= '#'+link
.split('#')[1];
210 var srcPage
= stripPath($(location
).attr('pathname'));
211 var targetPage
= stripPath(link
.split('#')[0]);
212 a
.href
= srcPage
!=targetPage
? url
: "javascript:void(0)";
213 a
.onclick = function(){
215 if (!$(a
).parent().parent().hasClass('selected'))
217 $('.item').removeClass('selected');
218 $('.item').removeAttr('id');
219 $(a
).parent().parent().addClass('selected');
220 $(a
).parent().parent().attr('id','selected');
222 var anchor
= $(aname
);
223 gotoAnchor(anchor
,aname
,true);
227 a
.onclick = function() { storeLink(link
); }
230 if (childrenData
!= null)
232 a
.className
= "nolink";
233 a
.href
= "javascript:void(0)";
234 a
.onclick
= node
.expandToggle
.onclick
;
238 node
.childrenUL
= null;
239 node
.getChildrenUL = function() {
240 if (!node
.childrenUL
) {
241 node
.childrenUL
= document
.createElement("ul");
242 node
.childrenUL
.className
= "children_ul";
243 node
.childrenUL
.style
.display
= "none";
244 node
.li
.appendChild(node
.childrenUL
);
246 return node
.childrenUL
;
254 var headerHeight
= $("#top").height();
255 var footerHeight
= $("#nav-path").height();
256 var windowHeight
= $(window
).height() - headerHeight
- footerHeight
;
257 (function (){ // retry until we can scroll to the selected item
259 var navtree
=$('#nav-tree');
260 navtree
.scrollTo('#selected',0,{offset
:-windowHeight
/2});
262 setTimeout(arguments
.callee
, 0);
267 function expandNode(o
, node
, imm
, showRoot
)
269 if (node
.childrenData
&& !node
.expanded
) {
270 if (typeof(node
.childrenData
)==='string') {
271 var varName
= node
.childrenData
;
272 getScript(node
.relpath
+varName
,function(){
273 node
.childrenData
= getData(varName
);
274 expandNode(o
, node
, imm
, showRoot
);
277 if (!node
.childrenVisited
) {
279 } if (imm
|| ($.browser
.msie
&& $.browser
.version
>8)) {
280 // somehow slideDown jumps to the start of tree for IE9 :-(
281 $(node
.getChildrenUL()).show();
283 $(node
.getChildrenUL()).slideDown("fast");
286 node
.plus_img
.src
= node
.relpath
+"ftv2mlastnode.png";
288 node
.plus_img
.src
= node
.relpath
+"ftv2mnode.png";
290 node
.expanded
= true;
295 function glowEffect(n
,duration
)
297 n
.addClass('glow').delay(duration
).queue(function(next
){
298 $(this).removeClass('glow');next();
302 function highlightAnchor()
304 var aname
= $(location
).attr('hash');
305 var anchor
= $(aname
);
306 if (anchor
.parent().attr('class')=='memItemLeft'){
307 var rows
= $('.memberdecls tr[class$="'+
308 window
.location
.hash
.substring(1)+'"]');
309 glowEffect(rows
.children(),300); // member without details
310 } else if (anchor
.parents().slice(2).prop('tagName')=='TR') {
311 glowEffect(anchor
.parents('div.memitem'),1000); // enum value
312 } else if (anchor
.parent().attr('class')=='fieldtype'){
313 glowEffect(anchor
.parent().parent(),1000); // struct field
314 } else if (anchor
.parent().is(":header")) {
315 glowEffect(anchor
.parent(),1000); // section header
317 glowEffect(anchor
.next(),1000); // normal member
319 gotoAnchor(anchor
,aname
,false);
322 function selectAndHighlight(hash
,n
)
326 var link
=stripPath($(location
).attr('pathname'))+':'+hash
.substring(1);
327 a
=$('.item a[class$="'+link
+'"]');
330 a
.parent().parent().addClass('selected');
331 a
.parent().parent().attr('id','selected');
334 $(n
.itemDiv
).addClass('selected');
335 $(n
.itemDiv
).attr('id','selected');
337 if ($('#nav-tree-contents .item:first').hasClass('selected')) {
338 $('#nav-sync').css('top','30px');
340 $('#nav-sync').css('top','5px');
345 function showNode(o
, node
, index
, hash
)
347 if (node
&& node
.childrenData
) {
348 if (typeof(node
.childrenData
)==='string') {
349 var varName
= node
.childrenData
;
350 getScript(node
.relpath
+varName
,function(){
351 node
.childrenData
= getData(varName
);
352 showNode(o
,node
,index
,hash
);
355 if (!node
.childrenVisited
) {
358 $(node
.getChildrenUL()).css({'display':'block'});
360 node
.plus_img
.src
= node
.relpath
+"ftv2mlastnode.png";
362 node
.plus_img
.src
= node
.relpath
+"ftv2mnode.png";
364 node
.expanded
= true;
365 var n
= node
.children
[o
.breadcrumbs
[index
]];
366 if (index
+1<o
.breadcrumbs
.length
) {
367 showNode(o
,n
,index
+1,hash
);
369 if (typeof(n
.childrenData
)==='string') {
370 var varName
= n
.childrenData
;
371 getScript(n
.relpath
+varName
,function(){
372 n
.childrenData
= getData(varName
);
374 showNode(o
,node
,index
,hash
); // retry with child node expanded
377 var rootBase
= stripPath(o
.toroot
.replace(/\..+$/, ''));
378 if (rootBase
=="index" || rootBase
=="pages" || rootBase
=="search") {
379 expandNode(o
, n
, true, true);
381 selectAndHighlight(hash
,n
);
386 selectAndHighlight(hash
);
390 function removeToInsertLater(element
) {
391 var parentNode
= element
.parentNode
;
392 var nextSibling
= element
.nextSibling
;
393 parentNode
.removeChild(element
);
396 parentNode
.insertBefore(element
, nextSibling
);
398 parentNode
.appendChild(element
);
403 function getNode(o
, po
)
405 var insertFunction
= removeToInsertLater(po
.li
);
406 po
.childrenVisited
= true;
407 var l
= po
.childrenData
.length
-1;
408 for (var i
in po
.childrenData
) {
409 var nodeData
= po
.childrenData
[i
];
410 po
.children
[i
] = newNode(o
, po
, nodeData
[0], nodeData
[1], nodeData
[2],
416 function gotoNode(o
,subIndex
,root
,hash
,relpath
)
418 var nti
= navTreeSubIndices
[subIndex
][root
+hash
];
419 o
.breadcrumbs
= $.extend(true, [], nti
? nti
: navTreeSubIndices
[subIndex
][root
]);
420 if (!o
.breadcrumbs
&& root
!=NAVTREE
[0][1]) { // fallback: show index
421 navTo(o
,NAVTREE
[0][1],"",relpath
);
422 $('.item').removeClass('selected');
423 $('.item').removeAttr('id');
426 o
.breadcrumbs
.unshift(0); // add 0 for root node
427 showNode(o
, o
.node
, 0, hash
);
431 function navTo(o
,root
,hash
,relpath
)
433 var link
= cachedLink();
435 var parts
= link
.split('#');
437 if (parts
.length
>1) hash
= '#'+parts
[1];
440 if (hash
.match(/^#l\d+$/)) {
441 var anchor
=$('a[name='+hash
.substring(1)+']');
442 glowEffect(anchor
.parent(),1000); // line number
443 hash
=''; // strip line number anchors
444 //root=root.replace(/_source\./,'.'); // source link to doc link
448 while (NAVTREEINDEX
[i
+1]<=url
) i
++;
449 if (i
==-1) { i
=0; root
=NAVTREE
[0][1]; } // fallback: show index
450 if (navTreeSubIndices
[i
]) {
451 gotoNode(o
,i
,root
,hash
,relpath
)
453 getScript(relpath
+'navtreeindex'+i
,function(){
454 navTreeSubIndices
[i
] = eval('NAVTREEINDEX'+i
);
455 if (navTreeSubIndices
[i
]) {
456 gotoNode(o
,i
,root
,hash
,relpath
);
462 function showSyncOff(n
,relpath
)
464 n
.html('<img src="'+relpath
+'sync_off.png" title="'+SYNCOFFMSG
+'"/>');
467 function showSyncOn(n
,relpath
)
469 n
.html('<img src="'+relpath
+'sync_on.png" title="'+SYNCONMSG
+'"/>');
472 function toggleSyncButton(relpath
)
474 var navSync
= $('#nav-sync');
475 if (navSync
.hasClass('sync')) {
476 navSync
.removeClass('sync');
477 showSyncOff(navSync
,relpath
);
478 storeLink(stripPath2($(location
).attr('pathname'))+$(location
).attr('hash'));
480 navSync
.addClass('sync');
481 showSyncOn(navSync
,relpath
);
486 function initNavTree(toroot
,relpath
)
488 var o
= new Object();
490 o
.node
= new Object();
491 o
.node
.li
= document
.getElementById("nav-tree-contents");
492 o
.node
.childrenData
= NAVTREE
;
493 o
.node
.children
= new Array();
494 o
.node
.childrenUL
= document
.createElement("ul");
495 o
.node
.getChildrenUL = function() { return o
.node
.childrenUL
; };
496 o
.node
.li
.appendChild(o
.node
.childrenUL
);
498 o
.node
.relpath
= relpath
;
499 o
.node
.expanded
= false;
500 o
.node
.isLast
= true;
501 o
.node
.plus_img
= document
.createElement("img");
502 o
.node
.plus_img
.src
= relpath
+"ftv2pnode.png";
503 o
.node
.plus_img
.width
= 16;
504 o
.node
.plus_img
.height
= 22;
506 if (localStorageSupported()) {
507 var navSync
= $('#nav-sync');
509 showSyncOff(navSync
,relpath
);
510 navSync
.removeClass('sync');
512 showSyncOn(navSync
,relpath
);
514 navSync
.click(function(){ toggleSyncButton(relpath
); });
517 $(window
).load(function(){
518 navTo(o
,toroot
,window
.location
.hash
,relpath
);
522 $(window
).bind('hashchange', function(){
523 if (window
.location
.hash
&& window
.location
.hash
.length
>1){
525 if ($(location
).attr('hash')){
526 var clslink
=stripPath($(location
).attr('pathname'))+':'+
527 $(location
).attr('hash').substring(1);
528 a
=$('.item a[class$="'+clslink
+'"]');
530 if (a
==null || !$(a
).parent().parent().hasClass('selected')){
531 $('.item').removeClass('selected');
532 $('.item').removeAttr('id');
534 var link
=stripPath2($(location
).attr('pathname'));
535 navTo(o
,link
,$(location
).attr('hash'),relpath
);
536 } else if (!animationInProgress
) {
537 $('#doc-content').scrollTop(0);
538 $('.item').removeClass('selected');
539 $('.item').removeAttr('id');
540 navTo(o
,toroot
,window
.location
.hash
,relpath
);