1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxHtmlHelpDialog
4 // Notes: Based on htmlhelp.cpp, implementing a monolithic
5 // HTML Help controller class, by Vaclav Slavik
6 // Author: Harm van der Heijden, Vaclav Slavik, Julian Smart
8 // Copyright: (c) Harm van der Heijden, Vaclav Slavik, Julian Smart
9 // Licence: wxWidgets licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_HELPDLG_H_
13 #define _WX_HELPDLG_H_
15 #if defined(__GNUG__) && !defined(__APPLE__)
16 #pragma interface "helpdlgex.h"
23 #include "wx/html/helpdata.h"
24 #include "wx/window.h"
26 #include "wx/config.h"
27 #include "wx/splitter.h"
28 #include "wx/notebook.h"
29 #include "wx/listbox.h"
30 #include "wx/choice.h"
31 #include "wx/combobox.h"
32 #include "wx/checkbox.h"
33 #include "wx/stattext.h"
34 #include "wx/html/htmlwin.h"
35 #include "wx/html/helpwnd.h"
36 #include "wx/html/htmprint.h"
38 class WXDLLIMPEXP_HTML wxHtmlHelpController
;
39 class WXDLLIMPEXP_HTML wxHtmlHelpWindow
;
41 class WXDLLIMPEXP_HTML wxHtmlHelpDialog
: public wxDialog
43 DECLARE_DYNAMIC_CLASS(wxHtmlHelpDialog
)
46 wxHtmlHelpDialog(wxHtmlHelpData
* data
= NULL
) { Init(data
); }
47 wxHtmlHelpDialog(wxWindow
* parent
, wxWindowID wxWindowID
,
48 const wxString
& title
= wxEmptyString
,
49 int style
= wxHF_DEFAULT_STYLE
, wxHtmlHelpData
* data
= NULL
);
52 bool Create(wxWindow
* parent
, wxWindowID id
, const wxString
& title
= wxEmptyString
,
53 int style
= wxHF_DEFAULT_STYLE
);
55 /// Returns the data associated with this dialog.
56 wxHtmlHelpData
* GetData() { return m_Data
; }
58 /// Returns the controller that created this dialog.
59 wxHtmlHelpController
* GetController() const { return m_helpController
; }
61 /// Sets the controller associated with this dialog.
62 void SetController(wxHtmlHelpController
* controller
) { m_helpController
= controller
; }
64 /// Returns the help window.
65 wxHtmlHelpWindow
* GetHelpWindow() const { return m_HtmlHelpWin
; }
67 // Sets format of title of the frame. Must contain exactly one "%s"
68 // (for title of displayed HTML page)
69 void SetTitleFormat(const wxString
& format
);
71 // Override to add custom buttons to the toolbar
72 virtual void AddToolbarButtons(wxToolBar
* WXUNUSED(toolBar
), int WXUNUSED(style
)) {};
75 void Init(wxHtmlHelpData
* data
= NULL
);
77 void OnCloseWindow(wxCloseEvent
& event
);
80 // Temporary pointer to pass to window
81 wxHtmlHelpData
* m_Data
;
82 wxString m_TitleFormat
; // title of the help frame
83 wxHtmlHelpWindow
*m_HtmlHelpWin
;
84 wxHtmlHelpController
* m_helpController
;
87 DECLARE_NO_COPY_CLASS(wxHtmlHelpDialog
)