htmlgen.cpp

Go to the documentation of this file.
00001 /******************************************************************************
00002  *
00003  * $Id: htmlgen.cpp,v 1.56 2001/03/19 19:27:40 root Exp $
00004  *
00005  * Copyright (C) 1997-2008 by Dimitri van Heesch.
00006  *
00007  * Permission to use, copy, modify, and distribute this software and its
00008  * documentation under the terms of the GNU General Public License is hereby 
00009  * granted. No representations are made about the suitability of this software 
00010  * for any purpose. It is provided "as is" without express or implied warranty.
00011  * See the GNU General Public License for more details.
00012  *
00013  * Documents produced by Doxygen are derivative works derived from the
00014  * input used in their production; they are not affected by this license.
00015  *
00016  */
00017 
00018 #include <stdlib.h>
00019 
00020 #include "qtbc.h"
00021 #include <qdir.h>
00022 #include "message.h"
00023 #include "htmlgen.h"
00024 #include "config.h"
00025 #include "util.h"
00026 #include "doxygen.h"
00027 #include "logos.h"
00028 #include "diagram.h"
00029 #include "version.h"
00030 #include "dot.h"
00031 #include "language.h"
00032 #include "htmlhelp.h"
00033 #include "docparser.h"
00034 #include "htmldocvisitor.h"
00035 #include "index.h"
00036 #include "pagedef.h"
00037 #include "debug.h"
00038 #include "dirdef.h"
00039 #include "vhdldocgen.h"
00040 
00041 // #define GROUP_COLOR "#ff8080"
00042 
00043 //#define DBG_HTML(x) x;
00044 #define DBG_HTML(x) 
00045 
00046 static const char defaultStyleSheet[] = 
00047 #include "doxygen_css.h"
00048 ;
00049 
00050 static const char search_script[]=
00051 #include "search_php.h"
00052 ;
00053 
00054 static QCString g_header;
00055 static QCString g_footer;
00056 
00057 //------------------------- Pictures for the Tabs ------------------------
00058 
00059 static unsigned char tab_b_gif[] = {
00060   0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x01, 0x00, 0x01, 0x00, 0x80, 0x00,
00061   0x00, 0x84, 0xb0, 0xc7, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00,
00062   0x01, 0x00, 0x01, 0x00, 0x00, 0x02, 0x02, 0x44, 0x01, 0x00, 0x3b
00063 };
00064 static unsigned int tab_b_gif_len = 35;
00065 
00066 static unsigned char tab_l_gif[] = {
00067   0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x09, 0x00, 0x2c, 0x01, 0xd5, 0x00,
00068   0x00, 0xf6, 0xf7, 0xf9, 0xf1, 0xf4, 0xf7, 0xf6, 0xf8, 0xfa, 0xfc, 0xfd,
00069   0xfe, 0xfa, 0xfb, 0xfc, 0xf9, 0xfa, 0xfb, 0xf8, 0xf9, 0xfa, 0xea, 0xef,
00070   0xf3, 0xef, 0xf3, 0xf6, 0xc6, 0xd5, 0xdf, 0xd2, 0xde, 0xe6, 0xd8, 0xe2,
00071   0xe9, 0xde, 0xe7, 0xed, 0xdd, 0xe6, 0xec, 0xe5, 0xec, 0xf1, 0xe8, 0xee,
00072   0xf2, 0xf4, 0xf7, 0xf9, 0xf3, 0xf6, 0xf8, 0xb3, 0xc8, 0xd5, 0xc1, 0xd2,
00073   0xdd, 0xcb, 0xd9, 0xe2, 0xcf, 0xdc, 0xe4, 0xd6, 0xe1, 0xe8, 0x96, 0xb4,
00074   0xc5, 0x9d, 0xb9, 0xc9, 0xaf, 0xc2, 0xcd, 0xbb, 0xce, 0xd9, 0xc3, 0xd4,
00075   0xde, 0xc2, 0xd3, 0xdd, 0xc8, 0xd7, 0xe0, 0xcc, 0xda, 0xe2, 0xd5, 0xe1,
00076   0xe8, 0xd9, 0xe4, 0xea, 0xd7, 0xe2, 0xe8, 0xe5, 0xec, 0xf0, 0xeb, 0xf0,
00077   0xf3, 0x84, 0xb0, 0xc7, 0xd1, 0xde, 0xe5, 0xdc, 0xe6, 0xeb, 0xe3, 0xeb,
00078   0xef, 0xeb, 0xf1, 0xf4, 0xee, 0xf3, 0xf5, 0xf7, 0xfa, 0xfb, 0xfb, 0xfc,
00079   0xfc, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
00080   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
00081   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
00082   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
00083   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
00084   0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x2c, 0x01, 0x00, 0x06,
00085   0xff, 0x40, 0x96, 0x50, 0xb1, 0xc9, 0x60, 0x48, 0x24, 0x21, 0x25, 0x43,
00086   0x71, 0x00, 0x56, 0x03, 0x16, 0x65, 0x32, 0x1a, 0x58, 0xad, 0x8a, 0xcc,
00087   0x08, 0x4a, 0x28, 0x08, 0x04, 0x93, 0xc4, 0xa0, 0x2b, 0x80, 0x98, 0x33,
00088   0x0d, 0x32, 0x24, 0xc0, 0xc6, 0x20, 0xbc, 0x6b, 0x76, 0x8a, 0xe4, 0x2d,
00089   0xcb, 0xe7, 0xf5, 0x75, 0x2a, 0x85, 0x22, 0x7d, 0xe3, 0x7c, 0x7d, 0x7f,
00090   0x01, 0x7c, 0x07, 0x07, 0x7e, 0x71, 0x28, 0x0f, 0x22, 0x0c, 0x24, 0x66,
00091   0x84, 0x07, 0x0c, 0x0c, 0x27, 0x8e, 0x6c, 0x28, 0x8c, 0x26, 0x26, 0x24,
00092   0x72, 0x91, 0x99, 0x0b, 0x9b, 0x90, 0x0c, 0x26, 0x0b, 0x21, 0xa0, 0x29,
00093   0x0f, 0xa2, 0xa4, 0x9b, 0x7b, 0xa8, 0xa3, 0xa5, 0x72, 0xad, 0xaa, 0xb0,
00094   0xa9, 0xaf, 0x84, 0xb1, 0xaf, 0xac, 0xb4, 0xa6, 0xb7, 0xbb, 0xba, 0xb3,
00095   0xae, 0xab, 0xa7, 0xbe, 0xb6, 0xc3, 0xc2, 0xc0, 0xbf, 0xb2, 0xb9, 0xc7,
00096   0xc4, 0xcb, 0xc6, 0xb2, 0xcc, 0xc9, 0xce, 0xb5, 0xd2, 0xbd, 0xcd, 0xbc,
00097   0x84, 0xd4, 0xc8, 0xd3, 0xd7, 0xd0, 0xb8, 0xd9, 0xdd, 0xd5, 0xcf, 0xd9,
00098   0xca, 0xe2, 0xdc, 0xdf, 0xe3, 0xe7, 0xe6, 0xea, 0xbe, 0xe4, 0xdb, 0xc5,
00099   0xeb, 0xc7, 0xed, 0xe1, 0xee, 0xd6, 0xec, 0xe9, 0xef, 0xf8, 0xf1, 0xf7,
00100   0xf5, 0xfc, 0xd1, 0xf0, 0xe5, 0xf9, 0xfc, 0x05, 0xa4, 0x07, 0x50, 0xdf,
00101   0x3f, 0x82, 0x08, 0x83, 0x1d, 0x9c, 0xc7, 0x10, 0xdb, 0x42, 0x6d, 0x0d,
00102   0xe5, 0x41, 0x9c, 0x08, 0xce, 0xe1, 0xc0, 0x86, 0x15, 0x25, 0x56, 0xdc,
00103   0x88, 0xee, 0x21, 0xc7, 0x6b, 0x1a, 0xf7, 0x15, 0x14, 0xd8, 0x2f, 0xe1,
00104   0xc4, 0x90, 0x1e, 0x3b, 0x5e, 0xa4, 0xa8, 0xb2, 0x24, 0xc6, 0x96, 0x23,
00105   0x4d, 0x66, 0x14, 0x29, 0x13, 0x66, 0xcd, 0x87, 0x28, 0x57, 0xce, 0x4c,
00106   0x89, 0x93, 0xe6, 0x4b, 0xe7, 0x90, 0xd2, 0x84, 0xb0, 0x20, 0x92, 0x01,
00107   0x49, 0x12, 0x29, 0x4c, 0x1c, 0x18, 0x10, 0x3a, 0x65, 0x44, 0x0b, 0xa1,
00108   0x43, 0xb5, 0xb4, 0x78, 0x2a, 0x34, 0x0c, 0x55, 0xa8, 0x68, 0xa0, 0x0a,
00109   0x25, 0x11, 0x41, 0xab, 0x90, 0xa3, 0x5e, 0xc1, 0x4e, 0x1d, 0x4b, 0x62,
00110   0xac, 0xd9, 0x16, 0x65, 0xa7, 0x0e, 0x58, 0xb1, 0x82, 0x00, 0x81, 0xb4,
00111   0x6b, 0xbb, 0x78, 0x21, 0xc1, 0xd6, 0xed, 0x97, 0x32, 0x74, 0xdd, 0xd6,
00112   0x09, 0x00, 0x21, 0xaf, 0x9a, 0x35, 0x74, 0xdb, 0xe6, 0xe9, 0x1b, 0x97,
00113   0xc0, 0x5d, 0x01, 0x24, 0xac, 0xb4, 0x25, 0x83, 0x58, 0xed, 0xe2, 0x2e,
00114   0x69, 0x5b, 0xac, 0x5d, 0x1c, 0x59, 0xad, 0x95, 0xca, 0x66, 0x8f, 0x9e,
00115   0x45, 0xeb, 0xf5, 0x6b, 0x67, 0x16, 0x60, 0xb5, 0x86, 0x86, 0x3a, 0x7a,
00116   0xeb, 0xe7, 0xd2, 0x9e, 0x3b, 0xa3, 0x06, 0x7d, 0xba, 0xb5, 0x6a, 0xd7,
00117   0x61, 0x61, 0x8b, 0x96, 0x4d, 0x9a, 0xb6, 0xe9, 0xd7, 0xb8, 0x63, 0xe7,
00118   0x9e, 0xbd, 0xbb, 0x76, 0xef, 0xdb, 0xba, 0x83, 0xf3, 0x16, 0xee, 0x9b,
00119   0x38, 0xf0, 0xe1, 0xc8, 0x8b, 0x27, 0x3f, 0xae, 0xbc, 0x39, 0xf3, 0xe7,
00120   0xa9, 0x8d, 0x47, 0x5f, 0x3e, 0xdd, 0x79, 0x75, 0xe8, 0xac, 0x7f, 0x5f,
00121   0xdf, 0x9e, 0x5d, 0x7a, 0x77, 0xea, 0xdf, 0xad, 0x87, 0xc7, 0xbe, 0xba,
00122   0xbc, 0x6d, 0xee, 0xe6, 0xb5, 0x8f, 0x47, 0x7f, 0x7e, 0xbd, 0xfb, 0xf4,
00123   0xde, 0xe1, 0x83, 0x97, 0x2f, 0x9e, 0x3e, 0xf9, 0xf6, 0xf6, 0xd9, 0xab,
00124   0xcf, 0xff, 0x1e, 0xbf, 0xff, 0xfd, 0xff, 0xc5, 0x17, 0xe0, 0x7c, 0x03,
00125   0xd6, 0x57, 0xe0, 0x7d, 0x00, 0x76, 0x16, 0x04, 0x00, 0x3b
00126 };
00127 static unsigned int tab_l_gif_len = 706;
00128 
00129 static unsigned char tab_r_gif[] = {
00130   0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x90, 0x01, 0x2c, 0x01, 0xd5, 0x00,
00131   0x00, 0xf6, 0xf7, 0xf9, 0xf1, 0xf4, 0xf7, 0xf6, 0xf8, 0xfa, 0xfc, 0xfd,
00132   0xfe, 0xfa, 0xfb, 0xfc, 0xf9, 0xfa, 0xfb, 0xf8, 0xf9, 0xfa, 0xea, 0xef,
00133   0xf3, 0xef, 0xf3, 0xf6, 0xc6, 0xd5, 0xdf, 0xd2, 0xde, 0xe6, 0xd8, 0xe2,
00134   0xe9, 0xde, 0xe7, 0xed, 0xdd, 0xe6, 0xec, 0xe5, 0xec, 0xf1, 0xe8, 0xee,
00135   0xf2, 0xf4, 0xf7, 0xf9, 0xf3, 0xf6, 0xf8, 0xb3, 0xc8, 0xd5, 0xc1, 0xd2,
00136   0xdd, 0xcb, 0xd9, 0xe2, 0xcf, 0xdc, 0xe4, 0xd6, 0xe1, 0xe8, 0x96, 0xb4,
00137   0xc5, 0x9d, 0xb9, 0xc9, 0xaf, 0xc2, 0xcd, 0xbb, 0xce, 0xd9, 0xc3, 0xd4,
00138   0xde, 0xc2, 0xd3, 0xdd, 0xc8, 0xd7, 0xe0, 0xcc, 0xda, 0xe2, 0xd5, 0xe1,
00139   0xe8, 0xd9, 0xe4, 0xea, 0xd7, 0xe2, 0xe8, 0xe5, 0xec, 0xf0, 0xeb, 0xf0,
00140   0xf3, 0x84, 0xb0, 0xc7, 0xd1, 0xde, 0xe5, 0xdc, 0xe6, 0xeb, 0xe3, 0xeb,
00141   0xef, 0xeb, 0xf1, 0xf4, 0xee, 0xf3, 0xf5, 0xf7, 0xfa, 0xfb, 0xfb, 0xfc,
00142   0xfc, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
00143   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
00144   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
00145   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
00146   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
00147   0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x90, 0x01, 0x2c, 0x01, 0x00, 0x06,
00148   0xff, 0x40, 0x92, 0x70, 0x48, 0x2c, 0x1a, 0x8f, 0xc8, 0xa4, 0x72, 0xc9,
00149   0x6c, 0x3a, 0x9f, 0xd0, 0xa8, 0x74, 0x4a, 0xad, 0x5a, 0xaf, 0xd8, 0xac,
00150   0x76, 0x0b, 0x95, 0x68, 0x3c, 0xac, 0x70, 0x6b, 0x4c, 0x2e, 0x9b, 0xcf,
00151   0xe8, 0xb4, 0x7a, 0xcd, 0x6e, 0xbb, 0xdf, 0xf0, 0xb8, 0x7c, 0x4e, 0xaf,
00152   0xdb, 0xef, 0xf8, 0xbc, 0x7e, 0xcf, 0x77, 0x0f, 0x56, 0x10, 0x16, 0x1a,
00153   0x17, 0x1c, 0x61, 0x2b, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e,
00154   0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a,
00155   0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0x93, 0x2a, 0x10, 0x01, 0x29, 0x15,
00156   0x5e, 0x2c, 0x2a, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2,
00157   0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe,
00158   0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xb6, 0x10, 0x10, 0x29, 0x0f, 0x27, 0x1d,
00159   0x17, 0x15, 0xc6, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6,
00160   0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2,
00161   0xe3, 0xe4, 0xe5, 0xe6, 0xda, 0xa5, 0x28, 0x22, 0x0c, 0x0c, 0x12, 0x12,
00162   0x01, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa,
00163   0xfb, 0xfc, 0xfd, 0xfe, 0xff, 0x00, 0x03, 0x0a, 0x1c, 0x48, 0xb0, 0xa0,
00164   0xc1, 0x83, 0x08, 0x13, 0xf2, 0x4b, 0x81, 0x22, 0x19, 0x03, 0x13, 0x83,
00165   0x52, 0x48, 0x9c, 0x48, 0xb1, 0xa2, 0xc5, 0x8b, 0x18, 0x33, 0x6a, 0xdc,
00166   0xc8, 0xb1, 0xa3, 0xc7, 0x8f, 0x20, 0x43, 0x8a, 0x1c, 0x49, 0xb2, 0xa4,
00167   0xc9, 0x93, 0x28, 0x53, 0xaa, 0x5c, 0xe9, 0x11, 0xc5, 0x81, 0x75, 0x26,
00168   0x40, 0x80, 0x20, 0xc1, 0xb2, 0xa6, 0xcd, 0x9b, 0x38, 0x73, 0xea, 0xdc,
00169   0xc9, 0xb3, 0xa7, 0x4f, 0xff, 0x96, 0x28, 0x1a, 0xc2, 0x04, 0xb1, 0x80,
00170   0x44, 0xd0, 0xa3, 0x48, 0x93, 0x2a, 0x5d, 0xca, 0xb4, 0xa9, 0xd3, 0xa7,
00171   0x50, 0xa3, 0x4a, 0x9d, 0x4a, 0xb5, 0xaa, 0xd5, 0xab, 0x58, 0xb3, 0x6a,
00172   0xdd, 0xca, 0xb5, 0xab, 0xd7, 0xaf, 0x53, 0x0f, 0x38, 0x34, 0xb1, 0x20,
00173   0x04, 0x89, 0x03, 0x68, 0xd3, 0xaa, 0x5d, 0xcb, 0xb6, 0xad, 0xdb, 0xb7,
00174   0x70, 0xe3, 0xca, 0x9d, 0x4b, 0xb7, 0xae, 0xdd, 0xbb, 0x78, 0xf3, 0xea,
00175   0xdd, 0xcb, 0xb7, 0xaf, 0xdf, 0xbf, 0x80, 0x03, 0xd3, 0x7d, 0x20, 0xe2,
00176   0x44, 0xcc, 0x10, 0x66, 0x1f, 0x28, 0x5e, 0xcc, 0xb8, 0xb1, 0xe3, 0xc7,
00177   0x90, 0x23, 0x4b, 0x9e, 0x4c, 0xb9, 0xb2, 0xe5, 0xcb, 0x98, 0x33, 0x6b,
00178   0xde, 0xcc, 0xb9, 0xb3, 0xe7, 0xcf, 0xa0, 0x43, 0x8b, 0x1e, 0x6d, 0xb9,
00179   0xf0, 0x43, 0xc4, 0x1f, 0x48, 0x9c, 0x58, 0xcd, 0xba, 0xb5, 0xeb, 0xd7,
00180   0xb0, 0x63, 0xcb, 0x9e, 0x4d, 0xbb, 0xb6, 0xed, 0xdb, 0xb8, 0x73, 0xeb,
00181   0xde, 0xcd, 0xbb, 0xb7, 0xef, 0xdf, 0xc0, 0x83, 0x0b, 0x1f, 0x4e, 0x1c,
00182   0xf7, 0xc3, 0x05, 0x1f, 0x4a, 0x94, 0x20, 0xc1, 0xae, 0xb9, 0xf3, 0xe7,
00183   0xd0, 0xa3, 0x4b, 0x9f, 0x4e, 0xbd, 0xba, 0xf5, 0xeb, 0xd8, 0xb3, 0x6b,
00184   0xdf, 0xce, 0xbd, 0xbb, 0xf7, 0xef, 0xe0, 0xc3, 0x8b, 0x1f, 0x4f, 0xbe,
00185   0x3c, 0x76, 0x13, 0x31, 0x91, 0x2b, 0x5f, 0x2e, 0xb3, 0xbd, 0xfb, 0xf7,
00186   0xf0, 0xe3, 0xcb, 0x9f, 0x4f, 0xbf, 0xbe, 0xfd, 0xfb, 0xf8, 0xf3, 0xeb,
00187   0xdf, 0xcf, 0xbf, 0xbf, 0xff, 0xff, 0x00, 0x06, 0x28, 0xe0, 0x80, 0x04,
00188   0x16, 0x98, 0x5f, 0x59, 0xc9, 0x95, 0x40, 0xc1, 0x72, 0x88, 0x35, 0xe8,
00189   0xe0, 0x83, 0x10, 0x46, 0x28, 0xe1, 0x84, 0x14, 0x56, 0x68, 0xe1, 0x85,
00190   0x18, 0x66, 0xa8, 0xe1, 0x86, 0x1c, 0x76, 0xe8, 0xff, 0xe1, 0x87, 0x20,
00191   0x86, 0x28, 0xe2, 0x88, 0x24, 0x96, 0xa8, 0x61, 0x82, 0x14, 0xa4, 0x48,
00192   0x82, 0x89, 0x2c, 0xb6, 0xe8, 0xe2, 0x8b, 0x30, 0xc6, 0x28, 0xe3, 0x8c,
00193   0x34, 0xd6, 0x68, 0xe2, 0x07, 0x09, 0x2a, 0xa8, 0x22, 0x8e, 0x3c, 0xf6,
00194   0xe8, 0xe3, 0x8f, 0x40, 0x06, 0x29, 0xe4, 0x90, 0x44, 0x16, 0x69, 0xe4,
00195   0x91, 0x48, 0x26, 0xa9, 0xe4, 0x92, 0x4c, 0x36, 0xe9, 0xe4, 0x93, 0x50,
00196   0x46, 0x29, 0xe5, 0x94, 0x54, 0x26, 0xa9, 0x5c, 0x8a, 0x3b, 0x56, 0xa9,
00197   0xe5, 0x96, 0x5c, 0x76, 0xe9, 0xe5, 0x97, 0x60, 0x86, 0x29, 0xe6, 0x98,
00198   0x5a, 0x5e, 0x89, 0x25, 0x09, 0x64, 0xa6, 0xa9, 0xe6, 0x9a, 0x6c, 0xb6,
00199   0xe9, 0xe6, 0x9b, 0x70, 0xfe, 0x68, 0x66, 0x96, 0x71, 0xd6, 0x69, 0xe7,
00200   0x9d, 0x78, 0xe6, 0xa9, 0xe7, 0x97, 0x73, 0x52, 0x80, 0xe6, 0x9e, 0x80,
00201   0x06, 0x2a, 0xe8, 0xa0, 0x84, 0xc2, 0xd9, 0xe7, 0x9f, 0x85, 0x26, 0xaa,
00202   0xe8, 0xa2, 0x8c, 0x36, 0x3a, 0xe4, 0xa1, 0x8e, 0x46, 0x2a, 0xe9, 0xa4,
00203   0x94, 0xc6, 0x09, 0x69, 0xa5, 0x98, 0x66, 0xaa, 0xe9, 0xa6, 0x4f, 0x5e,
00204   0xca, 0xe9, 0xa7, 0xa0, 0x86, 0xca, 0xa9, 0xa7, 0xa2, 0x96, 0x6a, 0xea,
00205   0xa9, 0x84, 0x92, 0x8a, 0xea, 0xaa, 0xac, 0xb6, 0xca, 0xa6, 0xaa, 0xae,
00206   0xc6, 0x2a, 0xeb, 0xac, 0x53, 0xc2, 0x4a, 0xeb, 0xad, 0xb8, 0xe6, 0x2a,
00207   0xa4, 0xad, 0xba, 0xf6, 0xea, 0xeb, 0xac, 0xbc, 0xfe, 0x2a, 0xec, 0xb0,
00208   0xa5, 0x06, 0x4b, 0xec, 0xb1, 0xc8, 0x56, 0x6a, 0x6c, 0xb2, 0xcc, 0x36,
00209   0x9b, 0xe8, 0xb2, 0xce, 0x46, 0x2b, 0x2d, 0x9e, 0xd0, 0x4e, 0x6b, 0xed,
00210   0xb5, 0x6b, 0x56, 0x8b, 0xed, 0xb6, 0xdc, 0x76, 0xa9, 0x6d, 0xb7, 0xe0,
00211   0x86, 0xdb, 0xa9, 0x8e, 0x74, 0x8a, 0x6b, 0xee, 0xb9, 0x51, 0x7e, 0x8b,
00212   0xff, 0xee, 0xba, 0xec, 0xf2, 0xa8, 0x6e, 0xbb, 0xf0, 0x9a, 0xfb, 0x6e,
00213   0xbc, 0xf4, 0x72, 0x3b, 0x6f, 0xbd, 0xf8, 0x4e, 0x7b, 0x6f, 0xbe, 0xfc,
00214   0x32, 0xbb, 0x6f, 0xbf, 0x00, 0x0f, 0xfb, 0x6f, 0xc0, 0x04, 0xeb, 0x3a,
00215   0x70, 0xc1, 0x08, 0x03, 0x4b, 0xae, 0x9f, 0x09, 0x37, 0x1c, 0xed, 0xc1,
00216   0x0e, 0x47, 0x6c, 0x2a, 0xc4, 0x12, 0x57, 0xfc, 0x29, 0xc5, 0x16, 0x67,
00217   0x8c, 0x29, 0xc6, 0x1a, 0x77, 0x1c, 0x29, 0xc7, 0x1e, 0x87, 0xac, 0x28,
00218   0xc8, 0x22, 0x97, 0x2c, 0x28, 0xc9, 0x26, 0xa7, 0x9c, 0x27, 0xca, 0x2a,
00219   0xb7, 0x6c, 0xe9, 0xc2, 0x88, 0xba, 0x2c, 0x33, 0xa5, 0x2c, 0xcf, 0x6c,
00220   0x33, 0x99, 0x35, 0xdf, 0xac, 0x33, 0x9f, 0x30, 0xef, 0xec, 0xf3, 0xb3,
00221   0x3d, 0xff, 0x2c, 0x74, 0xa0, 0x39, 0x0f, 0x6d, 0xb4, 0x93, 0x45, 0x1f,
00222   0xad, 0xb4, 0x95, 0x41, 0x2f, 0xed, 0x74, 0x9b, 0x49, 0x3f, 0x2d, 0x35,
00223   0x90, 0x51, 0x4f, 0x6d, 0x35, 0x8e, 0x55, 0x5f, 0x3d, 0x75, 0xd6, 0x5a,
00224   0x3f, 0xcd, 0x75, 0xd7, 0x4b, 0x7f, 0x0d, 0xf6, 0xd1, 0x62, 0x8f, 0x3d,
00225   0x74, 0xd9, 0x66, 0xff, 0x8c, 0x76, 0xda, 0x3b, 0xaf, 0xcd, 0xf6, 0xcd,
00226   0x6e, 0xbf, 0x3d, 0x73, 0xdc, 0x72, 0xbb, 0x4c, 0x77, 0xdd, 0x2a, 0xdf,
00227   0x8d, 0xb7, 0xc9, 0x7a, 0xef, 0x2d, 0x72, 0xdf, 0x7e, 0x7b, 0x0c, 0x78,
00228   0xe0, 0x1a, 0x0f, 0x4e, 0xb8, 0xc5, 0x86, 0x1f, 0x2e, 0x71, 0xe2, 0x8a,
00229   0x3b, 0xcc, 0x78, 0xe3, 0x09, 0x3f, 0x0e, 0x79, 0xc1, 0x92, 0x4f, 0x1e,
00230   0x70, 0xe5, 0x96, 0xf7, 0x8b, 0x79, 0xe6, 0xf9, 0x6e, 0xce, 0x79, 0xbd,
00231   0x9e, 0x7f, 0x1e, 0x6f, 0xe8, 0xa2, 0xb7, 0x4b, 0x7a, 0xe9, 0xeb, 0x9e,
00232   0x8e, 0xfa, 0xb9, 0xaa, 0xaf, 0x2e, 0x6e, 0xeb, 0xae, 0x83, 0x0b, 0x7b,
00233   0xec, 0xf6, 0x36, 0x4d, 0xff, 0xbb, 0xd6, 0xb3, 0xdf, 0x7e, 0x6d, 0xee,
00234   0xba, 0xeb, 0x6b, 0x7b, 0xef, 0x52, 0xf3, 0x0e, 0xbc, 0xb3, 0xc2, 0x0f,
00235   0xef, 0xef, 0xef, 0xc6, 0x2b, 0x5d, 0x7c, 0xf2, 0xc7, 0x2e, 0xcf, 0xbc,
00236   0xc0, 0xc8, 0x3f, 0x2f, 0xb4, 0xf3, 0xd2, 0xfb, 0x4a, 0x7d, 0xf5, 0x06,
00237   0x47, 0x8f, 0xbd, 0xce, 0xd7, 0x6f, 0x7f, 0x6b, 0xf7, 0xde, 0x2b, 0x8c,
00238   0x25, 0xc3, 0xe1, 0xab, 0xad, 0x7d, 0xf9, 0x76, 0x9f, 0x8f, 0x7e, 0xde,
00239   0xea, 0xaf, 0xcf, 0x77, 0xfb, 0xee, 0xff, 0x0d, 0x7f, 0xfc, 0x82, 0xcf,
00240   0x4f, 0x7f, 0xe1, 0xf6, 0xdf, 0x8f, 0x78, 0xfe, 0xfa, 0x2f, 0xce, 0x7f,
00241   0xff, 0x8e, 0xfb, 0x1f, 0x00, 0x23, 0x27, 0xc0, 0x01, 0x52, 0xae, 0x80,
00242   0x06, 0xbc, 0x1c, 0x02, 0x13, 0xa8, 0xb9, 0x05, 0x32, 0xb0, 0x73, 0x0e,
00243   0x7c, 0x20, 0xe8, 0x22, 0x28, 0xc1, 0xd1, 0x51, 0xb0, 0x82, 0xa6, 0xbb,
00244   0x20, 0x06, 0x53, 0xa7, 0xc1, 0x0d, 0xb2, 0xae, 0x83, 0x1e, 0x7c, 0x1d,
00245   0x08, 0x43, 0x28, 0xbb, 0x11, 0x92, 0xb0, 0x76, 0xe3, 0x8b, 0xd9, 0x09,
00246   0x09, 0x98, 0xc2, 0x15, 0x46, 0x0c, 0x7c, 0x2e, 0x64, 0x14, 0x0c, 0x63,
00247   0x38, 0x32, 0x13, 0xd2, 0x50, 0x5a, 0x33, 0xbc, 0x61, 0xaa, 0x6c, 0xa8,
00248   0xc3, 0x66, 0xe5, 0xb0, 0x87, 0x44, 0xe3, 0x21, 0x10, 0x91, 0xf5, 0xc3,
00249   0x21, 0xea, 0xa9, 0x88, 0x46, 0xa4, 0x96, 0x10, 0x93, 0x28, 0x2c, 0x24,
00250   0x32, 0xb1, 0x4e, 0x4e, 0x7c, 0xa2, 0xa1, 0x96, 0x28, 0xc5, 0xec, 0xb5,
00251   0xb0, 0x8a, 0x16, 0x4c, 0x21, 0x17, 0xb6, 0xc8, 0xc5, 0x2e, 0x7a, 0xf1,
00252   0x8b, 0x60, 0x0c, 0xa3, 0x18, 0xc7, 0x48, 0xc6, 0x2e, 0x7a, 0x01, 0x0c,
00253   0x61, 0x48, 0xa3, 0x1a, 0xd7, 0xc8, 0xc6, 0x36, 0xba, 0xf1, 0x8d, 0x70,
00254   0x8c, 0xa3, 0x1c, 0xe7, 0x48, 0xc7, 0x3a, 0xda, 0xff, 0xf1, 0x8e, 0x78,
00255   0xcc, 0xa3, 0x1e, 0xf7, 0xc8, 0xc7, 0x3e, 0xfa, 0xf1, 0x8f, 0x80, 0x0c,
00256   0x64, 0x1d, 0xc7, 0x40, 0x80, 0x00, 0x08, 0x82, 0x10, 0x82, 0x4c, 0xa4,
00257   0x22, 0x17, 0xc9, 0xc8, 0x46, 0x3a, 0xf2, 0x91, 0x90, 0x8c, 0xa4, 0x24,
00258   0x13, 0x39, 0x86, 0x02, 0x08, 0x20, 0x00, 0x28, 0x38, 0x85, 0x06, 0x26,
00259   0xc9, 0xc9, 0x4e, 0x7a, 0xf2, 0x93, 0xa0, 0x0c, 0xa5, 0x28, 0x47, 0xa9,
00260   0x46, 0x42, 0x5e, 0xb2, 0x21, 0xcb, 0xa8, 0x00, 0x29, 0x57, 0xc9, 0xca,
00261   0x56, 0xba, 0xf2, 0x95, 0xb0, 0x6c, 0xa4, 0x29, 0x31, 0x99, 0x0c, 0x77,
00262   0xc4, 0xf2, 0x96, 0xb8, 0xcc, 0xa5, 0x2e, 0x77, 0x19, 0xca, 0x59, 0xba,
00263   0xe4, 0x01, 0x83, 0xe0, 0xa5, 0x30, 0x87, 0x49, 0xcc, 0x62, 0x1a, 0xf3,
00264   0x8d, 0xbe, 0x7c, 0xc9, 0x03, 0x48, 0x70, 0xcc, 0x66, 0x3a, 0xf3, 0x99,
00265   0xd0, 0xec, 0x65, 0x0b, 0x08, 0x70, 0x4a, 0xb1, 0x88, 0x80, 0x04, 0x7d,
00266   0xc8, 0xa6, 0x36, 0xb7, 0xc9, 0xcd, 0x6e, 0x7a, 0xf3, 0x9b, 0xe0, 0x0c,
00267   0xa7, 0x38, 0xfb, 0x30, 0x00, 0x02, 0x90, 0xc2, 0x25, 0x22, 0xb8, 0xe6,
00268   0x38, 0xd7, 0xc9, 0xce, 0x76, 0xba, 0xf3, 0x9d, 0xf0, 0x8c, 0xa7, 0x3c,
00269   0xc9, 0x50, 0xce, 0x51, 0x60, 0xf2, 0x25, 0xd7, 0x24, 0x80, 0x3e, 0xf7,
00270   0xc9, 0xcf, 0x7e, 0xfa, 0xf3, 0x9f, 0x00, 0x0d, 0xa8, 0x40, 0x07, 0x4a,
00271   0xd0, 0x82, 0x1a, 0xf4, 0xa0, 0x08, 0x4d, 0xa8, 0x42, 0x17, 0xca, 0xd0,
00272   0x86, 0x3a, 0xf4, 0xa1, 0x10, 0x8d, 0xa8, 0x44, 0x27, 0x5a, 0x50, 0x4b,
00273   0x46, 0x20, 0x05, 0xd6, 0xbc, 0x26, 0x31, 0x36, 0xca, 0xd1, 0x8e, 0x7a,
00274   0xf4, 0xa3, 0x20, 0x0d, 0xa9, 0x48, 0x47, 0x4a, 0x52, 0x62, 0x08, 0x20,
00275   0x02, 0xf7, 0x4c, 0xe7, 0x35, 0xcf, 0xc1, 0xd2, 0x96, 0xba, 0xf4, 0xa5,
00276   0xff, 0x30, 0x8d, 0xa9, 0x4c, 0x67, 0x4a, 0xd3, 0x9a, 0x9a, 0x23, 0x02,
00277   0x28, 0x65, 0x08, 0x3e, 0xaf, 0x89, 0xd3, 0x9e, 0xfa, 0xf4, 0xa7, 0x40,
00278   0x0d, 0xaa, 0x50, 0x87, 0x4a, 0xd4, 0xa2, 0x1a, 0xf5, 0xa8, 0x48, 0x4d,
00279   0xaa, 0x52, 0x97, 0xca, 0xd4, 0xa6, 0x3a, 0xf5, 0xa9, 0x50, 0x8d, 0xaa,
00280   0x54, 0xa7, 0x4a, 0xd5, 0xaa, 0x26, 0x35, 0x1d, 0x3b, 0x25, 0x81, 0x55,
00281   0xb7, 0xca, 0xd5, 0xae, 0x7a, 0xf5, 0xab, 0x60, 0x0d, 0xab, 0x58, 0xc7,
00282   0x4a, 0x56, 0xab, 0xc2, 0x43, 0xa7, 0x8b, 0xd1, 0x6a, 0x59, 0xd7, 0xca,
00283   0xd6, 0xb6, 0xba, 0xf5, 0xad, 0x70, 0x8d, 0xab, 0x5c, 0x7f, 0x8a, 0x55,
00284   0xb4, 0x90, 0xc0, 0xa6, 0x78, 0xcd, 0xab, 0x5e, 0xf7, 0xca, 0xd7, 0xbe,
00285   0xfa, 0xf5, 0xaf, 0xd0, 0xc0, 0x69, 0x29, 0x24, 0x82, 0x02, 0x12, 0x94,
00286   0xf4, 0xb0, 0x88, 0x4d, 0xac, 0x62, 0x17, 0xcb, 0xd8, 0xc6, 0x3a, 0x76,
00287   0x15, 0x02, 0x88, 0x2c, 0x04, 0x04, 0x0b, 0x0f, 0x12, 0x14, 0xe0, 0xb2,
00288   0x98, 0xcd, 0xac, 0x66, 0x37, 0xcb, 0xd9, 0xce, 0x7a, 0xf6, 0xb3, 0xa0,
00289   0x0d, 0xad, 0x68, 0x47, 0x4b, 0xda, 0xd2, 0x9a, 0xf6, 0xb4, 0xa8, 0x4d,
00290   0xad, 0x6a, 0x57, 0xcb, 0xda, 0xd6, 0xba, 0xf6, 0xb5, 0xb0, 0x15, 0xad,
00291   0x2a, 0x24, 0xdb, 0x53, 0x12, 0x50, 0xf4, 0xb6, 0xb8, 0xcd, 0xad, 0x6e,
00292   0x77, 0xcb, 0xdb, 0xde, 0xfa, 0xf6, 0xb7, 0xc0, 0xc5, 0x6d, 0x01, 0x20,
00293   0x2b, 0x00, 0x12, 0x84, 0xe2, 0xb8, 0xc8, 0x4d, 0xae, 0x72, 0x97, 0xcb,
00294   0xdc, 0xe6, 0x3a, 0xf7, 0xb9, 0xd0, 0x45, 0xae, 0x3f, 0xb1, 0x39, 0xcf,
00295   0xea, 0x5a, 0xf7, 0xba, 0xd8, 0xcd, 0xae, 0x76, 0xbf, 0x39, 0x80, 0xee,
00296   0x22, 0x82, 0xba, 0xdb, 0x0d, 0xaf, 0x78, 0xc7, 0x4b, 0xde, 0xf2, 0x62,
00297   0x97, 0x99, 0xd1, 0x4c, 0xff, 0xaf, 0x7a, 0xd7, 0xcb, 0x5e, 0x41, 0xa2,
00298   0xb7, 0xbd, 0xf0, 0x8d, 0xaf, 0x7c, 0xe7, 0x1b, 0x86, 0xf7, 0xd2, 0xf7,
00299   0xbe, 0xf8, 0xcd, 0xaf, 0x30, 0xed, 0xab, 0xdf, 0xfe, 0xfa, 0xf7, 0xbf,
00300   0xa1, 0xe4, 0x2f, 0x80, 0x07, 0x4c, 0xe0, 0x02, 0xbb, 0xd7, 0xc0, 0x08,
00301   0x4e, 0xb0, 0x82, 0xef, 0x28, 0xe0, 0x05, 0x3b, 0xf8, 0xc1, 0x09, 0x6e,
00302   0x30, 0x84, 0x27, 0x4c, 0x61, 0xfd, 0x4a, 0xb8, 0xc2, 0x18, 0xce, 0x30,
00303   0x7b, 0x2f, 0xac, 0xe1, 0x0e, 0x7b, 0xd8, 0x98, 0x1c, 0xfe, 0xb0, 0x88,
00304   0x47, 0x7c, 0xcb, 0x10, 0x93, 0xf8, 0xc4, 0x28, 0x16, 0xa5, 0x89, 0x53,
00305   0xcc, 0xe2, 0x16, 0x43, 0x72, 0xc5, 0x2e, 0x8e, 0xb1, 0x8c, 0x01, 0x09,
00306   0xe3, 0x19, 0xdb, 0xf8, 0xc6, 0x76, 0xac, 0x31, 0x8e, 0x77, 0xcc, 0x63,
00307   0x36, 0xea, 0xb8, 0xc7, 0x40, 0xde, 0xf1, 0x8f, 0x83, 0x4c, 0x64, 0x19,
00308   0x0f, 0xb9, 0xc8, 0x48, 0x4e, 0xf1, 0x91, 0x93, 0xcc, 0x64, 0x11, 0x2f,
00309   0xb9, 0xc9, 0x50, 0xce, 0xf0, 0x93, 0xa3, 0x4c, 0x65, 0x08, 0x4f, 0xb9,
00310   0xca, 0x58, 0x8e, 0x70, 0x96, 0xb7, 0x7c, 0xe2, 0x2b, 0x73, 0xf9, 0xcb,
00311   0xfd, 0xf5, 0x32, 0x98, 0xc7, 0x4c, 0x5f, 0x31, 0x93, 0xf9, 0xcc, 0xed,
00312   0x35, 0x33, 0x9a, 0xd7, 0x1c, 0x4d, 0x35, 0xb3, 0xf9, 0xcd, 0xc7, 0x74,
00313   0x33, 0x9c, 0xe7, 0xbc, 0x5f, 0x3a, 0xdb, 0xd9, 0xc2, 0x77, 0xce, 0x73,
00314   0x99, 0xf5, 0xcc, 0x67, 0xf8, 0xca, 0xb9, 0xcf, 0x80, 0x0e, 0x70, 0xa0,
00315   0x07, 0xfd, 0xcc, 0x3f, 0x13, 0xfa, 0xd0, 0x2f, 0x46, 0xb4, 0xa2, 0xeb,
00316   0xbc, 0xe8, 0x46, 0xe3, 0xd2, 0xd0, 0x8e, 0x8e, 0x74, 0x1f, 0x21, 0x2d,
00317   0xe9, 0x4a, 0xe3, 0x91, 0xd2, 0x96, 0xce, 0xf4, 0x1c, 0x31, 0xad, 0xe9,
00318   0x4e, 0xbb, 0x91, 0xd3, 0x9e, 0x0e, 0x75, 0x1a, 0xff, 0x41, 0x2d, 0xea,
00319   0x50, 0x93, 0xba, 0xd4, 0x9d, 0x3e, 0x35, 0xaa, 0x33, 0xad, 0xea, 0x55,
00320   0x57, 0xba, 0xd5, 0xae, 0x8e, 0x34, 0xac, 0x63, 0xdd, 0xe8, 0x59, 0xd3,
00321   0x5a, 0xd1, 0xb6, 0xbe, 0xf5, 0xa1, 0x73, 0xad, 0xeb, 0x41, 0xf3, 0xba,
00322   0xd7, 0x80, 0xfe, 0x35, 0xb0, 0xf9, 0x2c, 0xec, 0x61, 0xe7, 0xb9, 0xd8,
00323   0xc6, 0xb6, 0x33, 0xb2, 0x93, 0x3d, 0xe7, 0x65, 0x33, 0xfb, 0xcd, 0xce,
00324   0x7e, 0xf6, 0x9a, 0xa3, 0x2d, 0xed, 0x33, 0x53, 0xbb, 0xda, 0x63, 0xbe,
00325   0x36, 0xb6, 0xbf, 0xac, 0xed, 0x6d, 0x6f, 0xb9, 0xdb, 0xde, 0xc6, 0x32,
00326   0xb8, 0xc3, 0x4d, 0xe5, 0x71, 0x93, 0x1b, 0xca, 0xe6, 0x3e, 0x37, 0x93,
00327   0xd3, 0xad, 0x6e, 0x24, 0xb3, 0xbb, 0xdd, 0x44, 0x7e, 0x37, 0xbc, 0x81,
00328   0x2c, 0xef, 0x79, 0xf3, 0xb8, 0xde, 0xf6, 0xc6, 0x31, 0xbe, 0xf3, 0x6d,
00329   0xe3, 0x7d, 0xf3, 0xdb, 0xc8, 0xff, 0x76, 0xb5, 0xbf, 0x03, 0xde, 0xe2,
00330   0x81, 0x13, 0x5c, 0xc9, 0x07, 0x2f, 0xb5, 0xc1, 0x13, 0x4e, 0xe2, 0x85,
00331   0x33, 0xdc, 0xc9, 0x0f, 0xf7, 0xb4, 0xc3, 0x23, 0xde, 0xe1, 0x89, 0x53,
00332   0x5c, 0xca, 0x17, 0x67, 0x75, 0xc6, 0x2d, 0x6d, 0xf1, 0x8d, 0x4f, 0xb8,
00333   0xe3, 0x1e, 0x7f, 0x30, 0xc8, 0x43, 0xbe, 0xe0, 0x91, 0x93, 0x5c, 0xcb,
00334   0x27, 0x5f, 0xb4, 0xc9, 0x53, 0x5e, 0xe0, 0x95, 0xb3, 0x7c, 0xc0, 0x2e,
00335   0x7f, 0xf9, 0x7f, 0x63, 0x2e, 0xf3, 0x30, 0xd7, 0x9c, 0xd0, 0x34, 0xbf,
00336   0x39, 0x7e, 0x73, 0xae, 0xf3, 0x3d, 0xf7, 0xbc, 0xcf, 0x3c, 0xff, 0x79,
00337   0x7c, 0x83, 0x2e, 0xf4, 0x34, 0x17, 0x5d, 0xcf, 0x44, 0x3f, 0xba, 0x7a,
00338   0x93, 0xae, 0xf4, 0x36, 0x37, 0x5d, 0xd9, 0x4f, 0xa7, 0x33, 0xd3, 0xa3,
00339   0xde, 0xcc, 0xa9, 0x53, 0x1d, 0xc4, 0x57, 0x87, 0x76, 0xd6, 0xd9, 0x6c,
00340   0x3e, 0xf5, 0xad, 0x33, 0xda, 0xeb, 0x64, 0xee, 0x3a, 0xd8, 0x75, 0x29,
00341   0xf6, 0xb1, 0x3f, 0xda, 0xec, 0xd9, 0x46, 0x3b, 0x98, 0xcb, 0xae, 0xf6,
00342   0x57, 0xb2, 0xbd, 0xed, 0xad, 0x7c, 0x3b, 0xdc, 0x57, 0x29, 0xf7, 0xb9,
00343   0x8f, 0xb2, 0xee, 0x76, 0x17, 0x74, 0xde, 0xcb, 0xbd, 0x77, 0xbe, 0xf7,
00344   0x1d, 0xdd, 0x7f, 0x07, 0x7c, 0xe0, 0xd7, 0x3d, 0x78, 0xc2, 0x17, 0xde,
00345   0xdd, 0x41, 0x00, 0x00, 0x3b
00346 };
00347 static unsigned int tab_r_gif_len = 2585;
00348 
00349 
00350 static const char tabs_css[] = 
00351 "/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */\n"
00352 "\n"
00353 "DIV.tabs\n"
00354 "{\n"
00355 "   float            : left;\n"
00356 "   width            : 100%;\n"
00357 "   background       : url(\"tab_b.gif\") repeat-x bottom;\n"
00358 "   margin-bottom    : 4px;\n"
00359 "}\n"
00360 "\n"
00361 "DIV.tabs UL\n"
00362 "{\n"
00363 "   margin           : 0px;\n"
00364 "   padding-left     : 10px;\n"
00365 "   list-style       : none;\n"
00366 "}\n"
00367 "\n"
00368 "DIV.tabs LI, DIV.tabs FORM\n"
00369 "{\n"
00370 "   display          : inline;\n"
00371 "   margin           : 0px;\n"
00372 "   padding          : 0px;\n"
00373 "}\n"
00374 "\n"
00375 "DIV.tabs FORM\n"
00376 "{\n"
00377 "   float            : right;\n"
00378 "}\n"
00379 "\n"
00380 "DIV.tabs A\n"
00381 "{\n"
00382 "   float            : left;\n"
00383 "   background       : url(\"tab_r.gif\") no-repeat right top;\n"
00384 "   border-bottom    : 1px solid #84B0C7;\n"
00385 "   font-size        : x-small;\n"
00386 "   font-weight      : bold;\n"
00387 "   text-decoration  : none;\n"
00388 "}\n"
00389 "\n"
00390 "DIV.tabs A:hover\n"
00391 "{\n"
00392 "   background-position: 100% -150px;\n"
00393 "}\n"
00394 "\n"
00395 "DIV.tabs A:link, DIV.tabs A:visited,\n"
00396 "DIV.tabs A:active, DIV.tabs A:hover\n"
00397 "{\n"
00398 "       color: #1A419D;\n"
00399 "}\n"
00400 "\n"
00401 "DIV.tabs SPAN\n"
00402 "{\n"
00403 "   float            : left;\n"
00404 "   display          : block;\n"
00405 "   background       : url(\"tab_l.gif\") no-repeat left top;\n"
00406 "   padding          : 5px 9px;\n"
00407 "   white-space      : nowrap;\n"
00408 "}\n"
00409 "\n"
00410 "DIV.tabs INPUT\n"
00411 "{\n"
00412 "   float            : right;\n"
00413 "   display          : inline;\n"
00414 "   font-size        : 1em;\n"
00415 "}\n"
00416 "\n"
00417 "DIV.tabs TD\n"
00418 "{\n"
00419 "   font-size        : x-small;\n"
00420 "   font-weight      : bold;\n"
00421 "   text-decoration  : none;\n"
00422 "}\n"
00423 "\n"
00424 "\n"
00425 "\n"
00426 "/* Commented Backslash Hack hides rule from IE5-Mac \\*/\n"
00427 "DIV.tabs SPAN {float : none;}\n"
00428 "/* End IE5-Mac hack */\n"
00429 "\n"
00430 "DIV.tabs A:hover SPAN\n"
00431 "{\n"
00432 "   background-position: 0% -150px;\n"
00433 "}\n"
00434 "\n"
00435 "DIV.tabs LI.current A\n"
00436 "{\n"
00437 "   background-position: 100% -150px;\n"
00438 "   border-width     : 0px;\n"
00439 "}\n"
00440 "\n"
00441 "DIV.tabs LI.current SPAN\n"
00442 "{\n"
00443 "   background-position: 0% -150px;\n"
00444 "   padding-bottom   : 6px;\n"
00445 "}\n"
00446 "\n"
00447 "DIV.navpath\n"
00448 "{\n"
00449 "   background       : none;\n"
00450 "   border           : none;\n"
00451 "   border-bottom    : 1px solid #84B0C7;\n"
00452 "}\n"
00453 ;
00454 
00455 struct tab_data_item
00456 {
00457   const char *name;
00458   unsigned char *content;
00459   unsigned int len;
00460 };
00461 
00462 static tab_data_item tab_data[] =
00463 {
00464   { "tab_b.gif", tab_b_gif, tab_b_gif_len },
00465   { "tab_l.gif", tab_l_gif, tab_l_gif_len },
00466   { "tab_r.gif", tab_r_gif, tab_r_gif_len },
00467   { "tabs.css",  (unsigned char *)tabs_css, 0 }, 
00468   { 0, 0, 0 }
00469 };
00470 
00471 static void writeTabData(const char *dir)
00472 {
00473   tab_data_item *data = tab_data;
00474   while (data->name)
00475   {
00476     QCString fileName;
00477     fileName=(QCString)dir+"/"+data->name;
00478     QFile f(fileName);
00479     if (f.open(IO_WriteOnly))
00480     {
00481       f.writeBlock((char*)data->content,
00482                     data->len>0 ? data->len : strlen((char*)data->content));
00483     }
00484     else
00485     {
00486       fprintf(stderr,"Warning: Cannot open file %s for writing\n",data->name);
00487     }
00488     data++;
00489   }
00490 }
00491 
00492 //------------------------------------------------------------------------
00493 
00494 unsigned char open_gif[] = {
00495   0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x09, 0x00, 0x09, 0x00, 0xf0, 0x00,
00496   0x00, 0x8e, 0xaf, 0xc4, 0x00, 0x00, 0x00, 0x21, 0xf9, 0x04, 0x01, 0x00,
00497   0x00, 0x01, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x09, 0x00,
00498   0x00, 0x02, 0x0d, 0x8c, 0x8f, 0xa9, 0xcb, 0xe0, 0xff, 0x02, 0x8c, 0x66,
00499   0x26, 0x7a, 0x51, 0x01, 0x00, 0x3b
00500 };
00501 unsigned int open_gif_len = 54;
00502 
00503 unsigned char closed_gif[] = {
00504   0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x09, 0x00, 0x09, 0x00, 0xf0, 0x00,
00505   0x00, 0x8e, 0xaf, 0xc4, 0x00, 0x00, 0x00, 0x21, 0xf9, 0x04, 0x01, 0x00,
00506   0x00, 0x01, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x09, 0x00,
00507   0x00, 0x02, 0x10, 0x8c, 0x03, 0xa7, 0x98, 0xcb, 0xad, 0x80, 0x84, 0x66,
00508   0xca, 0x38, 0x57, 0xd6, 0xf4, 0xd0, 0x02, 0x00, 0x3b
00509 };
00510 unsigned int closed_gif_len = 57;
00511 
00512 
00513 
00514 //------------------------- Pictures for the Tabs ------------------------
00515 
00516 HtmlGenerator::HtmlGenerator() : OutputGenerator()
00517 {
00518   dir=Config_getString("HTML_OUTPUT");
00519   col=0;  
00520 }
00521 
00522 HtmlGenerator::~HtmlGenerator()
00523 {
00524   //printf("HtmlGenerator::~HtmlGenerator()\n");
00525 }
00526 
00527 void HtmlGenerator::init()
00528 {
00529   QCString dname=Config_getString("HTML_OUTPUT");
00530   QDir d(dname);
00531   if (!d.exists() && !d.mkdir(dname))
00532   {
00533     err("Could not create output directory %s\n",dname.data());
00534     exit(1);
00535   }
00536   writeLogo(dname);
00537   if (!Config_getString("HTML_HEADER").isEmpty()) 
00538   {
00539     g_header=fileToString(Config_getString("HTML_HEADER"));
00540     //printf("g_header='%s'\n",g_header.data());
00541   }
00542   if (!Config_getString("HTML_FOOTER").isEmpty()) 
00543   {
00544     g_footer=fileToString(Config_getString("HTML_FOOTER"));
00545     //printf("g_footer='%s'\n",g_footer.data());
00546   }
00547   createSubDirs(d);
00548 
00549   //if (Config_getBool("HTML_FANCY_TABS"))
00550   {
00551     writeTabData(dname);
00552   }
00553 }
00554 
00555 void HtmlGenerator::writeStyleSheetFile(QFile &file)
00556 {
00557   QTextStream t(&file);
00558   t << defaultStyleSheet;
00559 }
00560 
00561 static void writeDefaultHeaderFile(QTextStream &t, const char *title,
00562                                    const char *relPath,bool usePathCmd)
00563 {
00564   QString relPathStr;
00565   if (usePathCmd) 
00566     relPathStr="$relpath$";
00567   else
00568     relPathStr=relPath;
00569 
00570   t << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n"
00571     "<html><head>" 
00572     "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8" 
00573          //<< theTranslator->idLanguageCharset() 
00574          << "\">\n"
00575     "<title>"; 
00576   t << convertToHtml(title);
00577   t << "</title>\n";
00578   t << "<link ";
00579   t << "href=\"";
00580   if (Config_getString("HTML_STYLESHEET").isEmpty())
00581   {
00582     t << relPathStr << "doxygen.css";
00583   }
00584   else
00585   {
00586     QCString cssname=Config_getString("HTML_STYLESHEET");
00587     QFileInfo cssfi(cssname);
00588     if (!cssfi.exists())
00589     {
00590       err("Error: user specified HTML style sheet file does not exist!\n");
00591     }
00592     t << relPathStr << cssfi.fileName();
00593   }
00594   
00595   t << "\" rel=\"stylesheet\" type=\"text/css\">\n";
00596   t << "<link href=\"" << relPathStr << "tabs.css\" rel=\"stylesheet\" type=\"text/css\">\n";
00597   t << "</head><body>\n";
00598 }
00599 
00600 
00601 void HtmlGenerator::writeHeaderFile(QFile &file)
00602 {
00603   QTextStream t(&file);
00604   t.setEncoding(QTextStream::UnicodeUTF8);
00605   writeDefaultHeaderFile(t,"$title",relativePathToRoot(0),TRUE);
00606 }
00607 
00608 void HtmlGenerator::writeFooterFile(QFile &file)
00609 {
00610   QTextStream t(&file);
00611   t << "<hr size=\"1\"><address style=\"text-align: right;\"><small>\n";
00612   t << theTranslator->trGeneratedAt( "$datetime", "$projectname" );
00613   t << "&nbsp;<a href=\"http://www.doxygen.org/index.html\">"
00614     << "<img src=\"doxygen.png\" alt=\"doxygen\" " 
00615     << "align=\"middle\" border=\"0\">"
00616     << "</a> $doxygenversion";
00617   t << "</small></address>\n"
00618     << "</body>\n"
00619     << "</html>\n";
00620 }
00621 
00622 static void generateDynamicSections(QTextStream &t,const QCString &relPath)
00623 {
00624   if (Config_getBool("HTML_DYNAMIC_SECTIONS"))
00625   { 
00626     t << 
00627       "<script type=\"text/javascript\">\n"
00628       "<!--\n"
00629       "function changeDisplayState (e){\n"
00630       "  var num=this.id.replace(/[^[0-9]/g,'');\n"
00631       "  var button=this.firstChild;\n"
00632       "  var sectionDiv=document.getElementById('dynsection'+num);\n"
00633       "  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){\n"
00634       "    sectionDiv.style.display='block';\n"
00635       "    button.src='" << relPath << "open.gif';\n"
00636       "  }else{\n"
00637       "    sectionDiv.style.display='none';\n"
00638       "    button.src='" << relPath << "closed.gif';\n"
00639       "  }\n"
00640       "}\n"
00641       "function initDynSections(){\n"
00642       "  var divs=document.getElementsByTagName('div');\n"
00643       "  var sectionCounter=1;\n"
00644       "  for(var i=0;i<divs.length-1;i++){\n"
00645       "    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){\n"
00646       "      var header=divs[i];\n"
00647       "      var section=divs[i+1];\n"
00648       "      var button=header.firstChild;\n"
00649       "      if (button!='IMG'){\n"
00650       "        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);\n"
00651       "        button=document.createElement('img');\n"
00652       "        divs[i].insertBefore(button,divs[i].firstChild);\n"
00653       "      }\n"
00654       "      header.style.cursor='pointer';\n"
00655       "      header.onclick=changeDisplayState;\n"
00656       "      header.id='dynheader'+sectionCounter;\n"
00657       "      button.src='" << relPath << "closed.gif';\n"
00658       "      section.id='dynsection'+sectionCounter;\n"
00659       "      section.style.display='none';\n"
00660       "      section.style.marginLeft='14px';\n"
00661       "      sectionCounter++;\n"
00662       "    }\n"
00663       "  }\n"
00664       "}\n"
00665       "window.onload = initDynSections;\n"
00666       "-->\n"
00667       "</script>\n";
00668   }
00669 }
00670 
00671 
00672 void HtmlGenerator::startFile(const char *name,const char *,
00673                               const char *title)
00674 {
00675   //printf("HtmlGenerator::startFile(%s)\n",name);
00676   QCString fileName=name;
00677   lastTitle=title;
00678   relPath = relativePathToRoot(fileName);
00679 
00680   if (fileName.right(Doxygen::htmlFileExtension.length())!=Doxygen::htmlFileExtension) 
00681   {
00682     fileName+=Doxygen::htmlFileExtension;
00683   }
00684   startPlainFile(fileName);
00685   Doxygen::indexList.addIndexFile(fileName);
00686   //if (Config_getBool("GENERATE_HTMLHELP"))
00687   //{
00688   //  HtmlHelp::getInstance()->addIndexFile(fileName);
00689   //}
00690   
00691   QCString dispTitle = title;
00692   QCString projName = Config_getString("PROJECT_NAME");
00693   if (!projName.isEmpty())
00694   {
00695     dispTitle.prepend(projName+": ");
00696   }
00697  
00698   lastFile = fileName;
00699   if (g_header.isEmpty()) 
00700   {
00701     writeDefaultHeaderFile(t,dispTitle,relPath,FALSE);
00702   }
00703   else
00704   {
00705     t << substituteKeywords(g_header,convertToHtml(dispTitle),relPath);
00706   }
00707   t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen " 
00708     << versionString << " -->" << endl;
00709   generateDynamicSections(t,relPath);
00710 }
00711 
00712 static void writePageFooter(QTextStream &t,const QCString &lastTitle,
00713                             const QCString relPath)
00714 {
00715   if (g_footer.isEmpty())
00716   {
00717     t << "<hr size=\"1\"><address style=\"text-align: right;\"><small>";
00718     t << theTranslator->trGeneratedAt(
00719         dateToString(TRUE),
00720         Config_getString("PROJECT_NAME")
00721         );
00722     t << "&nbsp;" << endl << "<a href=\"http://www.doxygen.org/index.html\">";
00723     t << endl << "<img src=\"" << relPath << "doxygen.png\" alt=\"doxygen\" " 
00724       << "align=\"middle\" border=\"0\">" << "</a> " << versionString << " ";
00725     t << "</small></address>";
00726     if (Debug::isFlagSet(Debug::Validate))
00727     {
00728       t << "<p><a href=\"http://validator.w3.org/check/referer\">"
00729            "<img border=\"0\" src=\"http://www.w3.org/Icons/valid-html401\""
00730            " height=\"31\" width=\"88\" alt=\"This page is Valid HTML 4.01 "
00731            "Transitional!\"></a><a href=\"http://jigsaw.w3.org/css-validator/\">"
00732            "<img style=\"border:0;width:88px;height:31px\" "
00733            "src=\"http://jigsaw.w3.org/css-validator/images/vcss\" "
00734            "alt=\"This page uses valid CSS!\"></a></p>";
00735     }
00736     t << "\n</body>\n</html>\n";
00737   }
00738   else
00739   {
00740     t << substituteKeywords(g_footer,convertToHtml(lastTitle),relPath);
00741   }
00742 }
00743 
00744 void HtmlGenerator::writeFooter()
00745 {
00746   writePageFooter(t,lastTitle,relPath);
00747 }
00748 
00749 void HtmlGenerator::endFile()
00750 {
00751   endPlainFile();
00752 }
00753 
00754 void HtmlGenerator::startProjectNumber()
00755 {
00756   t << "<h3 align=\"center\">";
00757 }
00758 
00759 void HtmlGenerator::endProjectNumber()
00760 {
00761   t << "</h3>";
00762 }
00763 
00764 void HtmlGenerator::writeStyleInfo(int part)
00765 {
00766   //printf("writeStyleInfo(%d)\n",part);
00767   if (part==0)
00768   {
00769     if (Config_getString("HTML_STYLESHEET").isEmpty()) // write default style sheet
00770     {
00771       //printf("write doxygen.css\n");
00772       startPlainFile("doxygen.css"); 
00773       
00774       // alternative, cooler looking titles
00775       //t << "H1 { text-align: center; border-width: thin none thin none;" << endl;
00776       //t << "     border-style : double; border-color : blue; padding-left : 1em; padding-right : 1em }" << endl;
00777 
00778       t << defaultStyleSheet;
00779       endPlainFile();
00780     }
00781     else // write user defined style sheet
00782     {
00783       QCString cssname=Config_getString("HTML_STYLESHEET");
00784       QFileInfo cssfi(cssname);
00785       if (!cssfi.exists() || !cssfi.isFile() || !cssfi.isReadable())
00786       {
00787         err("Error: style sheet %s does not exist or is not readable!", Config_getString("HTML_STYLESHEET").data());
00788       }
00789       else
00790       {
00791         // convert style sheet to string
00792         QCString fileStr = fileToString(cssname);
00793         // write the string into the output dir
00794         startPlainFile(cssfi.fileName());
00795         t << fileStr;
00796         endPlainFile();
00797       }
00798     }
00799   }
00800 }
00801 
00802 void HtmlGenerator::startDoxyAnchor(const char *,const char *,
00803                                     const char *anchor, const char *name,
00804                                     const char *args)
00805 {
00806   t << "<a class=\"anchor\" name=\"" << anchor << "\"></a>";
00807   t << "<!-- doxytag: member=\"";
00808   docify(name); 
00809   t << "\" ref=\""; 
00810   docify(anchor); 
00811   t << "\" args=\"";
00812   docify(args);
00813   t << "\" -->";
00814 }
00815 
00816 void HtmlGenerator::endDoxyAnchor(const char *,const char *)
00817 {
00818 }
00819 
00820 void HtmlGenerator::newParagraph()
00821 {
00822   t << endl << "<p>" << endl;
00823 }
00824 
00825 void HtmlGenerator::startParagraph()
00826 {
00827   t << endl << "<p>";
00828 }
00829 
00830 void HtmlGenerator::endParagraph()
00831 {
00832   t << "</p>" << endl;
00833 }
00834 
00835 void HtmlGenerator::writeString(const char *text)
00836 {
00837   t << text;
00838 }
00839 
00840 void HtmlGenerator::startIndexItem(const char *ref,const char *f)
00841 {
00842   //printf("HtmlGenerator::startIndexItem(%s,%s)\n",ref,f);
00843   QCString *dest;
00844   t << "<li>";
00845   if (ref || f)
00846   {
00847     if (ref) 
00848     {
00849       t << "<a class=\"elRef\" ";
00850       t << "doxygen=\"" << ref << ":";
00851       if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
00852       t << "\" ";
00853     }
00854     else
00855     {
00856       t << "<a class=\"el\" ";
00857     }
00858     t << "href=\"";
00859     if (ref)
00860     {
00861       if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
00862     }
00863     else
00864     {
00865       t << relPath;
00866     }
00867     if (f) t << f << Doxygen::htmlFileExtension << "\">";
00868   }
00869   else
00870   {
00871     t << "<b>";
00872   }
00873 }
00874 
00875 void HtmlGenerator::endIndexItem(const char *ref,const char *f)
00876 {
00877   //printf("HtmlGenerator::endIndexItem(%s,%s,%s)\n",ref,f,name);
00878   if (ref || f)
00879   {
00880     t << "</a>" << endl;
00881   }
00882   else
00883   {
00884     t << "</b>";
00885   }
00886 }
00887 
00888 void HtmlGenerator::writeStartAnnoItem(const char *,const char *f,
00889                                        const char *path,const char *name)
00890 {
00891   t << "<li>";
00892   if (path) docify(path);
00893   t << "<a class=\"el\" href=\"" << f << Doxygen::htmlFileExtension << "\">";
00894   docify(name);
00895   t << "</a> ";
00896 }
00897 
00898 void HtmlGenerator::writeObjectLink(const char *ref,const char *f,
00899                                     const char *anchor, const char *name)
00900 {
00901   QCString *dest;
00902   if (ref) 
00903   {
00904     t << "<a class=\"elRef\" ";
00905     t << "doxygen=\"" << ref << ":";
00906     if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
00907     t << "\" ";
00908   }
00909   else
00910   {
00911     t << "<a class=\"el\" ";
00912   }
00913   t << "href=\"";
00914   if (ref)
00915   {
00916     if ((dest=Doxygen::tagDestinationDict[ref])) t << relPath << *dest << "/";
00917   }
00918   else
00919   {
00920     t << relPath;
00921   }
00922   if (f) t << f << Doxygen::htmlFileExtension;
00923   if (anchor) t << "#" << anchor;
00924   t << "\">";
00925   docify(name);
00926   t << "</a>";
00927 }
00928 
00929 void HtmlGenerator::writeCodeLink(const char *ref,const char *f,
00930                                   const char *anchor, const char *name,
00931                                   const char *tooltip)
00932 {
00933   QCString *dest;
00934   //printf("writeCodeLink(ref=%s,f=%s,anchor=%s,name=%s,tooltip=%s)\n",ref,f,anchor,name,tooltip);
00935   if (ref) 
00936   {
00937     t << "<a class=\"codeRef\" ";
00938     t << "doxygen=\"" << ref << ":";
00939     if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
00940     t << "\" ";
00941   }
00942   else
00943   {
00944     t << "<a class=\"code\" ";
00945   }
00946   t << "href=\"";
00947   if (ref)
00948   {
00949     if ((dest=Doxygen::tagDestinationDict[ref])) t << relPath << *dest << "/";
00950   }
00951   else
00952   {
00953     t << relPath;
00954   }
00955   if (f) t << f << Doxygen::htmlFileExtension;
00956   if (anchor) t << "#" << anchor;
00957   t << "\"";
00958   if (tooltip) t << " title=\"" << convertToXML(tooltip) << "\"";
00959   t << ">";
00960   docify(name);
00961   t << "</a>";
00962   col+=strlen(name);
00963 }
00964 
00965 void HtmlGenerator::startTextLink(const char *f,const char *anchor)
00966 {
00967   t << "<a href=\"";
00968   if (f)   t << relPath << f << Doxygen::htmlFileExtension;
00969   if (anchor) t << "#" << anchor;
00970   t << "\">"; 
00971 }
00972 
00973 void HtmlGenerator::endTextLink()
00974 {
00975   t << "</a>";
00976 }
00977 
00978 void HtmlGenerator::startHtmlLink(const char *url)
00979 {
00980   t << "<a ";
00981   if (Config_getBool("GENERATE_TREEVIEW")) t << "target=\"top\" ";
00982   t << "href=\"";
00983   if (url) t << url;
00984   t << "\">"; 
00985 }
00986 
00987 void HtmlGenerator::endHtmlLink()
00988 {
00989   t << "</a>";
00990 }
00991 
00992 void HtmlGenerator::startGroupHeader()
00993 {
00994   t << "<h2>";
00995 }
00996 
00997 void HtmlGenerator::endGroupHeader()
00998 {
00999   t << "</h2>" << endl;
01000 }
01001 
01002 void HtmlGenerator::startSection(const char *lab,const char *,SectionInfo::SectionType type)
01003 {
01004   switch(type)
01005   {
01006     case SectionInfo::Page:          t << "<h1>"; break;
01007     case SectionInfo::Section:       t << "<h2>"; break;
01008     case SectionInfo::Subsection:    t << "<h3>"; break;
01009     case SectionInfo::Subsubsection: t << "<h4>"; break;
01010     case SectionInfo::Paragraph:     t << "<h5>"; break;
01011     default: ASSERT(0); break;
01012   }
01013   t << "<a class=\"anchor\" name=\"" << lab << "\">";
01014 }
01015 
01016 void HtmlGenerator::endSection(const char *,SectionInfo::SectionType type)
01017 {
01018   t << "</a>";
01019   switch(type)
01020   {
01021     case SectionInfo::Page:          t << "</h1>"; break;
01022     case SectionInfo::Section:       t << "</h2>"; break;
01023     case SectionInfo::Subsection:    t << "</h3>"; break;
01024     case SectionInfo::Subsubsection: t << "</h4>"; break;
01025     case SectionInfo::Paragraph:     t << "</h5>"; break;
01026     default: ASSERT(0); break;
01027   }
01028 }
01029 
01030 void HtmlGenerator::docify(const char *str)
01031 {
01032   if (str)
01033   {
01034     const char *p=str;
01035     char c;
01036     while (*p)
01037     {
01038       c=*p++;
01039       switch(c)
01040       {
01041         case '<':  t << "&lt;"; break;
01042         case '>':  t << "&gt;"; break;
01043         case '&':  t << "&amp;"; break;
01044         case '"':  t << "&quot;"; break;
01045         case '\\':
01046                    if (*p=='<')
01047                      { t << "&lt;"; p++; }
01048                    else if (*p=='>')
01049                      { t << "&gt;"; p++; }
01050                    else
01051                      t << "\\";
01052                    break;
01053         default:   t << c; 
01054       }
01055     }
01056   }
01057 }
01058 
01059 void HtmlGenerator::codify(const char *str)
01060 {
01061   //docify(str);
01062   //static char spaces[]="        ";
01063   if (str)
01064   { 
01065     const char *p=str;
01066     char c;
01067     int spacesToNextTabStop;
01068     while (*p)
01069     {
01070       c=*p++;
01071       switch(c)
01072       {
01073         case '\t': spacesToNextTabStop = 
01074                          Config_getInt("TAB_SIZE") - (col%Config_getInt("TAB_SIZE")); 
01075                    t << spaces.left(spacesToNextTabStop); 
01076                    col+=spacesToNextTabStop; 
01077                    break; 
01078         case '\n': t << "\n"; col=0; 
01079                    break;
01080         //case '\n': t << "<br>"; col=0; 
01081         //           break;
01082         case '\r': break;
01083         case '<':  t << "&lt;"; col++; 
01084                    break;
01085         case '>':  t << "&gt;"; col++; 
01086                    break;
01087         case '&':  t << "&amp;"; col++; 
01088                    break;
01089         //case ' ':  t << "&nbsp;"; col++;
01090         //           break;
01091         case '\\':
01092                    if (*p=='<')
01093                      { t << "&lt;"; p++; }
01094                    else if (*p=='>')
01095                      { t << "&gt;"; p++; }
01096                    else
01097                      t << "\\";
01098                    col++;
01099                    break;
01100         default:   t << c;    
01101                    col++;                    
01102                    break;
01103       }
01104     }
01105   }
01106 }
01107 
01108 void HtmlGenerator::writeChar(char c)
01109 {
01110   char cs[2];
01111   cs[0]=c;
01112   cs[1]=0;
01113   docify(cs);
01114 }
01115 
01116 void HtmlGenerator::startClassDiagram()
01117 {
01118   //t << "<p>";
01119   t << "<div class=\"dynheader\">" << endl;
01120 }
01121 
01122 void HtmlGenerator::endClassDiagram(const ClassDiagram &d,
01123                                 const char *fileName,const char *name)
01124 {
01125   t << "</div>" << endl;
01126   t << "<div class=\"dynsection\">" << endl;
01127   t << "\n<p><center><img src=\""
01128     << relPath << fileName << ".png\" usemap=\"#" << name << "_map\""
01129     << " border=\"0\" alt=\"\"></center>" << endl
01130     << "<map name=\"" << name << "_map\">" << endl;
01131 
01132   d.writeImage(t,dir,relPath,fileName);
01133   t << "</div>" << endl;
01134 }
01135 
01136 
01137 void HtmlGenerator::startMemberList()  
01138 { 
01139   DBG_HTML(t << "<!-- startMemberList -->" << endl)
01140   if (Config_getBool("HTML_ALIGN_MEMBERS"))
01141   {
01142   }
01143   else
01144   {
01145     t << "<ul>" << endl; 
01146   }
01147 }
01148 
01149 void HtmlGenerator::endMemberList()    
01150 { 
01151   DBG_HTML(t << "<!-- endMemberList -->" << endl)
01152   if (Config_getBool("HTML_ALIGN_MEMBERS"))
01153   {
01154   }
01155   else
01156   {
01157     t << "</ul>" << endl; 
01158   }
01159 }
01160 
01161 // annonymous type:
01162 //  0 = single column right aligned
01163 //  1 = double column left aligned
01164 //  2 = single column left aligned
01165 void HtmlGenerator::startMemberItem(int annoType) 
01166 { 
01167   DBG_HTML(t << "<!-- startMemberItem() -->" << endl)
01168   if (Config_getBool("HTML_ALIGN_MEMBERS"))
01169   {
01170     t << "<tr>";
01171     switch(annoType)
01172     {
01173       case 0:  t << "<td class=\"memItemLeft\" nowrap align=\"right\" valign=\"top\">"; break;
01174       case 1:  t << "<td class=\"memItemLeft\" nowrap>"; break;
01175       case 2:  t << "<td class=\"memItemLeft\" nowrap valign=\"top\">"; break;
01176       default: t << "<td class=\"memTemplParams\" nowrap colspan=\"2\">"; break;
01177     }
01178   }
01179   else
01180   {
01181     t << "<li>"; 
01182   }
01183 }
01184 
01185 void HtmlGenerator::endMemberItem() 
01186 { 
01187   //DBG_HTML(t << "<!-- endMemberItem(" << (int)inGroup << "," << fileName << "," << headerName << " -->" << endl)
01188   if (Config_getBool("HTML_ALIGN_MEMBERS"))
01189   {
01190     t << "</td></tr>\n"; 
01191   }
01192   t << endl; 
01193 }
01194 
01195 void HtmlGenerator::startMemberTemplateParams()
01196 {
01197 }
01198 
01199 void HtmlGenerator::endMemberTemplateParams()
01200 {
01201   if (Config_getBool("HTML_ALIGN_MEMBERS"))
01202   {
01203     t << "</td></tr>" << endl;
01204     t << "<tr><td class=\"memTemplItemLeft\" nowrap align=\"right\" valign=\"top\">";
01205   }
01206 }
01207 
01208 
01209 void HtmlGenerator::insertMemberAlign(bool templ) 
01210 { 
01211   DBG_HTML(t << "<!-- insertMemberAlign -->" << endl)
01212   if (Config_getBool("HTML_ALIGN_MEMBERS"))
01213   {
01214     QCString className = templ ? "memTemplItemRight" : "memItemRight";
01215     t << "&nbsp;</td><td class=\"" << className << "\" valign=\"bottom\">"; 
01216   }
01217 }
01218 
01219 void HtmlGenerator::startMemberDescription() 
01220 { 
01221   DBG_HTML(t << "<!-- startMemberDescription -->" << endl)
01222   if (Config_getBool("HTML_ALIGN_MEMBERS"))
01223   {
01224     t << "<tr><td class=\"mdescLeft\">&nbsp;</td><td class=\"mdescRight\">"; 
01225   }
01226   else
01227   {
01228     t << "<dl class=\"el\"><dd class=\"mdescRight\">";
01229   }
01230 }
01231 
01232 void HtmlGenerator::endMemberDescription()   
01233 { 
01234   DBG_HTML(t << "<!-- endMemberDescription -->" << endl)
01235   if (Config_getBool("HTML_ALIGN_MEMBERS"))
01236   {
01237     t << "<br></td></tr>" << endl; 
01238   }
01239   else
01240   {
01241     t << "<br></dl>";
01242   }
01243 }
01244 
01245 void HtmlGenerator::startMemberSections()
01246 {
01247   DBG_HTML(t << "<!-- startMemberSections -->" << endl)
01248   if (Config_getBool("HTML_ALIGN_MEMBERS"))
01249   {
01250     t << "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">" << endl;
01251     // HTML is not recursively decomposable, sorry
01252     t << "<tr><td></td></tr>" << endl;
01253   }
01254 }
01255 
01256 void HtmlGenerator::endMemberSections()
01257 {
01258   DBG_HTML(t << "<!-- endMemberSections -->" << endl)
01259   if (Config_getBool("HTML_ALIGN_MEMBERS"))
01260   {
01261     t << "</table>" << endl;
01262   }
01263 }
01264 
01265 void HtmlGenerator::startMemberHeader()
01266 {
01267   DBG_HTML(t << "<!-- startMemberHeader -->" << endl)
01268   if (Config_getBool("HTML_ALIGN_MEMBERS"))
01269   {
01270     t << "<tr><td colspan=\"2\"><br><h2>";
01271   }
01272   else
01273   {
01274     startGroupHeader();
01275   }
01276 }
01277 
01278 void HtmlGenerator::endMemberHeader()
01279 {
01280   DBG_HTML(t << "<!-- endMemberHeader -->" << endl)
01281   if (Config_getBool("HTML_ALIGN_MEMBERS"))
01282   {
01283     t << "</h2></td></tr>" << endl;
01284   }
01285   else
01286   {
01287     endGroupHeader();
01288   }
01289 }
01290 
01291 void HtmlGenerator::startMemberSubtitle()
01292 {
01293   DBG_HTML(t << "<!-- startMemberSubtitle -->" << endl)
01294   if (Config_getBool("HTML_ALIGN_MEMBERS")) t << "<tr><td colspan=\"2\">";
01295 }
01296 
01297 void HtmlGenerator::endMemberSubtitle()
01298 {
01299   DBG_HTML(t << "<!-- endMemberSubtitle -->" << endl)
01300   if (Config_getBool("HTML_ALIGN_MEMBERS")) t << "<br><br></td></tr>" << endl;
01301 }
01302 
01303 void HtmlGenerator::startIndexList() 
01304 { 
01305   t << "<table>"  << endl; 
01306 }
01307 
01308 void HtmlGenerator::endIndexList()
01309 {
01310   t << "</table>" << endl;
01311 }
01312 
01313 void HtmlGenerator::startIndexKey() 
01314 { 
01315   // inserted 'class = ...', 02 jan 2002, jh
01316   t << "  <tr><td class=\"indexkey\">"; 
01317 }
01318 
01319 void HtmlGenerator::endIndexKey()
01320 {
01321   t << "</td>";
01322 }
01323 
01324 void HtmlGenerator::startIndexValue(bool) 
01325 { 
01326   // inserted 'class = ...', 02 jan 2002, jh
01327   t << "<td class=\"indexvalue\">"; 
01328 }
01329 
01330 void HtmlGenerator::endIndexValue(const char *,bool)
01331 {
01332   t << "</td></tr>" << endl;
01333 }
01334 
01335 void HtmlGenerator::startMemberDocList()
01336 {
01337   DBG_HTML(t << "<!-- startMemberDocList -->" << endl;)
01338   //t << "<table class=\"memlist\">" << endl;
01339   //t << "  <tr>" << endl;
01340   //t << "    <td>" << endl;
01341 }
01342 
01343 void HtmlGenerator::endMemberDocList()
01344 {
01345   DBG_HTML(t << "<!-- endMemberDocList -->" << endl;)
01346   //t << "    </td>" << endl;
01347   //t << "  </tr>" << endl;
01348   //t << "</table>" << endl;
01349 }
01350 
01351 void HtmlGenerator::startMemberDoc(const char *,const char *,const char *,const char *) 
01352 { 
01353   DBG_HTML(t << "<!-- startMemberDoc -->" << endl;)
01354   //t << "<p>" << endl;
01355  
01356   t << "\n<div class=\"memitem\">" << endl;
01357   //t << "<table>" << endl;
01358   //t << "  <tr>" << endl;
01359   //t << "    <td>" << endl;
01360   //t << "      <table class=\"memproto\">" << endl;
01361   t << "<div class=\"memproto\">" << endl;
01362   
01363 }
01364 
01365 void HtmlGenerator::startMemberDocPrefixItem()
01366 {
01367   DBG_HTML(t << "<!-- startMemberDocPrefixItem -->" << endl;)
01368   //t << "        <tr>" << endl;
01369   //t << "          <td class=\"memtemplate\" colspan=\"5\">";
01370   t << "<div class=\"memtemplate\">" << endl;
01371 }
01372 
01373 void HtmlGenerator::endMemberDocPrefixItem()
01374 {
01375   DBG_HTML(t << "<!-- endMemberDocPrefixItem -->" << endl;)
01376   //t << "</td>" << endl;
01377   //t << "        </tr>" << endl;
01378   t << "</div>" << endl;
01379 }
01380 
01381 void HtmlGenerator::startMemberDocName(bool /*align*/)
01382 {
01383   DBG_HTML(t << "<!-- startMemberDocName -->" << endl;)
01384 
01385   t << "      <table class=\"memname\">" << endl;
01386     
01387   t << "        <tr>" << endl;
01388   t << "          <td class=\"memname\">";
01389 }
01390 
01391 void HtmlGenerator::endMemberDocName()
01392 {
01393   DBG_HTML(t << "<!-- endMemberDocName -->" << endl;)
01394   t << "          </td>" << endl;
01395 }
01396 
01397 void HtmlGenerator::startParameterList(bool openBracket)
01398 {
01399   DBG_HTML(t << "<!-- startParameterList -->" << endl;)
01400   t << "          <td>";
01401   if (openBracket) t << "(";
01402   t << "</td>" << endl;
01403 }
01404 
01405 void HtmlGenerator::startParameterType(bool first,const char *key)
01406 {
01407   if (first)
01408   {
01409     DBG_HTML(t << "<!-- startFirstParameterType -->" << endl;)
01410     t << "          <td class=\"paramtype\">";
01411   }
01412   else
01413   {
01414     DBG_HTML(t << "<!-- startParameterType -->" << endl;)
01415     t << "        <tr>" << endl;
01416     t << "          <td class=\"paramkey\">";
01417     if (key) t << key;
01418     t << "</td>" << endl;
01419     t << "          <td></td>" << endl;
01420     t << "          <td class=\"paramtype\">";
01421   }
01422 }
01423 
01424 void HtmlGenerator::endParameterType()
01425 {
01426   DBG_HTML(t << "<!-- endParameterType -->" << endl;)
01427   t << "&nbsp;</td>" << endl;
01428 }
01429 
01430 void HtmlGenerator::startParameterName(bool /*oneArgOnly*/)
01431 {
01432   DBG_HTML(t << "<!-- startParameterName -->" << endl;)
01433   t << "          <td class=\"paramname\">";
01434 }
01435 
01436 void HtmlGenerator::endParameterName(bool last,bool emptyList,bool closeBracket)
01437 {
01438   DBG_HTML(t << "<!-- endParameterName -->" << endl;)
01439   if (last)
01440   {
01441     if (emptyList)
01442     {
01443       t << "          </td>" << endl;
01444       t << "          <td>";
01445       if (closeBracket) t << "&nbsp;)";
01446       t << "&nbsp;</td>" << endl;
01447       t << "          <td width=\"100%\">";
01448     }
01449     else
01450     {
01451       t << "</td><td>&nbsp;</td>" << endl;
01452       t << "        </tr>" << endl;
01453       t << "        <tr>" << endl;
01454       t << "          <td></td>" << endl;
01455       t << "          <td>";
01456       if (closeBracket) t << ")";
01457       t << "</td>" << endl;
01458       t << "          <td></td><td></td><td width=\"100%\">";
01459     }
01460   }
01461   else
01462   {
01463     t << "</td>" << endl;
01464     t << "        </tr>" << endl;
01465   }
01466 }
01467 
01468 void HtmlGenerator::endParameterList()
01469 {
01470   DBG_HTML(t << "<!-- endParameterList -->" << endl;)
01471   t << "</td>" << endl;
01472   t << "        </tr>" << endl;
01473 }
01474 
01475 void HtmlGenerator::endMemberDoc(bool hasArgs)     
01476 { 
01477   DBG_HTML(t << "<!-- endMemberDoc -->" << endl;)
01478   if (!hasArgs)
01479   {
01480     t << "        </tr>" << endl;
01481   }
01482   t << "      </table>" << endl;
01483   //t << "    </td>" << endl;
01484   //t << "  </tr>" << endl;
01485   //t << "</table>" << endl;
01486   t << "</div>" << endl;
01487 }
01488 
01489 void HtmlGenerator::startDotGraph()
01490 {
01491   t << "<div class=\"dynheader\">" << endl;
01492 }
01493 
01494 void HtmlGenerator::endDotGraph(const DotClassGraph &g)
01495 {
01496   t << "</div>" << endl;
01497   t << "<div class=\"dynsection\">" << endl;
01498   g.writeGraph(t,BITMAP,dir,relPath);
01499   if (Config_getBool("GENERATE_LEGEND"))
01500   {
01501     t << "<center><font size=\"2\">[";
01502     startHtmlLink(relPath+"graph_legend"+Doxygen::htmlFileExtension);
01503     t << theTranslator->trLegend();
01504     endHtmlLink();
01505     t << "]</font></center>";
01506   }
01507   t << "</div>" << endl;
01508 }
01509 
01510 void HtmlGenerator::startInclDepGraph()
01511 {
01512   t << "<div class=\"dynheader\">" << endl;
01513 }
01514 
01515 void HtmlGenerator::endInclDepGraph(const DotInclDepGraph &g)
01516 {
01517   t << "</div>" << endl;
01518   t << "<div class=\"dynsection\">" << endl;
01519   g.writeGraph(t,BITMAP,dir,relPath);
01520   t << "</div>" << endl;
01521 }
01522 
01523 void HtmlGenerator::startGroupCollaboration()
01524 {
01525   t << "<div class=\"dynheader\">" << endl;
01526 }
01527 
01528 void HtmlGenerator::endGroupCollaboration(const DotGroupCollaboration &g)
01529 {
01530   t << "</div>" << endl;
01531   t << "<div class=\"dynsection\">" << endl;
01532   g.writeGraph(t,BITMAP,dir,relPath);
01533   t << "</div>" << endl;
01534 }
01535 
01536 void HtmlGenerator::startCallGraph()
01537 {
01538   t << "<div class=\"dynheader\">" << endl;
01539 }
01540 
01541 void HtmlGenerator::endCallGraph(const DotCallGraph &g)
01542 {
01543   t << "</div>" << endl;
01544   t << "<div class=\"dynsection\">" << endl;
01545   g.writeGraph(t,BITMAP,dir,relPath);
01546   t << "</div>" << endl;
01547 }
01548 
01549 void HtmlGenerator::startDirDepGraph()
01550 {
01551   t << "<div class=\"dynheader\">" << endl;
01552 }
01553 
01554 void HtmlGenerator::endDirDepGraph(const DotDirDeps &g)
01555 {
01556   t << "</div>" << endl;
01557   t << "<div class=\"dynsection\">" << endl;
01558   g.writeGraph(t,BITMAP,dir,relPath);
01559   t << "</div>" << endl;
01560 }
01561 
01562 void HtmlGenerator::writeGraphicalHierarchy(const DotGfxHierarchyTable &g)
01563 {
01564   g.writeGraph(t,dir);
01565 }
01566 
01567 void HtmlGenerator::startMemberGroupHeader(bool)
01568 {
01569   t << "<tr><td colspan=\"2\"><div class=\"groupHeader\">";
01570 }
01571 
01572 void HtmlGenerator::endMemberGroupHeader()
01573 {
01574   t << "</div></td></tr>" << endl;
01575 }
01576 
01577 void HtmlGenerator::startMemberGroupDocs()
01578 {
01579   t << "<tr><td colspan=\"2\"><div class=\"groupText\">";
01580 }
01581 
01582 void HtmlGenerator::endMemberGroupDocs()
01583 {
01584   t << "<br><br></div></td></tr>" << endl;
01585 }
01586 
01587 void HtmlGenerator::startMemberGroup()
01588 {
01589 }
01590 
01591 void HtmlGenerator::endMemberGroup(bool)
01592 {
01593 }
01594 
01595 void HtmlGenerator::startIndent()        
01596 { 
01597   DBG_HTML(t << "<!-- startIndent -->" << endl;)
01598 
01599   t << "<div class=\"memdoc\">\n";
01600 }
01601 
01602 void HtmlGenerator::endIndent()          
01603 { 
01604   DBG_HTML(t << "<!-- endIndent -->" << endl;)
01605   t << endl << "</div>" << endl << "</div><p>" << endl; 
01606 }
01607 
01608 void HtmlGenerator::addIndexItem(const char *,const char *)
01609 {
01610 }
01611 
01612 void HtmlGenerator::writeNonBreakableSpace(int n)
01613 {
01614   int i;
01615   for (i=0;i<n;i++)
01616   {
01617     t << "&nbsp;";
01618   }
01619 }
01620 
01621 void HtmlGenerator::writeLineNumber(const char *ref,const char *file,
01622                                     const char *anchor,int l)
01623 {
01624   QCString lineNumber,lineAnchor;
01625   lineNumber.sprintf("%05d",l);
01626   lineAnchor.sprintf("l%05d",l);
01627 
01628   if (file)
01629   {
01630     startCodeAnchor(lineAnchor);
01631     writeCodeLink(ref,file,anchor,lineNumber,0);
01632     endCodeAnchor();
01633   }
01634   else
01635   {
01636     startCodeAnchor(lineAnchor);
01637     codify(lineNumber);
01638     endCodeAnchor();
01639   }
01640   codify(" ");
01641 }
01642 
01643 void HtmlGenerator::startSimpleSect(SectionTypes,
01644                                 const char *file,const char *anchor,
01645                                 const char *title)
01646 {
01647   t << "<dl compact><dt><b>";
01648   if (file)
01649   {
01650     writeObjectLink(0,file,anchor,title);
01651   }
01652   else
01653   {
01654     docify(title);
01655   }
01656   t << "</b></dt>";
01657 }
01658 
01659 void HtmlGenerator::endSimpleSect()
01660 {
01661   t << "</dl>"; 
01662 }
01663 
01664 void HtmlGenerator::startParamList(ParamListTypes,
01665                                 const char *title)
01666 {
01667   t << "<dl compact><dt><b>";
01668   docify(title);
01669   t << "</b></dt>";
01670 }
01671 
01672 void HtmlGenerator::endParamList()
01673 {
01674   t << "</dl>"; 
01675 }
01676 
01677 void HtmlGenerator::printDoc(DocNode *n,const char *langExt)
01678 {
01679   HtmlDocVisitor *visitor = new HtmlDocVisitor(t,*this,langExt);
01680   n->accept(visitor);
01681   delete visitor; 
01682 }
01683 
01684 //---------------- helpers for index generation -----------------------------
01685 
01686 static void startQuickIndexList(QTextStream &t,bool compact)
01687 {
01688   if (compact) 
01689   {
01690     t << "  <div class=\"tabs\">\n";
01691     t << "    <ul>\n"; 
01692   }
01693   else 
01694   {
01695     t << "<ul>";
01696   }
01697 }
01698 
01699 static void endQuickIndexList(QTextStream &t,bool compact)
01700 {
01701   if (compact) 
01702   {
01703     t << "    </ul>\n";
01704     t << "  </div>\n";
01705   }
01706   else 
01707   {
01708     t << "</ul>\n";
01709   }
01710 }
01711 
01712 static void startQuickIndexItem(QTextStream &t,const char *l,
01713                                 bool hl,bool /*compact*/,
01714                                 const QCString &relPath)
01715 {
01716   t << "      <li"; if (hl) t << " class=\"current\"";
01717   t << "><a ";
01718   t << "href=\"" << relPath << l << "\">";
01719   t << "<span>";
01720 }
01721 
01722 static void endQuickIndexItem(QTextStream &t)
01723 {
01724   t << "</span>";
01725   t << "</a>";
01726   t << "</li>\n";
01727 }
01728 
01729 static QCString fixSpaces(const QCString &s)
01730 {
01731   return substitute(s," ","&nbsp;");
01732 }
01733 
01734 static void writeNamespaceSubIndex(QTextStream &t,bool compact,
01735                                   HighlightedItem hli,const QCString &relPath
01736                                  )
01737 {
01738   bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
01739   startQuickIndexList(t,compact);
01740   if (documentedNamespaces>0)
01741   {
01742     startQuickIndexItem(t,"namespaces"+Doxygen::htmlFileExtension,
01743         hli==HLI_Namespaces,compact,relPath);
01744     if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
01745     {
01746       t << fixSpaces(theTranslator->trPackages());
01747     }
01748     else if(fortranOpt)
01749     {
01750       t << theTranslator->trModulesList();
01751     }
01752       else
01753     {
01754       t << theTranslator->trNamespaceList();
01755     }
01756     endQuickIndexItem(t);
01757   }
01758   if (documentedNamespaceMembers[NMHL_All]>0)
01759   {
01760     startQuickIndexItem(t,"namespacemembers"+Doxygen::htmlFileExtension,
01761         hli==HLI_NamespaceMembers,compact,relPath);
01762     if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
01763     {
01764       t << fixSpaces(theTranslator->trPackageMembers());
01765     }
01766     else if(fortranOpt)
01767     {
01768       t << fixSpaces(theTranslator->trModulesMembers());
01769     }
01770       else
01771     {
01772       t << fixSpaces(theTranslator->trNamespaceMembers());
01773     }
01774     endQuickIndexItem(t);
01775   }
01776   endQuickIndexList(t,compact);
01777 }
01778 
01779 static void writeClassSubIndex(QTextStream &t,bool compact,
01780                                HighlightedItem hli,const QCString &relPath
01781                               )
01782 {
01783   bool fortranOpt=Config_getBool("OPTIMIZE_FOR_FORTRAN");
01784   bool vhdlOpt=Config_getBool("OPTIMIZE_OUTPUT_VHDL");
01785   startQuickIndexList(t,compact);
01786   if (annotatedClasses>0)
01787   {
01788     if (Config_getBool("ALPHABETICAL_INDEX"))
01789     {
01790       startQuickIndexItem(t,"classes"+Doxygen::htmlFileExtension,
01791           hli==HLI_Classes,compact,relPath);
01792       t << fixSpaces(theTranslator->trAlphabeticalList());
01793       endQuickIndexItem(t);
01794     }
01795     startQuickIndexItem(t,"annotated"+Doxygen::htmlFileExtension,
01796         hli==HLI_Annotated,compact,relPath);
01797       if (fortranOpt)
01798       {
01799         t << fixSpaces(theTranslator->trCompoundListFortran());
01800       }
01801       else if (vhdlOpt)
01802       {
01803         t << fixSpaces(VhdlDocGen::trDesignUnitList());
01804       }
01805       else
01806       {
01807         t << fixSpaces(theTranslator->trCompoundList());
01808       }
01809     
01810     endQuickIndexItem(t);
01811   } 
01812   if (hierarchyClasses>0)
01813   {
01814     QCString title = theTranslator->trClassHierarchy();
01815     if (vhdlOpt) title = VhdlDocGen::trDesignUnitHierarchy();
01816     startQuickIndexItem(t,"hierarchy"+Doxygen::htmlFileExtension,
01817         hli==HLI_Hierarchy,compact,relPath);
01818     t << fixSpaces(title);
01819     endQuickIndexItem(t);
01820   } 
01821   if (documentedClassMembers[CMHL_All]>0)
01822   {
01823     startQuickIndexItem(t,"functions"+Doxygen::htmlFileExtension,
01824         hli==HLI_Functions,compact,relPath);
01825     if (fortranOpt)
01826     {
01827       t << fixSpaces(theTranslator->trCompoundMembersFortran());
01828     }
01829     else if (vhdlOpt)
01830     {
01831       t << fixSpaces(VhdlDocGen::trDesignUnitMembers());
01832     }
01833     else
01834     {
01835       t << fixSpaces(theTranslator->trCompoundMembers());
01836     }
01837     endQuickIndexItem(t);
01838   } 
01839   endQuickIndexList(t,compact);
01840 }
01841 
01842 static void writeFileSubIndex(QTextStream &t,bool compact,
01843                               HighlightedItem hli,const QCString &relPath)
01844 {
01845   startQuickIndexList(t,compact);
01846   if (documentedHtmlFiles>0)
01847   {
01848     startQuickIndexItem(t,"files"+Doxygen::htmlFileExtension,
01849         hli==HLI_Files,compact,relPath);
01850     t << fixSpaces(theTranslator->trFileList());
01851     endQuickIndexItem(t);
01852   } 
01853   if (documentedFileMembers[FMHL_All]>0)
01854   {
01855     startQuickIndexItem(t,"globals"+Doxygen::htmlFileExtension,
01856         hli==HLI_Globals,compact,relPath);
01857     t << fixSpaces(theTranslator->trFileMembers());
01858     endQuickIndexItem(t);
01859   } 
01860   endQuickIndexList(t,compact);
01861 }
01862 
01863 static void writeDefaultQuickLinks(QTextStream &t,bool compact,
01864                                    HighlightedItem hli,const QCString &relPath)
01865 {
01866   bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
01867   bool vhdlOpt    = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
01868   startQuickIndexList(t,compact);
01869 
01870   if (Config_getBool("GENERATE_TREEVIEW"))
01871   {
01872     startQuickIndexItem(t,"main"+Doxygen::htmlFileExtension,
01873                         hli==HLI_Main,compact,relPath);
01874   }
01875   else
01876   {
01877     startQuickIndexItem(t,"index"+Doxygen::htmlFileExtension,
01878                         hli==HLI_Main,compact,relPath);
01879   }
01880   t << fixSpaces(theTranslator->trMainPage());
01881   endQuickIndexItem(t);
01882 
01883   // -------------- Related pages
01884   
01885   if (indexedPages>0)
01886   {
01887     startQuickIndexItem(t,"pages"+Doxygen::htmlFileExtension,
01888                         hli==HLI_Pages,compact,relPath);
01889     t << fixSpaces(theTranslator->trRelatedPages());
01890     endQuickIndexItem(t);
01891   } 
01892 
01893   // --------------- Modules
01894 
01895   if (documentedGroups>0)
01896   {
01897     startQuickIndexItem(t,"modules"+Doxygen::htmlFileExtension,
01898                         hli==HLI_Modules,compact,relPath);
01899     t << fixSpaces(theTranslator->trModules());
01900     endQuickIndexItem(t);
01901   } 
01902 
01903   // --------------- Namespace indices
01904 
01905   if (documentedNamespaces>0)
01906   {
01907     startQuickIndexItem(t,"namespaces"+Doxygen::htmlFileExtension,
01908         hli==HLI_Namespaces || hli==HLI_NamespaceMembers || hli==HLI_NamespaceVisible,
01909         compact,relPath);
01910     if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
01911     {
01912       t << fixSpaces(theTranslator->trPackages());
01913     }
01914     else if (fortranOpt)
01915     {
01916       t << theTranslator->trModules();
01917     }
01918     else
01919     {
01920       t << theTranslator->trNamespaces();
01921     }
01922     endQuickIndexItem(t);
01923     if (!compact)
01924     {
01925       writeNamespaceSubIndex(t,compact,hli,relPath);
01926     }
01927   }
01928 
01929 
01930   // -------------- Class indices
01931 
01932   if (annotatedClasses>0)
01933   {
01934     static bool alphaIndex=Config_getBool("ALPHABETICAL_INDEX");
01935     {
01936       startQuickIndexItem(t,QCString(alphaIndex?"classes":"annotated")+Doxygen::htmlFileExtension,
01937           hli==HLI_Hierarchy || hli==HLI_Classes || 
01938           hli==HLI_Annotated || hli==HLI_Functions || hli==HLI_ClassVisible,
01939           compact,relPath);
01940     }
01941     if (fortranOpt)
01942     {
01943       t << fixSpaces(theTranslator->trDataTypes());
01944     }
01945     else if (vhdlOpt)
01946     {
01947       t << fixSpaces(VhdlDocGen::trDesignUnits());
01948     }
01949     else
01950     {
01951       t << fixSpaces(theTranslator->trClasses());
01952     }
01953     endQuickIndexItem(t);
01954     if (!compact)
01955     {
01956       writeClassSubIndex(t,compact,hli,relPath);
01957     }
01958   }
01959 
01960 
01961   // -------------- File
01962 
01963   if (documentedHtmlFiles>0)
01964   {
01965     startQuickIndexItem(t,"files"+Doxygen::htmlFileExtension,
01966                         hli==HLI_Files || hli==HLI_Globals || hli==HLI_FileVisible,
01967                         compact,relPath);
01968     t << fixSpaces(theTranslator->trFile(TRUE,FALSE));
01969     endQuickIndexItem(t);
01970     if (!compact)
01971     {
01972       writeFileSubIndex(t,compact,hli,relPath);
01973     }
01974   } 
01975 
01976   // -------------- Directories
01977   
01978   if (Config_getBool("SHOW_DIRECTORIES") && documentedDirs>0)
01979   {
01980     startQuickIndexItem(t,"dirs"+Doxygen::htmlFileExtension,
01981                         hli==HLI_Directories,compact,relPath);
01982     t << fixSpaces(theTranslator->trDirectories());
01983     endQuickIndexItem(t);
01984   } 
01985 
01986   // -------------- Examples
01987   
01988   if (Doxygen::exampleSDict->count()>0)
01989   {
01990     startQuickIndexItem(t,"examples"+Doxygen::htmlFileExtension,
01991                         hli==HLI_Examples,compact,relPath);
01992     t << fixSpaces(theTranslator->trExamples());
01993     endQuickIndexItem(t);
01994   } 
01995 
01996   // -------------- Search field
01997 
01998   if (Config_getBool("SEARCHENGINE"))
01999   {
02000     QCString searchFor = fixSpaces(theTranslator->trSearchForIndex());
02001     if (searchFor.at(0)=='S') searchFor="<u>S</u>"+searchFor.mid(1);
02002     t << "    <li>\n";
02003     t << "      <form action=\"" << relPath << "search.php\" method=\"get\">\n";
02004     t << "        <table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n";
02005     t << "          <tr>\n";
02006     t << "            <td><label>&nbsp;" << searchFor << "&nbsp;</label></td>\n";
02007     if (hli!=HLI_Search)
02008     {
02009       t << "            <td><input type=\"text\" name=\"query\" value=\"\" size=\"20\" accesskey=\"s\"/></td>\n";
02010       t << "          </tr>\n";
02011       t << "        </table>\n";
02012       t << "      </form>\n";
02013       t << "    </li>\n";
02014     }
02015   } 
02016   if (hli!=HLI_Search) // on the search page the page will be ended by the
02017                        // page itself
02018   {
02019     endQuickIndexList(t,compact);
02020   }
02021 
02022   //-------------------------------------------------------------------------
02023   // write sub indices in compact mode
02024 
02025   if ((hli==HLI_Namespaces || hli==HLI_NamespaceMembers || 
02026        hli==HLI_NamespaceVisible
02027       ) && 
02028       documentedNamespaces>0 &&
02029       documentedNamespaceMembers[NMHL_All]>0)
02030   {
02031     writeNamespaceSubIndex(t,compact,hli,relPath);
02032   }
02033   else if ((hli==HLI_Hierarchy || hli==HLI_Classes || 
02034             hli==HLI_Annotated || hli==HLI_Functions || 
02035             hli==HLI_ClassVisible || !compact
02036            ) && annotatedClasses>0
02037           )
02038   {
02039     writeClassSubIndex(t,compact,hli,relPath);
02040   }
02041   else if ((hli==HLI_Files || hli==HLI_Globals || 
02042             hli==HLI_FileVisible || !compact
02043            ) && documentedHtmlFiles>0 && documentedFileMembers[FMHL_All]>0
02044           )
02045   {
02046     writeFileSubIndex(t,compact,hli,relPath);
02047   }
02048   
02049 }
02050 
02051 void HtmlGenerator::startQuickIndices()
02052 {
02053   if (!Config_getBool("DISABLE_INDEX"))
02054   {
02055     t << "<div class=\"navigation\" id=\"top\">" << endl;
02056   }
02057 }
02058 
02059 void HtmlGenerator::endQuickIndices()
02060 {
02061   if (!Config_getBool("DISABLE_INDEX"))
02062   {
02063     t << "</div>" << endl;
02064   }
02065 }
02066 
02067 void HtmlGenerator::startContents()
02068 {
02069   t << "<div class=\"contents\">" << endl;
02070 }
02071 
02072 void HtmlGenerator::endContents()
02073 {
02074   t << "</div>" << endl;
02075 }
02076 
02077 void HtmlGenerator::writeQuickLinks(bool compact,HighlightedItem hli)
02078 {
02079   writeDefaultQuickLinks(t,compact,hli,relPath);
02080 }
02081 
02082 void HtmlGenerator::writeSearchPage()
02083 {
02084   if (Config_getBool("SEARCHENGINE") && Config_getBool("GENERATE_HTML"))
02085   {
02086     QCString fileName = Config_getString("HTML_OUTPUT")+"/search.php";
02087     QFile f(fileName);
02088     if (f.open(IO_WriteOnly))
02089     {
02090       QTextStream t(&f);
02091       t.setEncoding(QTextStream::UnicodeUTF8);
02092       if (g_header.isEmpty()) 
02093       {
02094         writeDefaultHeaderFile(t,theTranslator->trSearch().data(),0,FALSE);
02095       }
02096       else
02097       {
02098         t << substituteKeywords(g_header,"Search","");
02099       }
02100       t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen " 
02101         << versionString << " -->" << endl;
02102       if (!Config_getBool("DISABLE_INDEX")) 
02103       { 
02104         writeDefaultQuickLinks(t,TRUE,HLI_Search,"");
02105       }
02106       else
02107       {
02108         t << "&nbsp;\n<div class=\"qindex\">\n";
02109         t << "  <form class=\"search\" action=\"search.php\" "
02110           << "method=\"get\">\n";
02111       }
02112 
02113       t << "\n<?php\n\n";
02114       t << "function search_results()\n";
02115       t << "{\n";
02116       t << "  return \"" << theTranslator->trSearchResultsTitle() << "\";\n";
02117       t << "}\n";
02118       t << "\n";
02119       t << "function matches_text($num)\n";
02120       t << "{\n";
02121       t << "  if ($num==0)\n";
02122       t << "  {\n";
02123       t << "    return \"" << theTranslator->trSearchResults(0) << "\";\n";
02124       t << "  }\n";
02125       t << "  else if ($num==1)\n";
02126       t << "  {\n";
02127       t << "    return \"" << theTranslator->trSearchResults(1) << "\";\n";
02128       t << "  }\n";
02129       t << "  else // $num>1\n";
02130       t << "  {\n";
02131       t << "    return \"" << theTranslator->trSearchResults(2) << "\";\n";
02132       t << "  }\n";
02133       t << "}\n";
02134       t << "\n";
02135       t << "function report_matches()\n";
02136       t << "{\n";
02137       t << "  return \"" << theTranslator->trSearchMatches() << " \";\n";
02138       t << "}\n";
02139       t << "function end_form($value)\n";
02140       t << "{\n";
02141       t << "  echo \"" 
02142         << "            <td><input type=\\\"text\\\" name=\\\"query\\\" value=\\\"$value\\\" size=\\\"20\\\" accesskey=\\\"s\\\"/></td>\\n"
02143         << "          </tr>\\n"
02144         << "        </table>\\n"
02145         << "      </form>\\n"
02146         << "    </li>\\n"
02147         << "  </ul>\\n"
02148         << "</div>\\n"
02149         << "\";\n";
02150       t << "}\n";
02151       t << "\n";
02152       t << search_script;
02153       t << "\n";
02154       t << "?>\n";
02155       writePageFooter(t,"Search","");
02156     }
02157   }
02158 }
02159 
02160 void HtmlGenerator::generateSectionImages()
02161 {
02162   {
02163     QCString fileName = Config_getString("HTML_OUTPUT")+"/open.gif";
02164     QFile f(fileName);
02165     if (f.open(IO_WriteOnly))
02166     {
02167       f.writeBlock((char*)open_gif,open_gif_len);
02168     }
02169   }
02170   {
02171     QCString fileName = Config_getString("HTML_OUTPUT")+"/closed.gif";
02172     QFile f(fileName);
02173     if (f.open(IO_WriteOnly))
02174     {
02175       f.writeBlock((char*)closed_gif,closed_gif_len);
02176     }
02177   }
02178 }
02179 
02180 void HtmlGenerator::startConstraintList(const char *header)
02181 {
02182   t << "<div class=\"typeconstraint\">" << endl;
02183   t << "<dl compact><dt><b>" << header << "</b><dt><dd>" << endl;
02184   t << "<table border=\"0\" cellspacing=\"2\" cellpadding=\"0\">" << endl;
02185 }
02186 
02187 void HtmlGenerator::startConstraintParam()
02188 {
02189   t << "<tr><td valign=\"top\"><em>";
02190 }
02191 
02192 void HtmlGenerator::endConstraintParam()
02193 {
02194   t << "</em></td>";
02195 }
02196 
02197 void HtmlGenerator::startConstraintType()
02198 {
02199   t << "<td>&nbsp;:</td><td valign=\"top\"><em>";
02200 }
02201 
02202 void HtmlGenerator::endConstraintType()
02203 {
02204   t << "</em></td>";
02205 }
02206 
02207 void HtmlGenerator::startConstraintDocs()
02208 {
02209   t << "<td>&nbsp;";
02210 }
02211 
02212 void HtmlGenerator::endConstraintDocs()
02213 {
02214   t << "</td></tr>" << endl;
02215 }
02216 
02217 void HtmlGenerator::endConstraintList()
02218 {
02219   t << "</table>" << endl;
02220   t << "</dl>" << endl;
02221   t << "</div>" << endl;
02222 }
02223 
02224 



Generated on Mon Mar 31 10:58:39 2008 by  doxygen 1.5.1