Added feature to the HTML manual to remember your preference to show or hide the inheritance diagram (shown by default now).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53235 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Bryan Petty 2008-04-16 20:11:08 +00:00
parent 1a21919b23
commit 20a886a34a
4 changed files with 84 additions and 4 deletions

View File

@ -16,6 +16,8 @@
</tr>
</table>
<script src="wxwidgets.js" type="text/javascript"></script>
</body>
</html>

View File

@ -11,13 +11,14 @@ mkdir out\html\wxgtk 2>&1 >NUL
mkdir out\html\wxmsw 2>&1 >NUL
mkdir out\html\wxmac 2>&1 >NUL
REM this image is not automatically copied by Doxygen because it's not
REM used in doxygen documentation but only in our html footer...
REM These not automatically copied by Doxygen because it's not
REM used in doxygen documentation, only in our html footer.
copy images\powered-by-wxwidgets.png out\html 2>&1 >NUL
copy images\*logo.png out\html 2>&1 >NUL
copy images\wxgtk\*png out\html\wxgtk 2>&1 >NUL
copy images\wxmsw\*png out\html\wxmsw 2>&1 >NUL
copy images\wxmac\*png out\html\wxmac 2>&1 >NUL
copy wxwidgets.js out\html 2>&1 >NUL
REM this CSS is automatically copied by Doxygen because it's
REM included by our custom html header...

View File

@ -25,14 +25,15 @@ cd $path
mkdir -p out/html # we need to copy files in this folder below
mkdir -p out/html/wxmsw out/html/wxgtk out/html/wxmac
# these images are not automatically copied by Doxygen because they're not
# used in doxygen documentation but only in our html footer and by our
# These are not automatically copied by Doxygen because they're not
# used in doxygen documentation, only in our html footer and by our
# custom aliases
cp images/powered-by-wxwidgets.png out/html
cp images/*logo.png out/html
cp images/wxmsw/*png out/html/wxmsw
cp images/wxmac/*png out/html/wxmac
cp images/wxgtk/*png out/html/wxgtk
cp wxwidgets.js out/html
# this CSS is not automatically copied by Doxygen because it's
# included by our custom html header...

76
docs/doxygen/wxwidgets.js Normal file
View File

@ -0,0 +1,76 @@
// from w3schools
function getCookie(c_name)
{
if (document.cookie.length>0)
{
c_start=document.cookie.indexOf(c_name + "=");
if (c_start!=-1)
{
c_start=c_start + c_name.length+1;
c_end=document.cookie.indexOf(";",c_start);
if (c_end==-1) c_end=document.cookie.length;
return unescape(document.cookie.substring(c_start,c_end));
}
}
return "";
}
// from w3schools
function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ '=' +escape(value)+
((expiredays==null) ? '' : ';expires='+exdate.toGMTString());
}
// Reimplementation of changeDisplayState
function mychangeDisplayState( e )
{
var num=this.id.replace(/[^[0-9]/g,'');
var button=this.firstChild;
var sectionDiv=document.getElementById('dynsection'+num);
if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
sectionDiv.style.display='block';
button.src='open.gif';
}else{
sectionDiv.style.display='none';
button.src='closed.gif';
}
setCookie( 'sectionDiv.style.display', sectionDiv.style.display );
}
window.onload = function myinitDynSections()
{
var divs=document.getElementsByTagName('div');
var sectionCounter=1;
for(var i=0;i<divs.length-1;i++){
if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
var header=divs[i];
var section=divs[i+1];
var button=header.firstChild;
if (button!='IMG'){
divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
button=document.createElement('img');
divs[i].insertBefore(button,divs[i].firstChild);
}
header.style.cursor='pointer';
header.onclick=mychangeDisplayState;
header.id='dynheader'+sectionCounter;
button.src='closed.gif';
section.id='dynsection'+sectionCounter;
var display = getCookie( 'sectionDiv.style.display' );
if ( display == '' ){
section.style.display='block'; // default
}else{
section.style.display=display;
}
setCookie( 'sectionDiv.style.display', section.style.display );
section.style.marginLeft='14px';
sectionCounter++;
}
}
}