]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/doxygen/wxwidgets.js
Made wxPropertyGridHitTestResult a real class (works better that way with SWIG)
[wxWidgets.git] / docs / doxygen / wxwidgets.js
... / ...
CommitLineData
1/*****************************************************************************\r
2 ** Name: wxwidgets.js\r
3 ** Purpose: The wxWidgets documentation javascript\r
4 ** Author: Doxygen team\r
5 ** RCS-ID: $Id$\r
6 ** Licence: wxWindows license\r
7 *****************************************************************************/\r
8\r
9// from w3schools\r
10function getCookie(c_name)\r
11{\r
12 if (document.cookie.length>0)\r
13 {\r
14 c_start=document.cookie.indexOf(c_name + "=");\r
15 if (c_start!=-1)\r
16 {\r
17 c_start=c_start + c_name.length+1;\r
18 c_end=document.cookie.indexOf(";",c_start);\r
19 if (c_end==-1) c_end=document.cookie.length;\r
20 return unescape(document.cookie.substring(c_start,c_end));\r
21 }\r
22 }\r
23 return "";\r
24}\r
25// from w3schools\r
26function setCookie(c_name,value,expiredays)\r
27{\r
28 var exdate=new Date();\r
29 exdate.setDate(exdate.getDate()+expiredays);\r
30 document.cookie=c_name+ '=' +escape(value)+\r
31 ((expiredays==null) ? '' : ';expires='+exdate.toGMTString());\r
32}\r
33\r
34// Reimplementation of changeDisplayState\r
35function mychangeDisplayState( e )\r
36{\r
37 var num=this.id.replace(/[^[0-9]/g,'');\r
38 var button=this.firstChild;\r
39 var sectionDiv=document.getElementById('dynsection'+num);\r
40 if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){\r
41 sectionDiv.style.display='block';\r
42 button.src='open.gif';\r
43 }else{\r
44 sectionDiv.style.display='none';\r
45 button.src='closed.gif';\r
46 }\r
47\r
48 setCookie( 'sectionDiv.style.display', sectionDiv.style.display );\r
49\r
50}\r
51\r
52window.onload = function myinitDynSections()\r
53{\r
54 var divs=document.getElementsByTagName('div');\r
55 var sectionCounter=1;\r
56 for(var i=0;i<divs.length-1;i++){\r
57 if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){\r
58 var header=divs[i];\r
59 var section=divs[i+1];\r
60 var button=header.firstChild;\r
61 if (button!='IMG'){\r
62 divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);\r
63 button=document.createElement('img');\r
64 divs[i].insertBefore(button,divs[i].firstChild);\r
65 }\r
66 header.style.cursor='pointer';\r
67 header.onclick=mychangeDisplayState;\r
68 header.id='dynheader'+sectionCounter;\r
69 section.id='dynsection'+sectionCounter;\r
70\r
71 var display = getCookie( 'sectionDiv.style.display' );\r
72 if ( display == '' || display == 'block' ){\r
73 section.style.display='block'; // default\r
74 button.src='open.gif';\r
75 }else{\r
76 section.style.display='none';\r
77 button.src='closed.gif';\r
78 }\r
79 setCookie( 'sectionDiv.style.display', section.style.display );\r
80\r
81 section.style.marginLeft='14px';\r
82 sectionCounter++;\r
83 }\r
84 }\r
85}\r