helpfrm.h 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: html/helpfrm.h
  3. // Purpose: interface of wxHtmlHelpFrame
  4. // Author: wxWidgets team
  5. // Licence: wxWindows licence
  6. /////////////////////////////////////////////////////////////////////////////
  7. /// style flags for the Help Frame
  8. #define wxHF_TOOLBAR 0x0001
  9. #define wxHF_CONTENTS 0x0002
  10. #define wxHF_INDEX 0x0004
  11. #define wxHF_SEARCH 0x0008
  12. #define wxHF_BOOKMARKS 0x0010
  13. #define wxHF_OPEN_FILES 0x0020
  14. #define wxHF_PRINT 0x0040
  15. #define wxHF_FLAT_TOOLBAR 0x0080
  16. #define wxHF_MERGE_BOOKS 0x0100
  17. #define wxHF_ICONS_BOOK 0x0200
  18. #define wxHF_ICONS_BOOK_CHAPTER 0x0400
  19. #define wxHF_ICONS_FOLDER 0x0000 // this is 0 since it is default
  20. #define wxHF_DEFAULT_STYLE (wxHF_TOOLBAR | wxHF_CONTENTS | \
  21. wxHF_INDEX | wxHF_SEARCH | \
  22. wxHF_BOOKMARKS | wxHF_PRINT)
  23. /**
  24. @class wxHtmlHelpFrame
  25. This class is used by wxHtmlHelpController to display help.
  26. It is an internal class and should not be used directly - except for the case
  27. when you're writing your own HTML help controller.
  28. @library{wxhtml}
  29. @category{help,html}
  30. */
  31. class wxHtmlHelpFrame : public wxFrame
  32. {
  33. public:
  34. wxHtmlHelpFrame(wxHtmlHelpData* data = NULL);
  35. /**
  36. Constructor.
  37. For the possible values of @a style, please see wxHtmlHelpController.
  38. */
  39. wxHtmlHelpFrame(wxWindow* parent, wxWindowID id,
  40. const wxString& title = wxEmptyString,
  41. int style = wxHF_DEFAULT_STYLE,
  42. wxHtmlHelpData* data = NULL,
  43. wxConfigBase* config = NULL,
  44. const wxString& rootpath = wxEmptyString);
  45. /**
  46. You may override this virtual method to add more buttons to the help window's
  47. toolbar. @a toolBar is a pointer to the toolbar and @a style is the style
  48. flag as passed to the Create() method.
  49. wxToolBar::Realize is called immediately after returning from this function.
  50. */
  51. virtual void AddToolbarButtons(wxToolBar* toolBar, int style);
  52. /**
  53. Creates the frame. See @ref wxHtmlHelpFrame() "the constructor"
  54. for a description of the parameters.
  55. */
  56. bool Create(wxWindow* parent, wxWindowID id,
  57. const wxString& title = wxEmptyString, int style = wxHF_DEFAULT_STYLE,
  58. wxConfigBase* config = NULL,
  59. const wxString& rootpath = wxEmptyString);
  60. /**
  61. Returns the help controller associated with the frame.
  62. */
  63. wxHtmlHelpController* GetController() const;
  64. /**
  65. Sets the help controller associated with the frame.
  66. */
  67. void SetController(wxHtmlHelpController* controller);
  68. /**
  69. Sets the frame's title format.
  70. @a format must contain exactly one "%s" (it will be replaced by the page title).
  71. */
  72. void SetTitleFormat(const wxString& format);
  73. };