]>
Commit | Line | Data |
---|---|---|
3755cfa6 | 1 | ///////////////////////////////////////////////////////////////////////////// |
c5197da4 | 2 | // Name: wx/html/helpdlg.h |
3755cfa6 JS |
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 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Harm van der Heijden, Vaclav Slavik, Julian Smart | |
9 | // Licence: wxWidgets licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _WX_HELPDLG_H_ | |
13 | #define _WX_HELPDLG_H_ | |
14 | ||
3755cfa6 JS |
15 | #include "wx/defs.h" |
16 | ||
17 | #if wxUSE_WXHTML_HELP | |
18 | ||
19 | #include "wx/html/helpdata.h" | |
20 | #include "wx/window.h" | |
c5197da4 | 21 | #include "wx/dialog.h" |
3755cfa6 JS |
22 | #include "wx/frame.h" |
23 | #include "wx/config.h" | |
24 | #include "wx/splitter.h" | |
25 | #include "wx/notebook.h" | |
26 | #include "wx/listbox.h" | |
27 | #include "wx/choice.h" | |
28 | #include "wx/combobox.h" | |
29 | #include "wx/checkbox.h" | |
30 | #include "wx/stattext.h" | |
31 | #include "wx/html/htmlwin.h" | |
f3e156ef | 32 | #include "wx/html/helpwnd.h" |
3755cfa6 JS |
33 | #include "wx/html/htmprint.h" |
34 | ||
35 | class WXDLLIMPEXP_HTML wxHtmlHelpController; | |
36 | class WXDLLIMPEXP_HTML wxHtmlHelpWindow; | |
37 | ||
38 | class WXDLLIMPEXP_HTML wxHtmlHelpDialog : public wxDialog | |
39 | { | |
40 | DECLARE_DYNAMIC_CLASS(wxHtmlHelpDialog) | |
41 | ||
42 | public: | |
43 | wxHtmlHelpDialog(wxHtmlHelpData* data = NULL) { Init(data); } | |
44 | wxHtmlHelpDialog(wxWindow* parent, wxWindowID wxWindowID, | |
45 | const wxString& title = wxEmptyString, | |
46 | int style = wxHF_DEFAULT_STYLE, wxHtmlHelpData* data = NULL); | |
d3c7fc99 | 47 | virtual ~wxHtmlHelpDialog(); |
3755cfa6 JS |
48 | |
49 | bool Create(wxWindow* parent, wxWindowID id, const wxString& title = wxEmptyString, | |
50 | int style = wxHF_DEFAULT_STYLE); | |
51 | ||
52 | /// Returns the data associated with this dialog. | |
53 | wxHtmlHelpData* GetData() { return m_Data; } | |
54 | ||
55 | /// Returns the controller that created this dialog. | |
56 | wxHtmlHelpController* GetController() const { return m_helpController; } | |
57 | ||
58 | /// Sets the controller associated with this dialog. | |
59 | void SetController(wxHtmlHelpController* controller) { m_helpController = controller; } | |
60 | ||
61 | /// Returns the help window. | |
62 | wxHtmlHelpWindow* GetHelpWindow() const { return m_HtmlHelpWin; } | |
63 | ||
64 | // Sets format of title of the frame. Must contain exactly one "%s" | |
65 | // (for title of displayed HTML page) | |
66 | void SetTitleFormat(const wxString& format); | |
67 | ||
68 | // Override to add custom buttons to the toolbar | |
47b378bd | 69 | virtual void AddToolbarButtons(wxToolBar* WXUNUSED(toolBar), int WXUNUSED(style)) {} |
3755cfa6 JS |
70 | |
71 | protected: | |
72 | void Init(wxHtmlHelpData* data = NULL); | |
73 | ||
74 | void OnCloseWindow(wxCloseEvent& event); | |
75 | ||
76 | protected: | |
77 | // Temporary pointer to pass to window | |
78 | wxHtmlHelpData* m_Data; | |
79 | wxString m_TitleFormat; // title of the help frame | |
80 | wxHtmlHelpWindow *m_HtmlHelpWin; | |
81 | wxHtmlHelpController* m_helpController; | |
82 | ||
83 | DECLARE_EVENT_TABLE() | |
84 | DECLARE_NO_COPY_CLASS(wxHtmlHelpDialog) | |
85 | }; | |
86 | ||
87 | #endif | |
88 | // wxUSE_WXHTML_HELP | |
89 | ||
90 | #endif |