[Cmake-commits] [cmake-commits] hoffman committed cmDocumentation.cxx 1.68 1.69 cmDocumentationFormatter.h 1.7 1.8 cmDocumentationFormatterHTML.cxx 1.9 1.10 cmDocumentationFormatterHTML.h 1.2 1.3
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Mar 5 11:05:25 EST 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv10384
Modified Files:
cmDocumentation.cxx cmDocumentationFormatter.h
cmDocumentationFormatterHTML.cxx
cmDocumentationFormatterHTML.h
Log Message:
ENH: add master index into html full help
Index: cmDocumentationFormatter.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentationFormatter.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C 2 -d -r1.7 -r1.8
*** cmDocumentationFormatter.h 4 Mar 2008 14:16:33 -0000 1.7
--- cmDocumentationFormatter.h 5 Mar 2008 16:05:21 -0000 1.8
***************
*** 60,63 ****
--- 60,66 ----
virtual void PrintPreformatted(std::ostream& os, const char* text) = 0;
virtual void PrintParagraph(std::ostream& os, const char* text) = 0;
+ virtual void PrintIndex(std::ostream& ,
+ std::vector<const cmDocumentationSection *>&)
+ {}
};
Index: cmDocumentation.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentation.cxx,v
retrieving revision 1.68
retrieving revision 1.69
diff -C 2 -d -r1.68 -r1.69
*** cmDocumentation.cxx 4 Mar 2008 14:16:33 -0000 1.68
--- cmDocumentation.cxx 5 Mar 2008 16:05:20 -0000 1.69
***************
*** 847,850 ****
--- 847,853 ----
void cmDocumentation::Print(std::ostream& os)
{
+ // if the formatter supports it, print a master index for
+ // all sections
+ this->CurrentFormatter->PrintIndex(os, this->PrintSections);
for(unsigned int i=0; i < this->PrintSections.size(); ++i)
{
Index: cmDocumentationFormatterHTML.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentationFormatterHTML.cxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -C 2 -d -r1.9 -r1.10
*** cmDocumentationFormatterHTML.cxx 19 Feb 2008 19:33:43 -0000 1.9
--- cmDocumentationFormatterHTML.cxx 5 Mar 2008 16:05:21 -0000 1.10
***************
*** 207,208 ****
--- 207,223 ----
}
}
+
+ void cmDocumentationFormatterHTML
+ ::PrintIndex(std::ostream& os,
+ std::vector<const cmDocumentationSection *>& sections)
+ {
+ os << "<h2><a name=\"section_Index\"/>Master Index</h2>\n";
+ os << "<ul>\n";
+ for(unsigned int i=0; i < sections.size(); ++i)
+ {
+ std::string name = sections[i]->
+ GetName((this->GetForm()));
+ os << " <li><a href=\"#section_" << name << "\"<b>" << name << "</b></a></li>\n";
+ }
+ os << "</ul>\n";
+ }
Index: cmDocumentationFormatterHTML.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentationFormatterHTML.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** cmDocumentationFormatterHTML.h 22 Oct 2007 16:48:39 -0000 1.2
--- cmDocumentationFormatterHTML.h 5 Mar 2008 16:05:22 -0000 1.3
***************
*** 37,41 ****
const char* name);
virtual void PrintPreformatted(std::ostream& os, const char* text);
! virtual void PrintParagraph(std::ostream& os, const char* text);
private:
void PrintHTMLEscapes(std::ostream& os, const char* text);
--- 37,43 ----
const char* name);
virtual void PrintPreformatted(std::ostream& os, const char* text);
! virtual void PrintParagraph(std::ostream& os, const char* text);
! virtual void PrintIndex(std::ostream& ,
! std::vector<const cmDocumentationSection *>&);
private:
void PrintHTMLEscapes(std::ostream& os, const char* text);
More information about the Cmake-commits
mailing list