]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/htmlhelp.i
merged wxRegConf rename fix from 2.2
[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//
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%{
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
26//---------------------------------------------------------------------------
27
28%include typemaps.i
29%include my_typemaps.i
30
31%extern wx.i
32%extern windows.i
2f90df85 33%extern frames.i
0f66a9f3
RD
34%extern _defs.i
35%extern events.i
36%extern controls.i
37%extern controls2.i
38
39%extern utils.i
0f66a9f3
RD
40%extern html.i
41
1b62f00d 42
2f90df85
RD
43//---------------------------------------------------------------------------
44
45class wxHtmlHelpFrameCfg
46{
0f66a9f3 47public:
2f90df85
RD
48 wxHtmlHelpFrameCfg();
49
50 long x, y, w, h;
51 long sashpos;
52 bool navig_on;
2f90df85
RD
53};
54
55
56//---------------------------------------------------------------------------
57
58class wxHtmlBookRecord {
59public:
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
74typedef 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
85class wxHtmlSearchStatus
86{
87public:
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};
0f66a9f3 97
2f90df85 98//---------------------------------------------------------------------------
0f66a9f3 99
2f90df85
RD
100class wxHtmlHelpData {
101public:
102 wxHtmlHelpData();
103 ~wxHtmlHelpData();
0f66a9f3
RD
104
105 void SetTempDir(const wxString& path);
2f90df85 106 bool AddBook(const wxString& book);
eec92d76
RD
107// bool AddBookParam(const wxString& title, const wxString& contfile,
108// const wxString& indexfile=wxEmptyString,
109// const wxString& deftopic=wxEmptyString,
110// const wxString& path=wxEmptyString);
0f66a9f3 111
2f90df85
RD
112 wxString FindPageByName(const wxString& page);
113 wxString FindPageById(int id);
0f66a9f3 114
13806c7d 115 // TODO: this one needs fixed...
2f90df85 116 const wxHtmlBookRecArray& GetBookRecArray();
0f66a9f3 117
2f90df85
RD
118 wxHtmlContentsItem* GetContents();
119 int GetContentsCnt();
120 wxHtmlContentsItem* GetIndex();
121 int GetIndexCnt();
122};
0f66a9f3 123
2f90df85 124//---------------------------------------------------------------------------
0f66a9f3 125
2f90df85
RD
126class wxHtmlHelpFrame : public wxFrame {
127public:
128 wxHtmlHelpFrame(wxWindow* parent, int wxWindowID,
129 const wxString& title = wxEmptyString,
130 int style = wxHF_DEFAULTSTYLE, wxHtmlHelpData* data = NULL);
0f66a9f3 131
2f90df85
RD
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);
0f66a9f3 139 void UseConfig(wxConfigBase *config, const wxString& rootpath = wxEmptyString);
2f90df85
RD
140 void ReadCustomization(wxConfigBase *cfg, wxString path = wxEmptyString);
141 void WriteCustomization(wxConfigBase *cfg, wxString path = wxEmptyString);
142};
0f66a9f3 143
2f90df85
RD
144
145//---------------------------------------------------------------------------
146
13806c7d
RD
147
148enum {
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
2f90df85
RD
161class wxHtmlHelpController : public wxEvtHandler {
162public:
13806c7d 163 wxHtmlHelpController(int style = wxHF_DEFAULTSTYLE);
2f90df85
RD
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);
0f66a9f3 175 void ReadCustomization(wxConfigBase *cfg, wxString path = wxEmptyString);
0f66a9f3 176 void WriteCustomization(wxConfigBase *cfg, wxString path = wxEmptyString);
2f90df85 177 wxHtmlHelpFrame* GetFrame();
0f66a9f3
RD
178};
179
2f90df85 180//---------------------------------------------------------------------------
0f66a9f3 181//---------------------------------------------------------------------------