+ // if the header includes other headers they must be related to it... try to
+ // automatically generate the "See also" clause
+ if ( !m_headers.IsEmpty() ) {
+ // correspondence between wxWindows headers and class names
+ static const char *headers[] = {
+ "object",
+ "defs",
+ "string",
+ "dynarray",
+ "file",
+ "time",
+ };
+
+ // NULL here means not to insert anything in "See also" for the
+ // corresponding header
+ static const char *classes[] = {
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "wxFile",
+ "wxTime",
+ };
+
+ wxASSERT_MSG( WXSIZEOF(headers) == WXSIZEOF(classes),
+ "arrays must be in sync!" );
+
+ wxArrayInt interestingClasses;
+
+ size_t count = m_headers.Count(), index;
+ for ( size_t n = 0; n < count; n++ ) {
+ wxString baseHeaderName = m_headers[n].Before('.');
+ if ( baseHeaderName(0, 3) != "wx/" )
+ continue;
+
+ baseHeaderName.erase(0, 3);
+ for ( index = 0; index < WXSIZEOF(headers); index++ ) {
+ if ( Stricmp(baseHeaderName, headers[index]) == 0 )
+ break;
+ }
+
+ if ( (index < WXSIZEOF(headers)) && classes[index] ) {
+ // interesting header
+ interestingClasses.Add(index);
+ }
+ }
+
+ if ( !interestingClasses.IsEmpty() ) {
+ // do generate "See also" clause
+ totalText << "\\wxheading{See also:}\n\n";
+
+ count = interestingClasses.Count();
+ for ( index = 0; index < count; index++ ) {
+ if ( index > 0 )
+ totalText << ", ";
+
+ totalText << MakeHelpref(classes[interestingClasses[index]]);
+ }
+
+ totalText << "\n\n";
+ }
+ }
+