]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/htmlhelp.i
Added missing files to listing
[wxWidgets.git] / wxPython / src / htmlhelp.i
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: htmlhelp.i
3 // Purpose: SWIG definitions of html classes
4 //
5 // Author: Robin Dunn
6 //
7 // Created: 25-nov-1998
8 // RCS-ID: $Id$
9 // Copyright: (c) 1998 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
12
13
14 %module htmlhelp
15
16 %{
17 #include "export.h"
18 #include <wx/html/htmlwin.h>
19 #include <wx/html/helpctrl.h>
20 #include <wx/image.h>
21 #include <wx/fs_zip.h>
22 #include <wx/fs_inet.h>
23 #include <wx/wfstream.h>
24 %}
25
26 //---------------------------------------------------------------------------
27
28 %include typemaps.i
29 %include my_typemaps.i
30
31 %extern wx.i
32 %extern windows.i
33 %extern frames.i
34 %extern _defs.i
35 %extern events.i
36 %extern controls.i
37 %extern controls2.i
38
39 %extern utils.i
40 %extern html.i
41
42
43 //---------------------------------------------------------------------------
44
45 class wxHtmlHelpFrameCfg
46 {
47 public:
48 wxHtmlHelpFrameCfg();
49
50 long x, y, w, h;
51 long sashpos;
52 bool navig_on;
53 };
54
55
56 //---------------------------------------------------------------------------
57
58 class wxHtmlBookRecord {
59 public:
60 wxHtmlBookRecord(const wxString& basepath, const wxString& title,
61 const wxString& start);
62
63 wxString GetTitle();
64 wxString GetStart();
65 wxString GetBasePath();
66
67 void SetContentsRange(int start, int end);
68 int GetContentsStart();
69 int GetContentsEnd();
70 };
71
72 //---------------------------------------------------------------------------
73
74 typedef struct
75 {
76 short int m_Level;
77 int m_ID;
78 char* m_Name;
79 char* m_Page;
80 wxHtmlBookRecord *m_Book;
81 } wxHtmlContentsItem;
82
83 //---------------------------------------------------------------------------
84
85 class wxHtmlSearchStatus
86 {
87 public:
88 //wxHtmlSearchStatus(wxHtmlHelpData* base, const wxString& keyword,
89 // const wxString& book = wxEmptyString);
90 bool Search();
91 bool IsActive();
92 int GetCurIndex();
93 int GetMaxIndex();
94 const wxString& GetName();
95 wxHtmlContentsItem* GetContentsItem();
96 };
97
98 //---------------------------------------------------------------------------
99
100 class wxHtmlHelpData {
101 public:
102 wxHtmlHelpData();
103 ~wxHtmlHelpData();
104
105 void SetTempDir(const wxString& path);
106 bool AddBook(const wxString& book);
107 // bool AddBookParam(const wxString& title, const wxString& contfile,
108 // const wxString& indexfile=wxEmptyString,
109 // const wxString& deftopic=wxEmptyString,
110 // const wxString& path=wxEmptyString);
111
112 wxString FindPageByName(const wxString& page);
113 wxString FindPageById(int id);
114
115 // TODO: this one needs fixed...
116 const wxHtmlBookRecArray& GetBookRecArray();
117
118 wxHtmlContentsItem* GetContents();
119 int GetContentsCnt();
120 wxHtmlContentsItem* GetIndex();
121 int GetIndexCnt();
122 };
123
124 //---------------------------------------------------------------------------
125
126 class wxHtmlHelpFrame : public wxFrame {
127 public:
128 wxHtmlHelpFrame(wxWindow* parent, int wxWindowID,
129 const wxString& title = wxEmptyString,
130 int style = wxHF_DEFAULTSTYLE, wxHtmlHelpData* data = NULL);
131
132 wxHtmlHelpData* GetData();
133 void SetTitleFormat(const wxString& format);
134 void Display(const wxString& x);
135 %name(DisplayID) void Display(int id);
136 void DisplayContents();
137 void DisplayIndex();
138 bool KeywordSearch(const wxString& keyword);
139 void UseConfig(wxConfigBase *config, const wxString& rootpath = wxEmptyString);
140 void ReadCustomization(wxConfigBase *cfg, wxString path = wxEmptyString);
141 void WriteCustomization(wxConfigBase *cfg, wxString path = wxEmptyString);
142 };
143
144
145 //---------------------------------------------------------------------------
146
147
148 enum {
149 wxHF_TOOLBAR,
150 wxHF_FLATTOOLBAR,
151 wxHF_CONTENTS,
152 wxHF_INDEX,
153 wxHF_SEARCH,
154 wxHF_BOOKMARKS,
155 wxHF_OPENFILES,
156 wxHF_PRINT,
157 wxHF_DEFAULTSTYLE,
158 };
159
160
161 class wxHtmlHelpController : public wxEvtHandler {
162 public:
163 wxHtmlHelpController(int style = wxHF_DEFAULTSTYLE);
164 ~wxHtmlHelpController();
165
166 void SetTitleFormat(const wxString& format);
167 void SetTempDir(const wxString& path);
168 bool AddBook(const wxString& book, int show_wait_msg = FALSE);
169 void Display(const wxString& x);
170 %name(DisplayID) void Display(int id);
171 void DisplayContents();
172 void DisplayIndex();
173 bool KeywordSearch(const wxString& keyword);
174 void UseConfig(wxConfigBase *config, const wxString& rootpath = wxEmptyString);
175 void ReadCustomization(wxConfigBase *cfg, wxString path = wxEmptyString);
176 void WriteCustomization(wxConfigBase *cfg, wxString path = wxEmptyString);
177 wxHtmlHelpFrame* GetFrame();
178 };
179
180 //---------------------------------------------------------------------------
181 //---------------------------------------------------------------------------