Added wxCHMHelpController, updated help demo. Added DisplaySection(const wxString&)

to wxHelpControllerBase. Corrected some Dialog Editor bugs.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2000-04-18 10:30:25 +00:00
parent 9d62ffe24a
commit 0a47db39df
31 changed files with 3232 additions and 2770 deletions

57
include/wx/msw/helpchm.h Normal file
View File

@@ -0,0 +1,57 @@
/////////////////////////////////////////////////////////////////////////////
// Name: helpchm.h
// Purpose: Help system: MS HTML Help implementation
// Author: Julian Smart
// Modified by:
// Created: 16/04/2000
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_HELPCHM_H_
#define _WX_HELPCHM_H_
#ifdef __GNUG__
#pragma interface "helpchm.h"
#endif
#include "wx/wx.h"
#if wxUSE_HELP
#include "wx/helpbase.h"
class WXDLLEXPORT wxCHMHelpController: public wxHelpControllerBase
{
DECLARE_CLASS(wxCHMHelpController)
public:
wxCHMHelpController() {}
~wxCHMHelpController() {}
// Must call this to set the filename
virtual bool Initialize(const wxString& file);
// If file is "", reloads file given in Initialize
virtual bool LoadFile(const wxString& file = wxEmptyString);
virtual bool DisplayContents();
virtual bool DisplaySection(int sectionNo);
virtual bool DisplaySection(const wxString& section);
virtual bool DisplayBlock(long blockNo);
virtual bool KeywordSearch(const wxString& k);
virtual bool Quit();
inline wxString GetHelpFile() const { return m_helpFile; }
protected:
// Append extension if necessary.
wxString GetValidFilename(const wxString& file) const;
protected:
wxString m_helpFile;
};
#endif // wxUSE_HELP
#endif
// _WX_HELPCHM_H_

View File

@@ -24,31 +24,33 @@
class WXDLLEXPORT wxWinHelpController: public wxHelpControllerBase
{
DECLARE_CLASS(wxWinHelpController)
DECLARE_CLASS(wxWinHelpController)
public:
wxWinHelpController() {};
~wxWinHelpController() {};
public:
wxWinHelpController(void);
~wxWinHelpController(void);
// Must call this to set the filename
virtual bool Initialize(const wxString& file);
// Must call this to set the filename and server name
virtual bool Initialize(const wxString& file);
// If file is "", reloads file given in Initialize
virtual bool LoadFile(const wxString& file = wxEmptyString);
virtual bool DisplayContents();
virtual bool DisplaySection(int sectionNo);
virtual bool DisplayBlock(long blockNo);
virtual bool KeywordSearch(const wxString& k);
virtual bool Quit();
// If file is "", reloads file given in Initialize
virtual bool LoadFile(const wxString& file = "");
virtual bool DisplayContents(void);
virtual bool DisplaySection(int sectionNo);
virtual bool DisplayBlock(long blockNo);
virtual bool KeywordSearch(const wxString& k);
virtual bool Quit(void);
virtual void OnQuit(void);
inline wxString GetHelpFile(void) const { return m_helpFile; }
inline wxString GetHelpFile() const { return m_helpFile; }
protected:
wxString m_helpFile;
// Append extension if necessary.
wxString GetValidFilename(const wxString& file) const;
private:
wxString m_helpFile;
};
#endif // wxUSE_HELP
#endif
// _WX_HELPWIN_H_
// _WX_HELPWIN_H_

View File

@@ -445,9 +445,10 @@
#define wxUSE_IPC 1
// 0 for no interprocess comms
// Note: wxHELP uses IPC under X so these are interdependent!
#define wxUSE_HELP 1
// 0 for no help facility
#define wxUSE_MS_HTML_HELP 0
// 0 for no MS HTML Help
#define wxUSE_RESOURCES 1
// 0 for no wxGetResource/wxWriteResource
#define wxUSE_CONSTRAINTS 1
@@ -605,8 +606,8 @@
// disable the settings which don't work for some compilers
// ----------------------------------------------------------------------------
// These don't work as expected for mingw32 and cygwin32
#if defined(__GNUWIN32__)
// These don't work as expected for mingw32 and cygwin32
#undef wxUSE_MEMORY_TRACING
#define wxUSE_MEMORY_TRACING 0
@@ -615,6 +616,9 @@
#undef wxUSE_DEBUG_NEW_ALWAYS
#define wxUSE_DEBUG_NEW_ALWAYS 0
#undef wxUSE_MS_HTML_HELP
#define wxUSE_MS_HTML_HELP 0
#endif // __GNUWIN32__
// MFC duplicates these operators
@@ -691,6 +695,12 @@
#define wxUSE_LIBJPEG 0
#endif
#if defined(__BORLANDC__)
// Need a BC++-specific htmlhelp.lib before we can enable this
#undef wxUSE_MS_HTML_HELP
#define wxUSE_MS_HTML_HELP 0
#endif
#if defined(__WXMSW__) && defined(__WATCOMC__)
#undef wxUSE_LIBJPEG
#define wxUSE_LIBJPEG 0
@@ -700,6 +710,9 @@
#undef wxUSE_GLCANVAS
#define wxUSE_GLCANVAS 0
#undef wxUSE_MS_HTML_HELP
#define wxUSE_MS_HTML_HELP 0
#endif
#if defined(__WXMSW__) && !defined(__WIN32__)
@@ -740,6 +753,8 @@
#undef wxUSE_GLCANVAS
#define wxUSE_GLCANVAS 0
#undef wxUSE_MS_HTML_HELP
#define wxUSE_MS_HTML_HELP 0
#endif // Win16
// ----------------------------------------------------------------------------