1 /////////////////////////////////////////////////////////////////////////////
 
   3 // Purpose:     SWIG definitions of html classes
 
   7 // Created:     25-nov-1998
 
   9 // Copyright:   (c) 1998 by Total Control Software
 
  10 // Licence:     wxWindows license
 
  11 /////////////////////////////////////////////////////////////////////////////
 
  18 #include <wx/html/htmlwin.h>
 
  19 #include <wx/html/helpctrl.h>
 
  21 #include <wx/fs_zip.h>
 
  22 #include <wx/fs_inet.h>
 
  23 #include <wx/wfstream.h>
 
  26 //---------------------------------------------------------------------------
 
  29 %include my_typemaps.i
 
  43 //---------------------------------------------------------------------------
 
  56     wxID_HTML_SEARCHBUTTON,
 
  57     wxID_HTML_SEARCHCHOICE,
 
  62 //---------------------------------------------------------------------------
 
  64 class  wxHtmlHelpFrameCfg
 
  75 //---------------------------------------------------------------------------
 
  77 class wxHtmlBookRecord  {
 
  79     wxHtmlBookRecord(const wxString& basepath, const wxString& title,
 
  80                      const wxString& start);
 
  84     wxString GetBasePath();
 
  86     void SetContentsRange(int start, int end);
 
  87     int GetContentsStart();
 
  91 //---------------------------------------------------------------------------
 
  99     wxHtmlBookRecord *m_Book;
 
 100 } wxHtmlContentsItem;
 
 102 //---------------------------------------------------------------------------
 
 104 class wxHtmlSearchStatus
 
 107     //wxHtmlSearchStatus(wxHtmlHelpData* base, const wxString& keyword,
 
 108     //                   const wxString& book = wxEmptyString);
 
 113     const wxString& GetName();
 
 114     wxHtmlContentsItem* GetContentsItem();
 
 117 //---------------------------------------------------------------------------
 
 119 class wxHtmlHelpData {
 
 124     void SetTempDir(const wxString& path);
 
 125     bool AddBook(const wxString& book);
 
 126 //      bool AddBookParam(const wxString& title, const wxString& contfile,
 
 127 //                    const wxString& indexfile=wxEmptyString,
 
 128 //                    const wxString& deftopic=wxEmptyString,
 
 129 //                    const wxString& path=wxEmptyString);
 
 131     wxString FindPageByName(const wxString& page);
 
 132     wxString FindPageById(int id);
 
 134     // **** this one needs fixed...
 
 135     const wxHtmlBookRecArray& GetBookRecArray();
 
 137     wxHtmlContentsItem* GetContents();
 
 138     int GetContentsCnt();
 
 139     wxHtmlContentsItem* GetIndex();
 
 143 //---------------------------------------------------------------------------
 
 145 class wxHtmlHelpFrame : public wxFrame {
 
 147     wxHtmlHelpFrame(wxWindow* parent, int wxWindowID,
 
 148                     const wxString& title = wxEmptyString,
 
 149                     int style = wxHF_DEFAULTSTYLE, wxHtmlHelpData* data = NULL);
 
 151     wxHtmlHelpData* GetData();
 
 152     void SetTitleFormat(const wxString& format);
 
 153     void Display(const wxString& x);
 
 154     %name(DisplayID) void Display(int id);
 
 155     void DisplayContents();
 
 157     bool KeywordSearch(const wxString& keyword);
 
 158     void UseConfig(wxConfigBase *config, const wxString& rootpath = wxEmptyString);
 
 159     void ReadCustomization(wxConfigBase *cfg, wxString path = wxEmptyString);
 
 160     void WriteCustomization(wxConfigBase *cfg, wxString path = wxEmptyString);
 
 164 //---------------------------------------------------------------------------
 
 166 class wxHtmlHelpController : public wxEvtHandler {
 
 168     wxHtmlHelpController();
 
 169     ~wxHtmlHelpController();
 
 171     void SetTitleFormat(const wxString& format);
 
 172     void SetTempDir(const wxString& path);
 
 173     bool AddBook(const wxString& book, int show_wait_msg = FALSE);
 
 174     void Display(const wxString& x);
 
 175     %name(DisplayID) void Display(int id);
 
 176     void DisplayContents();
 
 178     bool KeywordSearch(const wxString& keyword);
 
 179     void UseConfig(wxConfigBase *config, const wxString& rootpath = wxEmptyString);
 
 180     void ReadCustomization(wxConfigBase *cfg, wxString path = wxEmptyString);
 
 181     void WriteCustomization(wxConfigBase *cfg, wxString path = wxEmptyString);
 
 182     wxHtmlHelpFrame* GetFrame();
 
 185 //---------------------------------------------------------------------------
 
 186 //---------------------------------------------------------------------------