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