]> git.saurik.com Git - wxWidgets.git/blame - include/wx/html/helpctrl.h
Some compilation fixes
[wxWidgets.git] / include / wx / html / helpctrl.h
CommitLineData
8ec2b484
HH
1/////////////////////////////////////////////////////////////////////////////
2// Name: helpctrl.h
3// Purpose: wxHtmlHelpController
f42b1601 4// Notes: Based on htmlhelp.cpp, implementing a monolithic
8ec2b484
HH
5// HTML Help controller class, by Vaclav Slavik
6// Author: Harm van der Heijden and Vaclav Slavik
69941f05 7// RCS-ID: $Id$
8ec2b484
HH
8// Copyright: (c) Harm van der Heijden and Vaclav Slavik
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_HELPCTRL_H_
13#define _WX_HELPCTRL_H_
14
15#include "wx/defs.h"
16
17#ifdef __GNUG__
69941f05 18#pragma interface
8ec2b484
HH
19#endif
20
21#if wxUSE_HTML
22
16a12a3d 23#include "wx/html/helpfrm.h"
8ec2b484
HH
24
25class WXDLLEXPORT wxHtmlHelpController : public wxEvtHandler
26{
d5bb85a0 27 DECLARE_DYNAMIC_CLASS(wxHtmlHelpController)
f42b1601 28
d5bb85a0
VS
29 public:
30 wxHtmlHelpController(int style = wxHF_DEFAULTSTYLE);
31 virtual ~wxHtmlHelpController();
8ec2b484 32
d5bb85a0
VS
33 void SetTitleFormat(const wxString& format);
34 void SetTempDir(const wxString& path) { m_helpData.SetTempDir(path); }
35 bool AddBook(const wxString& book, bool show_wait_msg = FALSE);
36 bool Display(const wxString& x)
37 {
38 CreateHelpWindow(); return m_helpFrame->Display(x);
39 }
40 bool Display(int id)
41 {
42 CreateHelpWindow(); return m_helpFrame->Display(id);
43 }
44 bool DisplayContents()
45 {
46 CreateHelpWindow(); return m_helpFrame->DisplayContents();
47 }
48 bool DisplayIndex()
49 {
50 CreateHelpWindow(); return m_helpFrame->DisplayIndex();
51 }
52 bool KeywordSearch(const wxString& keyword)
53 {
64d84708 54 CreateHelpWindow(); return m_helpFrame->KeywordSearch(keyword);
d5bb85a0
VS
55 }
56 wxHtmlHelpFrame* GetFrame() { return m_helpFrame; }
721ab905
VS
57 void UseConfig(wxConfigBase *config, const wxString& rootpath = wxEmptyString);
58
d5bb85a0
VS
59 // Assigns config object to the Ctrl. This config is then
60 // used in subsequent calls to Read/WriteCustomization of both help
61 // Ctrl and it's wxHtmlWindow
62 virtual void ReadCustomization(wxConfigBase *cfg, const wxString& path = wxEmptyString);
63 virtual void WriteCustomization(wxConfigBase *cfg, const wxString& path = wxEmptyString);
052e12db
VS
64
65 protected:
b854b7b8
VS
66 virtual wxHtmlHelpFrame* CreateHelpFrame(wxHtmlHelpData *data);
67
052e12db 68 virtual void CreateHelpWindow();
b854b7b8 69 virtual void DestroyHelpWindow();
d5bb85a0 70
b854b7b8 71 void OnCloseFrame(wxCloseEvent& evt);
d5bb85a0
VS
72 wxHtmlHelpData m_helpData;
73 wxHtmlHelpFrame* m_helpFrame;
74 wxConfigBase *m_Config;
75 wxString m_ConfigRoot;
76 wxString m_titleFormat;
77 int m_FrameStyle;
78 DECLARE_EVENT_TABLE()
8ec2b484
HH
79};
80
f42b1601 81#endif
8ec2b484
HH
82
83#endif // _WX_HELPCTRL_H_