Fix for UBSan build
[platform/upstream/doxygen.git] / src / ftvhelp.h
1 /******************************************************************************
2  *
3  * Copyright (C) 1997-2012 by Dimitri van Heesch.
4  *
5  * Permission to use, copy, modify, and distribute this software and its
6  * documentation under the terms of the GNU General Public License is hereby 
7  * granted. No representations are made about the suitability of this software 
8  * for any purpose. It is provided "as is" without express or implied warranty.
9  * See the GNU General Public License for more details.
10  *
11  * Documents produced by Doxygen are derivative works derived from the
12  * input used in their production; they are not affected by this license.
13  *
14  */
15
16 /******************************************************************************
17  * ftvhelp.h,v 1.0 2000/09/06 16:09:00
18  *
19  * Kenney Wong <kwong@ea.com>
20  *
21  * Folder Tree View for offline help on browsers that do not support HTML Help.
22  */
23
24 #ifndef FTVHELP_H
25 #define FTVHELP_H
26
27 #include "qtbc.h"
28 #include <qtextstream.h>
29 #include <qlist.h>
30 #include "index.h"
31
32 class QFile;
33 class Definition;
34 struct FTVNode;
35 class FTextStream;
36
37 /** A class that generates a dynamic tree view side panel.
38  */
39 class FTVHelp : public IndexIntf
40 {
41   public:
42     FTVHelp(bool LTI);
43     ~FTVHelp();
44     void initialize();
45     void finalize();
46     void incContentsDepth();
47     void decContentsDepth();
48     void addContentsItem(bool isDir,
49                          const char *name,
50                          const char *ref,
51                          const char *file,
52                          const char *anchor,
53                          bool separateIndex,
54                          bool addToNavIndex,
55                          Definition *def);
56     void addIndexItem(Definition *,MemberDef *,const char *) {}
57     void addIndexFile(const char *) {}
58     void addImageFile(const char *) {}
59     void addStyleSheetFile(const char *) {}
60     void generateTreeView();
61     void generateTreeViewInline(FTextStream &t);
62     static void generateTreeViewImages();
63     void generateTreeViewScripts();
64   private:
65     void generateTree(FTextStream &t,const QList<FTVNode> &nl,int level,int maxLevel,int &index);
66     //bool generateJSTree(FTextStream &tidx,FTextStream &t,const QList<FTVNode> &nl,int level,bool &first);
67     //bool generateJSTreeTopLevel(FTextStream &tidx,FTextStream &t,const QList<FTVNode> &nl,int level,bool &first);
68     QCString generateIndentLabel(FTVNode *n,int level);
69     void generateIndent(FTextStream &t,FTVNode *n,int level,bool opened);
70     void generateLink(FTextStream &t,FTVNode *n);
71     //void generateJSLink(FTextStream &t,FTVNode *n);
72     QList<FTVNode> *m_indentNodes;
73     int m_indent;
74     bool m_topLevelIndex;
75 };
76
77
78 #endif /* FTVHELP_H */
79