navtree.js 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. var NAVTREE =
  2. [
  3. [ "QBluetoothZero", "index.html", [
  4. [ "Class List", "annotated.html", [
  5. [ "QBtAddress", "class_q_bt_address.html", null ],
  6. [ "QBtConstants", "class_q_bt_constants.html", null ],
  7. [ "QBtDevice", "class_q_bt_device.html", null ],
  8. [ "QBtDeviceDiscoverer", "class_q_bt_device_discoverer.html", null ],
  9. [ "QBtLocalDevice", "class_q_bt_local_device.html", null ],
  10. [ "QBtObjectExchangeClient", "class_q_bt_object_exchange_client.html", null ],
  11. [ "QBtObjectExchangeServer", "class_q_bt_object_exchange_server.html", null ],
  12. [ "QBtRemoteFileInfo", "class_q_bt_remote_file_info.html", null ],
  13. [ "QBtSerialPortClient", "class_q_bt_serial_port_client.html", null ],
  14. [ "QBtSerialPortServer", "class_q_bt_serial_port_server.html", null ],
  15. [ "QBtService", "class_q_bt_service.html", null ],
  16. [ "QBtServiceAdvertiser", "class_q_bt_service_advertiser.html", null ],
  17. [ "QBtServiceDiscoverer", "class_q_bt_service_discoverer.html", null ],
  18. [ "QBtServiceDiscovererForAll", "class_q_bt_service_discoverer_for_all.html", null ],
  19. [ "QBtSingleDeviceSelectorUI", "class_q_bt_single_device_selector_u_i.html", null ],
  20. [ "QBtUuid", "class_q_bt_uuid.html", null ]
  21. ] ],
  22. [ "Class Index", "classes.html", null ],
  23. [ "Class Members", "functions.html", null ],
  24. [ "Namespace List", "namespaces.html", [
  25. [ "QBluetooth", "namespace_q_bluetooth.html", null ]
  26. ] ],
  27. [ "File List", "files.html", [
  28. [ "QBluetoothZero.h", "_q_bluetooth_zero_8h.html", null ],
  29. [ "QBtAddress.h", "_q_bt_address_8h.html", null ],
  30. [ "QBtAuxFunctions.h", "_q_bt_aux_functions_8h.html", null ],
  31. [ "QBtConstants.h", "_q_bt_constants_8h.html", null ],
  32. [ "QBtDevice.h", "_q_bt_device_8h.html", null ],
  33. [ "QBtDeviceDiscoverer.h", "_q_bt_device_discoverer_8h.html", null ],
  34. [ "QBtGlobal.h", "_q_bt_global_8h.html", null ],
  35. [ "QBtLocalDevice.h", "_q_bt_local_device_8h.html", null ],
  36. [ "QBtObjectExchangeClient.h", "_q_bt_object_exchange_client_8h.html", null ],
  37. [ "QBtObjectExchangeServer.h", "_q_bt_object_exchange_server_8h.html", null ],
  38. [ "QBtRemoteFileInfo.h", "_q_bt_remote_file_info_8h.html", null ],
  39. [ "QBtSerialPortClient.h", "_q_bt_serial_port_client_8h.html", null ],
  40. [ "QBtSerialPortServer.h", "_q_bt_serial_port_server_8h.html", null ],
  41. [ "QBtService.h", "_q_bt_service_8h.html", null ],
  42. [ "QBtServiceAdvertiser.h", "_q_bt_service_advertiser_8h.html", null ],
  43. [ "QBtServiceDiscoverer.h", "_q_bt_service_discoverer_8h.html", null ],
  44. [ "QBtServiceDiscovererForAll.h", "_q_bt_service_discoverer_for_all_8h.html", null ],
  45. [ "QBtSingleDeviceSelectorUI.h", "_q_bt_single_device_selector_u_i_8h.html", null ],
  46. [ "QBtTypes.h", "_q_bt_types_8h.html", null ],
  47. [ "QBtUuid.h", "_q_bt_uuid_8h.html", null ]
  48. ] ],
  49. [ "File Members", "globals.html", null ]
  50. ] ]
  51. ];
  52. function createIndent(o,domNode,node,level)
  53. {
  54. if (node.parentNode && node.parentNode.parentNode)
  55. {
  56. createIndent(o,domNode,node.parentNode,level+1);
  57. }
  58. var imgNode = document.createElement("img");
  59. if (level==0 && node.childrenData)
  60. {
  61. node.plus_img = imgNode;
  62. node.expandToggle = document.createElement("a");
  63. node.expandToggle.href = "javascript:void(0)";
  64. node.expandToggle.onclick = function()
  65. {
  66. if (node.expanded)
  67. {
  68. $(node.getChildrenUL()).slideUp("fast");
  69. if (node.isLast)
  70. {
  71. node.plus_img.src = node.relpath+"ftv2plastnode.png";
  72. }
  73. else
  74. {
  75. node.plus_img.src = node.relpath+"ftv2pnode.png";
  76. }
  77. node.expanded = false;
  78. }
  79. else
  80. {
  81. expandNode(o, node, false);
  82. }
  83. }
  84. node.expandToggle.appendChild(imgNode);
  85. domNode.appendChild(node.expandToggle);
  86. }
  87. else
  88. {
  89. domNode.appendChild(imgNode);
  90. }
  91. if (level==0)
  92. {
  93. if (node.isLast)
  94. {
  95. if (node.childrenData)
  96. {
  97. imgNode.src = node.relpath+"ftv2plastnode.png";
  98. }
  99. else
  100. {
  101. imgNode.src = node.relpath+"ftv2lastnode.png";
  102. domNode.appendChild(imgNode);
  103. }
  104. }
  105. else
  106. {
  107. if (node.childrenData)
  108. {
  109. imgNode.src = node.relpath+"ftv2pnode.png";
  110. }
  111. else
  112. {
  113. imgNode.src = node.relpath+"ftv2node.png";
  114. domNode.appendChild(imgNode);
  115. }
  116. }
  117. }
  118. else
  119. {
  120. if (node.isLast)
  121. {
  122. imgNode.src = node.relpath+"ftv2blank.png";
  123. }
  124. else
  125. {
  126. imgNode.src = node.relpath+"ftv2vertline.png";
  127. }
  128. }
  129. imgNode.border = "0";
  130. }
  131. function newNode(o, po, text, link, childrenData, lastNode)
  132. {
  133. var node = new Object();
  134. node.children = Array();
  135. node.childrenData = childrenData;
  136. node.depth = po.depth + 1;
  137. node.relpath = po.relpath;
  138. node.isLast = lastNode;
  139. node.li = document.createElement("li");
  140. po.getChildrenUL().appendChild(node.li);
  141. node.parentNode = po;
  142. node.itemDiv = document.createElement("div");
  143. node.itemDiv.className = "item";
  144. node.labelSpan = document.createElement("span");
  145. node.labelSpan.className = "label";
  146. createIndent(o,node.itemDiv,node,0);
  147. node.itemDiv.appendChild(node.labelSpan);
  148. node.li.appendChild(node.itemDiv);
  149. var a = document.createElement("a");
  150. node.labelSpan.appendChild(a);
  151. node.label = document.createTextNode(text);
  152. a.appendChild(node.label);
  153. if (link)
  154. {
  155. a.href = node.relpath+link;
  156. }
  157. else
  158. {
  159. if (childrenData != null)
  160. {
  161. a.className = "nolink";
  162. a.href = "javascript:void(0)";
  163. a.onclick = node.expandToggle.onclick;
  164. node.expanded = false;
  165. }
  166. }
  167. node.childrenUL = null;
  168. node.getChildrenUL = function()
  169. {
  170. if (!node.childrenUL)
  171. {
  172. node.childrenUL = document.createElement("ul");
  173. node.childrenUL.className = "children_ul";
  174. node.childrenUL.style.display = "none";
  175. node.li.appendChild(node.childrenUL);
  176. }
  177. return node.childrenUL;
  178. };
  179. return node;
  180. }
  181. function showRoot()
  182. {
  183. var headerHeight = $("#top").height();
  184. var footerHeight = $("#nav-path").height();
  185. var windowHeight = $(window).height() - headerHeight - footerHeight;
  186. navtree.scrollTo('#selected',0,{offset:-windowHeight/2});
  187. }
  188. function expandNode(o, node, imm)
  189. {
  190. if (node.childrenData && !node.expanded)
  191. {
  192. if (!node.childrenVisited)
  193. {
  194. getNode(o, node);
  195. }
  196. if (imm)
  197. {
  198. $(node.getChildrenUL()).show();
  199. }
  200. else
  201. {
  202. $(node.getChildrenUL()).slideDown("fast",showRoot);
  203. }
  204. if (node.isLast)
  205. {
  206. node.plus_img.src = node.relpath+"ftv2mlastnode.png";
  207. }
  208. else
  209. {
  210. node.plus_img.src = node.relpath+"ftv2mnode.png";
  211. }
  212. node.expanded = true;
  213. }
  214. }
  215. function getNode(o, po)
  216. {
  217. po.childrenVisited = true;
  218. var l = po.childrenData.length-1;
  219. for (var i in po.childrenData)
  220. {
  221. var nodeData = po.childrenData[i];
  222. po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2],
  223. i==l);
  224. }
  225. }
  226. function findNavTreePage(url, data)
  227. {
  228. var nodes = data;
  229. var result = null;
  230. for (var i in nodes)
  231. {
  232. var d = nodes[i];
  233. if (d[1] == url)
  234. {
  235. return new Array(i);
  236. }
  237. else if (d[2] != null) // array of children
  238. {
  239. result = findNavTreePage(url, d[2]);
  240. if (result != null)
  241. {
  242. return (new Array(i).concat(result));
  243. }
  244. }
  245. }
  246. return null;
  247. }
  248. function initNavTree(toroot,relpath)
  249. {
  250. var o = new Object();
  251. o.toroot = toroot;
  252. o.node = new Object();
  253. o.node.li = document.getElementById("nav-tree-contents");
  254. o.node.childrenData = NAVTREE;
  255. o.node.children = new Array();
  256. o.node.childrenUL = document.createElement("ul");
  257. o.node.getChildrenUL = function() { return o.node.childrenUL; };
  258. o.node.li.appendChild(o.node.childrenUL);
  259. o.node.depth = 0;
  260. o.node.relpath = relpath;
  261. getNode(o, o.node);
  262. o.breadcrumbs = findNavTreePage(toroot, NAVTREE);
  263. if (o.breadcrumbs == null)
  264. {
  265. o.breadcrumbs = findNavTreePage("index.html",NAVTREE);
  266. }
  267. if (o.breadcrumbs != null && o.breadcrumbs.length>0)
  268. {
  269. var p = o.node;
  270. for (var i in o.breadcrumbs)
  271. {
  272. var j = o.breadcrumbs[i];
  273. p = p.children[j];
  274. expandNode(o,p,true);
  275. }
  276. p.itemDiv.className = p.itemDiv.className + " selected";
  277. p.itemDiv.id = "selected";
  278. $(window).load(showRoot);
  279. }
  280. }