ftvhelp.h 2.59 KB
Newer Older
1 2
/******************************************************************************
 *
Dimitri van Heesch's avatar
Dimitri van Heesch committed
3
 * Copyright (C) 1997-2014 by Dimitri van Heesch.
4 5 6 7 8 9 10 11 12 13 14 15
 *
 * Permission to use, copy, modify, and distribute this software and its
 * documentation under the terms of the GNU General Public License is hereby 
 * granted. No representations are made about the suitability of this software 
 * for any purpose. It is provided "as is" without express or implied warranty.
 * See the GNU General Public License for more details.
 *
 * Documents produced by Doxygen are derivative works derived from the
 * input used in their production; they are not affected by this license.
 *
 */

16 17 18 19 20 21 22 23 24 25 26
/******************************************************************************
 * ftvhelp.h,v 1.0 2000/09/06 16:09:00
 *
 * Kenney Wong <kwong@ea.com>
 *
 * Folder Tree View for offline help on browsers that do not support HTML Help.
 */

#ifndef FTVHELP_H
#define FTVHELP_H

27
#include <qlist.h>
Dimitri van Heesch's avatar
Dimitri van Heesch committed
28
#include "index.h"
29 30

class QFile;
31
class Definition;
32
struct FTVNode;
33
class FTextStream;
34

Dimitri van Heesch's avatar
Dimitri van Heesch committed
35
/** A class that generates a dynamic tree view side panel.
36
 */
Dimitri van Heesch's avatar
Dimitri van Heesch committed
37
class FTVHelp : public IndexIntf
38 39
{
  public:
40
    FTVHelp(bool LTI);
41
    ~FTVHelp();
42 43
    void initialize();
    void finalize();
Dimitri van Heesch's avatar
Dimitri van Heesch committed
44 45
    void incContentsDepth();
    void decContentsDepth();
46
    void addContentsItem(bool isDir,
Dimitri van Heesch's avatar
Dimitri van Heesch committed
47
                         const char *name,
48 49
                         const char *ref,
                         const char *file,
50
                         const char *anchor,
Dimitri van Heesch's avatar
Dimitri van Heesch committed
51 52 53
                         bool separateIndex,
                         bool addToNavIndex,
                         Definition *def);
54
    void addIndexItem(Definition *,MemberDef *,const char *,const char *) {}
Dimitri van Heesch's avatar
Dimitri van Heesch committed
55
    void addIndexFile(const char *) {}
56 57
    void addImageFile(const char *) {}
    void addStyleSheetFile(const char *) {}
58 59
    void generateTreeView();
    void generateTreeViewInline(FTextStream &t);
Dimitri van Heesch's avatar
Dimitri van Heesch committed
60
    static void generateTreeViewImages();
61
    void generateTreeViewScripts();
62
  private:
Dimitri van Heesch's avatar
Dimitri van Heesch committed
63
    void generateTree(FTextStream &t,const QList<FTVNode> &nl,int level,int maxLevel,int &index);
64
    //bool generateJSTree(FTextStream &tidx,FTextStream &t,const QList<FTVNode> &nl,int level,bool &first);
65
    //bool generateJSTreeTopLevel(FTextStream &tidx,FTextStream &t,const QList<FTVNode> &nl,int level,bool &first);
66
    QCString generateIndentLabel(FTVNode *n,int level);
67
    void generateIndent(FTextStream &t,FTVNode *n,bool opened);
68
    void generateLink(FTextStream &t,FTVNode *n);
69
    //void generateJSLink(FTextStream &t,FTVNode *n);
70 71
    QList<FTVNode> *m_indentNodes;
    int m_indent;
72
    bool m_topLevelIndex;
73 74
};

75

76 77
#endif /* FTVHELP_H */