Re: Getting doxygen to not output a files tab

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Getting doxygen to not output a files tab

Malcolm MacLeod
Thanks for the code snippet, this causes problems however if you do
things such as generate a chm file as well(and also don't want the files
tab in the chm file).
So I decided to code a patch for t he behavior I want instead. I have
submitted it and hope it will make its way into the source tree, but in
case it does not here it is for anyone else who needs  it...


- Malcolm MacLeod

Index: doxygen/src/config.l
===================================================================
RCS file: /cvsroot/doxygen/src/config.l,v
retrieving revision 1.158
diff -u -p -r1.158 config.l
--- doxygen/src/config.l 4 Apr 2007 19:15:19 -0000 1.158
+++ doxygen/src/config.l 4 May 2007 11:39:41 -0000
@@ -1711,6 +1711,12 @@ void Config::create()
     "If set to NO (the default) only methods in the interface are included. \n",
                     FALSE
                  );
+  cb = addBool(     "HIDE_SOURCE",
+                    "If the HIDE_SOURCE tag is set to YES, Doxygen will not output a \n"
+ "files tab or any links to header files such as the definition links \n"
+ "No files will be generated for any of the header files either \n",
+ FALSE
+ );
   cb = addBool(
                     "HIDE_UNDOC_MEMBERS",
                     "If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all \n"
Index: doxygen/src/definition.cpp
===================================================================
RCS file: /cvsroot/doxygen/src/definition.cpp,v
retrieving revision 1.105
diff -u -p -r1.105 definition.cpp
--- doxygen/src/definition.cpp 19 Feb 2007 18:47:46 -0000 1.105
+++ doxygen/src/definition.cpp 4 May 2007 11:39:53 -0000
@@ -537,6 +537,10 @@ static bool readCodeFragment(const char
 /*! Write a reference to the source code defining this definition */
 void Definition::writeSourceDef(OutputList &ol,const char *)
 {
+  if(Config_getBool("HIDE_SOURCE"))
+  {
+    return;
+  }
   makeResident();
   ol.pushGeneratorState();
   //printf("Definition::writeSourceRef %d %p\n",bodyLine,bodyDef);
Index: doxygen/src/index.cpp
===================================================================
RCS file: /cvsroot/doxygen/src/index.cpp,v
retrieving revision 1.142
diff -u -p -r1.142 index.cpp
--- doxygen/src/index.cpp 19 Feb 2007 18:47:47 -0000 1.142
+++ doxygen/src/index.cpp 4 May 2007 11:41:04 -0000
@@ -775,7 +775,15 @@ void countFiles(int &htmlFiles,int &file
     for (;(fd=fni.current());++fni)
     {
       bool doc = fd->isLinkableInProject();
-      bool src = fd->generateSourceFile();
+      bool src;
+  if(Config_getBool("HIDE_SOURCE"))
+  {
+    src = false;
+  }
+  else
+  {
+    src = fd->generateSourceFile();
+  }
       bool nameOk = !fd->isDocumentationFile();
       if (nameOk)
       {

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users