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