2008-03-22 08:06:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/generic/helpext.h
|
|
|
|
// Purpose: an external help controller for wxWidgets
|
|
|
|
// Author: Karsten Ballueder (Ballueder@usa.net)
|
|
|
|
// Modified by:
|
|
|
|
// Copyright: (c) Karsten Ballueder 1998
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
1999-06-01 11:32:12 -04:00
|
|
|
|
|
|
|
#ifndef __WX_HELPEXT_H_
|
|
|
|
#define __WX_HELPEXT_H_
|
1998-11-10 16:17:35 -05:00
|
|
|
|
|
|
|
#if wxUSE_HELP
|
|
|
|
|
2003-05-24 07:20:39 -04:00
|
|
|
|
2008-03-22 08:06:30 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// headers
|
|
|
|
// ----------------------------------------------------------------------------
|
1998-11-10 16:17:35 -05:00
|
|
|
|
2008-03-22 08:06:30 -04:00
|
|
|
#include "wx/helpbase.h"
|
1998-11-10 16:17:35 -05:00
|
|
|
|
|
|
|
|
2008-03-22 08:06:30 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxExtHelpController
|
|
|
|
// ----------------------------------------------------------------------------
|
1998-11-10 16:17:35 -05:00
|
|
|
|
2008-03-22 08:06:30 -04:00
|
|
|
// This class implements help via an external browser.
|
2003-08-01 21:04:55 -04:00
|
|
|
class WXDLLIMPEXP_ADV wxExtHelpController : public wxHelpControllerBase
|
2004-06-17 12:22:36 -04:00
|
|
|
{
|
2006-03-27 12:28:51 -05:00
|
|
|
public:
|
2008-03-22 08:06:30 -04:00
|
|
|
wxExtHelpController(wxWindow* parentWindow = NULL);
|
|
|
|
virtual ~wxExtHelpController();
|
|
|
|
|
|
|
|
#if WXWIN_COMPATIBILITY_2_8
|
|
|
|
wxDEPRECATED(void SetBrowser(const wxString& browsername = wxEmptyString, bool isNetscape = false) );
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Set viewer: new name for SetBrowser
|
|
|
|
virtual void SetViewer(const wxString& viewer = wxEmptyString,
|
|
|
|
long flags = wxHELP_NETSCAPE);
|
|
|
|
|
|
|
|
virtual bool Initialize(const wxString& dir, int WXUNUSED(server))
|
|
|
|
{ return Initialize(dir); }
|
|
|
|
|
|
|
|
virtual bool Initialize(const wxString& dir);
|
|
|
|
virtual bool LoadFile(const wxString& file = wxEmptyString);
|
|
|
|
virtual bool DisplayContents(void);
|
|
|
|
virtual bool DisplaySection(int sectionNo);
|
|
|
|
virtual bool DisplaySection(const wxString& section);
|
|
|
|
virtual bool DisplayBlock(long blockNo);
|
|
|
|
virtual bool KeywordSearch(const wxString& k,
|
|
|
|
wxHelpSearchMode mode = wxHELP_SEARCH_ALL);
|
|
|
|
|
|
|
|
virtual bool Quit(void);
|
|
|
|
virtual void OnQuit(void);
|
|
|
|
|
|
|
|
virtual bool DisplayHelp(const wxString &) ;
|
|
|
|
|
|
|
|
virtual void SetFrameParameters(const wxString& WXUNUSED(title),
|
|
|
|
const wxSize& WXUNUSED(size),
|
|
|
|
const wxPoint& WXUNUSED(pos) = wxDefaultPosition,
|
|
|
|
bool WXUNUSED(newFrameEachTime) = false)
|
|
|
|
{
|
|
|
|
// does nothing by default
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual wxFrame *GetFrameParameters(wxSize *WXUNUSED(size) = NULL,
|
|
|
|
wxPoint *WXUNUSED(pos) = NULL,
|
|
|
|
bool *WXUNUSED(newFrameEachTime) = NULL)
|
|
|
|
{
|
2009-01-19 08:55:27 -05:00
|
|
|
return NULL; // does nothing by default
|
2008-03-22 08:06:30 -04:00
|
|
|
}
|
2003-05-24 07:20:39 -04:00
|
|
|
|
2006-03-27 12:28:51 -05:00
|
|
|
protected:
|
2008-03-22 08:06:30 -04:00
|
|
|
// Filename of currently active map file.
|
|
|
|
wxString m_helpDir;
|
|
|
|
|
|
|
|
// How many entries do we have in the map file?
|
|
|
|
int m_NumOfEntries;
|
|
|
|
|
|
|
|
// A list containing all id,url,documentation triples.
|
|
|
|
wxList *m_MapList;
|
2006-03-27 12:28:51 -05:00
|
|
|
|
|
|
|
private:
|
2008-03-22 08:06:30 -04:00
|
|
|
// parse a single line of the map file (called by LoadFile())
|
|
|
|
//
|
|
|
|
// return true if the line was valid or false otherwise
|
|
|
|
bool ParseMapFileLine(const wxString& line);
|
|
|
|
|
|
|
|
// Deletes the list and all objects.
|
|
|
|
void DeleteList(void);
|
2006-03-27 12:28:51 -05:00
|
|
|
|
2003-05-24 07:20:39 -04:00
|
|
|
|
2008-03-22 08:06:30 -04:00
|
|
|
// How to call the html viewer.
|
|
|
|
wxString m_BrowserName;
|
2006-03-27 12:28:51 -05:00
|
|
|
|
2008-03-22 08:06:30 -04:00
|
|
|
// Is the viewer a variant of netscape?
|
|
|
|
bool m_BrowserIsNetscape;
|
2006-03-27 12:28:51 -05:00
|
|
|
|
|
|
|
DECLARE_CLASS(wxExtHelpController)
|
1998-11-10 16:17:35 -05:00
|
|
|
};
|
|
|
|
|
1999-06-01 11:32:12 -04:00
|
|
|
#endif // wxUSE_HELP
|
|
|
|
|
|
|
|
#endif // __WX_HELPEXT_H_
|