// helper classes & structs
//--------------------------------------------------------------------------------
-class WXDLLEXPORT wxHtmlBookRecord : public wxObject
+class WXDLLEXPORT wxHtmlBookRecord
{
public:
- wxHtmlBookRecord(const wxString& basepath, const wxString& title,
- const wxString& start)
+ wxHtmlBookRecord(const wxString& bookfile, const wxString& basepath,
+ const wxString& title, const wxString& start)
{
+ m_BookFile = bookfile;
m_BasePath = basepath;
m_Title = title;
m_Start = start;
// for debugging, give the contents index obvious default values
m_ContentsStart = m_ContentsEnd = -1;
}
+ wxString GetBookFile() const { return m_BookFile; }
wxString GetTitle() const { return m_Title; }
wxString GetStart() const { return m_Start; }
wxString GetBasePath() const { return m_BasePath; }
void SetBasePath(const wxString& path) { m_BasePath = path; }
void SetStart(const wxString& start) { m_Start = 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;
+
protected:
+ wxString m_BookFile;
wxString m_BasePath;
wxString m_Title;
wxString m_Start;
wxChar* m_Name;
wxChar* m_Page;
wxHtmlBookRecord *m_Book;
+
+ // returns full filename of m_Page, i.e. with book's basePath prepended
+ wxString GetFullPath() const { return m_Book->GetFullPath(m_Page); }
};
//------------------------------------------------------------------------------
bool SaveCachedBook(wxHtmlBookRecord *book, wxOutputStream *f);
};
-// Utility function
-wxString wxAddBasePath(const wxString& basePath, const wxString& path) ;
-
#endif
#endif