- DECLARE_DYNAMIC_CLASS(wxHtmlHelpData)
-
- friend class wxHtmlSearchStatus;
-
- public:
- wxHtmlHelpData();
- ~wxHtmlHelpData();
-
- void SetTempDir(const wxString& path);
- // Sets directory where temporary files are stored.
- // These temp files are index & contents file in binary (much faster to read)
- // form. These files are NOT deleted on program's exit.
-
- bool AddBook(const wxString& book);
- // Adds new book. 'book' is location of .htb file (stands for "html book").
- // See documentation for details on its format.
- // Returns success.
- bool AddBookParam(const wxFSFile& bookfile,
- wxFontEncoding encoding,
- const wxString& title, const wxString& contfile,
- const wxString& indexfile = wxEmptyString,
- const wxString& deftopic = wxEmptyString,
- const wxString& path = wxEmptyString);
-
- // Some accessing stuff
- wxString FindPageByName(const wxString& page);
- // returns URL of page on basis of (file)name
- wxString FindPageById(int id);
- // returns URL of page on basis of MS id
-
- const wxHtmlBookRecArray& GetBookRecArray() { return m_BookRecords; }
- wxHtmlContentsItem* GetContents() { return m_Contents; }
- int GetContentsCnt() { return m_ContentsCnt; }
- wxHtmlContentsItem* GetIndex() { return m_Index; }
- int GetIndexCnt() { return m_IndexCnt; }
-
- protected:
- wxString m_TempPath;
-
- wxHtmlBookRecArray m_BookRecords;
- // each book has one record in this array
- wxHtmlContentsItem* m_Contents;
- int m_ContentsCnt;
- // list of all available books and pages.
- wxHtmlContentsItem* m_Index;
- int m_IndexCnt;
- // list of index items
-
- protected:
- bool LoadMSProject(wxHtmlBookRecord *book, wxFileSystem& fsys,
- const wxString& indexfile, const wxString& contentsfile);
- // Imports .hhp files (MS HTML Help Workshop)
- bool LoadCachedBook(wxHtmlBookRecord *book, wxInputStream *f);
- // Reads binary book
- bool SaveCachedBook(wxHtmlBookRecord *book, wxOutputStream *f);
- // Writes binary book
-};
+ DECLARE_DYNAMIC_CLASS(wxHtmlHelpData)
+ friend class wxHtmlSearchStatus;
+
+public:
+ wxHtmlHelpData();
+ ~wxHtmlHelpData();
+
+ // Sets directory where temporary files are stored.
+ // These temp files are index & contents file in binary (much faster to read)
+ // form. These files are NOT deleted on program's exit.
+ void SetTempDir(const wxString& path);
+
+ // Adds new book. 'book' is location of .htb file (stands for "html book").
+ // See documentation for details on its format.
+ // Returns success.
+ bool AddBook(const wxString& book);
+ bool AddBookParam(const wxFSFile& bookfile,
+ wxFontEncoding encoding,
+ const wxString& title, const wxString& contfile,
+ const wxString& indexfile = wxEmptyString,
+ const wxString& deftopic = wxEmptyString,
+ const wxString& path = wxEmptyString);
+
+ // Some accessing stuff:
+
+ // returns URL of page on basis of (file)name
+ wxString FindPageByName(const wxString& page);
+ // returns URL of page on basis of MS id
+ wxString FindPageById(int id);
+
+ const wxHtmlBookRecArray& GetBookRecArray() const { return m_bookRecords; }
+
+ const wxHtmlHelpDataItems& GetContentsArray() const { return m_contents; }
+ const wxHtmlHelpDataItems& GetIndexArray() const { return m_index; }
+
+#if WXWIN_COMPATIBILITY_2_4
+ // deprecated interface, new interface is arrays-based (see above)
+ wxDEPRECATED( wxHtmlContentsItem* GetContents() );
+ wxDEPRECATED( int GetContentsCnt() );
+ wxDEPRECATED( wxHtmlContentsItem* GetIndex() );
+ wxDEPRECATED( int GetIndexCnt() );
+#endif