*** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2963 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
9
samples/html/help/Makefile.am
Normal file
9
samples/html/help/Makefile.am
Normal file
@@ -0,0 +1,9 @@
|
||||
AUTOMAKE_OPTIONS = 1.3 no-dependencies
|
||||
|
||||
SUFFIXES = .cpp
|
||||
|
||||
DEFS = @DEFS@ $(TOOLKIT_DEF) $(WXDEBUG_DEFINE)
|
||||
|
||||
noinst_PROGRAMS = help
|
||||
|
||||
help_SOURCES = help.cpp
|
85
samples/html/help/help.cpp
Normal file
85
samples/html/help/help.cpp
Normal file
@@ -0,0 +1,85 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: test.cpp
|
||||
// Purpose: wxHtml testing example
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
#include <wx/wxprec.h>
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
// for all others, include the necessary headers (this file is usually all you
|
||||
// need because it includes almost all "standard" wxWindows headers
|
||||
#ifndef WX_PRECOMP
|
||||
#include <wx/wx.h>
|
||||
#endif
|
||||
|
||||
#include <wx/image.h>
|
||||
#include <wx/wxhtml.h>
|
||||
#if (( wxVERSION_NUMBER < 2100 ) || (( wxVERSION_NUMBER == 2100 ) && (wxBETA_NUMBER <= 4)))
|
||||
#include <wx/imaggif.h>
|
||||
#endif
|
||||
#include <wx/config.h>
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// private classes
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Define a new application type, each program should derive a class from wxApp
|
||||
class MyApp : public wxApp
|
||||
{
|
||||
private:
|
||||
wxHtmlHelpController help;
|
||||
wxConfig* config;
|
||||
|
||||
public:
|
||||
// override base class virtuals
|
||||
// ----------------------------
|
||||
|
||||
// this one is called on application startup and is a good place for the app
|
||||
// initialization (doing it here and not in the ctor allows to have an error
|
||||
// return: if OnInit() returns false, the application terminates)
|
||||
bool OnInit();
|
||||
int OnExit();
|
||||
};
|
||||
|
||||
IMPLEMENT_APP(MyApp)
|
||||
|
||||
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
config = new wxConfig("wxHTMLhelp");
|
||||
#if wxUSE_LIBPNG
|
||||
wxImage::AddHandler(new wxPNGHandler);
|
||||
#endif
|
||||
#if wxUSE_LIBJPEG
|
||||
wxImage::AddHandler(new wxJPEGHandler);
|
||||
#endif
|
||||
|
||||
help.UseConfig(config);
|
||||
help.SetTempDir("tmp");
|
||||
help.AddBook("helpfiles/testing.hhp");
|
||||
help.Display("Main page");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int MyApp::OnExit()
|
||||
{
|
||||
delete config;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
2
samples/html/help/help.rc
Normal file
2
samples/html/help/help.rc
Normal file
@@ -0,0 +1,2 @@
|
||||
#include "wx/msw/wx.rc"
|
||||
#include "wx/html/msw/wxhtml.rc"
|
24
samples/html/help/helpfiles/Index.hhk
Normal file
24
samples/html/help/helpfiles/Index.hhk
Normal file
@@ -0,0 +1,24 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<meta name="GENERATOR" content="Microsoft® HTML Help Workshop 4.1">
|
||||
<!-- Sitemap 1.0 -->
|
||||
</HEAD><BODY>
|
||||
<UL>
|
||||
<LI> <OBJECT type="text/sitemap">
|
||||
<param name="Name" value="1">
|
||||
<param name="Name" value="Book 1">
|
||||
<param name="Local" value="book1.htm">
|
||||
</OBJECT>
|
||||
<LI> <OBJECT type="text/sitemap">
|
||||
<param name="Name" value="main">
|
||||
<param name="Name" value="Untitled: d:\HELPS\testing\main.htm">
|
||||
<param name="Local" value="main.htm">
|
||||
</OBJECT>
|
||||
<LI> <OBJECT type="text/sitemap">
|
||||
<param name="Name" value="2">
|
||||
<param name="Name" value="Book 1">
|
||||
<param name="Local" value="book2.htm">
|
||||
</OBJECT>
|
||||
</UL>
|
||||
</BODY></HTML>
|
4
samples/html/help/helpfiles/book1.htm
Normal file
4
samples/html/help/helpfiles/book1.htm
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><title>Book 1</title><body>
|
||||
<h2>Book 1.</h2>
|
||||
How do you enjoy <i> book one</i>??
|
||||
</body></html>
|
5
samples/html/help/helpfiles/book2.htm
Normal file
5
samples/html/help/helpfiles/book2.htm
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><title>Book 1</title><body>
|
||||
<h2>Book 2.</h2>
|
||||
How do you enjoy <i> book two</i>??
|
||||
<p>Please click <a href="page2-b.htm">HERE</a>
|
||||
</body></html>
|
33
samples/html/help/helpfiles/contents.hhc
Normal file
33
samples/html/help/helpfiles/contents.hhc
Normal file
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<meta name="GENERATOR" content="Microsoft® HTML Help Workshop 4.1">
|
||||
<!-- Sitemap 1.0 -->
|
||||
</HEAD><BODY>
|
||||
<OBJECT type="text/site properties">
|
||||
<param name="ImageType" value="Folder">
|
||||
</OBJECT>
|
||||
<UL>
|
||||
<LI> <OBJECT type="text/sitemap">
|
||||
<param name="Name" value="Main page">
|
||||
<param name="Local" value="main.htm">
|
||||
</OBJECT>
|
||||
<UL>
|
||||
<LI> <OBJECT type="text/sitemap">
|
||||
<param name="Name" value="Book 1">
|
||||
<param name="Local" value="book1.htm">
|
||||
</OBJECT>
|
||||
<LI> <OBJECT type="text/sitemap">
|
||||
<param name="Name" value="Book 2">
|
||||
<param name="ID" value=34>
|
||||
<param name="Local" value="book2.htm">
|
||||
</OBJECT>
|
||||
<UL>
|
||||
<LI> <OBJECT type="text/sitemap">
|
||||
<param name="Name" value="sub book">
|
||||
<param name="Local" value="page2-b.htm">
|
||||
</OBJECT>
|
||||
</UL>
|
||||
</UL>
|
||||
</UL>
|
||||
</BODY></HTML>
|
5
samples/html/help/helpfiles/main.htm
Normal file
5
samples/html/help/helpfiles/main.htm
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>
|
||||
<h2>This is main page.</h2>
|
||||
<a href="book1.htm">Book 1</a><br>
|
||||
<a href="book2.htm">Book 2</a><br>
|
||||
</body></html>
|
5
samples/html/help/helpfiles/page2-b.htm
Normal file
5
samples/html/help/helpfiles/page2-b.htm
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>
|
||||
<font color="#FF0000" size=+4 face="Tahoma">
|
||||
Hello, you're on sub page of page 2 !!!
|
||||
</font>
|
||||
</body></html>
|
15
samples/html/help/helpfiles/testing.hhp
Normal file
15
samples/html/help/helpfiles/testing.hhp
Normal file
@@ -0,0 +1,15 @@
|
||||
[OPTIONS]
|
||||
Compatibility=1.1
|
||||
Compiled file=testing.chm
|
||||
Contents file=contents.hhc
|
||||
Display compile progress=No
|
||||
Index file=Index.hhk
|
||||
Language=0x405 <20>esky
|
||||
Title=Testing HELPFILE :-)
|
||||
Default topic=main.htm
|
||||
|
||||
[FILES]
|
||||
main.htm
|
||||
book1.htm
|
||||
book2.htm
|
||||
page2-b.htm
|
Reference in New Issue
Block a user