]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/htmlhelp.i
Use the OOR typemap for wxTreeCtrls too.
[wxWidgets.git] / wxPython / src / htmlhelp.i
CommitLineData
0f66a9f3
RD
1/////////////////////////////////////////////////////////////////////////////
2// Name: htmlhelp.i
3// Purpose: SWIG definitions of html classes
4//
5// Author: Robin Dunn
6//
2c8a649d 7// Created: 25-Nov-1998
0f66a9f3
RD
8// RCS-ID: $Id$
9// Copyright: (c) 1998 by Total Control Software
10// Licence: wxWindows license
11/////////////////////////////////////////////////////////////////////////////
12
13
14%module htmlhelp
15
16%{
1e7ecb7b 17#include "export.h"
0f66a9f3 18#include <wx/html/htmlwin.h>
2f90df85 19#include <wx/html/helpctrl.h>
0f66a9f3
RD
20#include <wx/image.h>
21#include <wx/fs_zip.h>
22#include <wx/fs_inet.h>
23#include <wx/wfstream.h>
0f66a9f3
RD
24%}
25
137b5242
RD
26//---------------------------------------------------------------------------
27%{
28 // Put some wx default wxChar* values into wxStrings.
29 static const wxString wxPyEmptyString(wxT(""));
30%}
0f66a9f3
RD
31//---------------------------------------------------------------------------
32
33%include typemaps.i
34%include my_typemaps.i
35
36%extern wx.i
37%extern windows.i
2f90df85 38%extern frames.i
0f66a9f3
RD
39%extern _defs.i
40%extern events.i
41%extern controls.i
42%extern controls2.i
43
44%extern utils.i
0f66a9f3
RD
45%extern html.i
46
1b62f00d 47
2f90df85
RD
48//---------------------------------------------------------------------------
49
ff42dd66 50class wxHtmlBookRecord : public wxObject {
2f90df85 51public:
ff42dd66
RD
52 wxHtmlBookRecord(const wxString& bookfile, const wxString& basepath,
53 const wxString& title, const wxString& start);
2f90df85 54
ff42dd66 55 wxString GetBookFile();
2f90df85
RD
56 wxString GetTitle();
57 wxString GetStart();
58 wxString GetBasePath();
59
60 void SetContentsRange(int start, int end);
61 int GetContentsStart();
62 int GetContentsEnd();
ff42dd66
RD
63
64 void SetTitle(const wxString& title);
65 void SetBasePath(const wxString& path);
66 void SetStart(const wxString& start);
67
68 wxString GetFullPath(const wxString &page) const;
2f90df85
RD
69};
70
71//---------------------------------------------------------------------------
72
ff42dd66 73struct wxHtmlContentsItem
2f90df85 74{
137b5242
RD
75 %addmethods {
76 int GetLevel() { return self->m_Level; }
77 int GetID() { return self->m_ID; }
78 wxString GetName() { return self->m_Name; }
79 wxString GetPage() { return self->m_Page; }
80 wxHtmlBookRecord* GetBook() { return self->m_Book; }
81 }
ff42dd66 82};
2f90df85
RD
83
84//---------------------------------------------------------------------------
85
86class wxHtmlSearchStatus
87{
88public:
89 //wxHtmlSearchStatus(wxHtmlHelpData* base, const wxString& keyword,
137b5242 90 // const wxString& book = wxPyEmptyString);
2f90df85
RD
91 bool Search();
92 bool IsActive();
93 int GetCurIndex();
94 int GetMaxIndex();
95 const wxString& GetName();
96 wxHtmlContentsItem* GetContentsItem();
97};
0f66a9f3 98
2f90df85 99//---------------------------------------------------------------------------
0f66a9f3 100
2f90df85
RD
101class wxHtmlHelpData {
102public:
103 wxHtmlHelpData();
104 ~wxHtmlHelpData();
0f66a9f3
RD
105
106 void SetTempDir(const wxString& path);
2f90df85 107 bool AddBook(const wxString& book);
eec92d76 108// bool AddBookParam(const wxString& title, const wxString& contfile,
137b5242
RD
109// const wxString& indexfile=wxPyEmptyString,
110// const wxString& deftopic=wxPyEmptyString,
111// const wxString& path=wxPyEmptyString);
0f66a9f3 112
2f90df85
RD
113 wxString FindPageByName(const wxString& page);
114 wxString FindPageById(int id);
0f66a9f3 115
13806c7d 116 // TODO: this one needs fixed...
2f90df85 117 const wxHtmlBookRecArray& GetBookRecArray();
0f66a9f3 118
2f90df85
RD
119 wxHtmlContentsItem* GetContents();
120 int GetContentsCnt();
121 wxHtmlContentsItem* GetIndex();
122 int GetIndexCnt();
123};
0f66a9f3 124
2f90df85 125//---------------------------------------------------------------------------
0f66a9f3 126
2f90df85
RD
127class wxHtmlHelpFrame : public wxFrame {
128public:
129 wxHtmlHelpFrame(wxWindow* parent, int wxWindowID,
137b5242 130 const wxString& title = wxPyEmptyString,
2f90df85 131 int style = wxHF_DEFAULTSTYLE, wxHtmlHelpData* data = NULL);
0f66a9f3 132
0122b7e3
RD
133 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
134
2f90df85
RD
135 wxHtmlHelpData* GetData();
136 void SetTitleFormat(const wxString& format);
137 void Display(const wxString& x);
138 %name(DisplayID) void Display(int id);
139 void DisplayContents();
140 void DisplayIndex();
141 bool KeywordSearch(const wxString& keyword);
137b5242
RD
142 void UseConfig(wxConfigBase *config, const wxString& rootpath = wxPyEmptyString);
143 void ReadCustomization(wxConfigBase *cfg, wxString path = wxPyEmptyString);
144 void WriteCustomization(wxConfigBase *cfg, wxString path = wxPyEmptyString);
2f90df85 145};
0f66a9f3 146
2f90df85
RD
147
148//---------------------------------------------------------------------------
149
13806c7d
RD
150
151enum {
152 wxHF_TOOLBAR,
153 wxHF_FLATTOOLBAR,
154 wxHF_CONTENTS,
155 wxHF_INDEX,
156 wxHF_SEARCH,
157 wxHF_BOOKMARKS,
158 wxHF_OPENFILES,
159 wxHF_PRINT,
160 wxHF_DEFAULTSTYLE,
161};
162
163
2f90df85
RD
164class wxHtmlHelpController : public wxEvtHandler {
165public:
13806c7d 166 wxHtmlHelpController(int style = wxHF_DEFAULTSTYLE);
2f90df85
RD
167 ~wxHtmlHelpController();
168
0122b7e3
RD
169 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
170
2f90df85
RD
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();
177 void DisplayIndex();
178 bool KeywordSearch(const wxString& keyword);
137b5242
RD
179 void UseConfig(wxConfigBase *config, const wxString& rootpath = wxPyEmptyString);
180 void ReadCustomization(wxConfigBase *cfg, wxString path = wxPyEmptyString);
181 void WriteCustomization(wxConfigBase *cfg, wxString path = wxPyEmptyString);
2f90df85 182 wxHtmlHelpFrame* GetFrame();
0f66a9f3
RD
183};
184
2f90df85 185//---------------------------------------------------------------------------
0f66a9f3 186//---------------------------------------------------------------------------