Orb/Doxygen/src/ftvhelp.cpp
changeset 0 42188c7ea2d9
child 4 468f4c8d3d5b
equal deleted inserted replaced
-1:000000000000 0:42188c7ea2d9
       
     1 /******************************************************************************
       
     2  * ftvhelp.cpp,v 1.0 2000/09/06 16:09:00
       
     3  *
       
     4  * Copyright (C) 1997-2008 by Dimitri van Heesch.
       
     5  *
       
     6  * Permission to use, copy, modify, and distribute this software and its
       
     7  * documentation under the terms of the GNU General Public License is hereby 
       
     8  * granted. No representations are made about the suitability of this software 
       
     9  * for any purpose. It is provided "as is" without express or implied warranty.
       
    10  * See the GNU General Public License for more details.
       
    11  *
       
    12  * Documents produced by Doxygen are derivative works derived from the
       
    13  * input used in their production; they are not affected by this license.
       
    14  *
       
    15  * Contributed by Kenney Wong <kwong@ea.com>
       
    16  * Modified by Dimitri van Heesch
       
    17  *
       
    18  * Folder Tree View for offline help on browsers that do not support HTML Help.
       
    19  */
       
    20 
       
    21 #include <stdio.h>
       
    22 #include <stdlib.h>
       
    23 #include <qlist.h>
       
    24 #include <qdict.h>
       
    25 #include <qfileinfo.h>
       
    26 
       
    27 #include "ftvhelp.h"
       
    28 #include "config.h"
       
    29 #include "message.h"
       
    30 #include "doxygen.h"
       
    31 #include "language.h"
       
    32 #include "htmlgen.h"
       
    33 
       
    34 #define MAX_INDENT 1024
       
    35 
       
    36 unsigned char ftv2blank_png[] = {
       
    37   0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
       
    38   0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x16,
       
    39   0x01, 0x00, 0x00, 0x00, 0x01, 0x96, 0xd6, 0x11, 0x47, 0x00, 0x00, 0x00,
       
    40   0x02, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x01, 0x01, 0x94, 0xfd, 0xae, 0x00,
       
    41   0x00, 0x00, 0x16, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77,
       
    42   0x61, 0x72, 0x65, 0x00, 0x67, 0x69, 0x66, 0x32, 0x70, 0x6e, 0x67, 0x20,
       
    43   0x32, 0x2e, 0x34, 0x2e, 0x32, 0xa3, 0x5e, 0x47, 0x0e, 0x00, 0x00, 0x00,
       
    44   0x25, 0x74, 0x45, 0x58, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74,
       
    45   0x00, 0x55, 0x6c, 0x65, 0x61, 0x64, 0x20, 0x47, 0x49, 0x46, 0x20, 0x53,
       
    46   0x6d, 0x61, 0x72, 0x74, 0x53, 0x61, 0x76, 0x65, 0x72, 0x20, 0x56, 0x65,
       
    47   0x72, 0x20, 0x32, 0x2e, 0x30, 0x21, 0xf8, 0xd7, 0x5e, 0x53, 0x00, 0x00,
       
    48   0x00, 0x14, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x38, 0xc0, 0x80,
       
    49   0x80, 0x1f, 0x30, 0xe0, 0x7f, 0x42, 0x90, 0x00, 0x02, 0x00, 0x78, 0x3c,
       
    50   0x32, 0xcb, 0x72, 0x8f, 0x7c, 0x12, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45,
       
    51   0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
       
    52 };
       
    53 
       
    54 unsigned char ftv2doc_png[] = {
       
    55   0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
       
    56   0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x16,
       
    57   0x04, 0x03, 0x00, 0x00, 0x01, 0x5f, 0x54, 0x71, 0x2d, 0x00, 0x00, 0x00,
       
    58   0x15, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xff,
       
    59   0xff, 0xff, 0xc0, 0xc0, 0xc0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00,
       
    60   0x00, 0xff, 0xb3, 0xbd, 0xfb, 0xc8, 0x00, 0x00, 0x00, 0x01, 0x74, 0x52,
       
    61   0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, 0x00, 0x16, 0x74,
       
    62   0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00,
       
    63   0x67, 0x69, 0x66, 0x32, 0x70, 0x6e, 0x67, 0x20, 0x32, 0x2e, 0x34, 0x2e,
       
    64   0x32, 0xa3, 0x5e, 0x47, 0x0e, 0x00, 0x00, 0x00, 0x76, 0x49, 0x44, 0x41,
       
    65   0x54, 0x78, 0xda, 0x63, 0x60, 0x60, 0x60, 0x60, 0x63, 0x60, 0x60, 0x64,
       
    66   0x00, 0x01, 0x27, 0x30, 0x62, 0x71, 0x01, 0xe2, 0x24, 0x06, 0x38, 0x60,
       
    67   0x71, 0x00, 0xca, 0x27, 0x33, 0x30, 0x30, 0x01, 0x31, 0xa3, 0x32, 0x03,
       
    68   0x0a, 0x70, 0x54, 0x32, 0x01, 0x53, 0x69, 0x60, 0x71, 0x27, 0x08, 0x15,
       
    69   0x1a, 0x1a, 0xca, 0x80, 0x01, 0x5c, 0x5c, 0xc0, 0x94, 0xa2, 0x90, 0x02,
       
    70   0x88, 0x52, 0x4b, 0x52, 0x05, 0x53, 0x69, 0xc8, 0x94, 0x18, 0x84, 0x52,
       
    71   0x52, 0x12, 0xc5, 0x69, 0x0a, 0x36, 0xe0, 0xa4, 0xa4, 0xa4, 0x68, 0x82,
       
    72   0xc4, 0x51, 0x82, 0x6b, 0x04, 0x71, 0x14, 0x4d, 0x61, 0x4e, 0x55, 0x04,
       
    73   0xf2, 0x60, 0x1c, 0x27, 0x45, 0x24, 0x19, 0x90, 0x01, 0x70, 0x19, 0x67,
       
    74   0x63, 0x20, 0x30, 0xc5, 0x6f, 0x23, 0x00, 0xf5, 0xd0, 0x11, 0xe0, 0x55,
       
    75   0x83, 0x47, 0xbd, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae,
       
    76   0x42, 0x60, 0x82
       
    77 };
       
    78 
       
    79 unsigned char ftv2folderclosed_png[] = {
       
    80   0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
       
    81   0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x16,
       
    82   0x04, 0x03, 0x00, 0x00, 0x01, 0x5f, 0x54, 0x71, 0x2d, 0x00, 0x00, 0x00,
       
    83   0x12, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0,
       
    84   0xc0, 0xc0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x42,
       
    85   0xee, 0x40, 0xe1, 0x00, 0x00, 0x00, 0x01, 0x74, 0x52, 0x4e, 0x53, 0x00,
       
    86   0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, 0x00, 0x16, 0x74, 0x45, 0x58, 0x74,
       
    87   0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, 0x67, 0x69, 0x66,
       
    88   0x32, 0x70, 0x6e, 0x67, 0x20, 0x32, 0x2e, 0x34, 0x2e, 0x32, 0xa3, 0x5e,
       
    89   0x47, 0x0e, 0x00, 0x00, 0x00, 0x7d, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda,
       
    90   0x8d, 0x8e, 0xc1, 0x0a, 0x84, 0x30, 0x10, 0x43, 0x23, 0x8c, 0x77, 0x0f,
       
    91   0xfb, 0x03, 0x42, 0xbd, 0x2b, 0xf8, 0x01, 0x65, 0x6d, 0xef, 0xa2, 0xcd,
       
    92   0xff, 0xff, 0x8a, 0x33, 0xad, 0xee, 0x5a, 0xf6, 0xb0, 0x06, 0xda, 0xf0,
       
    93   0x86, 0xa6, 0x13, 0x00, 0x88, 0x40, 0x03, 0x53, 0x02, 0x82, 0x9a, 0xd7,
       
    94   0x51, 0x42, 0x25, 0xae, 0x7a, 0x76, 0xa0, 0xed, 0xea, 0x79, 0x79, 0x17,
       
    95   0x49, 0x73, 0xe1, 0xf2, 0x32, 0x14, 0x8f, 0x5f, 0x49, 0xb9, 0xed, 0x23,
       
    96   0x60, 0x20, 0xcd, 0x36, 0x66, 0xe4, 0x40, 0x4b, 0xb4, 0xdb, 0xdb, 0xe5,
       
    97   0x16, 0xee, 0x16, 0x78, 0x20, 0xf9, 0x96, 0x15, 0x6d, 0xc2, 0x8b, 0xa2,
       
    98   0x6e, 0xf9, 0x50, 0x64, 0xa6, 0x70, 0xb6, 0x50, 0x0a, 0xd3, 0x78, 0x86,
       
    99   0x98, 0xa6, 0xde, 0x5d, 0x9d, 0x25, 0xcd, 0xfe, 0xdf, 0xc6, 0x03, 0xa0,
       
   100   0x13, 0x15, 0x98, 0x60, 0xbd, 0x81, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x49,
       
   101   0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
       
   102 };
       
   103 
       
   104 unsigned char ftv2folderopen_png[] = {
       
   105   0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
       
   106   0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x16,
       
   107   0x04, 0x03, 0x00, 0x00, 0x01, 0x5f, 0x54, 0x71, 0x2d, 0x00, 0x00, 0x00,
       
   108   0x15, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xff,
       
   109   0xff, 0xff, 0xc0, 0xc0, 0xc0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80,
       
   110   0x00, 0x80, 0x92, 0x32, 0x8c, 0xe5, 0x00, 0x00, 0x00, 0x01, 0x74, 0x52,
       
   111   0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, 0x00, 0x16, 0x74,
       
   112   0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00,
       
   113   0x67, 0x69, 0x66, 0x32, 0x70, 0x6e, 0x67, 0x20, 0x32, 0x2e, 0x34, 0x2e,
       
   114   0x32, 0xa3, 0x5e, 0x47, 0x0e, 0x00, 0x00, 0x00, 0x7c, 0x49, 0x44, 0x41,
       
   115   0x54, 0x78, 0xda, 0x85, 0x8d, 0x41, 0x0e, 0x82, 0x30, 0x10, 0x45, 0x5f,
       
   116   0x08, 0xf5, 0x1e, 0x2d, 0x53, 0xd6, 0xc6, 0x18, 0xd7, 0x8d, 0x18, 0xd7,
       
   117   0x06, 0xd2, 0x1e, 0xa0, 0xb1, 0xde, 0xff, 0x08, 0x3a, 0x20, 0x21, 0x10,
       
   118   0xa2, 0x6f, 0xf3, 0xfe, 0xff, 0x8b, 0x19, 0x80, 0x0a, 0x6a, 0x14, 0x81,
       
   119   0x3c, 0x06, 0x2a, 0x61, 0xc5, 0xd3, 0x43, 0x69, 0xc1, 0xb4, 0xab, 0xf9,
       
   120   0x70, 0xac, 0x83, 0xca, 0xbb, 0xfb, 0xa4, 0x8b, 0xae, 0x26, 0x46, 0xb6,
       
   121   0x4c, 0x0f, 0xe8, 0xc3, 0x18, 0xfa, 0xb3, 0x7d, 0xa8, 0x1a, 0xeb, 0x17,
       
   122   0xa5, 0x46, 0x54, 0x46, 0x4e, 0x2a, 0xe2, 0xce, 0x95, 0x3d, 0xba, 0xb0,
       
   123   0x64, 0x93, 0x85, 0x9b, 0x0b, 0x73, 0x71, 0x83, 0x75, 0xd7, 0xf2, 0xa7,
       
   124   0x90, 0xf2, 0x20, 0x9d, 0xfb, 0x16, 0xd2, 0xeb, 0x43, 0xf9, 0xfd, 0xf2,
       
   125   0x0d, 0xa4, 0x29, 0x14, 0xcb, 0xda, 0x47, 0xac, 0x44, 0x00, 0x00, 0x00,
       
   126   0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
       
   127 };
       
   128 
       
   129 unsigned char ftv2lastnode_png[] = {
       
   130   0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
       
   131   0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x16,
       
   132   0x04, 0x03, 0x00, 0x00, 0x01, 0x4c, 0x83, 0x31, 0xd9, 0x00, 0x00, 0x00,
       
   133   0x30, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
       
   134   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
       
   135   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
       
   136   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
       
   137   0x00, 0x00, 0x80, 0x80, 0x80, 0x18, 0xd3, 0xa0, 0x90, 0x00, 0x00, 0x00,
       
   138   0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00,
       
   139   0x00, 0x16, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61,
       
   140   0x72, 0x65, 0x00, 0x67, 0x69, 0x66, 0x32, 0x70, 0x6e, 0x67, 0x20, 0x32,
       
   141   0x2e, 0x34, 0x2e, 0x32, 0xa3, 0x5e, 0x47, 0x0e, 0x00, 0x00, 0x00, 0x26,
       
   142   0x74, 0x45, 0x58, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x00,
       
   143   0x55, 0x6c, 0x65, 0x61, 0x64, 0x20, 0x47, 0x49, 0x46, 0x20, 0x53, 0x6d,
       
   144   0x61, 0x72, 0x74, 0x53, 0x61, 0x76, 0x65, 0x72, 0x20, 0x56, 0x65, 0x72,
       
   145   0x20, 0x32, 0x2e, 0x30, 0x69, 0x01, 0x6f, 0x3f, 0xcd, 0x06, 0x00, 0x00,
       
   146   0x00, 0x13, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x60, 0x18, 0x30,
       
   147   0xc0, 0x4f, 0x0c, 0x03, 0x04, 0xc8, 0x33, 0x1e, 0x00, 0x24, 0xa7, 0x00,
       
   148   0x88, 0x10, 0xca, 0x33, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e,
       
   149   0x44, 0xae, 0x42, 0x60, 0x82
       
   150 };
       
   151 
       
   152 unsigned char ftv2link_png[] = {
       
   153   0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
       
   154   0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x16,
       
   155   0x04, 0x03, 0x00, 0x00, 0x01, 0x5f, 0x54, 0x71, 0x2d, 0x00, 0x00, 0x00,
       
   156   0x30, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, 0x00, 0x80, 0x00, 0xff,
       
   157   0xff, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xff, 0x00, 0x80, 0x80, 0x80,
       
   158   0x80, 0x80, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
       
   159   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
       
   160   0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x7e, 0x9b, 0x08, 0x00, 0x00, 0x00,
       
   161   0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00,
       
   162   0x00, 0x16, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61,
       
   163   0x72, 0x65, 0x00, 0x67, 0x69, 0x66, 0x32, 0x70, 0x6e, 0x67, 0x20, 0x32,
       
   164   0x2e, 0x34, 0x2e, 0x32, 0xa3, 0x5e, 0x47, 0x0e, 0x00, 0x00, 0x00, 0x26,
       
   165   0x74, 0x45, 0x58, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x00,
       
   166   0x55, 0x6c, 0x65, 0x61, 0x64, 0x20, 0x47, 0x49, 0x46, 0x20, 0x53, 0x6d,
       
   167   0x61, 0x72, 0x74, 0x53, 0x61, 0x76, 0x65, 0x72, 0x20, 0x56, 0x65, 0x72,
       
   168   0x20, 0x32, 0x2e, 0x30, 0x19, 0x02, 0xd9, 0x09, 0xe5, 0x4a, 0x00, 0x00,
       
   169   0x00, 0x90, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x7d, 0x8c, 0xb1, 0x0a,
       
   170   0xc2, 0x30, 0x14, 0x45, 0x6f, 0x33, 0xb4, 0x63, 0x7e, 0xa1, 0x53, 0x57,
       
   171   0x8b, 0x7e, 0x80, 0x6e, 0xae, 0x16, 0x5a, 0xb2, 0xbe, 0x3a, 0x64, 0x35,
       
   172   0xb8, 0x64, 0xec, 0x2f, 0x07, 0x05, 0x1d, 0x9f, 0x79, 0x8d, 0x21, 0x50,
       
   173   0xd0, 0x03, 0xc9, 0xcd, 0xe1, 0xbe, 0x17, 0x00, 0xa8, 0x00, 0x82, 0xe0,
       
   174   0x81, 0x66, 0x7d, 0xc0, 0x9e, 0x51, 0x70, 0x40, 0x1d, 0xcf, 0xad, 0x07,
       
   175   0x18, 0x1b, 0x74, 0x90, 0xdb, 0x1c, 0x62, 0x0f, 0xe2, 0x20, 0xc1, 0xcc,
       
   176   0x61, 0x3b, 0x06, 0x6a, 0xbb, 0x14, 0x3b, 0xe9, 0x68, 0xba, 0xac, 0x51,
       
   177   0x9d, 0x24, 0xec, 0xdc, 0x4b, 0x68, 0xed, 0xd2, 0x5e, 0x1b, 0x7e, 0xfd,
       
   178   0x92, 0xa8, 0x6d, 0x84, 0xb2, 0x28, 0x28, 0x38, 0xca, 0xd2, 0x4c, 0x46,
       
   179   0x2d, 0x59, 0xcc, 0x38, 0x5c, 0x8b, 0xcc, 0xe3, 0xfe, 0x2b, 0x71, 0xfa,
       
   180   0x79, 0xbc, 0x67, 0x79, 0x85, 0x07, 0x54, 0x69, 0xde, 0xde, 0x2f, 0xf8,
       
   181   0xcf, 0x07, 0x71, 0x95, 0x2b, 0xa1, 0x10, 0x78, 0xd0, 0xff, 0x00, 0x00,
       
   182   0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
       
   183 };
       
   184 
       
   185 unsigned char ftv2mlastnode_png[] = {
       
   186   0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
       
   187   0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x16,
       
   188   0x02, 0x03, 0x00, 0x00, 0x01, 0xc3, 0xc3, 0xc4, 0x79, 0x00, 0x00, 0x00,
       
   189   0x09, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, 0x80, 0x80, 0x80, 0x00,
       
   190   0x00, 0x00, 0x3c, 0x5e, 0xbb, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x74, 0x52,
       
   191   0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, 0x00, 0x16, 0x74,
       
   192   0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00,
       
   193   0x67, 0x69, 0x66, 0x32, 0x70, 0x6e, 0x67, 0x20, 0x32, 0x2e, 0x34, 0x2e,
       
   194   0x32, 0xa3, 0x5e, 0x47, 0x0e, 0x00, 0x00, 0x00, 0x23, 0x49, 0x44, 0x41,
       
   195   0x54, 0x78, 0xda, 0x63, 0x60, 0x20, 0x0b, 0x08, 0x08, 0x20, 0x10, 0x0a,
       
   196   0x60, 0x84, 0x11, 0x8c, 0xa1, 0xa1, 0x20, 0x06, 0x90, 0xc9, 0xa8, 0xb5,
       
   197   0x50, 0x10, 0xca, 0x02, 0x89, 0x61, 0x01, 0x00, 0x6d, 0x17, 0x02, 0xba,
       
   198   0xc0, 0xdc, 0x69, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44,
       
   199   0xae, 0x42, 0x60, 0x82
       
   200 };
       
   201 
       
   202 unsigned char ftv2mnode_png[] = {
       
   203   0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
       
   204   0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x16,
       
   205   0x04, 0x03, 0x00, 0x00, 0x01, 0x4c, 0x83, 0x31, 0xd9, 0x00, 0x00, 0x00,
       
   206   0x24, 0x50, 0x4c, 0x54, 0x45, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00,
       
   207   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
       
   208   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
       
   209   0x00, 0x00, 0x80, 0x80, 0x80, 0x53, 0xbe, 0x1e, 0x99, 0x00, 0x00, 0x00,
       
   210   0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00,
       
   211   0x00, 0x16, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61,
       
   212   0x72, 0x65, 0x00, 0x67, 0x69, 0x66, 0x32, 0x70, 0x6e, 0x67, 0x20, 0x32,
       
   213   0x2e, 0x34, 0x2e, 0x32, 0xa3, 0x5e, 0x47, 0x0e, 0x00, 0x00, 0x00, 0x2a,
       
   214   0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x60, 0xa0, 0x2e, 0xe0, 0x06,
       
   215   0x42, 0x74, 0x02, 0xa7, 0x52, 0x54, 0x06, 0xf7, 0x6e, 0x20, 0x80, 0xf1,
       
   216   0xc1, 0x62, 0xdc, 0x4c, 0x4a, 0x4a, 0xdc, 0xdc, 0xdc, 0xc8, 0x22, 0x30,
       
   217   0x35, 0x98, 0xda, 0xd1, 0x19, 0x00, 0xb7, 0x79, 0x07, 0x27, 0xaa, 0xf7,
       
   218   0x96, 0x03, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42,
       
   219   0x60, 0x82
       
   220 };
       
   221 
       
   222 unsigned char ftv2node_png[] = {
       
   223   0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
       
   224   0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x16,
       
   225   0x04, 0x03, 0x00, 0x00, 0x01, 0x4c, 0x83, 0x31, 0xd9, 0x00, 0x00, 0x00,
       
   226   0x30, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
       
   227   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
       
   228   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
       
   229   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
       
   230   0x00, 0x00, 0x80, 0x80, 0x80, 0x18, 0xd3, 0xa0, 0x90, 0x00, 0x00, 0x00,
       
   231   0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00,
       
   232   0x00, 0x16, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61,
       
   233   0x72, 0x65, 0x00, 0x67, 0x69, 0x66, 0x32, 0x70, 0x6e, 0x67, 0x20, 0x32,
       
   234   0x2e, 0x34, 0x2e, 0x32, 0xa3, 0x5e, 0x47, 0x0e, 0x00, 0x00, 0x00, 0x26,
       
   235   0x74, 0x45, 0x58, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x00,
       
   236   0x55, 0x6c, 0x65, 0x61, 0x64, 0x20, 0x47, 0x49, 0x46, 0x20, 0x53, 0x6d,
       
   237   0x61, 0x72, 0x74, 0x53, 0x61, 0x76, 0x65, 0x72, 0x20, 0x56, 0x65, 0x72,
       
   238   0x20, 0x32, 0x2e, 0x30, 0x69, 0x01, 0x6f, 0x3f, 0xcd, 0x06, 0x00, 0x00,
       
   239   0x00, 0x15, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x60, 0x18, 0x30,
       
   240   0xc0, 0x4f, 0x0c, 0x03, 0x04, 0x88, 0x56, 0x8c, 0xc2, 0x00, 0x00, 0x2e,
       
   241   0x52, 0x00, 0xe2, 0xfa, 0x45, 0x3a, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x49,
       
   242   0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
       
   243 };
       
   244 
       
   245 unsigned char ftv2plastnode_png[] = {
       
   246   0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
       
   247   0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x16,
       
   248   0x02, 0x03, 0x00, 0x00, 0x01, 0xc3, 0xc3, 0xc4, 0x79, 0x00, 0x00, 0x00,
       
   249   0x09, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, 0x80, 0x80, 0x80, 0x00,
       
   250   0x00, 0x00, 0x3c, 0x5e, 0xbb, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x74, 0x52,
       
   251   0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, 0x00, 0x16, 0x74,
       
   252   0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00,
       
   253   0x67, 0x69, 0x66, 0x32, 0x70, 0x6e, 0x67, 0x20, 0x32, 0x2e, 0x34, 0x2e,
       
   254   0x32, 0xa3, 0x5e, 0x47, 0x0e, 0x00, 0x00, 0x00, 0x28, 0x49, 0x44, 0x41,
       
   255   0x54, 0x78, 0xda, 0x63, 0x60, 0x20, 0x0b, 0x08, 0x08, 0x30, 0x08, 0x81,
       
   256   0x11, 0x90, 0x81, 0x02, 0x18, 0x61, 0x04, 0x63, 0x68, 0x28, 0x90, 0x60,
       
   257   0x02, 0x32, 0x19, 0xb5, 0x16, 0x0a, 0x42, 0x59, 0x20, 0x31, 0x2c, 0x00,
       
   258   0x00, 0x6e, 0xc1, 0x02, 0xc2, 0xe5, 0xed, 0x75, 0xa7, 0x00, 0x00, 0x00,
       
   259   0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
       
   260 };
       
   261 
       
   262 unsigned char ftv2pnode_png[] = {
       
   263   0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
       
   264   0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x16,
       
   265   0x04, 0x03, 0x00, 0x00, 0x01, 0x4c, 0x83, 0x31, 0xd9, 0x00, 0x00, 0x00,
       
   266   0x24, 0x50, 0x4c, 0x54, 0x45, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00,
       
   267   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
       
   268   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
       
   269   0x00, 0x00, 0x80, 0x80, 0x80, 0x53, 0xbe, 0x1e, 0x99, 0x00, 0x00, 0x00,
       
   270   0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00,
       
   271   0x00, 0x16, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61,
       
   272   0x72, 0x65, 0x00, 0x67, 0x69, 0x66, 0x32, 0x70, 0x6e, 0x67, 0x20, 0x32,
       
   273   0x2e, 0x34, 0x2e, 0x32, 0xa3, 0x5e, 0x47, 0x0e, 0x00, 0x00, 0x00, 0x30,
       
   274   0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x60, 0xa0, 0x2e, 0xe0, 0x06,
       
   275   0x42, 0x06, 0x6e, 0x26, 0x38, 0x01, 0xe2, 0xe2, 0x54, 0x8a, 0xca, 0xe0,
       
   276   0xde, 0x0d, 0x04, 0x10, 0x3e, 0x13, 0x44, 0x8c, 0x9b, 0x49, 0x49, 0x89,
       
   277   0x9b, 0x9b, 0x1b, 0x59, 0x04, 0xa6, 0x06, 0x53, 0x3b, 0x3a, 0x03, 0x00,
       
   278   0xba, 0x6b, 0x07, 0x2f, 0xaa, 0xcb, 0x1f, 0x6f, 0x00, 0x00, 0x00, 0x00,
       
   279   0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
       
   280 };
       
   281 
       
   282 unsigned char ftv2vertline_png[] = {
       
   283   0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
       
   284   0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x16,
       
   285   0x04, 0x03, 0x00, 0x00, 0x01, 0x4c, 0x83, 0x31, 0xd9, 0x00, 0x00, 0x00,
       
   286   0x30, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
       
   287   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
       
   288   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
       
   289   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
       
   290   0x00, 0x00, 0x80, 0x80, 0x80, 0x18, 0xd3, 0xa0, 0x90, 0x00, 0x00, 0x00,
       
   291   0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00,
       
   292   0x00, 0x16, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61,
       
   293   0x72, 0x65, 0x00, 0x67, 0x69, 0x66, 0x32, 0x70, 0x6e, 0x67, 0x20, 0x32,
       
   294   0x2e, 0x34, 0x2e, 0x32, 0xa3, 0x5e, 0x47, 0x0e, 0x00, 0x00, 0x00, 0x26,
       
   295   0x74, 0x45, 0x58, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x00,
       
   296   0x55, 0x6c, 0x65, 0x61, 0x64, 0x20, 0x47, 0x49, 0x46, 0x20, 0x53, 0x6d,
       
   297   0x61, 0x72, 0x74, 0x53, 0x61, 0x76, 0x65, 0x72, 0x20, 0x56, 0x65, 0x72,
       
   298   0x20, 0x32, 0x2e, 0x30, 0x69, 0x01, 0x6f, 0x3f, 0xcd, 0x06, 0x00, 0x00,
       
   299   0x00, 0x0f, 0x49, 0x44, 0x41, 0x54, 0x78, 0xda, 0x63, 0x60, 0x18, 0x30,
       
   300   0xc0, 0x4f, 0x5b, 0x06, 0x00, 0x21, 0x14, 0x00, 0xa6, 0xe5, 0x3c, 0xe8,
       
   301   0x3a, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60,
       
   302   0x82
       
   303 };
       
   304 
       
   305 
       
   306 FTVImageInfo image_info[] =
       
   307 {
       
   308   { "&#160;", "ftv2blank.png",ftv2blank_png,174,16,22 },
       
   309   { "*",  "ftv2doc.png",ftv2doc_png,255,24,22 },
       
   310   { "+",  "ftv2folderclosed.png",ftv2folderclosed_png,259,24,22 },
       
   311   { "-",  "ftv2folderopen.png",ftv2folderopen_png,261,24,22 },
       
   312   { "\\", "ftv2lastnode.png",ftv2lastnode_png,233,16,22 },
       
   313   { "-",  "ftv2link.png",ftv2link_png,358,24,22 },
       
   314   { "\\", "ftv2mlastnode.png",ftv2mlastnode_png,160,16,22 },
       
   315   { "o",  "ftv2mnode.png",ftv2mnode_png,194,16,22 },
       
   316   { "o",  "ftv2node.png",ftv2node_png,235,16,22 },
       
   317   { "\\", "ftv2plastnode.png",ftv2plastnode_png,165,16,22 },
       
   318   { "o",  "ftv2pnode.png",ftv2pnode_png,200,16,22 },
       
   319   { "|",  "ftv2vertline.png",ftv2vertline_png,229,16,22 },
       
   320   { 0,0,0,0,0,0 }
       
   321 };
       
   322 
       
   323 struct FTVNode
       
   324 {
       
   325   FTVNode(bool dir,const char *r,const char *f,const char *a,const char *n)
       
   326     : isLast(TRUE), isDir(dir),ref(r),file(f),anchor(a),name(n), 
       
   327       parent(0) { children.setAutoDelete(TRUE); }
       
   328   bool isLast;
       
   329   bool isDir;
       
   330   QCString ref;
       
   331   QCString file;
       
   332   QCString anchor;
       
   333   QCString name;
       
   334   QList<FTVNode> children;
       
   335   FTVNode *parent;
       
   336 };
       
   337 
       
   338 
       
   339 //----------------------------------------------------------------------------
       
   340 
       
   341 /*! Constructs an ftv help object. 
       
   342  *  The object has to be \link initialize() initialized\endlink before it can 
       
   343  *  be used.
       
   344  */
       
   345 FTVHelp::FTVHelp(bool TLI) 
       
   346 {
       
   347   /* initial depth */
       
   348   m_indentNodes = new QList<FTVNode>[MAX_INDENT];
       
   349   m_indentNodes[0].setAutoDelete(TRUE);
       
   350   m_indent=0;
       
   351   m_topLevelIndex = TLI;
       
   352 }
       
   353 
       
   354 FTVHelp::~FTVHelp()
       
   355 {
       
   356   delete[] m_indentNodes;
       
   357 }
       
   358 
       
   359 /*! This will create a folder tree view table of contents file (tree.js).
       
   360  *  \sa finalize()
       
   361  */
       
   362 void FTVHelp::initialize()
       
   363 {
       
   364 }
       
   365 
       
   366 /*! Finalizes the FTV help. This will finish and close the
       
   367  *  contents file (index.js).
       
   368  *  \sa initialize()
       
   369  */
       
   370 void FTVHelp::finalize()
       
   371 {
       
   372   generateTreeView();
       
   373 }
       
   374 
       
   375 /*! Increase the level of the contents hierarchy. 
       
   376  *  This will start a new sublist in contents file.
       
   377  *  \sa decContentsDepth()
       
   378  */
       
   379 void FTVHelp::incContentsDepth()
       
   380 {
       
   381   m_indent++;
       
   382   ASSERT(m_indent<MAX_INDENT);
       
   383 }
       
   384 
       
   385 /*! Decrease the level of the contents hierarchy.
       
   386  *  This will end the current sublist.
       
   387  *  \sa incContentsDepth()
       
   388  */
       
   389 void FTVHelp::decContentsDepth()
       
   390 {
       
   391   ASSERT(m_indent>0);
       
   392   if (m_indent>0)
       
   393   {
       
   394     m_indent--;
       
   395     QList<FTVNode> *nl = &m_indentNodes[m_indent];
       
   396     FTVNode *parent = nl->getLast();
       
   397     QList<FTVNode> *children = &m_indentNodes[m_indent+1];
       
   398     while (!children->isEmpty())
       
   399     {
       
   400       parent->children.append(children->take(0));
       
   401     }
       
   402   }
       
   403 }
       
   404 
       
   405 /*! Add a list item to the contents file.
       
   406  *  \param isDir TRUE if the item is a directory, FALSE if it is a text
       
   407  *  \param ref  the URL of to the item.
       
   408  *  \param file the file containing the definition of the item
       
   409  *  \param anchor the anchor within the file.
       
   410  *  \param name the name of the item.
       
   411  */
       
   412 void FTVHelp::addContentsItem(bool isDir,
       
   413                               const char *name,
       
   414                               const char *ref,
       
   415                               const char *file,
       
   416                               const char *anchor
       
   417                               )
       
   418 {
       
   419   QList<FTVNode> *nl = &m_indentNodes[m_indent];
       
   420   FTVNode *newNode = new FTVNode(isDir,ref,file,anchor,name);
       
   421   if (!nl->isEmpty())
       
   422   {
       
   423     nl->getLast()->isLast=FALSE;
       
   424   }
       
   425   nl->append(newNode);
       
   426   if (m_indent>0)
       
   427   {
       
   428     QList<FTVNode> *pnl = &m_indentNodes[m_indent-1];
       
   429     newNode->parent = pnl->getLast();
       
   430   }
       
   431   
       
   432 }
       
   433 
       
   434 static int folderId=1;
       
   435 
       
   436 void FTVHelp::generateIndent(QTextStream &t, FTVNode *n,int level)
       
   437 {
       
   438   if (n->parent)
       
   439   {
       
   440     generateIndent(t,n->parent,level+1);
       
   441   }
       
   442   // from the root up to node n do...
       
   443   if (level==0) // item before a dir or document
       
   444   {
       
   445     if (n->isLast)
       
   446     {
       
   447       if (n->isDir)
       
   448       {
       
   449         t << "<img " << FTV_IMGATTRIBS(plastnode) << "onclick=\"toggleFolder('folder" << folderId << "', this)\"/>";
       
   450       }
       
   451       else
       
   452       {
       
   453         t << "<img " << FTV_IMGATTRIBS(lastnode) << "/>";
       
   454       }
       
   455     }
       
   456     else
       
   457     {
       
   458       if (n->isDir)
       
   459       {
       
   460         t << "<img " << FTV_IMGATTRIBS(pnode) << "onclick=\"toggleFolder('folder" << folderId << "', this)\"/>";
       
   461       }
       
   462       else
       
   463       {
       
   464         t << "<img " << FTV_IMGATTRIBS(node) << "/>";
       
   465       }
       
   466     }
       
   467   }
       
   468   else // item at another level
       
   469   {
       
   470     if (n->isLast)
       
   471     {
       
   472       t << "<img " << FTV_IMGATTRIBS(blank) << "/>";
       
   473     }
       
   474     else
       
   475     {
       
   476       t << "<img " << FTV_IMGATTRIBS(vertline) << "/>";
       
   477     }
       
   478   }
       
   479 }
       
   480 
       
   481 void FTVHelp::generateLink(QTextStream &t,FTVNode *n)
       
   482 {
       
   483   QCString *dest;
       
   484   //printf("FTVHelp::generateLink(ref=%s,file=%s,anchor=%s\n",
       
   485   //    n->ref.data(),n->file.data(),n->anchor.data());
       
   486   if (n->file.isEmpty()) // no link
       
   487   {
       
   488     t << "<b>" << convertToHtml(n->name) << "</b>";
       
   489   }
       
   490   else // link into other frame
       
   491   {
       
   492     if (!n->ref.isEmpty()) // link to entity imported via tag file
       
   493     {
       
   494       t << "<a class=\"elRef\" ";
       
   495       t << "doxygen=\"" << n->ref << ":";
       
   496       if ((dest=Doxygen::tagDestinationDict[n->ref])) t << *dest << "/";
       
   497       t << "\" ";
       
   498     }
       
   499     else // local link
       
   500     {
       
   501       t << "<a class=\"el\" ";
       
   502     }
       
   503     t << "href=\"";
       
   504     if (!n->ref.isEmpty())
       
   505     {
       
   506       if ((dest=Doxygen::tagDestinationDict[n->ref])) t << *dest << "/";
       
   507     }
       
   508     t << n->file << Doxygen::htmlFileExtension;
       
   509     if (!n->anchor.isEmpty()) t << "#" << n->anchor;
       
   510     if (m_topLevelIndex)
       
   511       t << "\" target=\"basefrm\">";
       
   512     else
       
   513       t << "\" target=\"_self\">";
       
   514     t << convertToHtml(n->name);
       
   515     t << "</a>";
       
   516     if (!n->ref.isEmpty())
       
   517     {
       
   518       t << "&nbsp;[external]";
       
   519     }
       
   520   }
       
   521 }
       
   522 
       
   523 void FTVHelp::generateTree(QTextStream &t, const QList<FTVNode> &nl,int level)
       
   524 {
       
   525   QCString spaces;
       
   526   spaces.fill(' ',level*2+8);
       
   527   QListIterator<FTVNode> nli(nl);
       
   528   FTVNode *n;
       
   529   for (nli.toFirst();(n=nli.current());++nli)
       
   530   {
       
   531     t << spaces << "<p>";
       
   532     generateIndent(t,n,0);
       
   533     if (n->isDir)
       
   534     {
       
   535       t << "<img " << FTV_IMGATTRIBS(folderclosed) << "onclick=\"toggleFolder('folder" << folderId << "', this)\"/>";
       
   536       generateLink(t,n);
       
   537       t << "</p>\n";
       
   538       t << spaces << "<div id=\"folder" << folderId << "\">\n";
       
   539       folderId++;
       
   540       generateTree(t,n->children,level+1);
       
   541       t << spaces << "</div>\n";
       
   542     }
       
   543     else
       
   544     {
       
   545       t << "<img " << FTV_IMGATTRIBS(doc) << "/>";
       
   546       generateLink(t,n);
       
   547       t << "</p>\n";
       
   548     }
       
   549   }
       
   550 }
       
   551 
       
   552 void FTVHelp::generateTreeViewImages()
       
   553 {
       
   554   static bool done=FALSE;
       
   555   if (done) return;
       
   556   done=TRUE;
       
   557 
       
   558   // Generate tree view images
       
   559   FTVImageInfo *p = image_info;
       
   560   while (p->name)
       
   561   {
       
   562     QCString fileName=Config_getString("HTML_OUTPUT")+"/"+p->name;
       
   563     QFile f(fileName);
       
   564     if (f.open(IO_WriteOnly)) 
       
   565     {
       
   566       f.writeBlock((char *)p->data,p->len);
       
   567     }
       
   568     else
       
   569     {
       
   570       fprintf(stderr,"Warning: Cannot open file %s for writing\n",fileName.data());
       
   571     }
       
   572     f.close();
       
   573     p++;
       
   574   }
       
   575 } 
       
   576 
       
   577 void FTVHelp::generateTreeView(QString* OutString)
       
   578 {
       
   579   QCString fileName;
       
   580   QFile f;
       
   581   static bool searchEngine = Config_getBool("SEARCHENGINE");
       
   582   static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH");
       
   583   
       
   584   generateTreeViewImages();
       
   585   
       
   586   // If top level index, generate alternative index.html as a frame
       
   587   if (m_topLevelIndex)
       
   588   {
       
   589     fileName=Config_getString("HTML_OUTPUT")+"/index"+Doxygen::htmlFileExtension;
       
   590     f.setName(fileName);
       
   591     if (!f.open(IO_WriteOnly))
       
   592     {
       
   593       err("Cannot open file %s for writing!\n",fileName.data());
       
   594       return;
       
   595     }
       
   596     else
       
   597     {
       
   598       QTextStream t(&f);
       
   599 #if QT_VERSION >= 200
       
   600       t.setEncoding(QTextStream::UnicodeUTF8);
       
   601 #endif
       
   602       //t << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\">\n";
       
   603       t << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">\n";
       
   604       t << "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n";
       
   605       t << "<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n";
       
   606       t << "<title>"; 
       
   607       if (Config_getString("PROJECT_NAME").isEmpty())
       
   608       {
       
   609         t << "Doxygen Documentation";
       
   610       }
       
   611       else
       
   612       {
       
   613         t << Config_getString("PROJECT_NAME");
       
   614       }
       
   615       t << "</title>\n</head>" << endl;
       
   616       t << "<frameset cols=\"" << Config_getInt("TREEVIEW_WIDTH") << ",*\">" << endl;
       
   617       t << "  <frame src=\"tree" << Doxygen::htmlFileExtension << "\" name=\"treefrm\"/>" << endl;
       
   618       t << "  <frame src=\"main" << Doxygen::htmlFileExtension << "\" name=\"basefrm\"/>" << endl;
       
   619       t << "  <noframes>" << endl;
       
   620       t << "    <body>" << endl;
       
   621       t << "    <a href=\"main" << Doxygen::htmlFileExtension << "\">Frames are disabled. Click here to go to the main page.</a>" << endl;
       
   622       t << "    </body>" << endl;
       
   623       t << "  </noframes>" << endl;
       
   624       t << "</frameset>" << endl;
       
   625       t << "</html>" << endl;
       
   626       f.close();
       
   627     }
       
   628   }
       
   629 
       
   630   // Generate tree view
       
   631   if (!OutString)
       
   632     OutString = new QString;
       
   633   QTextOStream t(OutString);
       
   634   t.setEncoding(QTextStream::UnicodeUTF8);
       
   635 
       
   636   if (m_topLevelIndex)
       
   637   {
       
   638     if (searchEngine)
       
   639     {
       
   640       t << "<!-- This comment will put IE 6, 7 and 8 in quirks mode -->" << endl;
       
   641     }
       
   642     t << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
       
   643     t << "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n";
       
   644     t << "  <head>\n";
       
   645     t << "    <meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n";
       
   646     t << "    <meta http-equiv=\"Content-Style-Type\" content=\"text/css\" />\n";
       
   647     t << "    <meta http-equiv=\"Content-Language\" content=\"en\" />\n";
       
   648     if (searchEngine)
       
   649     {
       
   650       t << "    <link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>" << endl;
       
   651       t << "    <script type=\"text/javaScript\" src=\"search/search.js\"></script>" << endl;
       
   652     }
       
   653     t << "    <link rel=\"stylesheet\" href=\"";
       
   654     QCString cssname=Config_getString("HTML_STYLESHEET");
       
   655     if (cssname.isEmpty())
       
   656     {
       
   657       t << "doxygen.css";
       
   658     }
       
   659     else
       
   660     {
       
   661       QFileInfo cssfi(cssname);
       
   662       if (!cssfi.exists())
       
   663       {
       
   664         err("Error: user specified HTML style sheet file does not exist!\n");
       
   665       }
       
   666       t << cssfi.fileName();
       
   667     }
       
   668     t << "\"/>" << endl;
       
   669     t << "    <title>TreeView</title>\n";
       
   670   }
       
   671   t << "    <script type=\"text/javascript\">\n";
       
   672   t << "    <!-- // Hide script from old browsers\n";
       
   673   t << "    \n";
       
   674 
       
   675   /* User has clicked on a node (folder or +/-) in the tree */
       
   676   t << "    function toggleFolder(id, imageNode) \n";
       
   677   t << "    {\n";
       
   678   t << "      var folder = document.getElementById(id);\n";
       
   679   t << "      var l = imageNode.src.length;\n";
       
   680   /* If the user clicks on the book icon, we move left one image so 
       
   681    * the code (below) will also adjust the '+' icon. 
       
   682    */
       
   683   t << "      if (imageNode.src.substring(l-20,l)==\"" FTV_ICON_FILE(folderclosed) "\" || \n";
       
   684   t << "          imageNode.src.substring(l-18,l)==\"" FTV_ICON_FILE(folderopen)  "\")\n";
       
   685   t << "      {\n";
       
   686   t << "        imageNode = imageNode.previousSibling;\n";
       
   687   t << "        l = imageNode.src.length;\n";
       
   688   t << "      }\n";
       
   689   t << "      if (folder == null) \n";
       
   690   t << "      {\n";
       
   691   t << "      } \n";
       
   692   /* Node controls a open section, we need to close it */
       
   693   t << "      else if (folder.style.display == \"block\") \n";
       
   694   t << "      {\n";
       
   695   t << "        if (imageNode != null) \n";
       
   696   t << "        {\n";
       
   697   t << "          imageNode.nextSibling.src = \"" FTV_ICON_FILE(folderclosed) "\";\n";
       
   698   t << "          if (imageNode.src.substring(l-13,l) == \"" FTV_ICON_FILE(mnode) "\")\n";
       
   699   t << "          {\n";
       
   700   t << "            imageNode.src = \"" FTV_ICON_FILE(pnode) "\";\n";
       
   701   t << "          }\n";
       
   702   t << "          else if (imageNode.src.substring(l-17,l) == \"" FTV_ICON_FILE(mlastnode) "\")\n";
       
   703   t << "          {\n";
       
   704   t << "            imageNode.src = \"" FTV_ICON_FILE(plastnode) "\";\n";
       
   705   t << "          }\n";
       
   706   t << "        }\n";
       
   707   t << "        folder.style.display = \"none\";\n";
       
   708   t << "      } \n";
       
   709   t << "      else \n"; /* section is closed, we need to open it */
       
   710   t << "      {\n";
       
   711   t << "        if (imageNode != null) \n";
       
   712   t << "        {\n";
       
   713   t << "          imageNode.nextSibling.src = \"" FTV_ICON_FILE(folderopen) "\";\n";
       
   714   t << "          if (imageNode.src.substring(l-13,l) == \"" FTV_ICON_FILE(pnode) "\")\n";
       
   715   t << "          {\n";
       
   716   t << "            imageNode.src = \"" FTV_ICON_FILE(mnode) "\";\n";
       
   717   t << "          }\n";
       
   718   t << "          else if (imageNode.src.substring(l-17,l) == \"" FTV_ICON_FILE(plastnode) "\")\n";
       
   719   t << "          {\n";
       
   720   t << "            imageNode.src = \"" FTV_ICON_FILE(mlastnode) "\";\n";
       
   721   t << "          }\n";
       
   722   t << "        }\n";
       
   723   t << "        folder.style.display = \"block\";\n";
       
   724   t << "      }\n";
       
   725   t << "    }\n";
       
   726   t << "\n";
       
   727   t << "    // End script hiding -->        \n";
       
   728   t << "    </script>\n";
       
   729   if (m_topLevelIndex)
       
   730   {
       
   731     t << "  </head>\n";
       
   732     t << "\n";
       
   733     t << "  <body class=\"ftvtree\"";
       
   734     if (searchEngine && !serverBasedSearch)
       
   735     {
       
   736       t << " onload='searchBox.OnSelectItem(0);'";
       
   737     }
       
   738     t << ">\n";
       
   739     if (searchEngine)
       
   740     {
       
   741       t << "      <script type=\"text/javascript\"><!--\n";
       
   742       t << "      var searchBox = new SearchBox(\"searchBox\", \"search\", true, '" 
       
   743         << theTranslator->trSearch() << "');\n";
       
   744       t << "      --></script>\n";
       
   745       if (!serverBasedSearch)
       
   746       {
       
   747         t << "      <div id=\"MSearchBox\" class=\"MSearchBoxInactive\">\n";
       
   748         t << "      <div class=\"MSearchBoxRow\"><span class=\"MSearchBoxLeft\">\n";
       
   749         t << "      <a id=\"MSearchClose\" href=\"javascript:searchBox.CloseResultsWindow()\">"
       
   750           << "<img id=\"MSearchCloseImg\" border=\"0\" src=\"search/close.png\" alt=\"\"/></a>\n";
       
   751         t << "      <input type=\"text\" id=\"MSearchField\" value=\"" 
       
   752           << theTranslator->trSearch() << "\" accesskey=\"S\"\n";
       
   753         t << "           onfocus=\"searchBox.OnSearchFieldFocus(true)\" \n";
       
   754         t << "           onblur=\"searchBox.OnSearchFieldFocus(false)\" \n";
       
   755         t << "           onkeyup=\"searchBox.OnSearchFieldChange(event)\"/>\n";
       
   756         t << "      </span><span class=\"MSearchBoxRight\">\n";
       
   757         t << "      <img id=\"MSearchSelect\" src=\"search/search.png\"\n";
       
   758         t << "           onmouseover=\"return searchBox.OnSearchSelectShow()\"\n";
       
   759         t << "           onmouseout=\"return searchBox.OnSearchSelectHide()\"\n";
       
   760         t << "           alt=\"\"/>\n";
       
   761         t << "      </span></div><div class=\"MSearchBoxSpacer\">&nbsp;</div>\n";
       
   762         t << "      </div>\n";
       
   763         HtmlGenerator::writeSearchFooter(t,QCString());
       
   764       }
       
   765       else
       
   766       {
       
   767         t << "        <div id=\"MSearchBox\" class=\"MSearchBoxInactive\">\n";
       
   768         t << "            <form id=\"FSearchBox\" action=\"search.php\" method=\"get\" target=\"basefrm\">\n";
       
   769         t << "              <img id=\"MSearchSelect\" src=\"search/search.png\" alt=\"\"/>\n";
       
   770         t << "              <input type=\"text\" id=\"MSearchField\" name=\"query\" value=\""
       
   771           << theTranslator->trSearch() << "\" size=\"20\" accesskey=\"S\" \n";
       
   772         t << "                     onfocus=\"searchBox.OnSearchFieldFocus(true)\" \n";
       
   773         t << "                     onblur=\"searchBox.OnSearchFieldFocus(false)\"/>\n";
       
   774         t << "            </form>\n";
       
   775         t << "          <div class=\"MSearchBoxSpacer\">&nbsp;</div>\n";
       
   776         t << "        </div>\n";
       
   777       }
       
   778     }
       
   779     t << "    <div class=\"directory\">\n";
       
   780     t << "      <h3 class=\"swap\"><span>";
       
   781     QCString &projName = Config_getString("PROJECT_NAME");
       
   782     if (projName.isEmpty())
       
   783     {
       
   784       t << "Root";
       
   785     }
       
   786     else
       
   787     {
       
   788       t << projName;
       
   789     }
       
   790     t << "</span></h3>\n";
       
   791   }
       
   792   else
       
   793   {
       
   794     t << "    <div class=\"directory-alt\">\n";
       
   795     t << "      <br/>\n";
       
   796   }
       
   797   t << "      <div style=\"display: block;\">\n";
       
   798 
       
   799   generateTree(t,m_indentNodes[0],0);
       
   800 
       
   801   t << "      </div>\n";
       
   802   t << "    </div>\n";
       
   803   
       
   804   if (m_topLevelIndex)
       
   805   {
       
   806     t << "  </body>\n";
       
   807     t << "</html>\n";
       
   808   }
       
   809   
       
   810   if (m_topLevelIndex)
       
   811   {
       
   812     fileName=Config_getString("HTML_OUTPUT")+"/tree"+Doxygen::htmlFileExtension;
       
   813     f.setName(fileName);
       
   814     if (!f.open(IO_WriteOnly))
       
   815     {
       
   816       err("Cannot open file %s for writing!\n",fileName.data());
       
   817       return;
       
   818     }
       
   819     else
       
   820     {
       
   821       QTextStream t(&f);
       
   822       t.setEncoding(QTextStream::UnicodeUTF8);
       
   823       t << *OutString << endl;
       
   824       f.close();
       
   825     }
       
   826   }
       
   827 }
       
   828