]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/html/helpdata.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: html/helpdata.h
3 // Purpose: interface of wxHtmlHelpData
4 // Author: wxWidgets team
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
10 @class wxHtmlBookRecord
12 Helper class for wxHtmlHelpData
14 class wxHtmlBookRecord
17 wxHtmlBookRecord(const wxString
& bookfile
, const wxString
& basepath
,
18 const wxString
& title
, const wxString
& start
);
20 wxString
GetBookFile() const;
21 wxString
GetTitle() const;
22 wxString
GetStart() const;
23 wxString
GetBasePath() const;
25 /* SetContentsRange: store in the bookrecord where in the index/contents lists the
26 * book's records are stored. This to facilitate searching in a specific book.
27 * This code will have to be revised when loading/removing books becomes dynamic.
28 * (as opposed to appending only)
29 * Note that storing index range is pointless, because the index is alphab. sorted. */
30 void SetContentsRange(int start
, int end
);
31 int GetContentsStart() const;
32 int GetContentsEnd() const;
34 void SetTitle(const wxString
& title
);
35 void SetBasePath(const wxString
& path
);
36 void SetStart(const wxString
& start
);
38 // returns full filename of page (which is part of the book),
39 // i.e. with book's basePath prepended. If page is already absolute
40 // path, basePath is _not_ prepended.
41 wxString
GetFullPath(const wxString
&page
) const;
47 @class wxHtmlHelpDataItem
49 Helper class for wxHtmlHelpData
51 struct wxHtmlHelpDataItem
56 wxHtmlHelpDataItem
*parent
;
60 wxHtmlBookRecord
*book
;
62 // returns full filename of m_Page, i.e. with book's basePath prepended
63 wxString
GetFullPath() const;
65 // returns item indented with spaces if it has level>1:
66 wxString
GetIndentedName() const;
75 This class is used by wxHtmlHelpController and wxHtmlHelpFrame to access HTML
78 It is internal class and should not be used directly - except for the case
79 you're writing your own HTML help controller.
84 class wxHtmlHelpData
: public wxObject
95 @a book_url is URL (not filename!) of HTML help project (hhp) or ZIP file
96 that contains arbitrary number of .hhp projects (this zip file can have
97 either .zip or .htb extension, htb stands for "html book").
101 bool AddBook(const wxString
& book_url
);
104 Returns page's URL based on integer ID stored in project.
106 wxString
FindPageById(int id
);
109 Returns page's URL based on its (file)name.
111 wxString
FindPageByName(const wxString
& page
);
114 Returns array with help books info.
116 const wxHtmlBookRecArray
& GetBookRecArray() const;
119 Returns reference to array with contents entries.
121 const wxHtmlHelpDataItems
& GetContentsArray() const;
124 Returns reference to array with index entries.
126 const wxHtmlHelpDataItems
& GetIndexArray() const;
129 Sets the temporary directory where binary cached versions of MS HTML Workshop
130 files will be stored. (This is turned off by default and you can enable
131 this feature by setting non-empty temp dir.)
133 void SetTempDir(const wxString
& path
);