1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG definitions of html classes
7 // Created: 25-Nov-1998
9 // Copyright: (c) 2003 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
14 "Classes for a simple HTML rendering window, HTML Help Window, etc."
17 %module(package="wx", docstring=DOCSTRING) html
20 #include "wx/wxPython/wxPython.h"
21 #include "wx/wxPython/pyclasses.h"
22 #include "wx/wxPython/pyistream.h"
23 #include "wx/wxPython/printfw.h"
25 #include <wx/html/htmlwin.h>
26 #include <wx/html/htmprint.h>
27 #include <wx/html/helpctrl.h>
28 #include <wx/html/helpwnd.h>
29 #include <wx/html/helpfrm.h>
30 #include <wx/html/helpdlg.h>
35 //---------------------------------------------------------------------------
38 %pythoncode { wx = _core }
39 %pythoncode { __docfilter__ = wx.__DocFilter(globals()) }
41 %include _html_rename.i
44 MAKE_CONST_WXSTRING_NOSWIG(EmptyString);
45 MAKE_CONST_WXSTRING2(HtmlWindowNameStr, wxT("htmlWindow"))
46 MAKE_CONST_WXSTRING2(HtmlPrintoutTitleStr, wxT("Printout"))
47 MAKE_CONST_WXSTRING2(HtmlPrintingTitleStr, wxT("Printing"))
50 // TODO: Split this file into multiple %included files that coresponds to the
51 // wx/html include files (more or less.)
53 //---------------------------------------------------------------------------
64 wxHTML_CLR_FOREGROUND,
65 wxHTML_CLR_BACKGROUND,
75 wxHTML_INDENT_HORIZONTAL,
76 wxHTML_INDENT_VERTICAL,
80 wxHTML_COND_ISIMAGEMAP,
102 // enums for wxHtmlWindow::OnOpeningURL
103 enum wxHtmlOpeningStatus
119 //---------------------------------------------------------------------------
121 class wxHtmlLinkInfo : public wxObject {
123 wxHtmlLinkInfo(const wxString& href, const wxString& target = wxPyEmptyString);
125 wxString GetTarget();
126 wxMouseEvent* GetEvent();
127 wxHtmlCell* GetHtmlCell();
129 void SetEvent(const wxMouseEvent *e);
130 void SetHtmlCell(const wxHtmlCell * e);
133 //---------------------------------------------------------------------------
135 class wxHtmlTag : public wxObject {
137 // Never need to create a new tag from Python...
138 //wxHtmlTag(const wxString& source, int pos, int end_pos, wxHtmlTagsCache* cache);
141 bool HasParam(const wxString& par);
142 wxString GetParam(const wxString& par, int with_commas = false);
144 // Can't do this one as-is, but GetParam should be enough...
145 //int ScanParam(const wxString& par, const char *format, void* param);
147 wxString GetAllParams();
154 //---------------------------------------------------------------------------
156 class wxHtmlParser : public wxObject {
158 // wxHtmlParser(); This is an abstract base class...
160 void SetFS(wxFileSystem *fs);
161 wxFileSystem* GetFS();
162 wxObject* Parse(const wxString& source);
163 void InitParser(const wxString& source);
165 void DoParsing(int begin_pos, int end_pos);
167 // wxObject* GetProduct();
169 void AddTagHandler(wxHtmlTagHandler *handler);
170 wxString* GetSource();
171 void PushTagHandler(wxHtmlTagHandler* handler, wxString tags);
172 void PopTagHandler();
174 // virtual wxFSFile *OpenURL(wxHtmlURLType type, const wxString& url) const;
176 // void AddText(const char* txt) = 0;
177 // void AddTag(const wxHtmlTag& tag);
180 // Returns HTML source inside the element (i.e. between the starting
182 wxString GetInnerSource(const wxHtmlTag& tag);
186 //---------------------------------------------------------------------------
188 class wxHtmlWinParser : public wxHtmlParser {
190 wxHtmlWinParser(wxPyHtmlWindow *wnd = NULL);
192 void SetDC(wxDC *dc);
196 wxPyHtmlWindow* GetWindow();
198 // Sets fonts to be used when displaying HTML page. (if size null then default sizes used).
200 void SetFonts(wxString normal_face, wxString fixed_face, PyObject* sizes=NULL) {
202 if (sizes) temp = int_LIST_helper(sizes);
203 self->SetFonts(normal_face, fixed_face, temp);
209 // Sets font sizes to be relative to the given size or the system
210 // default size; use either specified or default font
211 void SetStandardFonts(int size = -1,
212 const wxString& normal_face = wxPyEmptyString,
213 const wxString& fixed_face = wxPyEmptyString);
216 wxHtmlContainerCell* GetContainer();
217 wxHtmlContainerCell* OpenContainer();
218 wxHtmlContainerCell *SetContainer(wxHtmlContainerCell *c);
219 wxHtmlContainerCell* CloseContainer();
222 void SetFontSize(int s);
224 void SetFontBold(int x);
226 void SetFontItalic(int x);
227 int GetFontUnderlined();
228 void SetFontUnderlined(int x);
230 void SetFontFixed(int x);
232 void SetAlign(int a);
233 wxColour GetLinkColor();
234 void SetLinkColor(const wxColour& clr);
235 wxColour GetActualColor();
236 void SetActualColor(const wxColour& clr);
238 GetActualColour = GetActualColor
239 SetActualColour = SetActualColor
241 void SetLink(const wxString& link);
242 wxFont* CreateCurrentFont();
243 wxHtmlLinkInfo GetLink();
248 //---------------------------------------------------------------------------
251 class wxPyHtmlTagHandler : public wxHtmlTagHandler {
252 DECLARE_DYNAMIC_CLASS(wxPyHtmlTagHandler)
254 wxPyHtmlTagHandler() : wxHtmlTagHandler() {};
256 wxHtmlParser* GetParser() { return m_Parser; }
257 void ParseInner(const wxHtmlTag& tag) { wxHtmlTagHandler::ParseInner(tag); }
259 DEC_PYCALLBACK_STRING__pure(GetSupportedTags);
260 DEC_PYCALLBACK_BOOL_TAG_pure(HandleTag);
265 IMPLEMENT_DYNAMIC_CLASS(wxPyHtmlTagHandler, wxHtmlTagHandler);
267 IMP_PYCALLBACK_STRING__pure(wxPyHtmlTagHandler, wxHtmlTagHandler, GetSupportedTags);
268 IMP_PYCALLBACK_BOOL_TAG_pure(wxPyHtmlTagHandler, wxHtmlTagHandler, HandleTag);
272 %rename(HtmlTagHandler) wxPyHtmlTagHandler;
273 class wxPyHtmlTagHandler : public wxObject {
275 %pythonAppend wxPyHtmlTagHandler "self._setCallbackInfo(self, HtmlTagHandler)"
276 wxPyHtmlTagHandler();
278 void _setCallbackInfo(PyObject* self, PyObject* _class);
280 void SetParser(wxHtmlParser *parser);
281 wxHtmlParser* GetParser();
282 void ParseInner(const wxHtmlTag& tag);
286 //---------------------------------------------------------------------------
289 class wxPyHtmlWinTagHandler : public wxHtmlWinTagHandler {
290 DECLARE_DYNAMIC_CLASS(wxPyHtmlWinTagHandler)
292 wxPyHtmlWinTagHandler() : wxHtmlWinTagHandler() {};
294 wxHtmlWinParser* GetParser() { return m_WParser; }
295 void ParseInner(const wxHtmlTag& tag)
296 { wxHtmlWinTagHandler::ParseInner(tag); }
298 DEC_PYCALLBACK_STRING__pure(GetSupportedTags);
299 DEC_PYCALLBACK_BOOL_TAG_pure(HandleTag);
304 IMPLEMENT_DYNAMIC_CLASS( wxPyHtmlWinTagHandler, wxHtmlWinTagHandler);
306 IMP_PYCALLBACK_STRING__pure(wxPyHtmlWinTagHandler, wxHtmlWinTagHandler, GetSupportedTags);
307 IMP_PYCALLBACK_BOOL_TAG_pure(wxPyHtmlWinTagHandler, wxHtmlWinTagHandler, HandleTag);
311 %rename(HtmlWinTagHandler) wxPyHtmlWinTagHandler;
312 class wxPyHtmlWinTagHandler : public wxPyHtmlTagHandler {
314 %pythonAppend wxPyHtmlWinTagHandler "self._setCallbackInfo(self, HtmlWinTagHandler)"
315 wxPyHtmlWinTagHandler();
317 void _setCallbackInfo(PyObject* self, PyObject* _class);
319 void SetParser(wxHtmlParser *parser);
320 wxHtmlWinParser* GetParser();
321 void ParseInner(const wxHtmlTag& tag);
325 //---------------------------------------------------------------------------
329 class wxPyHtmlTagsModule : public wxHtmlTagsModule {
331 wxPyHtmlTagsModule(PyObject* thc) : wxHtmlTagsModule() {
332 m_tagHandlerClass = thc;
333 Py_INCREF(m_tagHandlerClass);
334 RegisterModule(this);
335 wxHtmlWinParser::AddModule(this);
339 wxPyBlock_t blocked = wxPyBeginBlockThreads();
340 Py_DECREF(m_tagHandlerClass);
341 m_tagHandlerClass = NULL;
342 for (size_t x=0; x < m_objArray.GetCount(); x++) {
343 PyObject* obj = (PyObject*)m_objArray.Item(x);
346 wxPyEndBlockThreads(blocked);
349 void FillHandlersTable(wxHtmlWinParser *parser) {
350 // Wave our magic wand... (if it works it's a miracle! ;-)
352 // First, make a new instance of the tag handler
353 wxPyBlock_t blocked = wxPyBeginBlockThreads();
354 PyObject* arg = PyTuple_New(0);
355 PyObject* obj = PyObject_CallObject(m_tagHandlerClass, arg);
358 // now figure out where it's C++ object is...
359 wxPyHtmlWinTagHandler* thPtr;
360 if (! wxPyConvertSwigPtr(obj, (void **)&thPtr, wxT("wxPyHtmlWinTagHandler"))) {
361 wxPyEndBlockThreads(blocked);
364 wxPyEndBlockThreads(blocked);
367 parser->AddTagHandler(thPtr);
374 PyObject* m_tagHandlerClass;
375 wxArrayPtrVoid m_objArray;
383 void wxHtmlWinParser_AddTagHandler(PyObject* tagHandlerClass) {
384 // Dynamically create a new wxModule. Refcounts tagHandlerClass
385 // and adds itself to the wxModules list and to the wxHtmlWinParser.
386 new wxPyHtmlTagsModule(tagHandlerClass);
391 //---------------------------------------------------------------------------
393 %typemap(out) wxHtmlCell* { $result = wxPyMake_wxObject($1, $owner); }
394 %typemap(out) const wxHtmlCell* { $result = wxPyMake_wxObject($1, $owner); }
396 //---------------------------------------------------------------------------
400 // wxHtmlSelection is data holder with information about text selection.
401 // Selection is defined by two positions (beginning and end of the selection)
402 // and two leaf(!) cells at these positions.
403 class wxHtmlSelection
409 void Set(const wxPoint& fromPos, const wxHtmlCell *fromCell,
410 const wxPoint& toPos, const wxHtmlCell *toCell);
411 %Rename(SetCells, void, Set(const wxHtmlCell *fromCell, const wxHtmlCell *toCell));
413 const wxHtmlCell *GetFromCell() const;
414 const wxHtmlCell *GetToCell() const;
416 // these values are in absolute coordinates:
417 const wxPoint& GetFromPos() const;
418 const wxPoint& GetToPos() const;
420 // these are From/ToCell's private data
421 const wxPoint& GetFromPrivPos() const;
422 const wxPoint& GetToPrivPos() const;
423 void SetFromPrivPos(const wxPoint& pos);
424 void SetToPrivPos(const wxPoint& pos);
427 const bool IsEmpty() const;
432 enum wxHtmlSelectionState
434 wxHTML_SEL_OUT, // currently rendered cell is outside the selection
435 wxHTML_SEL_IN, // ... is inside selection
436 wxHTML_SEL_CHANGING // ... is the cell on which selection state changes
441 // Selection state is passed to wxHtmlCell::Draw so that it can render itself
442 // differently e.g. when inside text selection or outside it.
443 class wxHtmlRenderingState
446 wxHtmlRenderingState();
447 ~wxHtmlRenderingState();
449 void SetSelectionState(wxHtmlSelectionState s);
450 wxHtmlSelectionState GetSelectionState() const;
452 void SetFgColour(const wxColour& c);
453 const wxColour& GetFgColour() const;
454 void SetBgColour(const wxColour& c);
455 const wxColour& GetBgColour() const;
460 // HTML rendering customization. This class is used when rendering wxHtmlCells
462 class wxHtmlRenderingStyle
465 virtual wxColour GetSelectedTextColour(const wxColour& clr) = 0;
466 virtual wxColour GetSelectedTextBgColour(const wxColour& clr) = 0;
470 class wxDefaultHtmlRenderingStyle : public wxHtmlRenderingStyle
473 virtual wxColour GetSelectedTextColour(const wxColour& clr);
474 virtual wxColour GetSelectedTextBgColour(const wxColour& clr);
479 // Information given to cells when drawing them. Contains rendering state,
480 // selection information and rendering style object that can be used to
481 // customize the output.
482 class wxHtmlRenderingInfo
485 wxHtmlRenderingInfo();
486 ~wxHtmlRenderingInfo();
488 void SetSelection(wxHtmlSelection *s);
489 wxHtmlSelection *GetSelection() const;
491 void SetStyle(wxHtmlRenderingStyle *style);
492 wxHtmlRenderingStyle& GetStyle();
494 wxHtmlRenderingState& GetState();
497 //---------------------------------------------------------------------------
503 wxHTML_FIND_EXACT = 1,
504 wxHTML_FIND_NEAREST_BEFORE = 2,
505 wxHTML_FIND_NEAREST_AFTER = 4
509 class wxHtmlCell : public wxObject {
511 %typemap(out) wxHtmlCell*; // turn off this typemap
516 // Turn it back on again
517 %typemap(out) wxHtmlCell* { $result = wxPyMake_wxObject($1, $owner); }
525 // Returns the maximum possible length of the cell.
526 // Call Layout at least once before using GetMaxTotalWidth()
527 int GetMaxTotalWidth() const;
529 const wxString& GetId() const;
530 void SetId(const wxString& id);
531 wxHtmlLinkInfo* GetLink(int x = 0, int y = 0);
532 wxHtmlCell* GetNext();
533 wxHtmlContainerCell* GetParent();
534 wxHtmlCell* GetFirstChild() const;
536 // Returns cursor to be used when mouse is over the cell:
537 wxCursor GetCursor() const;
539 // Formatting cells are not visible on the screen, they only alter
541 bool IsFormattingCell() const;
544 void SetLink(const wxHtmlLinkInfo& link);
546 %disownarg(wxHtmlCell*);
547 void SetNext(wxHtmlCell *cell);
548 %cleardisown(wxHtmlCell*);
550 void SetParent(wxHtmlContainerCell *p);
551 void SetPos(int x, int y);
553 void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2,
554 wxHtmlRenderingInfo& info);
555 void DrawInvisible(wxDC& dc, int x, int y,
556 wxHtmlRenderingInfo& info);
557 const wxHtmlCell* Find(int condition, const void* param);
559 bool AdjustPagebreak(int* INOUT);
560 void SetCanLiveOnPagebreak(bool can);
562 // Can the line be broken before this cell?
563 bool IsLinebreakAllowed() const;
565 // Returns True for simple == terminal cells, i.e. not composite ones.
566 // This if for internal usage only and may disappear in future versions!
567 bool IsTerminalCell() const;
569 // Find a cell inside this cell positioned at the given coordinates
570 // (relative to this's positions). Returns NULL if no such cell exists.
571 // The flag can be used to specify whether to look for terminal or
572 // nonterminal cells or both. In either case, returned cell is deepest
573 // cell in cells tree that contains [x,y].
574 wxHtmlCell *FindCellByPos(wxCoord x, wxCoord y,
575 unsigned flags = wxHTML_FIND_EXACT) const;
577 // Returns absolute position of the cell on HTML canvas
578 wxPoint GetAbsPos() const;
580 // Returns first (last) terminal cell inside this cell. It may return NULL,
581 // but it is rare -- only if there are no terminals in the tree.
582 wxHtmlCell *GetFirstTerminal() const ;
583 wxHtmlCell *GetLastTerminal() const ;
585 // Returns cell's depth, i.e. how far under the root cell it is
586 // (if it is the root, depth is 0)
587 unsigned GetDepth() const;
589 // Returns True if the cell appears before 'cell' in natural order of
590 // cells (= as they are read). If cell A is (grand)parent of cell B,
591 // then both A.IsBefore(B) and B.IsBefore(A) always return True.
592 bool IsBefore(wxHtmlCell *cell) const;
594 // Converts the cell into text representation. If sel != NULL then
595 // only part of the cell inside the selection is converted.
596 wxString ConvertToText(wxHtmlSelection *sel) const;
600 class wxHtmlWordCell : public wxHtmlCell
603 wxHtmlWordCell(const wxString& word, wxDC& dc);
604 wxString ConvertToText(wxHtmlSelection *sel) const;
605 bool IsLinebreakAllowed() const;
606 void SetPreviousWord(wxHtmlWordCell *cell);
610 class wxHtmlContainerCell : public wxHtmlCell {
612 wxHtmlContainerCell(wxHtmlContainerCell *parent);
614 %disownarg(wxHtmlCell*);
615 void InsertCell(wxHtmlCell *cell);
616 %cleardisown(wxHtmlCell*);
618 void SetAlignHor(int al);
620 void SetAlignVer(int al);
622 void SetIndent(int i, int what, int units = wxHTML_UNITS_PIXELS);
623 int GetIndent(int ind);
624 int GetIndentUnits(int ind);
625 void SetAlign(const wxHtmlTag& tag);
626 void SetWidthFloat(int w, int units);
627 %Rename(SetWidthFloatFromTag, void, SetWidthFloat(const wxHtmlTag& tag));
628 void SetMinHeight(int h, int align = wxHTML_ALIGN_TOP);
629 void SetBackgroundColour(const wxColour& clr);
630 wxColour GetBackgroundColour();
631 void SetBorder(const wxColour& clr1, const wxColour& clr2);
632 wxHtmlCell* GetFirstChild();
633 %pragma(python) addtoclass = "GetFirstCell = GetFirstChild"
638 class wxHtmlColourCell : public wxHtmlCell {
640 wxHtmlColourCell(const wxColour& clr, int flags = wxHTML_CLR_FOREGROUND);
645 class wxHtmlFontCell : public wxHtmlCell
648 wxHtmlFontCell(wxFont *font);
652 class wxHtmlWidgetCell : public wxHtmlCell {
654 wxHtmlWidgetCell(wxWindow* wnd, int w = 0);
661 //---------------------------------------------------------------------------
663 //---------------------------------------------------------------------------
667 %{ // here's the C++ version
668 class wxPyHtmlFilter : public wxHtmlFilter {
669 DECLARE_ABSTRACT_CLASS(wxPyHtmlFilter)
671 wxPyHtmlFilter() : wxHtmlFilter() {}
673 // returns True if this filter is able to open&read given file
674 virtual bool CanRead(const wxFSFile& file) const {
677 wxPyBlock_t blocked = wxPyBeginBlockThreads();
678 if ((found = wxPyCBH_findCallback(m_myInst, "CanRead"))) {
679 PyObject* obj = wxPyMake_wxObject((wxFSFile*)&file,false); // cast away const
680 rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj));
683 wxPyEndBlockThreads(blocked);
688 // Reads given file and returns HTML document.
689 // Returns empty string if opening failed
690 virtual wxString ReadFile(const wxFSFile& file) const {
693 wxPyBlock_t blocked = wxPyBeginBlockThreads();
694 if ((found = wxPyCBH_findCallback(m_myInst, "ReadFile"))) {
695 PyObject* obj = wxPyMake_wxObject((wxFSFile*)&file,false); // cast away const
697 ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(O)", obj));
700 rval = Py2wxString(ro);
704 wxPyEndBlockThreads(blocked);
711 IMPLEMENT_ABSTRACT_CLASS(wxPyHtmlFilter, wxHtmlFilter);
715 // And now the version seen by SWIG
717 %rename(HtmlFilter) wxPyHtmlFilter;
718 class wxPyHtmlFilter : public wxObject {
720 %pythonAppend wxPyHtmlFilter "self._setCallbackInfo(self, HtmlFilter)"
723 void _setCallbackInfo(PyObject* self, PyObject* _class);
727 // TODO: wxHtmlFilterHTML
730 //---------------------------------------------------------------------------
732 //---------------------------------------------------------------------------
736 class wxPyHtmlWindow : public wxHtmlWindow {
737 DECLARE_ABSTRACT_CLASS(wxPyHtmlWindow)
739 wxPyHtmlWindow(wxWindow *parent, wxWindowID id = -1,
740 const wxPoint& pos = wxDefaultPosition,
741 const wxSize& size = wxDefaultSize,
742 long style = wxHW_DEFAULT_STYLE,
743 const wxString& name = wxPyHtmlWindowNameStr)
744 : wxHtmlWindow(parent, id, pos, size, style, name) {};
745 wxPyHtmlWindow() : wxHtmlWindow() {};
747 bool ScrollToAnchor(const wxString& anchor) {
748 return wxHtmlWindow::ScrollToAnchor(anchor);
751 bool HasAnchor(const wxString& anchor) {
752 const wxHtmlCell *c = m_Cell->Find(wxHTML_COND_ISANCHOR, &anchor);
756 void OnLinkClicked(const wxHtmlLinkInfo& link);
758 wxHtmlOpeningStatus OnOpeningURL(wxHtmlURLType type,
760 wxString *redirect) const;
762 DEC_PYCALLBACK__STRING(OnSetTitle);
763 DEC_PYCALLBACK__CELLINTINT(OnCellMouseHover);
764 DEC_PYCALLBACK__CELLINTINTME(OnCellClicked);
768 IMPLEMENT_ABSTRACT_CLASS( wxPyHtmlWindow, wxHtmlWindow );
769 IMP_PYCALLBACK__STRING(wxPyHtmlWindow, wxHtmlWindow, OnSetTitle);
770 IMP_PYCALLBACK__CELLINTINT(wxPyHtmlWindow, wxHtmlWindow, OnCellMouseHover);
771 IMP_PYCALLBACK__CELLINTINTME(wxPyHtmlWindow, wxHtmlWindow, OnCellClicked);
774 void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) {
776 wxPyBlock_t blocked = wxPyBeginBlockThreads();
777 if ((found = wxPyCBH_findCallback(m_myInst, "OnLinkClicked"))) {
778 PyObject* obj = wxPyConstructObject((void*)&link, wxT("wxHtmlLinkInfo"), 0);
779 wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj));
782 wxPyEndBlockThreads(blocked);
784 wxHtmlWindow::OnLinkClicked(link);
788 wxHtmlOpeningStatus wxPyHtmlWindow::OnOpeningURL(wxHtmlURLType type,
790 wxString *redirect) const {
792 wxHtmlOpeningStatus rval;
793 wxPyBlock_t blocked = wxPyBeginBlockThreads();
794 if ((found = wxPyCBH_findCallback(m_myInst, "OnOpeningURL"))) {
796 PyObject* s = wx2PyString(url);
797 ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(iO)", type, s));
799 if (PyString_Check(ro)
800 #if PYTHON_API_VERSION >= 1009
801 || PyUnicode_Check(ro)
804 *redirect = Py2wxString(ro);
805 rval = wxHTML_REDIRECT;
808 PyObject* num = PyNumber_Int(ro);
809 rval = (wxHtmlOpeningStatus)PyInt_AsLong(num);
814 wxPyEndBlockThreads(blocked);
816 rval = wxHtmlWindow::OnOpeningURL(type, url, redirect);
825 MustHaveApp(wxPyHtmlWindow);
827 %rename(HtmlWindow) wxPyHtmlWindow;
828 class wxPyHtmlWindow : public wxScrolledWindow {
830 %pythonAppend wxPyHtmlWindow "self._setCallbackInfo(self, HtmlWindow); self._setOORInfo(self)"
831 %pythonAppend wxPyHtmlWindow() ""
832 %typemap(out) wxPyHtmlWindow*; // turn off this typemap
834 wxPyHtmlWindow(wxWindow *parent, int id = -1,
835 const wxPoint& pos = wxDefaultPosition,
836 const wxSize& size = wxDefaultSize,
837 int style=wxHW_DEFAULT_STYLE,
838 const wxString& name = wxPyHtmlWindowNameStr);
839 %RenameCtor(PreHtmlWindow, wxPyHtmlWindow());
841 // Turn it back on again
842 %typemap(out) wxPyHtmlWindow* { $result = wxPyMake_wxObject($1, $owner); }
844 bool Create(wxWindow *parent, int id = -1,
845 const wxPoint& pos = wxDefaultPosition,
846 const wxSize& size = wxDefaultSize,
847 int style=wxHW_SCROLLBAR_AUTO,
848 const wxString& name = wxPyHtmlWindowNameStr);
851 void _setCallbackInfo(PyObject* self, PyObject* _class);
854 // Set HTML page and display it. !! source is HTML document itself,
855 // it is NOT address/filename of HTML document. If you want to
856 // specify document location, use LoadPage() istead
857 // Return value : False if an error occurred, True otherwise
858 bool SetPage(const wxString& source);
860 // Load HTML page from given location. Location can be either
861 // a) /usr/wxGTK2/docs/html/wx.htm
862 // b) http://www.somewhere.uk/document.htm
863 // c) ftp://ftp.somesite.cz/pub/something.htm
864 // In case there is no prefix (http:,ftp:), the method
865 // will try to find it itself (1. local file, then http or ftp)
866 // After the page is loaded, the method calls SetPage() to display it.
867 // Note : you can also use path relative to previously loaded page
868 // Return value : same as SetPage
869 bool LoadPage(const wxString& location);
871 // Loads HTML page from file
872 bool LoadFile(const wxString& filename);
874 // Append to current page
875 bool AppendToPage(const wxString& source);
877 // Returns full location of opened page
878 wxString GetOpenedPage();
880 // Returns anchor within opened page
881 wxString GetOpenedAnchor();
883 // Returns <TITLE> of opened page or empty string otherwise
884 wxString GetOpenedPageTitle();
886 // Sets frame in which page title will be displayed. Format is format of
887 // frame title, e.g. "HtmlHelp : %s". It must contain exactly one %s
888 void SetRelatedFrame(wxFrame* frame, const wxString& format);
889 wxFrame* GetRelatedFrame();
891 // After(!) calling SetRelatedFrame, this sets statusbar slot where messages
892 // will be displayed. Default is -1 = no messages.
893 void SetRelatedStatusBar(int bar);
895 // Sets fonts to be used when displaying HTML page.
897 void SetFonts(wxString normal_face, wxString fixed_face, PyObject* sizes=NULL) {
899 if (sizes) temp = int_LIST_helper(sizes);
900 self->SetFonts(normal_face, fixed_face, temp);
906 // Sets font sizes to be relative to the given size or the system
907 // default size; use either specified or default font
908 void SetStandardFonts(int size = -1,
909 const wxString& normal_face = wxPyEmptyString,
910 const wxString& fixed_face = wxPyEmptyString);
913 void, SetLabel(const wxString& title),
916 // Sets space between text and window borders.
917 void SetBorders(int b);
919 // Sets the bitmap to use for background (currnetly it will be tiled,
920 // when/if we have CSS support we could add other possibilities...)
921 void SetBackgroundImage(const wxBitmap& bmpBg);
923 // Saves custom settings into cfg config. it will use the path 'path'
924 // if given, otherwise it will save info into currently selected path.
925 // saved values : things set by SetFonts, SetBorders.
926 void ReadCustomization(wxConfigBase *cfg, wxString path = wxPyEmptyString);
927 void WriteCustomization(wxConfigBase *cfg, wxString path = wxPyEmptyString);
929 // Goes to previous/next page (in browsing history)
930 // Returns True if successful, False otherwise
932 bool HistoryForward();
933 bool HistoryCanBack();
934 bool HistoryCanForward();
939 // Returns pointer to conteiners/cells structure.
940 wxHtmlContainerCell* GetInternalRepresentation();
942 // Returns a pointer to the parser.
943 wxHtmlWinParser* GetParser();
945 bool ScrollToAnchor(const wxString& anchor);
946 bool HasAnchor(const wxString& anchor);
949 static void AddFilter(wxPyHtmlFilter *filter);
951 // Helper functions to select parts of page:
952 void SelectWord(const wxPoint& pos);
953 void SelectLine(const wxPoint& pos);
956 // Convert selection to text:
957 wxString SelectionToText();
959 // Converts current page to text:
962 void OnLinkClicked(const wxHtmlLinkInfo& link);
963 void OnSetTitle(const wxString& title);
964 void OnCellMouseHover(wxHtmlCell *cell, wxCoord x, wxCoord y);
965 void OnCellClicked(wxHtmlCell *cell,
966 wxCoord x, wxCoord y,
967 const wxMouseEvent& event);
968 %MAKE_BASE_FUNC(HtmlWindow, OnLinkClicked);
969 %MAKE_BASE_FUNC(HtmlWindow, OnSetTitle);
970 %MAKE_BASE_FUNC(HtmlWindow, OnCellMouseHover);
971 %MAKE_BASE_FUNC(HtmlWindow, OnCellClicked);
973 static wxVisualAttributes
974 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
980 //---------------------------------------------------------------------------
981 //---------------------------------------------------------------------------
985 MustHaveApp(wxHtmlDCRenderer);
987 class wxHtmlDCRenderer : public wxObject {
992 void SetDC(wxDC *dc, int maxwidth);
993 void SetSize(int width, int height);
994 void SetHtmlText(const wxString& html,
995 const wxString& basepath = wxPyEmptyString,
997 // Sets fonts to be used when displaying HTML page. (if size null then default sizes used).
999 void SetFonts(wxString normal_face, wxString fixed_face, PyObject* sizes=NULL) {
1001 if (sizes) temp = int_LIST_helper(sizes);
1002 self->SetFonts(normal_face, fixed_face, temp);
1008 // Sets font sizes to be relative to the given size or the system
1009 // default size; use either specified or default font
1010 void SetStandardFonts(int size = -1,
1011 const wxString& normal_face = wxPyEmptyString,
1012 const wxString& fixed_face = wxPyEmptyString);
1014 int Render(int x, int y, int from = 0, int dont_render = false, int maxHeight = INT_MAX,
1015 //int *known_pagebreaks = NULL, int number_of_pages = 0
1016 int* choices=NULL, int LCOUNT = 0
1018 int GetTotalHeight();
1019 // returns total height of the html document
1020 // (compare Render's return value with this)
1031 MustHaveApp(wxHtmlPrintout);
1033 class wxHtmlPrintout : public wxPyPrintout {
1035 wxHtmlPrintout(const wxString& title = wxPyHtmlPrintoutTitleStr);
1036 //~wxHtmlPrintout(); wxPrintPreview object takes ownership...
1038 void SetHtmlText(const wxString& html,
1039 const wxString &basepath = wxPyEmptyString,
1041 void SetHtmlFile(const wxString &htmlfile);
1042 void SetHeader(const wxString& header, int pg = wxPAGE_ALL);
1043 void SetFooter(const wxString& footer, int pg = wxPAGE_ALL);
1045 // Sets fonts to be used when displaying HTML page. (if size null then default sizes used).
1047 void SetFonts(wxString normal_face, wxString fixed_face, PyObject* sizes=NULL) {
1049 if (sizes) temp = int_LIST_helper(sizes);
1050 self->SetFonts(normal_face, fixed_face, temp);
1056 // Sets font sizes to be relative to the given size or the system
1057 // default size; use either specified or default font
1058 void SetStandardFonts(int size = -1,
1059 const wxString& normal_face = wxPyEmptyString,
1060 const wxString& fixed_face = wxPyEmptyString);
1062 void SetMargins(float top = 25.2, float bottom = 25.2,
1063 float left = 25.2, float right = 25.2,
1066 // Adds input filter
1067 static void AddFilter(wxHtmlFilter *filter);
1070 static void CleanUpStatics();
1075 MustHaveApp(wxHtmlEasyPrinting);
1077 class wxHtmlEasyPrinting : public wxObject {
1079 wxHtmlEasyPrinting(const wxString& name = wxPyHtmlPrintingTitleStr,
1080 wxWindow *parentWindow = NULL);
1081 ~wxHtmlEasyPrinting();
1083 void PreviewFile(const wxString &htmlfile);
1084 void PreviewText(const wxString &htmltext, const wxString& basepath = wxPyEmptyString);
1085 void PrintFile(const wxString &htmlfile);
1086 void PrintText(const wxString &htmltext, const wxString& basepath = wxPyEmptyString);
1087 // void PrinterSetup();
1089 void SetHeader(const wxString& header, int pg = wxPAGE_ALL);
1090 void SetFooter(const wxString& footer, int pg = wxPAGE_ALL);
1093 void SetFonts(wxString normal_face, wxString fixed_face, PyObject* sizes=NULL) {
1095 if (sizes) temp = int_LIST_helper(sizes);
1096 self->SetFonts(normal_face, fixed_face, temp);
1102 // Sets font sizes to be relative to the given size or the system
1103 // default size; use either specified or default font
1104 void SetStandardFonts(int size = -1,
1105 const wxString& normal_face = wxPyEmptyString,
1106 const wxString& fixed_face = wxPyEmptyString);
1108 wxPrintData *GetPrintData() {return m_PrintData;}
1109 wxPageSetupDialogData *GetPageSetupData() {return m_PageSetupData;}
1114 //---------------------------------------------------------------------------
1115 //---------------------------------------------------------------------------
1119 class wxHtmlBookRecord {
1121 wxHtmlBookRecord(const wxString& bookfile, const wxString& basepath,
1122 const wxString& title, const wxString& start);
1124 wxString GetBookFile();
1125 wxString GetTitle();
1126 wxString GetStart();
1127 wxString GetBasePath();
1129 void SetContentsRange(int start, int end);
1130 int GetContentsStart();
1131 int GetContentsEnd();
1133 void SetTitle(const wxString& title);
1134 void SetBasePath(const wxString& path);
1135 void SetStart(const wxString& start);
1137 wxString GetFullPath(const wxString &page) const;
1140 //---------------------------------------------------------------------------
1141 // WXWIN_COMPATIBILITY_2_4
1143 struct wxHtmlContentsItem
1146 int GetLevel() { return self->m_Level; }
1147 int GetID() { return self->m_ID; }
1148 wxString GetName() { return self->m_Name; }
1149 wxString GetPage() { return self->m_Page; }
1150 wxHtmlBookRecord* GetBook() { return self->m_Book; }
1154 //---------------------------------------------------------------------------
1156 class wxHtmlSearchStatus
1159 //wxHtmlSearchStatus(wxHtmlHelpData* base, const wxString& keyword,
1160 // const wxString& book = wxPyEmptyString);
1165 const wxString& GetName();
1168 //---------------------------------------------------------------------------
1170 class wxHtmlHelpData {
1175 void SetTempDir(const wxString& path);
1176 bool AddBook(const wxString& book);
1177 // bool AddBookParam(const wxString& title, const wxString& contfile,
1178 // const wxString& indexfile=wxPyEmptyString,
1179 // const wxString& deftopic=wxPyEmptyString,
1180 // const wxString& path=wxPyEmptyString);
1182 wxString FindPageByName(const wxString& page);
1183 wxString FindPageById(int id);
1185 // TODO: this one needs fixed...
1186 const wxHtmlBookRecArray& GetBookRecArray();
1190 //---------------------------------------------------------------------------
1203 wxHF_ICONS_BOOK_CHAPTER,
1223 wxID_HTML_BOOKMARKSLIST,
1224 wxID_HTML_BOOKMARKSADD,
1225 wxID_HTML_BOOKMARKSREMOVE,
1227 wxID_HTML_INDEXPAGE,
1228 wxID_HTML_INDEXLIST,
1229 wxID_HTML_INDEXTEXT,
1230 wxID_HTML_INDEXBUTTON,
1231 wxID_HTML_INDEXBUTTONALL,
1233 wxID_HTML_SEARCHPAGE,
1234 wxID_HTML_SEARCHTEXT,
1235 wxID_HTML_SEARCHLIST,
1236 wxID_HTML_SEARCHBUTTON,
1237 wxID_HTML_SEARCHCHOICE,
1243 MustHaveApp(wxHtmlHelpWindow);
1245 class wxHtmlHelpWindow : public wxWindow
1248 %pythonAppend wxHtmlHelpWindow "self._setOORInfo(self)"
1249 %pythonAppend wxHtmlHelpWindow() ""
1250 %typemap(out) wxHtmlHelpWindow*; // turn off this typemap
1252 wxHtmlHelpWindow(wxWindow* parent, wxWindowID wxWindowID,
1253 const wxPoint& pos = wxDefaultPosition,
1254 const wxSize& size = wxDefaultSize,
1255 int style = wxTAB_TRAVERSAL|wxNO_BORDER,
1256 int helpStyle = wxHF_DEFAULT_STYLE,
1257 wxHtmlHelpData* data = NULL);
1258 %RenameCtor(PreHtmlHelpWindow, wxHtmlHelpWindow(wxHtmlHelpData* data = NULL));
1260 // Turn it back on again
1261 %typemap(out) wxHtmlHelpWindow* { $result = wxPyMake_wxObject($1, $owner); }
1263 bool Create(wxWindow* parent, wxWindowID id,
1264 const wxPoint& pos = wxDefaultPosition,
1265 const wxSize& size = wxDefaultSize,
1266 int style = wxTAB_TRAVERSAL|wxNO_BORDER,
1267 int helpStyle = wxHF_DEFAULT_STYLE);
1269 wxHtmlHelpData* GetData();
1270 wxHtmlHelpController* GetController() const;
1272 %disownarg( wxHtmlHelpController* controller );
1273 void SetController(wxHtmlHelpController* controller);
1274 %cleardisown( wxHtmlHelpController* controller );
1276 // Displays page x. If not found it will offect the user a choice of
1278 // Looking for the page runs in these steps:
1279 // 1. try to locate file named x (if x is for example "doc/howto.htm")
1280 // 2. try to open starting page of book x
1281 // 3. try to find x in contents (if x is for example "How To ...")
1282 // 4. try to find x in index (if x is for example "How To ...")
1283 bool Display(const wxString& x);
1285 // Alternative version that works with numeric ID.
1286 // (uses extension to MS format, <param name="ID" value=id>, see docs)
1287 %Rename(DisplayID, bool, Display(int id));
1289 // Displays help window and focuses contents.
1290 bool DisplayContents();
1292 // Displays help window and focuses index.
1293 bool DisplayIndex();
1295 // Searches for keyword. Returns true and display page if found, return
1297 // Syntax of keyword is Altavista-like:
1298 // * words are separated by spaces
1299 // (but "\"hello world\"" is only one world "hello world")
1300 // * word may be pretended by + or -
1301 // (+ : page must contain the word ; - : page can't contain the word)
1302 // * if there is no + or - before the word, + is default
1303 bool KeywordSearch(const wxString& keyword,
1304 wxHelpSearchMode mode = wxHELP_SEARCH_ALL);
1306 void UseConfig(wxConfigBase *config, const wxString& rootpath = wxEmptyString);
1308 // Saves custom settings into cfg config. it will use the path 'path'
1309 // if given, otherwise it will save info into currently selected path.
1310 // saved values : things set by SetFonts, SetBorders.
1311 void ReadCustomization(wxConfigBase *cfg, const wxString& path = wxEmptyString);
1312 void WriteCustomization(wxConfigBase *cfg, const wxString& path = wxEmptyString);
1314 // call this to let wxHtmlHelpWindow know page changed
1315 void NotifyPageChanged();
1317 // Refreshes Contents and Index tabs
1318 void RefreshLists();
1320 // Gets the HTML window
1321 wxHtmlWindow* GetHtmlWindow() const;
1323 // Gets the splitter window
1324 wxSplitterWindow* GetSplitterWindow();
1327 wxToolBar* GetToolBar() const;
1329 // Gets the configuration data
1330 wxHtmlHelpFrameCfg& GetCfgData();
1332 // Gets the tree control
1333 wxTreeCtrl *GetTreeCtrl() const;
1338 class wxHtmlWindowEvent: public wxNotifyEvent
1341 wxHtmlWindowEvent(wxEventType commandType = wxEVT_NULL, int id = 0):
1342 wxNotifyEvent(commandType, id);
1344 void SetURL(const wxString& url);
1345 const wxString& GetURL() const;
1350 MustHaveApp(wxHtmlHelpFrame);
1352 class wxHtmlHelpFrame : public wxFrame {
1354 %pythonAppend wxHtmlHelpFrame "self._setOORInfo(self)"
1355 %pythonAppend wxHtmlHelpFrame() ""
1356 %typemap(out) wxHtmlHelpFrame*; // turn off this typemap
1358 wxHtmlHelpFrame(wxWindow* parent, int wxWindowID,
1359 const wxString& title = wxPyEmptyString,
1360 int style = wxHF_DEFAULTSTYLE, wxHtmlHelpData* data = NULL);
1361 %RenameCtor(PreHtmlHelpFrame, wxHtmlHelpFrame(wxHtmlHelpData* data = NULL));
1363 // Turn it back on again
1364 %typemap(out) wxHtmlHelpFrame* { $result = wxPyMake_wxObject($1, $owner); }
1366 bool Create(wxWindow* parent, wxWindowID id,
1367 const wxString& title = wxPyEmptyString,
1368 int style = wxHF_DEFAULT_STYLE);
1370 wxHtmlHelpData* GetData();
1371 void SetTitleFormat(const wxString& format);
1373 void AddGrabIfNeeded();
1375 /// Returns the help controller associated with the window.
1376 wxHtmlHelpController* GetController() const;
1378 /// Sets the help controller associated with the window.
1379 %disownarg( wxHtmlHelpController* controller );
1380 void SetController(wxHtmlHelpController* controller);
1381 %cleardisown( wxHtmlHelpController* controller );
1383 /// Returns the help window.
1384 wxHtmlHelpWindow* GetHelpWindow() const;
1387 %# For compatibility from before the refactor
1388 def Display(self, x):
1389 return self.GetHelpWindow().Display(x)
1390 def DisplayID(self, x):
1391 return self.GetHelpWindow().DisplayID(id)
1392 def DisplayContents(self):
1393 return self.GetHelpWindow().DisplayContents()
1394 def DisplayIndex(self):
1395 return self.GetHelpWindow().DisplayIndex()
1397 def KeywordSearch(self, keyword):
1398 return self.GetHelpWindow().KeywordSearch(keyword)
1400 def UseConfig(self, config, rootpath=""):
1401 return self.GetHelpWindow().UseConfig(config, rootpath)
1402 def ReadCustomization(self, config, rootpath=""):
1403 return self.GetHelpWindow().ReadCustomization(config, rootpath)
1404 def WriteCustomization(self, config, rootpath=""):
1405 return self.GetHelpWindow().WriteCustomization(config, rootpath)
1411 MustHaveApp(wxHtmlHelpDialog);
1413 class wxHtmlHelpDialog : public wxDialog
1416 %pythonAppend wxHtmlHelpDialog "self._setOORInfo(self)"
1417 %pythonAppend wxHtmlHelpDialog() ""
1418 %typemap(out) wxHtmlHelpDialog*; // turn off this typemap
1420 wxHtmlHelpDialog(wxWindow* parent, wxWindowID wxWindowID,
1421 const wxString& title = wxPyEmptyString,
1422 int style = wxHF_DEFAULT_STYLE, wxHtmlHelpData* data = NULL);
1423 %RenameCtor(PreHtmlHelpDialog, wxHtmlHelpDialog(wxHtmlHelpData* data = NULL));
1425 // Turn it back on again
1426 %typemap(out) wxHtmlHelpDialog* { $result = wxPyMake_wxObject($1, $owner); }
1428 bool Create(wxWindow* parent, wxWindowID id, const wxString& title = wxPyEmptyString,
1429 int style = wxHF_DEFAULT_STYLE);
1431 /// Returns the data associated with this dialog.
1432 wxHtmlHelpData* GetData();
1434 /// Returns the controller that created this dialog.
1435 wxHtmlHelpController* GetController() const;
1437 /// Sets the controller associated with this dialog.
1438 %disownarg( wxHtmlHelpController* controller );
1439 void SetController(wxHtmlHelpController* controller);
1440 %cleardisown( wxHtmlHelpController* controller );
1442 /// Returns the help window.
1443 wxHtmlHelpWindow* GetHelpWindow() const;
1445 // Sets format of title of the frame. Must contain exactly one "%s"
1446 // (for title of displayed HTML page)
1447 void SetTitleFormat(const wxString& format);
1449 // Override to add custom buttons to the toolbar
1450 // virtual void AddToolbarButtons(wxToolBar* WXUNUSED(toolBar), int WXUNUSED(style)) {};
1455 //---------------------------------------------------------------------------
1458 // TODO: Make virtual methods of this class overridable in Python.
1460 MustHaveApp(wxHelpControllerBase);
1462 class wxHelpControllerBase: public wxObject
1465 // wxHelpControllerBase(wxWindow* parentWindow = NULL);
1466 // ~wxHelpControllerBase();
1468 %nokwargs Initialize;
1469 virtual bool Initialize(const wxString& file, int server );
1470 virtual bool Initialize(const wxString& file);
1472 virtual void SetViewer(const wxString& viewer, long flags = 0);
1474 // If file is "", reloads file given in Initialize
1475 virtual bool LoadFile(const wxString& file = wxEmptyString) /* = 0 */;
1477 // Displays the contents
1478 virtual bool DisplayContents(void) /* = 0 */;
1480 %nokwargs DisplaySection;
1482 // Display the given section
1483 virtual bool DisplaySection(int sectionNo) /* = 0 */;
1485 // Display the section using a context id
1486 virtual bool DisplayContextPopup(int contextId);
1488 // Display the text in a popup, if possible
1489 virtual bool DisplayTextPopup(const wxString& text, const wxPoint& pos);
1491 // By default, uses KeywordSection to display a topic. Implementations
1492 // may override this for more specific behaviour.
1493 virtual bool DisplaySection(const wxString& section);
1495 virtual bool DisplayBlock(long blockNo) /* = 0 */;
1496 virtual bool KeywordSearch(const wxString& k,
1497 wxHelpSearchMode mode = wxHELP_SEARCH_ALL) /* = 0 */;
1499 /// Allows one to override the default settings for the help frame.
1500 virtual void SetFrameParameters(const wxString& title,
1502 const wxPoint& pos = wxDefaultPosition,
1503 bool newFrameEachTime = false);
1505 /// Obtains the latest settings used by the help frame and the help
1507 virtual wxFrame *GetFrameParameters(wxSize *size = NULL,
1508 wxPoint *pos = NULL,
1509 bool *newFrameEachTime = NULL);
1511 virtual bool Quit() /* = 0 */;
1513 virtual void OnQuit();
1515 /// Set the window that can optionally be used for the help window's parent.
1516 virtual void SetParentWindow(wxWindow* win);
1518 /// Get the window that can optionally be used for the help window's parent.
1519 virtual wxWindow* GetParentWindow() const;
1526 MustHaveApp(wxHtmlHelpController);
1528 class wxHtmlHelpController : public wxHelpControllerBase
1531 // %pythonAppend wxHtmlHelpController "self._setOORInfo(self)"
1533 wxHtmlHelpController(int style = wxHF_DEFAULT_STYLE, wxWindow* parentWindow = NULL);
1534 ~wxHtmlHelpController();
1536 wxHtmlHelpWindow* GetHelpWindow();
1537 void SetHelpWindow(wxHtmlHelpWindow* helpWindow);
1539 wxHtmlHelpFrame* GetFrame();
1540 wxHtmlHelpDialog* GetDialog();
1542 void SetTitleFormat(const wxString& format);
1543 void SetTempDir(const wxString& path);
1544 bool AddBook(const wxString& book, int show_wait_msg = false);
1545 void Display(const wxString& x);
1546 %Rename(DisplayID, void, Display(int id));
1547 void DisplayContents();
1548 void DisplayIndex();
1549 bool KeywordSearch(const wxString& keyword);
1550 void UseConfig(wxConfigBase *config, const wxString& rootpath = wxPyEmptyString);
1551 void ReadCustomization(wxConfigBase *cfg, wxString path = wxPyEmptyString);
1552 void WriteCustomization(wxConfigBase *cfg, wxString path = wxPyEmptyString);
1554 void MakeModalIfNeeded();
1555 wxWindow* FindTopLevelWindow();
1561 * A convenience class particularly for use on wxMac,
1562 * where you can only show modal dialogs from a modal
1567 * wxHtmlModalHelp help(parent, filename, topic);
1569 * If topic is empty, the help contents is displayed.
1572 class wxHtmlModalHelp
1575 wxHtmlModalHelp(wxWindow* parent, const wxString& helpFile,
1576 const wxString& topic = wxEmptyString,
1577 int style = wxHF_DEFAULT_STYLE | wxHF_DIALOG | wxHF_MODAL);
1581 //---------------------------------------------------------------------------
1583 wxPyPtrTypeMap_Add("wxHtmlTagHandler", "wxPyHtmlTagHandler");
1584 wxPyPtrTypeMap_Add("wxHtmlWinTagHandler", "wxPyHtmlWinTagHandler");
1585 wxPyPtrTypeMap_Add("wxHtmlWindow", "wxPyHtmlWindow");
1586 wxPyPtrTypeMap_Add("wxHtmlFilter", "wxPyHtmlFilter");
1588 //---------------------------------------------------------------------------
1589 //---------------------------------------------------------------------------