X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/526954c5968baa29218c994ec48e476ae2bd4b9f..d3fa4bc22e84e3ca4d88cc1772f2d414140a1017:/interface/wx/html/helpdata.h diff --git a/interface/wx/html/helpdata.h b/interface/wx/html/helpdata.h index 4360c98e8c..ffcb3c528f 100644 --- a/interface/wx/html/helpdata.h +++ b/interface/wx/html/helpdata.h @@ -6,6 +6,69 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +/** + @class wxHtmlBookRecord + + Helper class for wxHtmlHelpData +*/ +class wxHtmlBookRecord +{ +public: + wxHtmlBookRecord(const wxString& bookfile, const wxString& basepath, + const wxString& title, const wxString& start); + + wxString GetBookFile() const; + wxString GetTitle() const; + wxString GetStart() const; + wxString GetBasePath() const; + + /* SetContentsRange: store in the bookrecord where in the index/contents lists the + * book's records are stored. This to facilitate searching in a specific book. + * This code will have to be revised when loading/removing books becomes dynamic. + * (as opposed to appending only) + * Note that storing index range is pointless, because the index is alphab. sorted. */ + void SetContentsRange(int start, int end); + int GetContentsStart() const; + int GetContentsEnd() const; + + void SetTitle(const wxString& title); + void SetBasePath(const wxString& path); + void SetStart(const wxString& start); + + // returns full filename of page (which is part of the book), + // i.e. with book's basePath prepended. If page is already absolute + // path, basePath is _not_ prepended. + wxString GetFullPath(const wxString &page) const; +}; + + + +/** + @class wxHtmlHelpDataItem + + Helper class for wxHtmlHelpData +*/ +struct wxHtmlHelpDataItem +{ + wxHtmlHelpDataItem(); + + int level; + wxHtmlHelpDataItem *parent; + int id; + wxString name; + wxString page; + wxHtmlBookRecord *book; + + // returns full filename of m_Page, i.e. with book's basePath prepended + wxString GetFullPath() const; + + // returns item indented with spaces if it has level>1: + wxString GetIndentedName() const; +}; + + + + /** @class wxHtmlHelpData