/////////////////////////////////////////////////////////////////////////////
// Name: helpfrm.h
// Purpose: wxHtmlHelpFrame
-// Notes: Based on htmlhelp.cpp, implementing a monolithic
+// Notes: Based on htmlhelp.cpp, implementing a monolithic
// HTML Help controller class, by Vaclav Slavik
// Author: Harm van der Heijden and Vaclav Slavik
-// Created:
-// RCS-ID:
+// RCS-ID: $Id$
// Copyright: (c) Harm van der Heijden and Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#define _WX_HELPFRM_H_
#ifdef __GNUG__
-#pragma interface "helpfrm.h"
+#pragma interface
#endif
#include "wx/defs.h"
wxID_HTML_HELPFRAME // the id of wxHtmlHelpController's helpframe
};
+class WXDLLEXPORT wxHtmlHelpFrameCfg
+{
+public:
+ wxHtmlHelpFrameCfg() {};
+ long x, y, w, h;
+ long sashpos;
+ bool navig_on;
+ int style; // flags given to wxHtmlHelpFrame ctor
+ wxString titleformat;
+};
+
class WXDLLEXPORT wxHtmlHelpFrame : public wxFrame
{
DECLARE_DYNAMIC_CLASS(wxHtmlHelpFrame)
public:
wxHtmlHelpFrame(wxHtmlHelpData* data = NULL) { Init(data); }
- wxHtmlHelpFrame(wxWindow* parent, int wxWindowID,
+ wxHtmlHelpFrame(wxWindow* parent, int wxWindowID,
const wxString& title = wxEmptyString,
int style = wxHF_DEFAULTSTYLE, wxHtmlHelpData* data = NULL);
bool Create(wxWindow* parent, wxWindowID id, const wxString& title = wxEmptyString,
int style = wxHF_DEFAULTSTYLE);
~wxHtmlHelpFrame();
-
+
wxHtmlHelpData* GetData() { return m_Data; }
-
+
void SetTitleFormat(const wxString& format) {
- if (m_HtmlWin)
+ if (m_HtmlWin)
m_HtmlWin->SetRelatedFrame(this, format);
m_TitleFormat = format;
}
// Sets format of title of the frame. Must contain exactly one "%s"
// (for title of displayed HTML page)
-
+
bool Display(const wxString& x);
- // Displays page x. If not found it will offect the user a choice of
+ // Displays page x. If not found it will offect the user a choice of
// searching books.
// Looking for the page runs in these steps:
// 1. try to locate file named x (if x is for example "doc/howto.htm")
bool Display(const int id);
// Alternative version that works with numeric ID.
// (uses extension to MS format, <param name="ID" value=id>, see docs)
-
+
bool DisplayContents();
// Displays help window and focuses contents.
-
+
bool DisplayIndex();
// Displays help window and focuses index.
-
+
bool KeywordSearch(const wxString& keyword);
// Searches for keyword. Returns TRUE and display page if found, return
// FALSE otherwise
IMG_Folder,
IMG_Page
};
-
+
protected:
wxHtmlHelpData* m_Data;
bool m_DataCreated; // m_Data created by frame, or supplied?
wxListBox *m_IndexBox;
wxTextCtrl *m_SearchText;
wxButton *m_SearchButton;
- wxListBox *m_SearchList;
+ wxListBox *m_SearchList;
wxChoice *m_SearchChoice;
- struct {
- long x, y, w, h;
- long sashpos;
- bool navig_on;
- int style; // flags given to wxHtmlHelpFrame ctor
- wxString titleformat;
- } m_Cfg;
- // settings (window size, position, sash pos etc..)
+ wxHtmlHelpFrameCfg m_Cfg;
wxConfigBase *m_Config;
wxString m_ConfigRoot;
int m_ContentsPage;
int m_IndexPage;
int m_SearchPage;
-
+
protected:
void Init(wxHtmlHelpData* data = NULL);