Added WinHelp sample doc to samples/help, and made it possible to show
both native and wxHTML help git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -238,13 +238,15 @@ utils/dialoged/test/*.ico
|
|||||||
utils/dialoged/test/*.prj
|
utils/dialoged/test/*.prj
|
||||||
utils/dialoged/test/*.bmp
|
utils/dialoged/test/*.bmp
|
||||||
|
|
||||||
|
contrib/configure
|
||||||
|
contrib/configure.in
|
||||||
|
|
||||||
contrib/include/wx/mmedia/*.h
|
contrib/include/wx/mmedia/*.h
|
||||||
contrib/include/wx/mmedia/internal/*.h
|
contrib/include/wx/mmedia/internal/*.h
|
||||||
contrib/src/mmedia/makefile*
|
contrib/src/mmedia/makefile*
|
||||||
contrib/src/mmedia/README
|
contrib/src/mmedia/README
|
||||||
contrib/src/mmedia/*.h
|
contrib/src/mmedia/*.h
|
||||||
contrib/src/mmedia/*.cpp
|
contrib/src/mmedia/*.cpp
|
||||||
contrib/src/mmedia/makefile*
|
|
||||||
contrib/samples/mmedia/*.h
|
contrib/samples/mmedia/*.h
|
||||||
contrib/samples/mmedia/*.cpp
|
contrib/samples/mmedia/*.cpp
|
||||||
contrib/samples/mmedia/makefile*
|
contrib/samples/mmedia/makefile*
|
||||||
@@ -322,7 +324,13 @@ samples/help/makefile*
|
|||||||
samples/help/*.xbm
|
samples/help/*.xbm
|
||||||
samples/help/*.xpm
|
samples/help/*.xpm
|
||||||
samples/help/*.ico
|
samples/help/*.ico
|
||||||
|
samples/help/*.bmp
|
||||||
samples/help/*.rc
|
samples/help/*.rc
|
||||||
|
samples/help/*.hlp
|
||||||
|
samples/help/*.cnt
|
||||||
|
samples/help/*.hpj
|
||||||
|
samples/help/*.tex
|
||||||
|
samples/help/*.ini
|
||||||
samples/help/doc/*.html
|
samples/help/doc/*.html
|
||||||
samples/help/doc/*.htm
|
samples/help/doc/*.htm
|
||||||
samples/help/doc/*.class
|
samples/help/doc/*.class
|
||||||
|
@@ -57,14 +57,11 @@ samples/treelay/Makefile.in
|
|||||||
samples/opengl/cube/Makefile.in
|
samples/opengl/cube/Makefile.in
|
||||||
samples/opengl/penguin/Makefile.in
|
samples/opengl/penguin/Makefile.in
|
||||||
samples/opengl/isosurf/Makefile.in
|
samples/opengl/isosurf/Makefile.in
|
||||||
samples/ogl/ogledit/Makefile.in
|
|
||||||
samples/ogl/studio/Makefile.in
|
|
||||||
demos/bombs/Makefile.in
|
demos/bombs/Makefile.in
|
||||||
demos/forty/Makefile.in
|
demos/forty/Makefile.in
|
||||||
demos/fractal/Makefile.in
|
demos/fractal/Makefile.in
|
||||||
demos/poem/Makefile.in
|
demos/poem/Makefile.in
|
||||||
demos/life/Makefile.in
|
demos/life/Makefile.in
|
||||||
utils/glcanvas/motif/Makefile.in
|
|
||||||
utils/HelpGen/Makefile.in
|
utils/HelpGen/Makefile.in
|
||||||
utils/tex2rtf/Makefile.in
|
utils/tex2rtf/Makefile.in
|
||||||
utils/tex2rtf/src/Makefile.in
|
utils/tex2rtf/src/Makefile.in
|
||||||
@@ -72,6 +69,10 @@ utils/dialoged/Makefile.in
|
|||||||
utils/dialoged/src/Makefile.in
|
utils/dialoged/src/Makefile.in
|
||||||
utils/hhp2cached/Makefile.in
|
utils/hhp2cached/Makefile.in
|
||||||
utils/Makefile.in
|
utils/Makefile.in
|
||||||
utils/wxMMedia2/Makefile.in
|
contrib/Makefile.in
|
||||||
utils/wxMMedia2/lib/Makefile.in
|
contrib/src/ogl/Makefile.in
|
||||||
utils/wxMMedia2/sample/Makefile.in
|
contrib/src/mmedia/Makefile.in
|
||||||
|
contrib/samples/ogl/ogledit/Makefile.in
|
||||||
|
contrib/samples/ogl/studio/Makefile.in
|
||||||
|
contrib/samples/mmedia/Makefile.in
|
||||||
|
|
||||||
|
@@ -53,7 +53,6 @@ src/common/doslex.c
|
|||||||
src/common/y_tab.c
|
src/common/y_tab.c
|
||||||
src/common/lex_yy.c
|
src/common/lex_yy.c
|
||||||
|
|
||||||
src/msw/files.lst
|
|
||||||
src/msw/*.cpp
|
src/msw/*.cpp
|
||||||
src/msw/*.h
|
src/msw/*.h
|
||||||
src/msw/makefile.*
|
src/msw/makefile.*
|
||||||
@@ -151,32 +150,3 @@ samples/oleauto/*.txt
|
|||||||
samples/oleauto/*.bmp
|
samples/oleauto/*.bmp
|
||||||
samples/oleauto/*.ico
|
samples/oleauto/*.ico
|
||||||
|
|
||||||
utils/nplugin/make*.*
|
|
||||||
utils/nplugin/src/*.cpp
|
|
||||||
utils/nplugin/src/*.h
|
|
||||||
utils/nplugin/src/*.rc
|
|
||||||
utils/nplugin/src/*.def
|
|
||||||
utils/nplugin/src/makefile.*
|
|
||||||
utils/nplugin/src/*.txt
|
|
||||||
utils/nplugin/samples/simple/*.cpp
|
|
||||||
utils/nplugin/samples/simple/*.h
|
|
||||||
utils/nplugin/samples/simple/*.rc
|
|
||||||
utils/nplugin/samples/simple/*.def
|
|
||||||
utils/nplugin/samples/simple/makefile.*
|
|
||||||
utils/nplugin/samples/simple/*.txt
|
|
||||||
utils/nplugin/samples/gui/*.cpp
|
|
||||||
utils/nplugin/samples/gui/*.h
|
|
||||||
utils/nplugin/samples/gui/*.rc
|
|
||||||
utils/nplugin/samples/gui/*.def
|
|
||||||
utils/nplugin/samples/gui/makefile.*
|
|
||||||
utils/nplugin/samples/gui/*.txt
|
|
||||||
utils/nplugin/docs/*.tex
|
|
||||||
utils/nplugin/docs/*.txt
|
|
||||||
utils/nplugin/docs/*.hpj
|
|
||||||
utils/nplugin/docs/*.eps
|
|
||||||
utils/nplugin/docs/*.ps
|
|
||||||
utils/nplugin/docs/*.ini
|
|
||||||
utils/nplugin/docs/*.cnt
|
|
||||||
utils/nplugin/docs/*.hlp
|
|
||||||
utils/nplugin/lib/dummy
|
|
||||||
|
|
||||||
|
29
distrib/msw/nplugin.rsp
Normal file
29
distrib/msw/nplugin.rsp
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
utils/nplugin/make*.*
|
||||||
|
utils/nplugin/src/*.cpp
|
||||||
|
utils/nplugin/src/*.h
|
||||||
|
utils/nplugin/src/*.rc
|
||||||
|
utils/nplugin/src/*.def
|
||||||
|
utils/nplugin/src/makefile.*
|
||||||
|
utils/nplugin/src/*.txt
|
||||||
|
utils/nplugin/samples/simple/*.cpp
|
||||||
|
utils/nplugin/samples/simple/*.h
|
||||||
|
utils/nplugin/samples/simple/*.rc
|
||||||
|
utils/nplugin/samples/simple/*.def
|
||||||
|
utils/nplugin/samples/simple/makefile.*
|
||||||
|
utils/nplugin/samples/simple/*.txt
|
||||||
|
utils/nplugin/samples/gui/*.cpp
|
||||||
|
utils/nplugin/samples/gui/*.h
|
||||||
|
utils/nplugin/samples/gui/*.rc
|
||||||
|
utils/nplugin/samples/gui/*.def
|
||||||
|
utils/nplugin/samples/gui/makefile.*
|
||||||
|
utils/nplugin/samples/gui/*.txt
|
||||||
|
utils/nplugin/docs/*.tex
|
||||||
|
utils/nplugin/docs/*.txt
|
||||||
|
utils/nplugin/docs/*.hpj
|
||||||
|
utils/nplugin/docs/*.eps
|
||||||
|
utils/nplugin/docs/*.ps
|
||||||
|
utils/nplugin/docs/*.ini
|
||||||
|
utils/nplugin/docs/*.cnt
|
||||||
|
utils/nplugin/docs/*.hlp
|
||||||
|
utils/nplugin/lib/dummy
|
||||||
|
|
@@ -6,8 +6,8 @@
|
|||||||
* $Id$
|
* $Id$
|
||||||
*******************************************************************/
|
*******************************************************************/
|
||||||
|
|
||||||
#ifndef __WX_HELPWXHT_H_
|
#ifndef _WX_HELPWXHT_H_
|
||||||
#define __WX_HELPWXHT_H_
|
#define _WX_HELPWXHT_H_
|
||||||
|
|
||||||
#if wxUSE_HELP
|
#if wxUSE_HELP
|
||||||
#if wxUSE_HTML
|
#if wxUSE_HTML
|
||||||
@@ -72,4 +72,4 @@ protected:
|
|||||||
#endif // wxUSE_HELP
|
#endif // wxUSE_HELP
|
||||||
#endif // wxUSE_HTML
|
#endif // wxUSE_HTML
|
||||||
|
|
||||||
#endif // __WX_HELPEXT_H_
|
#endif // _WX_HELPWXHT_H_
|
||||||
|
@@ -9,7 +9,22 @@
|
|||||||
#define wxHelpController wxWinHelpController
|
#define wxHelpController wxWinHelpController
|
||||||
#define sm_classwxHelpController sm_classwxWinHelpController
|
#define sm_classwxHelpController sm_classwxWinHelpController
|
||||||
#else // !MSW
|
#else // !MSW
|
||||||
#include "wx/helpbase.h"
|
|
||||||
|
/* By default, if wxHTML is compiled in, use the
|
||||||
|
wxHelpControllerHtml. If not, use the external help controller.
|
||||||
|
(of course, we shouldn't do it for wxMSW)
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if wxUSE_HTML
|
||||||
|
# include "wx/generic/helpwxht.h"
|
||||||
|
# define wxHelpController wxHelpControllerHtml
|
||||||
|
# define sm_classwxHelpController sm_classwxHelpControllerHtml
|
||||||
|
#else
|
||||||
|
# include "wx/generic/helpext.h"
|
||||||
|
# define wxHelpController wxExtHelpController
|
||||||
|
# define sm_classwxHelpController sm_classwxExtHelpController
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // MSW/!MSW
|
#endif // MSW/!MSW
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -72,23 +72,6 @@ class WXDLLEXPORT wxHelpControllerBase: public wxObject
|
|||||||
virtual void OnQuit(void) {};
|
virtual void OnQuit(void) {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* By default, if wxHTML is compiled in, use the
|
|
||||||
wxHelpControllerHtml. If not, use the external help controller.
|
|
||||||
(of course, we shouldn't do it for wxMSW)
|
|
||||||
*/
|
|
||||||
#ifndef __WXMSW__
|
|
||||||
#if wxUSE_HTML
|
|
||||||
# include "wx/generic/helpwxht.h"
|
|
||||||
# define wxHelpController wxHelpControllerHtml
|
|
||||||
# define sm_classwxHelpController sm_classwxHelpControllerHtml
|
|
||||||
#else
|
|
||||||
# include "wx/generic/helpext.h"
|
|
||||||
# define wxHelpController wxExtHelpController
|
|
||||||
# define sm_classwxHelpController sm_classwxExtHelpController
|
|
||||||
#endif
|
|
||||||
#endif // wxMSW
|
|
||||||
|
|
||||||
#endif // wxUSE_HELP
|
#endif // wxUSE_HELP
|
||||||
#endif
|
#endif
|
||||||
// _WX_HELPBASEH__
|
// _WX_HELPBASEH__
|
||||||
|
BIN
samples/help/bullet.bmp
Normal file
BIN
samples/help/bullet.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 138 B |
@@ -30,13 +30,22 @@
|
|||||||
# include "wx/wx.h"
|
# include "wx/wx.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// define this to 1 to use HTML help even under Windows (by default, Windows
|
# include "wx/image.h"
|
||||||
// version will HLP-based help)
|
|
||||||
#define USE_HTML_HELP 1
|
|
||||||
#if USE_HTML_HELP
|
|
||||||
# include "wx/helpbase.h"
|
|
||||||
#else
|
|
||||||
# include "wx/help.h"
|
# include "wx/help.h"
|
||||||
|
|
||||||
|
// define this to 1 to use HTML help even under Windows (by default, Windows
|
||||||
|
// version will use WinHelp).
|
||||||
|
// Please also see samples/html/helpview for a more complex help viewer.
|
||||||
|
|
||||||
|
#define USE_HTML_HELP 1
|
||||||
|
|
||||||
|
#if !wxUSE_HTML
|
||||||
|
#undef USE_HTML_HELP
|
||||||
|
#define USE_HTML_HELP 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if USE_HTML_HELP
|
||||||
|
# include "wx/generic/helpwxht.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -73,12 +82,21 @@ public:
|
|||||||
|
|
||||||
wxHelpController& GetHelpController() { return m_help; }
|
wxHelpController& GetHelpController() { return m_help; }
|
||||||
|
|
||||||
|
#if USE_HTML_HELP
|
||||||
|
wxHelpControllerHtml& GetHtmlHelpController() { return m_htmlHelp; }
|
||||||
|
#endif
|
||||||
|
|
||||||
// event handlers (these functions should _not_ be virtual)
|
// event handlers (these functions should _not_ be virtual)
|
||||||
void OnQuit(wxCommandEvent& event);
|
void OnQuit(wxCommandEvent& event);
|
||||||
void OnHelp(wxCommandEvent& event);
|
void OnHelp(wxCommandEvent& event);
|
||||||
|
void OnHtmlHelp(wxCommandEvent& event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
wxHelpController m_help;
|
wxHelpController m_help;
|
||||||
|
|
||||||
|
#if USE_HTML_HELP
|
||||||
|
wxHelpControllerHtml m_htmlHelp;
|
||||||
|
#endif
|
||||||
|
|
||||||
// any class wishing to process wxWindows events must use this macro
|
// any class wishing to process wxWindows events must use this macro
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
@@ -97,10 +115,17 @@ enum
|
|||||||
HelpDemo_Help_Classes,
|
HelpDemo_Help_Classes,
|
||||||
HelpDemo_Help_Functions,
|
HelpDemo_Help_Functions,
|
||||||
HelpDemo_Help_Help,
|
HelpDemo_Help_Help,
|
||||||
|
HelpDemo_Help_Search,
|
||||||
|
|
||||||
|
HelpDemo_Html_Help_Index,
|
||||||
|
HelpDemo_Html_Help_Classes,
|
||||||
|
HelpDemo_Html_Help_Functions,
|
||||||
|
HelpDemo_Html_Help_Help,
|
||||||
|
HelpDemo_Html_Help_Search,
|
||||||
|
|
||||||
HelpDemo_Help_KDE,
|
HelpDemo_Help_KDE,
|
||||||
HelpDemo_Help_GNOME,
|
HelpDemo_Help_GNOME,
|
||||||
HelpDemo_Help_Netscape,
|
HelpDemo_Help_Netscape,
|
||||||
HelpDemo_Help_Search,
|
|
||||||
// controls start here (the numbers are, of course, arbitrary)
|
// controls start here (the numbers are, of course, arbitrary)
|
||||||
HelpDemo_Text = 1000,
|
HelpDemo_Text = 1000,
|
||||||
};
|
};
|
||||||
@@ -118,10 +143,17 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
EVT_MENU(HelpDemo_Help_Classes, MyFrame::OnHelp)
|
EVT_MENU(HelpDemo_Help_Classes, MyFrame::OnHelp)
|
||||||
EVT_MENU(HelpDemo_Help_Functions, MyFrame::OnHelp)
|
EVT_MENU(HelpDemo_Help_Functions, MyFrame::OnHelp)
|
||||||
EVT_MENU(HelpDemo_Help_Help, MyFrame::OnHelp)
|
EVT_MENU(HelpDemo_Help_Help, MyFrame::OnHelp)
|
||||||
|
EVT_MENU(HelpDemo_Help_Search, MyFrame::OnHelp)
|
||||||
|
|
||||||
|
EVT_MENU(HelpDemo_Html_Help_Index, MyFrame::OnHtmlHelp)
|
||||||
|
EVT_MENU(HelpDemo_Html_Help_Classes, MyFrame::OnHtmlHelp)
|
||||||
|
EVT_MENU(HelpDemo_Html_Help_Functions, MyFrame::OnHtmlHelp)
|
||||||
|
EVT_MENU(HelpDemo_Html_Help_Help, MyFrame::OnHtmlHelp)
|
||||||
|
EVT_MENU(HelpDemo_Html_Help_Search, MyFrame::OnHtmlHelp)
|
||||||
|
|
||||||
EVT_MENU(HelpDemo_Help_KDE, MyFrame::OnHelp)
|
EVT_MENU(HelpDemo_Help_KDE, MyFrame::OnHelp)
|
||||||
EVT_MENU(HelpDemo_Help_GNOME, MyFrame::OnHelp)
|
EVT_MENU(HelpDemo_Help_GNOME, MyFrame::OnHelp)
|
||||||
EVT_MENU(HelpDemo_Help_Netscape, MyFrame::OnHelp)
|
EVT_MENU(HelpDemo_Help_Netscape, MyFrame::OnHelp)
|
||||||
EVT_MENU(HelpDemo_Help_Search, MyFrame::OnHelp)
|
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
// Create a new application object: this macro will allow wxWindows to create
|
// Create a new application object: this macro will allow wxWindows to create
|
||||||
@@ -142,6 +174,13 @@ IMPLEMENT_APP(MyApp)
|
|||||||
// `Main program' equivalent: the program execution "starts" here
|
// `Main program' equivalent: the program execution "starts" here
|
||||||
bool MyApp::OnInit()
|
bool MyApp::OnInit()
|
||||||
{
|
{
|
||||||
|
#if wxUSE_HTML
|
||||||
|
#if wxUSE_GIF
|
||||||
|
// Required for images in the online documentation
|
||||||
|
wxImage::AddHandler(new wxGIFHandler);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
// Create the main application window
|
// Create the main application window
|
||||||
MyFrame *frame = new MyFrame("HelpDemo wxWindows App",
|
MyFrame *frame = new MyFrame("HelpDemo wxWindows App",
|
||||||
wxPoint(50, 50), wxSize(450, 340));
|
wxPoint(50, 50), wxSize(450, 340));
|
||||||
@@ -149,7 +188,6 @@ bool MyApp::OnInit()
|
|||||||
frame->Show(TRUE);
|
frame->Show(TRUE);
|
||||||
SetTopWindow(frame);
|
SetTopWindow(frame);
|
||||||
|
|
||||||
|
|
||||||
// initialise the help system: this means that we'll use doc.hlp file under
|
// initialise the help system: this means that we'll use doc.hlp file under
|
||||||
// Windows and that the HTML docs are in the subdirectory doc for platforms
|
// Windows and that the HTML docs are in the subdirectory doc for platforms
|
||||||
// using HTML help
|
// using HTML help
|
||||||
@@ -160,6 +198,17 @@ bool MyApp::OnInit()
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if USE_HTML_HELP
|
||||||
|
// initialise the help system: this means that the HTML docs are in the
|
||||||
|
// subdirectory doc for platforms using HTML help
|
||||||
|
if ( !frame->GetHtmlHelpController().Initialize("doc") )
|
||||||
|
{
|
||||||
|
wxLogError("Cannot initialize the HTML help system, aborting.");
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,6 +232,16 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
|||||||
menuFile->Append(HelpDemo_Help_Help, "&About Help Demo...");
|
menuFile->Append(HelpDemo_Help_Help, "&About Help Demo...");
|
||||||
menuFile->AppendSeparator();
|
menuFile->AppendSeparator();
|
||||||
menuFile->Append(HelpDemo_Help_Search, "&Search help...");
|
menuFile->Append(HelpDemo_Help_Search, "&Search help...");
|
||||||
|
#if USE_HTML_HELP
|
||||||
|
menuFile->AppendSeparator();
|
||||||
|
menuFile->Append(HelpDemo_Html_Help_Index, "HTML &Help Index...");
|
||||||
|
menuFile->Append(HelpDemo_Html_Help_Classes, "HTML &Help on Classes...");
|
||||||
|
menuFile->Append(HelpDemo_Html_Help_Functions, "HTML &Help on Functions...");
|
||||||
|
menuFile->Append(HelpDemo_Html_Help_Help, "HTML &About Help Demo...");
|
||||||
|
menuFile->AppendSeparator();
|
||||||
|
menuFile->Append(HelpDemo_Html_Help_Search, "HTML &Search help...");
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __WXMSW__
|
#ifndef __WXMSW__
|
||||||
#if !wxUSE_HTML
|
#if !wxUSE_HTML
|
||||||
menuFile->AppendSeparator();
|
menuFile->AppendSeparator();
|
||||||
@@ -229,14 +288,15 @@ void MyFrame::OnHelp(wxCommandEvent& event)
|
|||||||
switch(event.GetId())
|
switch(event.GetId())
|
||||||
{
|
{
|
||||||
|
|
||||||
// Note: these DisplaySection calls use ids that are specific to wxExtHelpController
|
// Note: For WinHelp, these ids are specified in the map session, mapping
|
||||||
// (on Unix). For WinHelp, we'd need to use different context ids.
|
// topic names to numbers.
|
||||||
|
// For HTML and external help, a wxhelp.map file is used.
|
||||||
|
|
||||||
case HelpDemo_Help_Classes:
|
case HelpDemo_Help_Classes:
|
||||||
m_help.DisplaySection(1);
|
m_help.DisplaySection(2);
|
||||||
break;
|
break;
|
||||||
case HelpDemo_Help_Functions:
|
case HelpDemo_Help_Functions:
|
||||||
m_help.DisplaySection(2);
|
m_help.DisplaySection(1);
|
||||||
break;
|
break;
|
||||||
case HelpDemo_Help_Help:
|
case HelpDemo_Help_Help:
|
||||||
m_help.DisplaySection(3);
|
m_help.DisplaySection(3);
|
||||||
@@ -271,3 +331,37 @@ void MyFrame::OnHelp(wxCommandEvent& event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MyFrame::OnHtmlHelp(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
#if USE_HTML_HELP
|
||||||
|
switch(event.GetId())
|
||||||
|
{
|
||||||
|
|
||||||
|
case HelpDemo_Html_Help_Classes:
|
||||||
|
m_htmlHelp.DisplaySection(2);
|
||||||
|
break;
|
||||||
|
case HelpDemo_Html_Help_Functions:
|
||||||
|
m_htmlHelp.DisplaySection(1);
|
||||||
|
break;
|
||||||
|
case HelpDemo_Html_Help_Help:
|
||||||
|
m_htmlHelp.DisplaySection(3);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case HelpDemo_Html_Help_Search:
|
||||||
|
{
|
||||||
|
wxString key = wxGetTextFromUser("Search for?",
|
||||||
|
"Search help for keyword",
|
||||||
|
"",
|
||||||
|
this);
|
||||||
|
if(! key.IsEmpty())
|
||||||
|
m_htmlHelp.KeywordSearch(key);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case HelpDemo_Html_Help_Index:
|
||||||
|
default:
|
||||||
|
m_htmlHelp.DisplayContents();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
8
samples/help/doc.cnt
Normal file
8
samples/help/doc.cnt
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
:Base doc.hlp
|
||||||
|
1 Introduction
|
||||||
|
2 Introduction=intro
|
||||||
|
2 Classes=classes
|
||||||
|
2 Functions=functions
|
||||||
|
2 About=about
|
||||||
|
1 Chapter 2
|
||||||
|
2 Chapter 2=chapter2
|
BIN
samples/help/doc.hlp
Normal file
BIN
samples/help/doc.hlp
Normal file
Binary file not shown.
21
samples/help/doc.hpj
Normal file
21
samples/help/doc.hpj
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
[OPTIONS]
|
||||||
|
BMROOT=D:\wx2\wxWind~1\samples\help
|
||||||
|
TITLE=Help Demo Document
|
||||||
|
CONTENTS=Contents
|
||||||
|
COMPRESS=HIGH
|
||||||
|
|
||||||
|
[FILES]
|
||||||
|
doc.rtf
|
||||||
|
|
||||||
|
[CONFIG]
|
||||||
|
CreateButton("Up", "&Up", "JumpId(`doc.hlp', `Contents')")
|
||||||
|
BrowseButtons()
|
||||||
|
|
||||||
|
[MAP]
|
||||||
|
#define intro 100
|
||||||
|
#define functions 1
|
||||||
|
#define classes 2
|
||||||
|
#define about 3
|
||||||
|
|
||||||
|
[BITMAPS]
|
||||||
|
|
59
samples/help/doc.tex
Normal file
59
samples/help/doc.tex
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
\documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report}%
|
||||||
|
\parskip=10pt%
|
||||||
|
\parindent=0pt%
|
||||||
|
\title{Help Demo}%
|
||||||
|
\author{by Julian Smart}%
|
||||||
|
\makeindex%
|
||||||
|
\begin{document}%
|
||||||
|
\maketitle%
|
||||||
|
\pagestyle{fancyplain}%
|
||||||
|
\bibliographystyle{plain}%
|
||||||
|
\pagenumbering{roman}%
|
||||||
|
\setheader{{\it CONTENTS}}{}{}{}{}{{\it CONTENTS}}%
|
||||||
|
\setfooter{\thepage}{}{}{}{}{\thepage}%
|
||||||
|
\tableofcontents%
|
||||||
|
|
||||||
|
\chapter{Introduction}\label{intro}
|
||||||
|
\pagenumbering{arabic}%
|
||||||
|
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||||
|
\setfooter{\thepage}{}{}{}{}{\thepage}%
|
||||||
|
|
||||||
|
This is a demo document for the wxWindows 'help' sample.
|
||||||
|
|
||||||
|
You should process this file with Tex2RTF, for example:
|
||||||
|
|
||||||
|
{\tt tex2rtf -winhelp -twice doc.tex doc.hlp}
|
||||||
|
|
||||||
|
and then run:
|
||||||
|
|
||||||
|
{\tt hc doc}
|
||||||
|
|
||||||
|
where hc is the help compiler.
|
||||||
|
|
||||||
|
Note that you can also generate HTML and Word RTF with Tex2RTF.
|
||||||
|
|
||||||
|
\section{Classes}\label{classes}
|
||||||
|
|
||||||
|
This would say something about classes, but doesn't yet.
|
||||||
|
|
||||||
|
\section{Functions}\label{functions}
|
||||||
|
|
||||||
|
This would say something about functions, but doesn't yet.
|
||||||
|
|
||||||
|
\section{About}\label{about}
|
||||||
|
|
||||||
|
About this HelpDemo: this file is really not much of a demo, but it's a start.
|
||||||
|
|
||||||
|
\chapter{Chapter 2}\label{chapter2}
|
||||||
|
\pagenumbering{arabic}%
|
||||||
|
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||||
|
\setfooter{\thepage}{}{}{}{}{\thepage}%
|
||||||
|
|
||||||
|
Another chapter in this enticing little manual.
|
||||||
|
|
||||||
|
\addcontentsline{toc}{chapter}{Index}
|
||||||
|
\setheader{{\it INDEX}}{}{}{}{}{{\it INDEX}}%
|
||||||
|
\setfooter{\thepage}{}{}{}{}{\thepage}%
|
||||||
|
\printindex%
|
||||||
|
|
||||||
|
\end{document}
|
@@ -5,6 +5,6 @@
|
|||||||
; First, some wxWindows documentation files:
|
; First, some wxWindows documentation files:
|
||||||
;
|
;
|
||||||
0 wx.htm ; wxWindows: Help index; additional keywords like overview
|
0 wx.htm ; wxWindows: Help index; additional keywords like overview
|
||||||
1 wx204.htm ; wxWindows Class References
|
1 wx204.htm ; wxWindows Function Reference
|
||||||
2 wx34.htm ; wxWindows Function References; methods
|
2 wx34.htm ; wxWindows Class Reference
|
||||||
3 aindex.html
|
3 aindex.html ;
|
||||||
|
21
samples/help/tex2rtf.ini
Normal file
21
samples/help/tex2rtf.ini
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
; Tex2RTF initialisation file
|
||||||
|
runTwice = yes
|
||||||
|
titleFontSize = 12
|
||||||
|
authorFontSize = 10
|
||||||
|
chapterFontSize = 12
|
||||||
|
sectionFontSize = 12
|
||||||
|
subsectionFontSize = 12
|
||||||
|
headerRule = yes
|
||||||
|
footerRule = yes
|
||||||
|
useHeadingStyles = yes
|
||||||
|
contentsDepth = 2
|
||||||
|
listItemIndent=40
|
||||||
|
winHelpContents = yes
|
||||||
|
winHelpVersion = 3 ; 3 for Windows 3.x, 4 for Windows 95
|
||||||
|
generateHPJ = no
|
||||||
|
htmlBrowseButtons = bitmap
|
||||||
|
winHelpTitle = "Help Demo Document"
|
||||||
|
truncateFilenames = yes
|
||||||
|
combineSubSections = yes
|
||||||
|
htmlIndex = yes
|
||||||
|
htmlFrameContents = no
|
16
samples/plot/makefile.b32
Normal file
16
samples/plot/makefile.b32
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.b32
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1999
|
||||||
|
# Updated:
|
||||||
|
# Copyright:
|
||||||
|
#
|
||||||
|
# Makefile : Builds sample for 32-bit BC++
|
||||||
|
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
|
||||||
|
TARGET=plot
|
||||||
|
OBJECTS = $(TARGET).obj
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\makeprog.b32
|
||||||
|
|
19
samples/plot/makefile.bcc
Normal file
19
samples/plot/makefile.bcc
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.bcc
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1998
|
||||||
|
# Updated:
|
||||||
|
#
|
||||||
|
# Builds a BC++ 16-bit sample
|
||||||
|
|
||||||
|
!if "$(WXWIN)" == ""
|
||||||
|
!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
|
||||||
|
!endif
|
||||||
|
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
|
||||||
|
TARGET=plot
|
||||||
|
OBJECTS=$(TARGET).obj
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\makeprog.bcc
|
||||||
|
|
17
samples/plot/makefile.dos
Normal file
17
samples/plot/makefile.dos
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.dos
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1998
|
||||||
|
# Updated:
|
||||||
|
#
|
||||||
|
# Makefile : Builds 16-bit sample, VC++ 1.5
|
||||||
|
# Use FINAL=1 argument to nmake to build final version with no debugging
|
||||||
|
# info
|
||||||
|
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
|
||||||
|
TARGET=plot
|
||||||
|
OBJECTS=$(TARGET).obj
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\makeprog.msc
|
||||||
|
|
18
samples/plot/makefile.vc
Normal file
18
samples/plot/makefile.vc
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.vc
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1999
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) Julian Smart
|
||||||
|
#
|
||||||
|
# Makefile : Builds sample (VC++, WIN32)
|
||||||
|
# Use FINAL=1 argument to nmake to build final version with no debug info.
|
||||||
|
|
||||||
|
# Set WXDIR for your system
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
|
||||||
|
PROGRAM=plot
|
||||||
|
OBJECTS = $(PROGRAM).obj
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\makeprog.vc
|
||||||
|
|
15
samples/plot/makefile.wat
Normal file
15
samples/plot/makefile.wat
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#
|
||||||
|
# Makefile for WATCOM
|
||||||
|
#
|
||||||
|
# Created by Julian Smart, January 1999
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
|
WXDIR = $(%WXWIN)
|
||||||
|
|
||||||
|
PROGRAM = plot
|
||||||
|
OBJECTS = $(PROGRAM).obj
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\makeprog.wat
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user