helpdlg.h 2.8 KB

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