htmlhelp.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  *
4  *
5  * Copyright (C) 1997-2015 by Dimitri van Heesch.
6  *
7  * Permission to use, copy, modify, and distribute this software and its
8  * documentation under the terms of the GNU General Public License is hereby
9  * granted. No representations are made about the suitability of this software
10  * for any purpose. It is provided "as is" without express or implied warranty.
11  * See the GNU General Public License for more details.
12  *
13  * Documents produced by Doxygen are derivative works derived from the
14  * input used in their production; they are not affected by this license.
15  *
16  * The code is this file is largely based on a contribution from
17  * Harm van der Heijden <H.v.d.Heijden@phys.tue.nl>
18  * Please send thanks to him and bug reports to me :-)
19  */
20 
21 #ifndef HTMLHELP_H
22 #define HTMLHELP_H
23 
24 #include <qstrlist.h>
25 #include <qdict.h>
26 #include "index.h"
27 #include "ftextstream.h"
28 
29 class QFile;
30 class Definition;
31 class HtmlHelpIndex;
32 
33 /** A class that generated the HTML Help specific files.
34  *
35  * These files can be used with the Microsoft HTML Help workshop
36  * to generate compressed HTML files (.chm).
37  */
38 class HtmlHelp : public IndexIntf
39 {
40  /*! used in imageNumber param of HTMLHelp::addContentsItem() function
41  to specify document icon in tree view.
42  Writes <param name="ImageNumber" value="xx"> in .HHC file. */
43  enum ImageNumber {
65  };
66  public:
67  //static HtmlHelp *getInstance();
68  HtmlHelp();
69  ~HtmlHelp();
70  void initialize();
71  void finalize();
72  void incContentsDepth();
73  void decContentsDepth();
74  void addContentsItem(bool isDir,
75  const char *name,
76  const char *ref,
77  const char *file,
78  const char *anchor,
79  bool separateIndex,
80  bool addToNavIndex,
81  Definition *def);
82  void addIndexItem(Definition *context,MemberDef *md,
83  const char *sectionAnchor, const char *title);
84  void addIndexFile(const char *name);
85  void addImageFile(const char *);
86  void addStyleSheetFile(const char *) {}
87 
88  private:
89  friend class HtmlHelpIndex;
90  void createProjectFile();
91 
92  QFile *cf,*kf;
95  int dc;
98  QDict<void> indexFileDict;
100  QCString recode(const QCString &s);
101  void *m_fromUtf8;
102 };
103 
104 #endif /* HTMLHELP_H */
105 
static QCString name
Definition: declinfo.cpp:673
void addContentsItem(bool isDir, const char *name, const char *ref, const char *file, const char *anchor, bool separateIndex, bool addToNavIndex, Definition *def)
Definition: htmlhelp.cpp:627
ImageNumber
Definition: htmlhelp.h:43
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
QDict< void > indexFileDict
Definition: htmlhelp.h:98
void addStyleSheetFile(const char *)
Definition: htmlhelp.h:86
static HtmlHelp * theInstance
Definition: htmlhelp.h:99
void addIndexFile(const char *name)
Definition: htmlhelp.cpp:536
QStrList indexFiles
Definition: htmlhelp.h:96
void addImageFile(const char *)
Definition: htmlhelp.cpp:711
void addIndexItem(Definition *context, MemberDef *md, const char *sectionAnchor, const char *title)
Definition: htmlhelp.cpp:679
QCString recode(const QCString &s)
Definition: htmlhelp.cpp:595
FTextStream kts
Definition: htmlhelp.h:93
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
Abstract interface for index generators.
Definition: index.h:30
void initialize()
Definition: htmlhelp.cpp:303
void * m_fromUtf8
Definition: htmlhelp.h:101
QFile * cf
Definition: htmlhelp.h:92
QFile * kf
Definition: htmlhelp.h:92
QStrList imageFiles
Definition: htmlhelp.h:97
HtmlHelpIndex * index
Definition: htmlhelp.h:94
void createProjectFile()
Definition: htmlhelp.cpp:465
void incContentsDepth()
Definition: htmlhelp.cpp:577
int dc
Definition: htmlhelp.h:95
void finalize()
Definition: htmlhelp.cpp:549
void decContentsDepth()
Definition: htmlhelp.cpp:588
FTextStream cts
Definition: htmlhelp.h:93
static QCString * s
Definition: config.cpp:1042