Compare commits

...

1 Commits

Author SHA1 Message Date
Bryan Petty
af75c24d38 This commit was manufactured by cvs2svn to create tag 'wxGTK_2_1_13'.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/wxGTK_2_1_13@5627 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-01-24 13:27:37 +00:00
3535 changed files with 0 additions and 1025235 deletions

View File

@@ -1,113 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: minimal.cpp
// Purpose: Dynamic events wxWindows sample
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart and Markus Holzem
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "minimal.cpp"
#pragma interface "minimal.cpp"
#endif
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#ifdef __WXGTK__
#include "mondrian.xpm"
#endif
// Define a new application type
class MyApp: public wxApp
{ public:
bool OnInit(void);
};
// Define a new frame type
class MyFrame: public wxFrame
{ public:
MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h);
public:
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
bool OnClose(void) { return TRUE; }
};
// ID for the menu commands
#define MINIMAL_QUIT 1
#define MINIMAL_TEXT 101
#define MINIMAL_ABOUT 102
// Create a new application object
IMPLEMENT_APP (MyApp)
// `Main program' equivalent, creating windows and returning main app frame
bool MyApp::OnInit(void)
{
// Create the main frame window
MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "Minimal wxWindows App", 50, 50, 450, 340);
frame->Connect( MINIMAL_QUIT, -1, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction)MyFrame::OnQuit );
frame->Connect( MINIMAL_ABOUT, -1, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction)MyFrame::OnAbout );
// Give it an icon
#ifdef __WXMSW__
frame->SetIcon(wxIcon("mondrian"));
#else
frame->SetIcon(wxIcon(mondrian_xpm));
#endif
// Make a menubar
wxMenu *file_menu = new wxMenu;
file_menu->Append(MINIMAL_ABOUT, "&About");
file_menu->Append(MINIMAL_QUIT, "E&xit");
wxMenuBar *menu_bar = new wxMenuBar;
menu_bar->Append(file_menu, "&File");
frame->SetMenuBar(menu_bar);
// Make a panel with a message
wxPanel *panel = new wxPanel(frame, -1, wxPoint(0, 0), wxSize(400, 200), wxTAB_TRAVERSAL);
(void)new wxStaticText(panel, 311, "Hello!", wxPoint(10, 10), wxSize(-1, -1), 0);
// Show the frame
frame->Show(TRUE);
SetTopWindow(frame);
return TRUE;
}
// My frame constructor
MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h):
wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h))
{}
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) )
{
Close(TRUE);
}
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) )
{
wxMessageDialog dialog(this, "This is a minimal sample\nA second line in the message box",
"About Minimal", wxYES_NO|wxCANCEL);
dialog.ShowModal();
}

View File

@@ -1,23 +0,0 @@
#
# File: makefile.unx
# Author: Julian Smart
# Created: 1998
# Updated:
# Copyright: (c) 1998 Julian Smart
#
# "%W% %G%"
#
# Makefile for toolbar example (UNIX).
top_srcdir = @top_srcdir@
top_builddir = ../..
program_dir = samples/grid
PROGRAM=grid
OBJECTS=test.o
include ../../src/makeprog.env

View File

@@ -1,24 +0,0 @@
#
# File: Makefile.in
# Author: Julian Smart
# Created: 1998
# Updated:
# Copyright: (c) 1998 Julian Smart
#
# "%W% %G%"
#
# Makefile for html about example (UNIX).
top_srcdir = @top_srcdir@
top_builddir = ../../..
program_dir = samples/html/about
DATADIRS = data
DATAFILES = data/about.htm data/logo.png
PROGRAM=about
OBJECTS=$(PROGRAM).o
include ../../../src/makeprog.env

View File

@@ -1,18 +0,0 @@
#
# 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=about
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.vc

View File

@@ -1,187 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: test.cpp
// Purpose: wxHtml testing example
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "test.cpp"
#pragma interface "test.cpp"
#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/imagpng.h>
#include <wx/wxhtml.h>
#include <wx/statline.h>
// ----------------------------------------------------------------------------
// private classes
// ----------------------------------------------------------------------------
// Define a new application type, each program should derive a class from wxApp
class MyApp : public wxApp
{
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)
virtual bool OnInit();
};
// Define a new frame type: this is going to be our main frame
class MyFrame : public wxFrame
{
public:
// ctor(s)
MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
// event handlers (these functions should _not_ be virtual)
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
private:
// any class wishing to process wxWindows events must use this macro
DECLARE_EVENT_TABLE()
};
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
// IDs for the controls and the menu commands
enum
{
// menu items
Minimal_Quit = 1,
Minimal_About,
Minimal_Back,
Minimal_Forward,
// controls start here (the numbers are, of course, arbitrary)
Minimal_Text = 1000,
};
// ----------------------------------------------------------------------------
// event tables and other macros for wxWindows
// ----------------------------------------------------------------------------
// the event tables connect the wxWindows events with the functions (event
// handlers) which process them. It can be also done at run-time, but for the
// simple menu events like this the static method is much simpler.
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
EVT_MENU(Minimal_About, MyFrame::OnAbout)
END_EVENT_TABLE()
// Create a new application object: this macro will allow wxWindows to create
// the application object during program execution (it's better than using a
// static object for many reasons) and also declares the accessor function
// wxGetApp() which will return the reference of the right type (i.e. MyApp and
// not wxApp)
IMPLEMENT_APP(MyApp)
// ============================================================================
// implementation
// ============================================================================
// ----------------------------------------------------------------------------
// the application class
// ----------------------------------------------------------------------------
// `Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
wxImage::AddHandler(new wxPNGHandler);
// Create the main application window
MyFrame *frame = new MyFrame("wxHtmlWindow testing application",
wxPoint(50, 50), wxSize(150, 50));
// Show it and tell the application that it's our main window
// @@@ what does it do exactly, in fact? is it necessary here?
frame->Show(TRUE);
SetTopWindow(frame);
// success: wxApp::OnRun() will be called which will enter the main message
// loop and the application will run. If we returned FALSE here, the
// application would exit immediately.
return TRUE;
}
// ----------------------------------------------------------------------------
// main frame
// ----------------------------------------------------------------------------
// frame constructor
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
: wxFrame((wxFrame *)NULL, -1, title, pos, size)
{
// create a menu bar
wxMenu *menuFile = new wxMenu;
menuFile->Append(Minimal_About, "&About");
menuFile->Append(Minimal_Quit, "E&xit");
// now append the freshly created menu to the menu bar...
wxMenuBar *menuBar = new wxMenuBar;
menuBar->Append(menuFile, "&File");
// ... and attach this menu bar to the frame
SetMenuBar(menuBar);
}
// event handlers
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
// TRUE is to force the frame to close
Close(TRUE);
}
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
wxBoxSizer *topsizer;
wxHtmlWindow *html;
wxDialog dlg(this, -1, "About");
topsizer = new wxBoxSizer(wxVERTICAL);
html = new wxHtmlWindow(&dlg, -1, wxDefaultPosition, wxSize(380, 160), wxHW_SCROLLBAR_NEVER);
html -> SetBorders(0);
html -> LoadPage("data/about.htm");
html -> SetSize(html -> GetInternalRepresentation() -> GetWidth(),
html -> GetInternalRepresentation() -> GetHeight());
topsizer -> Add(html, 1, wxALL, 10);
topsizer -> Add(new wxStaticLine(&dlg, -1), 0, wxEXPAND | wxLEFT | wxRIGHT, 10);
wxButton *bu1 = new wxButton(&dlg, wxID_OK, "Okay");
bu1 -> SetDefault();
topsizer -> Add(bu1, 0, wxALL | wxALIGN_RIGHT, 15);
dlg.SetAutoLayout(TRUE);
dlg.SetSizer(topsizer);
topsizer -> Fit(&dlg);
dlg.ShowModal();
}

View File

@@ -1,2 +0,0 @@
#include "wx/msw/wx.rc"

View File

@@ -1,34 +0,0 @@
<html>
<body bgcolor="#FFFFFF">
<table cellspacing=3 cellpadding=4 width="100%">
<tr>
<td bgcolor="#101010">
<center>
<font size=+2 color="#FFFFFF"><b><br>wxHTML Library Sample 0.2.0<br></b>
</font>
</center>
</td>
</tr>
<tr>
<td bgcolor="#73A183">
<b><font size=+1>Copyright (C) 1999 Vaclav Slavik</font></b><p>
<font size=-1>
<table cellpadding=0 cellspacing=0 width="100%">
<tr>
<td width="65%">
Vaclav Slavik (v.slavik@volny.cz)<p>
</td>
<td valign=top>
<img src="logo.png">
</td>
</tr>
</table>
<font size=1>
Licenced under wxWindows Library Licence, Version 3.
</font>
</font>
</td>
</tr>
</table>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

View File

@@ -1,16 +0,0 @@
#
# File: makefile.b32
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright:
#
# Makefile : Builds sample for 32-bit BC++
WXDIR = $(WXWIN)
TARGET=about
OBJECTS = $(TARGET).obj
!include $(WXDIR)\src\makeprog.b32

View File

@@ -1,15 +0,0 @@
#
# Makefile for WATCOM
#
# Created by Julian Smart, January 1999
#
#
WXDIR = $(%WXWIN)
PROGRAM = about
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.wat

View File

@@ -1,28 +0,0 @@
#
# File: Makefile.in
# Author: Julian Smart
# Created: 1998
# Updated:
# Copyright: (c) 1998 Julian Smart
#
# "%W% %G%"
#
# Makefile for html about example (UNIX).
top_srcdir = @top_srcdir@
top_builddir = ../../..
program_dir = samples/html/help
VPATH = :$(top_srcdir)/samples/html/help
DATADIRS = helpfiles
DATAFILES = helpfiles/Index.hhk helpfiles/book1.htm helpfiles/book2.htm \
helpfiles/contents.hhc helpfiles/main.htm helpfiles/page2-b.htm helpfiles/testing.hhp \
helpfiles/another.hhc helpfiles/another.hhp helpfiles/another.htm
PROGRAM=help
OBJECTS=$(PROGRAM).o
include ../../../src/makeprog.env

View File

@@ -1,18 +0,0 @@
#
# 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=help
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.vc

View File

@@ -1,192 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: test.cpp
// Purpose: wxHtml testing example
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "help.cpp"
#pragma interface "help.cpp"
#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>
// ----------------------------------------------------------------------------
// private classes
// ----------------------------------------------------------------------------
// Define a new application type, each program should derive a class from wxApp
class MyApp : public wxApp
{
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)
virtual bool OnInit();
};
// Define a new frame type: this is going to be our main frame
class MyFrame : public wxFrame
{
public:
// ctor(s)
MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
// event handlers (these functions should _not_ be virtual)
void OnQuit(wxCommandEvent& event);
void OnHelp(wxCommandEvent& event);
void OnClose(wxCloseEvent& event);
private:
wxHtmlHelpController help;
// any class wishing to process wxWindows events must use this macro
DECLARE_EVENT_TABLE()
};
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
// IDs for the controls and the menu commands
enum
{
// menu items
Minimal_Quit = 1,
Minimal_Help
};
// ----------------------------------------------------------------------------
// event tables and other macros for wxWindows
// ----------------------------------------------------------------------------
// the event tables connect the wxWindows events with the functions (event
// handlers) which process them. It can be also done at run-time, but for the
// simple menu events like this the static method is much simpler.
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
EVT_MENU(Minimal_Help, MyFrame::OnHelp)
EVT_CLOSE(MyFrame::OnClose)
END_EVENT_TABLE()
// Create a new application object: this macro will allow wxWindows to create
// the application object during program execution (it's better than using a
// static object for many reasons) and also declares the accessor function
// wxGetApp() which will return the reference of the right type (i.e. MyApp and
// not wxApp)
IMPLEMENT_APP(MyApp)
// ============================================================================
// implementation
// ============================================================================
// ----------------------------------------------------------------------------
// the application class
// ----------------------------------------------------------------------------
// `Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
wxInitAllImageHandlers();
SetVendorName("wxWindows");
SetAppName("wxHTMLHelp");
// Create the main application window
MyFrame *frame = new MyFrame("HTML Help Sample",
wxPoint(50, 50), wxSize(150, 50));
// Show it and tell the application that it's our main window
// @@@ what does it do exactly, in fact? is it necessary here?
frame->Show(TRUE);
SetTopWindow(frame);
// success: wxApp::OnRun() will be called which will enter the main message
// loop and the application will run. If we returned FALSE here, the
// application would exit immediately.
return TRUE;
}
// ----------------------------------------------------------------------------
// main frame
// ----------------------------------------------------------------------------
// frame constructor
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
: wxFrame((wxFrame *)NULL, -1, title, pos, size), help()
{
// create a menu bar
wxMenu *menuFile = new wxMenu;
menuFile->Append(Minimal_Help, "&Help");
menuFile->Append(Minimal_Quit, "E&xit");
// now append the freshly created menu to the menu bar...
wxMenuBar *menuBar = new wxMenuBar;
menuBar->Append(menuFile, "&File");
// ... and attach this menu bar to the frame
SetMenuBar(menuBar);
help.UseConfig(wxConfig::Get());
bool ret;
help.SetTempDir(".");
ret = help.AddBook("helpfiles/testing.hhp");
if (! ret)
wxMessageBox("Failed adding book helpfiles/testing.hhp");
ret = help.AddBook("helpfiles/another.hhp");
if (! ret)
wxMessageBox("Failed adding book helpfiles/another.hhp");
}
// event handlers
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
// TRUE is to force the frame to close
Close(TRUE);
}
void MyFrame::OnHelp(wxCommandEvent& WXUNUSED(event))
{
help.Display("Main page");
}
void MyFrame::OnClose(wxCloseEvent& event)
{
// Close the help frame; this will cause the config data to
// get written.
if ( help.GetFrame() ) // returns NULL if no help frame active
help.GetFrame()->Close(TRUE);
// now we can safely delete the config pointer
event.Skip();
delete wxConfig::Set(NULL);
}

View File

@@ -1,2 +0,0 @@
#include "wx/msw/wx.rc"
#include "wx/html/msw/wxhtml.rc"

View File

@@ -1,24 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>
<meta name="GENERATOR" content="Microsoft&reg; 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>

View File

@@ -1,24 +0,0 @@
<HTML>
<HEAD>
<!-- 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="another.htm">
</OBJECT>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Project file">
<param name="Local" value="another.hhp">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Contents file">
<param name="Local" value="another.hhc">
</OBJECT>
</UL>
</UL>
</BODY></HTML>

View File

@@ -1,6 +0,0 @@
[OPTIONS]
Compatibility=1.1
Contents file=another.hhc
Display compile progress=No
Title=Another book
Default topic=another.htm

View File

@@ -1,24 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<title>Another HTML Help book</title>
</head>
<body>
<h1>Another book...</h1>
Here's another book to demonstrate that
<UL>
<LI> You can display multiple books in a help controller
<LI> You can selectively search books. Try it!
<LI> Index files are optional. This book doesn't supply an index, but it does supply
a contents (.hhc) file. You must always supply a contents file because
<UL>
<LI> Contents trees rule :-)
<LI> The search algorithm uses the contents tree to find out which pages are
available.
</UL>
Wanna know what a contents file looks like? Click <a href="another.hhc">here</a>
</UL>
You can also view the <a href="another.hhp">project file</a> for this book.
</body>
</html>

View File

@@ -1,4 +0,0 @@
<html><title>Book 1</title><body>
<h2>Book 1.</h2>
How do you enjoy <i> book one</i>??
</body></html>

View File

@@ -1,5 +0,0 @@
<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>

View File

@@ -1,33 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>
<meta name="GENERATOR" content="Microsoft&reg; 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>

View File

@@ -1,5 +0,0 @@
<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>

View File

@@ -1,5 +0,0 @@
<html><body>
<font color="#FF0000" size=+4 face="Tahoma">
Hello, you're on sub page of page 2 !!!
</font>
</body></html>

View File

@@ -1,15 +0,0 @@
[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

View File

@@ -1,16 +0,0 @@
#
# File: makefile.b32
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright:
#
# Makefile : Builds sample for 32-bit BC++
WXDIR = $(WXWIN)
TARGET=help
OBJECTS = $(TARGET).obj
!include $(WXDIR)\src\makeprog.b32

View File

@@ -1,16 +0,0 @@
#
# File: makefile.g95
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart, 1999
#
# Makefile for wxWindows sample (Cygwin/Mingw32).
WXDIR = ../../..
TARGET=help
OBJECTS = $(TARGET).o
include $(WXDIR)/src/makeprog.g95

View File

@@ -1,15 +0,0 @@
#
# Makefile for WATCOM
#
# Created by Julian Smart, January 1999
#
#
WXDIR = $(%WXWIN)
PROGRAM = help
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.wat

View File

@@ -1,25 +0,0 @@
#
# File: Makefile.in
# Author: Julian Smart
# Created: 1998
# Updated:
# Copyright: (c) 1998 Julian Smart
#
# "%W% %G%"
#
# Makefile for html about example (UNIX).
top_srcdir = @top_srcdir@
top_builddir = ../../..
program_dir = samples/html/helpview
VPATH = :$(top_srcdir)/samples/html/helpview
DATAFILES = test.zip
PROGRAM=helpview
OBJECTS=$(PROGRAM).o
include ../../../src/makeprog.env

View File

@@ -1,18 +0,0 @@
#
# 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=helpview
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.vc

View File

@@ -1,98 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: helpview.cpp
// Purpose: wxHtml help browser
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "help.cpp"
#pragma interface "help.cpp"
#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>
#include <wx/fs_zip.h>
#include <wx/log.h>
// ----------------------------------------------------------------------------
// private classes
// ----------------------------------------------------------------------------
// Define a new application type, each program should derive a class from wxApp
class MyApp : public wxApp
{
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)
virtual bool OnInit();
virtual int OnExit();
private:
wxHtmlHelpController *help;
};
IMPLEMENT_APP(MyApp)
bool MyApp::OnInit()
{
#ifdef __WXMOTIF__
delete wxLog::SetActiveTarget(new wxLogStderr); // So dialog boxes aren't used
#endif
wxInitAllImageHandlers();
wxFileSystem::AddHandler(new wxZipFSHandler);
SetVendorName("wxWindows");
SetAppName("wxHTMLHelp");
wxConfig::Get(); // create an instance
help = new wxHtmlHelpController;
if (argc < 2) {
wxLogError("Usage : helpview <helpfile> [<more helpfiles>]");
wxLogError(" helpfile may be .hhp, .zip or .htb");
return FALSE;
}
for (int i = 1; i < argc; i++)
help -> AddBook(argv[i]);
#ifdef __WXMOTIF__
delete wxLog::SetActiveTarget(new wxLogGui);
#endif
help -> DisplayContents();
return TRUE;
}
int MyApp::OnExit()
{
delete help;
delete wxConfig::Set(NULL);
return 0;
}

View File

@@ -1,5 +0,0 @@
/* We need this to get the right default icon. */
aaaaaa ICON "wx/html/msw/whelp.ico"
#include "wx/msw/wx.rc"
#include "wx/html/msw/wxhtml.rc"

View File

@@ -1,16 +0,0 @@
#
# File: makefile.b32
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright:
#
# Makefile : Builds sample for 32-bit BC++
WXDIR = $(WXWIN)
TARGET=helpview
OBJECTS = $(TARGET).obj
!include $(WXDIR)\src\makeprog.b32

View File

@@ -1,16 +0,0 @@
#
# File: makefile.g95
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart, 1999
#
# Makefile for wxWindows sample (Cygwin/Mingw32).
WXDIR = ../../..
TARGET=helpview
OBJECTS = $(TARGET).o
include $(WXDIR)/src/makeprog.g95

View File

@@ -1,15 +0,0 @@
#
# Makefile for WATCOM
#
# Created by Julian Smart, January 1999
#
#
WXDIR = $(%WXWIN)
PROGRAM = helpview
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.wat

Binary file not shown.

View File

@@ -1,23 +0,0 @@
#
# File: Makefile.in
# Author: Julian Smart
# Created: 1998
# Updated:
# Copyright: (c) 1998 Julian Smart
#
# "%W% %G%"
#
# Makefile for html printing example (UNIX).
top_srcdir = @top_srcdir@
top_builddir = ../../..
program_dir = samples/html/printing
DATAFILES = test.htm
PROGRAM=printing
OBJECTS=$(PROGRAM).o
include ../../../src/makeprog.env

View File

@@ -1,18 +0,0 @@
#
# 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=printing
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.vc

View File

@@ -1,16 +0,0 @@
#
# File: makefile.b32
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright:
#
# Makefile : Builds sample for 32-bit BC++
WXDIR = $(WXWIN)
TARGET=printing
OBJECTS = $(TARGET).obj
!include $(WXDIR)\src\makeprog.b32

View File

@@ -1,16 +0,0 @@
#
# File: makefile.g95
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart, 1999
#
# Makefile for wxWindows sample (Cygwin/Mingw32).
WXDIR = ../../..
TARGET=printing
OBJECTS = $(TARGET).o
include $(WXDIR)/src/makeprog.g95

View File

@@ -1,15 +0,0 @@
#
# Makefile for WATCOM
#
# Created by Julian Smart, January 1999
#
#
WXDIR = $(%WXWIN)
PROGRAM = printing
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.wat

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

View File

@@ -1,244 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: printimg.cpp
// Purpose: wxHtmlEasyPrinting testing example
/////////////////////////////////////////////////////////////////////////////
// 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/html/htmlwin.h>
#include <wx/html/htmprint.h>
// ----------------------------------------------------------------------------
// private classes
// ----------------------------------------------------------------------------
// Define a new application type, each program should derive a class from wxApp
class MyApp : public wxApp
{
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)
virtual bool OnInit();
};
// Define a new frame type: this is going to be our main frame
class MyFrame : public wxFrame
{
public:
// ctor(s)
MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
// event handlers (these functions should _not_ be virtual)
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
void OnPrintSetup(wxCommandEvent& event);
void OnPageSetup(wxCommandEvent& event);
void OnPrint(wxCommandEvent& event);
void OnPreview(wxCommandEvent& event);
void OnOpen(wxCommandEvent& event);
private:
wxHtmlWindow *m_Html;
wxHtmlEasyPrinting *m_Prn;
wxString m_Name;
// any class wishing to process wxWindows events must use this macro
DECLARE_EVENT_TABLE()
};
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
// IDs for the controls and the menu commands
enum
{
// menu items
Minimal_Quit = 1,
Minimal_About,
Minimal_Print,
Minimal_Preview,
Minimal_PageSetup,
Minimal_PrintSetup,
Minimal_Open
};
// ----------------------------------------------------------------------------
// event tables and other macros for wxWindows
// ----------------------------------------------------------------------------
// the event tables connect the wxWindows events with the functions (event
// handlers) which process them. It can be also done at run-time, but for the
// simple menu events like this the static method is much simpler.
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
EVT_MENU(Minimal_About, MyFrame::OnAbout)
EVT_MENU(Minimal_Print, MyFrame::OnPrint)
EVT_MENU(Minimal_Preview, MyFrame::OnPreview)
EVT_MENU(Minimal_PageSetup, MyFrame::OnPageSetup)
EVT_MENU(Minimal_PrintSetup, MyFrame::OnPrintSetup)
EVT_MENU(Minimal_Open, MyFrame::OnOpen)
END_EVENT_TABLE()
// Create a new application object: this macro will allow wxWindows to create
// the application object during program execution (it's better than using a
// static object for many reasons) and also declares the accessor function
// wxGetApp() which will return the reference of the right type (i.e. MyApp and
// not wxApp)
IMPLEMENT_APP(MyApp)
// ============================================================================
// implementation
// ============================================================================
// ----------------------------------------------------------------------------
// the application class
// ----------------------------------------------------------------------------
// `Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
#if wxUSE_LIBPNG
wxImage::AddHandler(new wxPNGHandler);
#endif
#if wxUSE_LIBJPEG
wxImage::AddHandler(new wxJPEGHandler);
#endif
#if wxUSE_GIF
wxImage::AddHandler(new wxGIFHandler);
#endif
MyFrame *frame = new MyFrame("Printing test",
wxPoint(150, 50), wxSize(640, 480));
// Show it and tell the application that it's our main window
// @@@ what does it do exactly, in fact? is it necessary here?
frame->Show(TRUE);
SetTopWindow(frame);
// success: wxApp::OnRun() will be called which will enter the main message
// loop and the application will run. If we returned FALSE here, the
// application would exit immediately.
return TRUE;
}
// ----------------------------------------------------------------------------
// main frame
// ----------------------------------------------------------------------------
// frame constructor
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
: wxFrame((wxFrame *)NULL, -1, title, pos, size)
{
// create a menu bar
wxMenu *menuFile = new wxMenu;
wxMenu *menuNav = new wxMenu;
menuFile->Append(Minimal_Open, "Open...\tCtrl-O");
menuFile->AppendSeparator();
menuFile->Append(Minimal_PageSetup, "Page Setup");
menuFile->Append(Minimal_PrintSetup, "Printer Setup");
menuFile->Append(Minimal_Print, "Print...");
menuFile->Append(Minimal_Preview, "Preview...");
menuFile->AppendSeparator();
menuFile->Append(Minimal_About, "&About");
menuFile->AppendSeparator();
menuFile->Append(Minimal_Quit, "&Exit");
// now append the freshly created menu to the menu bar...
wxMenuBar *menuBar = new wxMenuBar;
menuBar->Append(menuFile, "&File");
// ... and attach this menu bar to the frame
SetMenuBar(menuBar);
CreateStatusBar(1);
m_Html = new wxHtmlWindow(this);
m_Html -> SetRelatedFrame(this, "HTML : %s");
m_Html -> SetRelatedStatusBar(0);
m_Name = "test.htm";
m_Html -> LoadPage(m_Name);
m_Prn = new wxHtmlEasyPrinting("Easy Printing Demo", this);
m_Prn -> SetHeader(m_Name + "(@PAGENUM@/@PAGESCNT@)<hr>", wxPAGE_ALL);
}
// event handlers
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
delete m_Prn;
// TRUE is to force the frame to close
Close(TRUE);
}
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
wxMessageBox("HTML printing sample\n\n(c) Vaclav Slavik, 1999");
}
void MyFrame::OnPrintSetup(wxCommandEvent& WXUNUSED(event))
{
m_Prn -> PrinterSetup();
}
void MyFrame::OnPageSetup(wxCommandEvent& WXUNUSED(event))
{
m_Prn -> PageSetup();
}
void MyFrame::OnPrint(wxCommandEvent& WXUNUSED(event))
{
m_Prn -> PrintFile(m_Name);
}
void MyFrame::OnPreview(wxCommandEvent& WXUNUSED(event))
{
m_Prn -> PreviewFile(m_Name);
}
void MyFrame::OnOpen(wxCommandEvent& WXUNUSED(event))
{
wxFileDialog dialog(this, "Open HTML page", "", "", "*.htm", 0);
if (dialog.ShowModal() == wxID_OK)
{
m_Name = dialog.GetPath();
m_Html -> LoadPage(m_Name);
m_Prn -> SetHeader(m_Name + "(@PAGENUM@/@PAGESCNT@)<hr>", wxPAGE_ALL);
}
}

View File

@@ -1,3 +0,0 @@
mondrian ICON "mondrian.ico"
#include "wx/msw/wx.rc"

View File

@@ -1,186 +0,0 @@
<HTML>
<HEAD>
<TITLE>wxWindows Roadmap</TITLE>
</HEAD>
<BODY>
<a name="top"></a>
<font face="Arial, Lucida Sans, Helvetica">
<table width=100% border=4 cellpadding=5 cellspacing=0>
<tr>
<td bgcolor="#660000">
<font size=+1 face="Arial, Lucida Sans, Helvetica" color="#FFFFFF">
wxWindows Roadmap
</font>
</td>
</tr>
</table>
<P>
<CENTER>
<a href="#schedule">Schedule</a> | <a href="#todo">To-Do List</a>
</CENTER>
<P>
This page represents current thinking about where wxWindows is going in the near,
medium and long-term. It also serves as a schedule for new releases so
that both developers and users can know what to expect when, at least approximately.<P>
Note (1): as the wxWindows effort is voluntary, these are not hard-and-fast deadlines:
but we will endeavour to follow them as closely as possible.<P>
Note (2): the releases described are for wxGTK, wxMSW and wxMotif ports. wxMac currently follows
its own development path. Also, minor snapshot releases for specific platforms may be
available at dates convenient to the developers.<P>
<HR> <FONT SIZE=+2><I><B><a name="schedule">Schedule</a></B></I></FONT> <HR>
<P>
<H4>Release 2.1.10</H4>
<ul>
<li>Release date: October 3rd, 1999
<li>This beta is intended to be the last stable snapshot before wxWindows
is split into base and GUI libraries.
<li>New wxGrid in beta.
</ul>
<P>
<H2>Release 2.1.11 (final)</H2>
<ul>
<li>Release date: November 7th, 1999
<li>Splits wxWindows into base and GUI libraries. Most, but not all makefiles
are expected to support this: for the rest, the makefiles will build a valid
combined base/GUI library for GUI applications only.
<li>New wxGrid.
<li>wxSocket working.
<li>wxHTML printing (possibly).
<li>Animation classes (possibly).
<li>PCX writing capability (possibly).
<li>wxImage handlers in separate .h and .cpp files.
<li>Rewritten timer.cpp, possible wxChrono class.
<li>Bug tracking system in place.
</ul>
<P>
<H4>Release 2.1.12</H4>
<ul>
<li>Release date: January 9th, 2000
<li>Miscellaneous fixes and small enhancements.
</ul>
<P>
<H4>Release 2.1.13</H4>
<ul>
<li>Release date: March 5th, 2000
<li>Miscellaneous fixes and small enhancements.
<li>wxDateTime class in beta.
</ul>
<P>
<H4>Release 2.2.0</H4>
<ul>
<li>Release date: May 7th, 2000
<li>Unicode compilation starting to work in wxGTK and wxMSW.
</ul>
<P>
<H2>Release 2.2.x (final)</H2>
<ul>
<li>Release date: c. July 2nd, 2000
<li>Unicode compilation working in wxGTK and wxMSW.
<li>wxDateTime class.
</ul>
<P>
<H2>Release 2.3.x (final)</H2>
<ul>
<li>Release date: unknown
<li>WinCE port available.
</ul>
<P>
<HR> <FONT SIZE=+2><I><B><a name="todo">To-Do List</a></B></I></FONT> <HR>
<P>
Developers: please feel free to add to these, and delete them when they are done.
<P>
<B><I>General</I></B><P>
<ul>
<li>wxHTML printing. When finished, this will allow an application to generate
printed reports with very little effort.
<li>wxSocket.
<li>Split library into several, for base (classes and functions usable by console and GUI
applications), console (classes and functions usable by console application only)
and GUI (classes and functions usable by GUI application only).
<li>Extend and unify drag and drop handling (e.g. we need to specify multiple drop targets
that can handle multiple formats).
<li>Expand the number of controls that can be specified in a WXR file.
<li>Rewrite Dialog Editor.
<li>PCX writing code.
<li>GIF animation code.
<li>Tidying of timer code, addition of wxChrono class.
<li>wxDateTime class.
<li>MGL port (see Backroom/Future Ports page).
<li>Rotated text support.
<li>FreeType support.
<li>Support for 'skins', perhaps using a set of alternative control and window classes
written generically in wxWindows.
<li>Book, tutorial.
<li>More examples.
</ul>
<P>
<B><I>wxMSW</I></B><P>
<ul>
<li>Windows CE port.
<li>Cure bug whereby in a panel within another panel, all buttons become
default buttons (heavy black border).
<li>Write a RC->WXR converter.
</ul>
<P>
<B><I>wxGTK</I></B><P>
<ul>
<li>GNOME/KDE integration libraries.
</ul>
<P>
<B><I>wxMotif</I></B><P>
<ul>
<li>Allow wxSystemSettings to be configurable, perhaps via a control
panel application.
</ul>
</BODY>
</HTML>

View File

@@ -1,14 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<title>ISO_8859-2 document</title>
</head>
<body>
Hi, this document is encoded in ISO_8859-2:
<p>
<b>P<EFBFBD><EFBFBD>li<EFBFBD> <20>lu<6C>ou<6F>k<EFBFBD> k<><6B> <20>p<EFBFBD>l <20><>belsk<73> <20>dy.</b>
<p>
The sentence above should look like this:
<p align=center><img src="i18n.gif">
</body>
</html>

View File

@@ -1,24 +0,0 @@
#
# File: Makefile.in
# Author: Julian Smart
# Created: 1998
# Updated:
# Copyright: (c) 1998 Julian Smart
#
# "%W% %G%"
#
# Makefile for html test example (UNIX).
top_srcdir = @top_srcdir@
top_builddir = ../../..
program_dir = samples/html/test
PROGRAM=test
OBJECTS=$(PROGRAM).o
DATAFILES=f.html fft.html imagemap.htm imagemap.png pic.png pic2.bmp \
tables.htm test.htm i18n.gif 8859_2.htm cp1250.htm
include ../../../src/makeprog.env

View File

@@ -1,18 +0,0 @@
#
# 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=test
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.vc

View File

@@ -1,19 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
<title>CP1250 document</title>
</head>
<body>
Hi, this document is encoded in CP1250:
<p>
<b>P<EFBFBD><EFBFBD>li<EFBFBD> <20>lu<6C>ou<6F>k<EFBFBD> k<><6B> <20>p<EFBFBD>l <20><>belsk<73> <20>dy.</b>
<p>
And now in forced arial face:
<p><font face="Arial,arial">
<b>P<EFBFBD><EFBFBD>li<EFBFBD> <20>lu<6C>ou<6F>k<EFBFBD> k<><6B> <20>p<EFBFBD>l <20><>belsk<73> <20>dy.</b>
</font>
<p>
The sentence above should look like this:
<p align=center><img src="i18n.gif">
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -1,144 +0,0 @@
<head>
<META >
<META NAME="Author" CONTENT="Vaclav Slavik">
<META NAME="Keywords" CONTENT="wxWindows,HTML widget,HTML,free,Unix,Linux,Windows,cross-platform,wxHTML,LGPL">
<TITLE>wxHTML : wxWindows HTML library</TITLE>
</head>
<body TEXT="#000000" BGCOLOR="#8D99BC" LINK="#51188E" VLINK="#51188E" ALINK="#FF0000">
<!-- TITLE BAR -->
<center>
<img src="pic/logo.png">
<p>
[ Intro & News ]
<a href="features.html.iso-8859-1">[ Features ]</a>
<a href="downloads.html.iso-8859-1">[ Download ]</a>
<a href="licence.html.iso-8859-1">[ Licence ]</a>
<a href="screenshots.html.iso-8859-1">[ Screenshots ]</a>
<a href="links.html.iso-8859-1">[ Links & Apps ]</a>
</center>
<!-- PAGE -->
<!-- HEADLINE -->
<p align=center><b><font color="#9B3030">
<center><table bgcolor="#00000" width="60%" cellpadding=1>
<tr><td>
<table width="100%" cellspacing=1 cellpadding=0><tr><td bgcolor="#7783A2" valign=center><font color="#FFFFFF" size=+2><center>
Latest release 0.2.3
</center></font>
</table>
</table></center>
</font></b></p>
<center></center>
<div align=right><font size=-1>
<!-- begin include -->
2811<!-- end --> visitors since January 99
<br>Last updated on : June 13, 1999
</font></div>
<p>
<table width="100%" cellspacing=0 cellpadding=6 border><tr><td width="30%" bgcolor="#7783A2" valign=top>
<!-- NEWS -->
<h2><u>News</u></h2>
<ul>
<li><b><font color="#9B3030">13/06/1999</font> - CVS available! </b><br>
Thanks to Russell Smith, development version of wxHTML is available through CVS.
See Download page for details!
</ul>
<ul>
<li><b><font color="#9B3030">13/06/1999</font> - 0.2.3 release </b><br>
Only minor changes and bugfixes.
</ul>
<ul>
<li><b><font color="#9B3030">16/05/1999</font> - New release </b><br>
Well, 0.2.1 is out. It contains some bug fixes (mainly related to Visual C++)
and new help controller that works with MS HTML Help Workshop projects as
it's native format. Patch from previous version is only 30kB so don't hesitate
to download it!
</ul>
<ul>
<li><b><font color="#9B3030">02/05/1999</font> - Beta release 0.2 is out!</b><br>
Ok, it's here, download it! Help controller is included (and broken under
MSW/Mingw32 - I'll fix it asap. If anyone can help with it, please do so...)
</ul>
<!-- INTRO -->
<td valign=top>
<h2><u>Intro</u></h2>
I started work on this library in January, 1999.
<br>The main goal was to provide light-weight HTML viewer for
<a href="http://web.ukonline.co.uk/julian.smart/wxwin">wxWindows 2</a> toolkit.
This viewer was expected to be used as help/documentation browser rather than full-featured web browser.
<p>This library is released under <b><font color="#330000"><a href="licence.html.iso-8859-1">
wxWindows Library Licence, Version 3</a></font>.</b> It is basically
GNU Library General Public Licence except that it makes using
wxHTML in commercial products much easier.
<p>The library should work on all platforms supported by wxWindows - it
is written as poor wxWindows-only code, without line of platform-specific
code (as I hope :-). It is known to compile under these enviromnets:
<ul>
<li>EGCS under Linux
<li>Cygwin b20 or Mingw32 under Windows 95
</ul>
<!-- AUTHOR -->
<h2><u>Author(s)</u></h2>
<i>wxHTML (and this page) is copyrighted by Vaclav Slavik. Parts of wxHTML are copyrighted by other
autors - all of them are listed in <a href="#contrib">contributors</a> section.
</i>
<p>
Feel free to send your suggestions, comments, bug reports to me. My
e-mail address is
<br><A HREF="mailto:slavik2@czn.cz">slavik2@czn.cz</A>
<br>or
<br><A HREF="mailto:vsla8348@ss1000.ms.mff.cuni.cz">vsla8348@ss1000.ms.mff.cuni.cz</A>
<p align=right>Vaclav Slavik
<a name="contrib"><h2><u>Contributors</u></h2></a>
<ul>
<li><b><u>Guillermo Rodriguez Garcia</u></b> (<a href="mailto:guille@iies.es">guille@iies.es</a>)
<br>contributed GIF reading routines
</ul>
</table>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -1,20 +0,0 @@
<html>
<head>
<title>ImageMap Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#FFFFFF">
This is test.
<img src="imagemap.png" width="269" height="249" border="0" usemap="#mymap">
<map name="mymap">
<area shape="poly" coords="187,85,160,121,163,153,180,129,166,225,241,223,230,155,201,121,187,86" href="test.htm">
<area shape="circle" coords="96,89,36" href="fft.html">
<area shape="rect" coords="43,168,124,213" href="tables.htm">
</map>
<img src="imagemap.png" usemap="#mymap">
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -1,16 +0,0 @@
#
# File: makefile.b32
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright:
#
# Makefile : Builds sample for 32-bit BC++
WXDIR = $(WXWIN)
TARGET=test
OBJECTS = $(TARGET).obj
!include $(WXDIR)\src\makeprog.b32

View File

@@ -1,16 +0,0 @@
#
# File: makefile.g95
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart, 1999
#
# Makefile for wxWindows sample (Cygwin/Mingw32).
WXDIR = ../../..
TARGET=test
OBJECTS = $(TARGET).o
include $(WXDIR)/src/makeprog.g95

View File

@@ -1,15 +0,0 @@
#
# Makefile for WATCOM
#
# Created by Julian Smart, January 1999
#
#
WXDIR = $(%WXWIN)
PROGRAM = test
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.wat

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -1,116 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="GENERATOR" CONTENT="Mozilla/4.06 [en] (X11; I; Linux 2.0.35 i686) [Netscape]">
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EF" VLINK="#51188E" ALINK="#FF0000">
<H3>
This is TABLES
tests page...</H3>
(yes, really, see bellow:)
<BR>Click <a href="test.htm">here</a> to go to original testing page...
<BR>Click <a href="../../docs/html/man.htm">here</a> to go to manuals...
<BR>&nbsp;
<CENTER><TABLE CELLSPACING=5 BORDER COLS=2 WIDTH="40%" NOSAVE >
<TR ALIGN=CENTER NOSAVE>
<TD WIDTH="40%" NOSAVE>Top left
<BR>(two lines expression)
<P>paragraph done</TD>
<TD NOSAVE>Top right</TD>
</TR>
<TR>
<TD>Bottom left</TD>
<TD>Bottom right</TD>
</TR>
</TABLE></CENTER>
<P>Subsampling is shown there:
<BR>&nbsp;
<TABLE BORDER COLS=2 WIDTH="100%" NOSAVE >
<TR NOSAVE>
<TD VALIGN=BOTTOM NOSAVE>
<TABLE BORDER COLS=2 WIDTH="50%" NOSAVE >
<TR ALIGN=CENTER BGCOLOR="#3366FF" NOSAVE>
<TD>a</TD>
<TD WIDTH="10%" NOSAVE>b</TD>
</TR>
<TR NOSAVE>
<TD>c</TD>
<TD NOSAVE>d</TD>
</TR>
</TABLE>
</TD>
<TD VALIGN=BOTTOM NOSAVE>2</TD>
</TR>
<TR NOSAVE>
<TD>3 dflkj lkjfl dkjldkfjl flk jflkf lkjflkj ljlf ajlfj alff h khg hgj
gjg jg gjhfg fg gjh gjf jgf jgj f gjfgj kfajg&nbsp;</TD>
<TD ALIGN=CENTER VALIGN=BOTTOM BGCOLOR="#FFFF99" NOSAVE>4
<BR>gh
<BR>gfh
<BR>gh
<BR>hg
<BR>5</TD>
</TR>
</TABLE>
<P>This is "default" table - with no sizes givev:
<BR>&nbsp;
<TABLE BORDER COLS=4 WIDTH="100%" NOSAVE >
<TR NOSAVE>
<TD>Hello</TD>
<TD NOSAVE>lkfdsjlk fj dlfj lkfj lkjflk jlfk lk fjlk elwkf lkejflek f jlekjflkj
ljlk lk jlkf lefjl j flkj ljl lf lfj lfjl lj lwe lekf;eh kfejh lkh kjh
kjhkj hkj hkj lkh kjh kjlh kj</TD>
<TD>shortebn formo lr lk</TD>
<TD>djsf lkjlf poer oi pjr po kpk&nbsp;</TD>
</TR>
<TR>
<TD>a</TD>
<TD>b</TD>
<TD>c</TD>
<TD>d</TD>
</TR>
<TR NOSAVE>
<TD>1</TD>
<TD>2</TD>
<TD COLSPAN="2" ROWSPAN="2" NOSAVE>3</TD>
</TR>
<TR>
<TD>A</TD>
<TD>B</Td>
</TR>
</TABLE>

View File

@@ -1,202 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: test.cpp
// Purpose: wxHtml testing example
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "test.cpp"
#pragma interface "test.cpp"
#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/html/htmlwin.h>
#include <wx/fs_inet.h>
// ----------------------------------------------------------------------------
// private classes
// ----------------------------------------------------------------------------
// Define a new application type, each program should derive a class from wxApp
class MyApp : public wxApp
{
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)
virtual bool OnInit();
};
// Define a new frame type: this is going to be our main frame
class MyFrame : public wxFrame
{
public:
// ctor(s)
MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
// event handlers (these functions should _not_ be virtual)
void OnQuit(wxCommandEvent& event);
void OnPageOpen(wxCommandEvent& event);
void OnBack(wxCommandEvent& event);
void OnForward(wxCommandEvent& event);
private:
wxHtmlWindow *m_Html;
// any class wishing to process wxWindows events must use this macro
DECLARE_EVENT_TABLE()
};
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
// IDs for the controls and the menu commands
enum
{
// menu items
Minimal_Quit = 1,
Minimal_PageOpen,
Minimal_Back,
Minimal_Forward,
// controls start here (the numbers are, of course, arbitrary)
Minimal_Text = 1000,
};
// ----------------------------------------------------------------------------
// event tables and other macros for wxWindows
// ----------------------------------------------------------------------------
// the event tables connect the wxWindows events with the functions (event
// handlers) which process them. It can be also done at run-time, but for the
// simple menu events like this the static method is much simpler.
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
EVT_MENU(Minimal_PageOpen, MyFrame::OnPageOpen)
EVT_MENU(Minimal_Back, MyFrame::OnBack)
EVT_MENU(Minimal_Forward, MyFrame::OnForward)
END_EVENT_TABLE()
// Create a new application object: this macro will allow wxWindows to create
// the application object during program execution (it's better than using a
// static object for many reasons) and also declares the accessor function
// wxGetApp() which will return the reference of the right type (i.e. MyApp and
// not wxApp)
IMPLEMENT_APP(MyApp)
// ============================================================================
// implementation
// ============================================================================
// ----------------------------------------------------------------------------
// the application class
// ----------------------------------------------------------------------------
// `Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
wxInitAllImageHandlers();
#if wxUSE_FS_INET
wxFileSystem::AddHandler(new wxInternetFSHandler);
#endif
SetVendorName("wxWindows");
SetAppName("wxHtmlTest");
// the following call to wxConfig::Get will use it to create an object...
// Create the main application window
MyFrame *frame = new MyFrame("wxHtmlWindow testing application",
wxPoint(50, 50), wxSize(640, 480));
// Show it and tell the application that it's our main window
// @@@ what does it do exactly, in fact? is it necessary here?
frame->Show(TRUE);
SetTopWindow(frame);
// success: wxApp::OnRun() will be called which will enter the main message
// loop and the application will run. If we returned FALSE here, the
// application would exit immediately.
return TRUE;
}
// ----------------------------------------------------------------------------
// main frame
// ----------------------------------------------------------------------------
// frame constructor
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
: wxFrame((wxFrame *)NULL, -1, title, pos, size, wxDEFAULT_FRAME_STYLE, "html_test_app")
{
// create a menu bar
wxMenu *menuFile = new wxMenu;
wxMenu *menuNav = new wxMenu;
menuFile->Append(Minimal_PageOpen, "&Open HTML page...");
menuFile->AppendSeparator();
menuFile->Append(Minimal_Quit, "&Close frame");
menuNav->Append(Minimal_Back, "Go &BACK");
menuNav->Append(Minimal_Forward, "Go &FORWARD");
// now append the freshly created menu to the menu bar...
wxMenuBar *menuBar = new wxMenuBar;
menuBar->Append(menuFile, "&File");
menuBar->Append(menuNav, "&Navigate");
// ... and attach this menu bar to the frame
SetMenuBar(menuBar);
CreateStatusBar(1);
m_Html = new wxHtmlWindow(this);
m_Html -> SetRelatedFrame(this, "HTML : %s");
m_Html -> SetRelatedStatusBar(0);
m_Html -> ReadCustomization(wxConfig::Get());
m_Html -> LoadPage("test.htm");
}
// event handlers
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
// TRUE is to force the frame to close
m_Html -> WriteCustomization(wxConfig::Get());
delete wxConfig::Set(NULL);
Close(TRUE);
}
void MyFrame::OnPageOpen(wxCommandEvent& WXUNUSED(event))
{
wxString p = wxFileSelector("Open HTML document", "", "", "", "HTML files|*.htm");
if (p != wxEmptyString)
m_Html -> LoadPage(p);
}
void MyFrame::OnBack(wxCommandEvent& WXUNUSED(event))
{
if (!m_Html -> HistoryBack()) wxMessageBox("You reached prehistory era!");
}
void MyFrame::OnForward(wxCommandEvent& WXUNUSED(event))
{
if (!m_Html -> HistoryForward()) wxMessageBox("No more items in history!");
}

View File

@@ -1,342 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="GENERATOR" CONTENT="Mozilla/4.06 [en] (X11; I; Linux 2.0.35 i686) [Netscape]">
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#B3B6E0" LINK="#0000FF" VLINK="#FF0000" ALINK="#000088">
<font size=+2>
<b><a href="tables.htm">click here to go to tables test page!</a></b>
<p>
<b><a href="imagemap.htm">click here to go to IMAGEMAPs test page!</a></b>
<p>
<b><a href="8859_2.htm">i18n demo 1 (iso8859-2)</a></b>
<p>
<b><a href="cp1250.htm">i18n demo 2 (cp1250)</a></b>
</font>
<p>
This is - - default text, now switching to
<CENTER>
<P>center, now still ctr, now exiting</CENTER>
exited!.<A HREF="#downtown">[link to down]</A>
<P>Hello, this *is* default charset (helvetica, probably) and it is displayed
with one&nbsp; <FONT COLOR="#FF0000">COLOR CHANGE</FONT>. Of course we
can have as many color changes as we can, what about this <FONT COLOR="#FF0000">M</FONT><FONT COLOR="#FFFF00">A</FONT><FONT COLOR="#33FF33">D</FONT><B><FONT COLOR="#FFFFFF"><FONT SIZE=+1>N</FONT></FONT></B>E<FONT COLOR="#999999">S</FONT><FONT COLOR="#CC33CC">S?</FONT>
<P><FONT COLOR="#000000">There was a space above.</FONT>
<BR>
<HR WIDTH="100%">This was a line. <TT>(BTW we are in <B>fixed</B> font
/ <I><U>typewriter</U> font</I> right now :-)</TT>
<BR>This is in <B>BOLD</B> face. This is <I>ITALIC.</I> This is <B><I><U>E
V E R Y T H I N G</U></I></B>.
<BR>&nbsp;
<P><BR>
<CENTER>
<P>Right now, <FONT COLOR="#0000FF"><FONT SIZE=+4>centered REALLY Big Text</FONT></FONT>,
how do you like (space) it?</CENTER>
<DIV ALIGN=right>RIGHT: <FONT SIZE=-2>text-2, </FONT><FONT SIZE=-1>text-1,
</FONT>text+0,
<FONT SIZE=+1>text+1,
</FONT><FONT COLOR="#FF0000"><FONT SIZE=+2>text+2,
</FONT></FONT><FONT SIZE=+3>text+3,
</FONT><FONT SIZE=+4>text+4</FONT>
<BR><U><FONT SIZE=+1>we are right now</FONT></U></DIV>
<CENTER><U><FONT SIZE=+1>we are center now</FONT></U></CENTER>
<U><FONT SIZE=+1>we are left now.</FONT></U>
<P><I><FONT COLOR="#3366FF">Blue italic text is displayed there....</FONT></I>
<H1>
<HR ALIGN=LEFT SIZE=10 WIDTH="50%">This is heading one.</H1>
this is normal
<CENTER>
<H1>
This is <FONT COLOR="#33FF33">CENTERED</FONT> heading one</H1></CENTER>
<FONT COLOR="#FFFF00">Yes, hmmmmmmmmm........, right now, <TT>we should
display some tiny nice image</TT>, he?</FONT>
<BR><IMG SRC="pic.png" ALT="Testing image image" ><IMG SRC="pic2.bmp">and this is text......
<P><IMG SRC="pic.png" ALT="Testing image image" HEIGHT=200 WIDTH=327 ALIGN=CENTER>and
this is text......
<BR><A HREF="pic.png"><IMG SRC="pic.png" ALT="Testing image image" HEIGHT=160 WIDTH=100 ALIGN=TEXTTOP></A> (try clicking on the image :-) and
this is text......
<BR>&nbsp;
<BR>&nbsp;
<UL>
<LI>
item 1</LI>
<LI>
item 2</LI>
<UL>
<LI>
nested item</LI>
<LI>
nested item 2</LI>
</UL>
<LI>
item 3</LI>
</UL>
<OL>
<LI>
item one</LI>
<LI>
item two</LI>
<OL>
<LI>
nsted item</LI>
</OL>
<LI>
last numbered item</LI>
</OL>
<H1>
Heading 1</H1>
<I>Italic text now...</I>
<H2>
<I>Heading 2</I></H2>
<I>and now?</I>
<H3>
Heading 3</H3>
<H4>
Heading 4</H4>
<H5>
Heading 5</H5>
<H6>
Heading 6</H6>
And this is normal text, once again :-)
<BR>&nbsp;
<BR>&nbsp;
<BR>&nbsp;
<BR>&nbsp;
<BR>&nbsp;
<BR>&nbsp;
<P>And yes, we're in <FONT SIZE=+4>HTML DOCUMENT, </FONT><FONT SIZE=+1>so
what about some nice <A HREF="fft.html">hypertext link</A>??</FONT>
<P>hello?
<BR>&nbsp;
<P><BR>
<CENTER>
<P>This is <A NAME="downtown"></a>centered paragraph</CENTER>
<P>This is new par?
<P><B>We switched to BOLD</B>
<P><B>This is new paragraph</B> Bold is off now.
<P>new par
<P>&nbsp; -----------
<P><FONT SIZE=-2>Hello</FONT>
<OL><FONT SIZE=-2>this is standalone :-)</FONT>
<LI>
<FONT SIZE=-2>This is item number one. iti lkdjfdl kjd lk jlkjdl kjlk jlf
jflkj d lfkjlkf jl jflkj flkwe lkhelf ;fk;fl kw;lfke ;ffj lkjflk wj lfjl
fkw ;k;ekf;lkfe ;kf;lk; ;j ;lrj;wfj;f ;eljfw; lfj;ewlfj dagdja gdj chga
kjegiquw iuqdb qiud iquwd hurray googoo.</FONT></LI>
<LI>
<FONT SIZE=-2>two two two two two two twotwo TWO two two two two two two
twotwo TWO two two two two two two twotwo TWO two two two two two two twotwo
TWO two two two two two two twotwo TWO two two two two two two twotwo TWO
two two two two two two twotwo TWO</FONT></LI>
<BLOCKQUOTE><FONT SIZE=+0><B>(blockquote)</B>two two two two two two twotwo
TWO two two two two two two twotwo TWO two two two two two two twotwo TWO</FONT>
<BLOCKQUOTE><FONT SIZE=+0>two two two two two two twotwo TWO two two two</FONT></BLOCKQUOTE>
<FONT SIZE=+0>two two two twotwo TWO two two two two two two twotwo TWO
two two two two two two twotwo TWO</FONT></BLOCKQUOTE>
<FONT SIZE=-2>two two two two two two twotwo TWO two two two two two two
twotwo TWO</FONT>
<LI>
<FONT SIZE=-2>This is item nyumber 3.</FONT></LI>
<LI>
<FONT SIZE=-2>This is item number one. iti lkdjfdl kjd lk jlkjdl kjlk jlf
jflkj d lfkjlkf jl jflkj flkwe lkhelf ;fk;fl kw;lfke ;ffj lkjflk wj lfjl
fkw ;k;ekf;lkfe ;kf;lk; ;j ;lrj;wfj;f ;eljfw; lfj;ewlfj dagdja gdj chga
kjegiquw iuqdb qiud iquwd hurray googoo.</FONT></LI>
<LI>
<FONT SIZE=-2>two two two two two two twotwo TWO two two two two two two
twotwo TWO two two two two two two twotwo TWO two two two two two two twotwo
TWO two two two two two two twotwo TWO two two two two two two twotwo TWO
two two two two two two twotwo TWO two two two two two two twotwo TWO two
two two two two two twotwo TWO two two two two two two twotwo TWO two two
two two two two twotwo TWO two two two two two two twotwo TWO two two two
two two two twotwo TWO two two two two two two twotwo TWO two two two two
two two twotwo TWO two two two two two two twotwo TWO</FONT></LI>
<LI>
<FONT SIZE=-2>This is item nyumber 3.</FONT></LI>
<LI>
<FONT SIZE=-2>This is item number one. iti lkdjfdl kjd lk jlkjdl kjlk jlf
jflkj d lfkjlkf jl jflkj flkwe lkhelf ;fk;fl kw;lfke ;ffj lkjflk wj lfjl
fkw ;k;ekf;lkfe ;kf;lk; ;j ;lrj;wfj;f ;eljfw; lfj;ewlfj dagdja gdj chga
kjegiquw iuqdb qiud iquwd hurray googoo.</FONT></LI>
<LI>
<FONT SIZE=-2>two two two two two two twotwo TWO two two two two two two
twotwo TWO two two two two two two twotwo TWO two two two two two two twotwo
TWO two two two two two two twotwo TWO two two two two two two twotwo TWO
two two two two two two twotwo TWO two two two two two two twotwo TWO two
two two two two two twotwo TWO two two two two two two twotwo TWO two two
two two two two twotwo TWO two two two two two two twotwo TWO two two two
two two two twotwo TWO two two two two two two twotwo TWO two two two two
two two twotwo TWO two two two two two two twotwo TWO</FONT></LI>
<LI>
<FONT SIZE=-2>This is item nyumber 3.</FONT></LI>
<LI>
<FONT SIZE=-2>This is item number one. iti lkdjfdl kjd lk jlkjdl kjlk jlf
jflkj d lfkjlkf jl jflkj flkwe lkhelf ;fk;fl kw;lfke ;ffj lkjflk wj lfjl
fkw ;k;ekf;lkfe ;kf;lk; ;j ;lrj;wfj;f ;eljfw; lfj;ewlfj dagdja gdj chga
kjegiquw iuqdb qiud iquwd hurray googoo.</FONT></LI>
<LI>
<FONT SIZE=-2>two two two two two two twotwo TWO two two two two two two
twotwo TWO two two two two two two twotwo TWO two two two two two two twotwo
TWO two two two two two two twotwo TWO two two two two two two twotwo TWO
two two two two two two twotwo TWO two two two two two two twotwo TWO two
two two two two two twotwo TWO two two two two two two twotwo TWO two two
two two two two twotwo TWO two two two two two two twotwo TWO two two two
two two two twotwo TWO two two two two two two twotwo TWO two two two two
two two twotwo TWO two two two two two two twotwo TWO</FONT></LI>
<LI>
<FONT SIZE=-2>This is item nyumber 3.</FONT></LI>
<LI>
<FONT SIZE=-2>This is item number one. iti lkdjfdl kjd lk jlkjdl kjlk jlf
jflkj d lfkjlkf jl jflkj flkwe lkhelf ;fk;fl kw;lfke ;ffj lkjflk wj lfjl
fkw ;k;ekf;lkfe ;kf;lk; ;j ;lrj;wfj;f ;eljfw; lfj;ewlfj dagdja gdj chga
kjegiquw iuqdb qiud iquwd hurray googoo.</FONT></LI>
<LI>
<FONT SIZE=-2>two two two two two two twotwo TWO two two two two two two
twotwo TWO two two two two two two twotwo TWO two two two two two two twotwo
TWO two two two two two two twotwo TWO two two two two two two twotwo TWO
two two two two two two twotwo TWO two two two two two two twotwo TWO</FONT></LI>
<P><BR><FONT SIZE=-2>two two two two two two twotwo TWO two two two two
two two twotwo TWO two two two two two two twotwo TWO two two two two two
two twotwo TWO</FONT>
<P><FONT SIZE=-2>two two two two two two twotwo TWO two two two two two
two twotwo TWO two two two two two two twotwo TWO two two two two two two
twotwo TWO</FONT>
<LI>
<FONT SIZE=-2>This is item nyumber 3.</FONT></LI>
</OL>
Now, you will see some PRE text:<p>
<PRE>// This is sample C++ code:
void main(int argc, char *argv[])
{
&nbsp;&nbsp;&nbsp; printf("Go away, man!\n");
&nbsp;&nbsp;&nbsp; i = 666;
&nbsp;&nbsp;&nbsp; printf("\n\n\nCRASH\n&nbsp; DOWN NOW. . .&nbsp; \n");
}</PRE>
<H3>WWW</H3>
<A HREF="http://www.kde.org">This is WWW link to KDE site!</A>
<BR>
<A HREF="http://www.ms.mff.cuni.cz/~vsla8348/wxhtml/index.html">(one folder up)</A>
<BR>
...
<BR>
...
<BR>
Link to normal text file : <a href="test.cpp">test.cpp</a>
<BR>
And link to BINARY : <a href="test">Unix</a> or <a href="test.exe">Windows</a>
<BR>
<a href="http://www.tue.nl">ANOTHER LINK(www.tue.nl)</a>
<p><hr size=4><p>
<h2>Definition lists</h2>
This is definition list (DL,DT,DD):
<dl>
<dt> term
<dd> and it's definition
<dt> Windows 95
<dt> Windows 98
<dt> Windows NT
<dd> so-called operating systems
<dd> Micro$oft trademarks
<dt> Unix
<dd> operating system
<dd> huh?
</dl>
...end of DD
<p>
<h2>Increasing font size test</h2>
normal<p>
<font size=+1>
plus one<p>
<font size=+1>
plus one<p>
<font size=+1>
plus one<p>
<font size=-2>
minus two<p>
</font>
</font>
</font>
</font>
<p>
<h2> FONT FACE demo </h2>
<font size=+2>
Normal font<br>
<font face="Times New Roman,times">Times New Roman (and <tt>typewriter</tt>)
<br></font>
<font face="avantgarde,Tahoma">avantgarde or Tahoma, if available</font>
<br>
<tt>inside tt tag...<font face="lucidatypewriter,terminal"> lucida/terminal </font></tt>
<br>...and now, everything is back in normal, we
continue as <i>before</i>, <b>ok?</b> ??
</font>
<h2>Justified paragraph:</h2>
<p align=justify>
A frame is a window whose size and position can (usually) be changed by the
user. It usually has thick borders and a title bar, and can optionally contain
a menu bar, toolbar and status bar. A frame can contain any window that is not
a frame or dialog.
<p align=justify>
A frame that has a status bar and toolbar created via the
CreateStatusBar/CreateToolBar functions manages these windows, and adjusts the
value returned by GetClientSize to reflect the remaining size available to
application windows.
</BODY>
</HTML>

View File

@@ -1,2 +0,0 @@
#include "wx/msw/wx.rc"

View File

@@ -1,23 +0,0 @@
#
# File: Makefile.in
# Author: Julian Smart
# Created: 1998
# Updated:
# Copyright: (c) 1998 Julian Smart
#
# "%W% %G%"
#
# Makefile for html virtual example (UNIX).
top_srcdir = @top_srcdir@
top_builddir = ../../..
program_dir = samples/html/virtual
PROGRAM=virtual
OBJECTS=$(PROGRAM).o
DATAFILES=start.htm
include ../../../src/makeprog.env

View File

@@ -1,18 +0,0 @@
#
# 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=virtual
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.vc

View File

@@ -1,16 +0,0 @@
#
# File: makefile.b32
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright:
#
# Makefile : Builds sample for 32-bit BC++
WXDIR = $(WXWIN)
TARGET=virtual
OBJECTS = $(TARGET).obj
!include $(WXDIR)\src\makeprog.b32

View File

@@ -1,16 +0,0 @@
#
# File: makefile.g95
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart, 1999
#
# Makefile for wxWindows sample (Cygwin/Mingw32).
WXDIR = ../../..
TARGET=virtual
OBJECTS = $(TARGET).o
include $(WXDIR)/src/makeprog.g95

View File

@@ -1,15 +0,0 @@
#
# Makefile for WATCOM
#
# Created by Julian Smart, January 1999
#
#
WXDIR = $(%WXWIN)
PROGRAM = virtual
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.wat

View File

@@ -1,12 +0,0 @@
<html>
<head><title>VFS Demo</title></head>
<body>
<h3>Virtual File Systems demonstration</h3>
Hello. This sample demonstrates VFS. Try the link (and have a look
at status bar before clicking on them)
<p>
<a href="myVFS:node"><b>Enter top level Node...</b></a>
</body>
</html>

View File

@@ -1,234 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: virtua;.cpp
// Purpose: wxHtml testing example
// demonstrates virtual file systems feature
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "test.cpp"
#pragma interface "test.cpp"
#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/html/htmlwin.h>
// new handler class:
#include <wx/wfstream.h>
#include <wx/mstream.h>
class MyVFS : public wxFileSystemHandler
{
public:
MyVFS() : wxFileSystemHandler() {}
wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location);
bool CanOpen(const wxString& location);
};
bool MyVFS::CanOpen(const wxString& location)
{
return (GetProtocol(location) == "myVFS");
}
wxFSFile* MyVFS::OpenFile(wxFileSystem& fs, const wxString& location)
{
wxFSFile *f;
wxInputStream *str;
char *buf = (char*)malloc(1024);
sprintf(buf, "<html><body><h2><i>You're in Node <u>%s</u></i></h2><p>"
"Where do you want to go?<br><blockquote>"
"<a href=\"%s-1\">sub-1</a><br>"
"<a href=\"%s-2\">sub-2</a><br>"
"<a href=\"%s-3\">sub-3</a><br>"
"</blockquote></body></html>",
location.GetData(), location.GetData(), location.GetData(), location.GetData());
// WARNING: wxMemoryInputStream will not free buf.
// There is a memory leak here.
str = new wxMemoryInputStream(buf, strlen(buf));
f = new wxFSFile(str, location, "text/html", wxEmptyString);
return f;
}
// ----------------------------------------------------------------------------
// private classes
// ----------------------------------------------------------------------------
// Define a new application type, each program should derive a class from wxApp
class MyApp : public wxApp
{
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)
virtual bool OnInit();
};
// Define a new frame type: this is going to be our main frame
class MyFrame : public wxFrame
{
public:
// ctor(s)
MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
// event handlers (these functions should _not_ be virtual)
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
void OnBack(wxCommandEvent& event);
void OnForward(wxCommandEvent& event);
private:
// any class wishing to process wxWindows events must use this macro
DECLARE_EVENT_TABLE()
};
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
// IDs for the controls and the menu commands
enum
{
// menu items
Minimal_Quit = 1,
Minimal_About,
Minimal_Back,
Minimal_Forward,
// controls start here (the numbers are, of course, arbitrary)
Minimal_Text = 1000,
};
// ----------------------------------------------------------------------------
// event tables and other macros for wxWindows
// ----------------------------------------------------------------------------
// the event tables connect the wxWindows events with the functions (event
// handlers) which process them. It can be also done at run-time, but for the
// simple menu events like this the static method is much simpler.
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
EVT_MENU(Minimal_About, MyFrame::OnAbout)
EVT_MENU(Minimal_Back, MyFrame::OnBack)
EVT_MENU(Minimal_Forward, MyFrame::OnForward)
END_EVENT_TABLE()
// Create a new application object: this macro will allow wxWindows to create
// the application object during program execution (it's better than using a
// static object for many reasons) and also declares the accessor function
// wxGetApp() which will return the reference of the right type (i.e. MyApp and
// not wxApp)
IMPLEMENT_APP(MyApp)
// ============================================================================
// implementation
// ============================================================================
// ----------------------------------------------------------------------------
// the application class
// ----------------------------------------------------------------------------
// `Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
// Create the main application window
MyFrame *frame = new MyFrame("wxHtmlWindow testing application",
wxPoint(50, 50), wxSize(640, 480));
// Show it and tell the application that it's our main window
// @@@ what does it do exactly, in fact? is it necessary here?
frame->Show(TRUE);
SetTopWindow(frame);
wxFileSystem::AddHandler(new MyVFS);
// success: wxApp::OnRun() will be called which will enter the main message
// loop and the application will run. If we returned FALSE here, the
// application would exit immediately.
return TRUE;
}
// ----------------------------------------------------------------------------
// main frame
// ----------------------------------------------------------------------------
wxHtmlWindow *html;
// frame constructor
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
: wxFrame((wxFrame *)NULL, -1, title, pos, size)
{
// create a menu bar
wxMenu *menuFile = new wxMenu;
wxMenu *menuNav = new wxMenu;
menuFile->Append(Minimal_Quit, "E&xit");
menuNav->Append(Minimal_Back, "Go &BACK");
menuNav->Append(Minimal_Forward, "Go &FORWARD");
// now append the freshly created menu to the menu bar...
wxMenuBar *menuBar = new wxMenuBar;
menuBar->Append(menuFile, "&File");
menuBar->Append(menuNav, "&Navigate");
// ... and attach this menu bar to the frame
SetMenuBar(menuBar);
CreateStatusBar(1);
html = new wxHtmlWindow(this);
html -> SetRelatedFrame(this, "VFS Demo: '%s'");
html -> SetRelatedStatusBar(1);
html -> LoadPage("start.htm");
}
// event handlers
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
// TRUE is to force the frame to close
Close(TRUE);
}
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
}
void MyFrame::OnBack(wxCommandEvent& WXUNUSED(event))
{
if (!html -> HistoryBack()) wxMessageBox("You reached prehistory era!");
}
void MyFrame::OnForward(wxCommandEvent& WXUNUSED(event))
{
if (!html -> HistoryForward()) wxMessageBox("No more items in history!");
}

View File

@@ -1,2 +0,0 @@
#include "wx/msw/wx.rc"

View File

@@ -1,23 +0,0 @@
#
# File: Makefile.in
# Author: Julian Smart
# Created: 1998
# Updated:
# Copyright: (c) 1998 Julian Smart
#
# "%W% %G%"
#
# Makefile for html widget example (UNIX).
top_srcdir = @top_srcdir@
top_builddir = ../../..
program_dir = samples/html/widget
PROGRAM=widget
OBJECTS=$(PROGRAM).o
DATAFILES=start.htm
include ../../../src/makeprog.env

View File

@@ -1,18 +0,0 @@
#
# 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=widget
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.vc

View File

@@ -1,16 +0,0 @@
#
# File: makefile.b32
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright:
#
# Makefile : Builds sample for 32-bit BC++
WXDIR = $(WXWIN)
TARGET=widget
OBJECTS = $(TARGET).obj
!include $(WXDIR)\src\makeprog.b32

View File

@@ -1,16 +0,0 @@
#
# File: makefile.g95
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart, 1999
#
# Makefile for wxWindows sample (Cygwin/Mingw32).
WXDIR = ../../..
TARGET=widget
OBJECTS = $(TARGET).o
include $(WXDIR)/src/makeprog.g95

View File

@@ -1,15 +0,0 @@
#
# Makefile for WATCOM
#
# Created by Julian Smart, January 1999
#
#
WXDIR = $(%WXWIN)
PROGRAM = widget
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.wat

View File

@@ -1,20 +0,0 @@
<html>
<head><title>Widgets demo</title></head>
<body>
<h3>wxHtmlWidgetCell demonstration</h3>
There is binded window somewhere around. Enjoy it.
<hr>
<center>
<mybind name="experimental binded window :-)" x=300 y=500>
</center>
<hr>
<mybind name="(small one)" x=150 y=30>
<hr>
<mybind name="a widget with floating width, hurray :-)" float=y x="50" y=50>
</body>
</html>

View File

@@ -1,244 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: virtua;.cpp
// Purpose: wxHtml testing example
// demonstrates virtual file systems feature
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "test.cpp"
#pragma interface "test.cpp"
#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/html/htmlwin.h>
/*
TAG HANDER FOR 'MYBIND' TAG
*/
#include <wx/html/m_templ.h>
TAG_HANDLER_BEGIN(MYBIND, "MYBIND")
TAG_HANDLER_PROC(tag)
{
wxWindow *wnd;
int ax, ay;
int fl = 0;
tag.ScanParam("X", "%i", &ax);
tag.ScanParam("Y", "%i", &ay);
if (tag.HasParam("FLOAT")) fl = ax;
wnd = new wxTextCtrl( m_WParser -> GetWindow(), -1, tag.GetParam("NAME"),
wxPoint(0,0), wxSize(ax, ay), wxTE_MULTILINE );
wnd -> Show(TRUE);
m_WParser -> OpenContainer() -> InsertCell(new wxHtmlWidgetCell(wnd, fl));
return FALSE;
}
TAG_HANDLER_END(MYBIND)
TAGS_MODULE_BEGIN(MyBind)
TAGS_MODULE_ADD(MYBIND)
TAGS_MODULE_END(MyBind)
// ----------------------------------------------------------------------------
// private classes
// ----------------------------------------------------------------------------
// Define a new application type, each program should derive a class from wxApp
class MyApp : public wxApp
{
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)
virtual bool OnInit();
};
// Define a new frame type: this is going to be our main frame
class MyFrame : public wxFrame
{
public:
// ctor(s)
MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
// event handlers (these functions should _not_ be virtual)
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
void OnBack(wxCommandEvent& event);
void OnForward(wxCommandEvent& event);
private:
// any class wishing to process wxWindows events must use this macro
DECLARE_EVENT_TABLE()
};
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
// IDs for the controls and the menu commands
enum
{
// menu items
Minimal_Quit = 1,
Minimal_About,
Minimal_Back,
Minimal_Forward,
// controls start here (the numbers are, of course, arbitrary)
Minimal_Text = 1000,
};
// ----------------------------------------------------------------------------
// event tables and other macros for wxWindows
// ----------------------------------------------------------------------------
// the event tables connect the wxWindows events with the functions (event
// handlers) which process them. It can be also done at run-time, but for the
// simple menu events like this the static method is much simpler.
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
EVT_MENU(Minimal_About, MyFrame::OnAbout)
EVT_MENU(Minimal_Back, MyFrame::OnBack)
EVT_MENU(Minimal_Forward, MyFrame::OnForward)
END_EVENT_TABLE()
// Create a new application object: this macro will allow wxWindows to create
// the application object during program execution (it's better than using a
// static object for many reasons) and also declares the accessor function
// wxGetApp() which will return the reference of the right type (i.e. MyApp and
// not wxApp)
IMPLEMENT_APP(MyApp)
// ============================================================================
// implementation
// ============================================================================
// ----------------------------------------------------------------------------
// the application class
// ----------------------------------------------------------------------------
// `Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
// Create the main application window
MyFrame *frame = new MyFrame("wxHtmlWindow testing application",
wxPoint(50, 50), wxSize(640, 480));
// Show it and tell the application that it's our main window
// @@@ what does it do exactly, in fact? is it necessary here?
frame->Show(TRUE);
SetTopWindow(frame);
// success: wxApp::OnRun() will be called which will enter the main message
// loop and the application will run. If we returned FALSE here, the
// application would exit immediately.
return TRUE;
}
// ----------------------------------------------------------------------------
// main frame
// ----------------------------------------------------------------------------
wxHtmlWindow *html;
// frame constructor
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
: wxFrame((wxFrame *)NULL, -1, title, pos, size)
{
// create a menu bar
wxMenu *menuFile = new wxMenu;
wxMenu *menuNav = new wxMenu;
menuFile->Append(Minimal_Quit, "E&xit");
menuNav->Append(Minimal_Back, "Go &BACK");
menuNav->Append(Minimal_Forward, "Go &FORWARD");
// now append the freshly created menu to the menu bar...
wxMenuBar *menuBar = new wxMenuBar;
menuBar->Append(menuFile, "&File");
menuBar->Append(menuNav, "&Navigate");
// ... and attach this menu bar to the frame
SetMenuBar(menuBar);
CreateStatusBar(1);
html = new wxHtmlWindow(this);
html -> SetRelatedFrame(this, "VFS Demo: '%s'");
html -> SetRelatedStatusBar(1);
html -> LoadPage("start.htm");
}
// event handlers
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
// TRUE is to force the frame to close
Close(TRUE);
}
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
}
void MyFrame::OnBack(wxCommandEvent& WXUNUSED(event))
{
if (!html -> HistoryBack()) wxMessageBox("You reached prehistory era!");
}
void MyFrame::OnForward(wxCommandEvent& WXUNUSED(event))
{
if (!html -> HistoryForward()) wxMessageBox("No more items in history!");
}

View File

@@ -1,2 +0,0 @@
#include "wx/msw/wx.rc"

View File

@@ -1,23 +0,0 @@
#
# File: Makefile.in
# Author: Julian Smart
# Created: 1998
# Updated:
# Copyright: (c) 1998 Julian Smart
#
# "%W% %G%"
#
# Makefile for html zip example (UNIX).
top_srcdir = @top_srcdir@
top_builddir = ../../..
program_dir = samples/html/zip
PROGRAM=zip
OBJECTS=$(PROGRAM).o
DATAFILES=pages.zip start.htm
include ../../../src/makeprog.env

View File

@@ -1,18 +0,0 @@
#
# 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=zip
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.vc

View File

@@ -1,16 +0,0 @@
#
# File: makefile.b32
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright:
#
# Makefile : Builds sample for 32-bit BC++
WXDIR = $(WXWIN)
TARGET=zip
OBJECTS = $(TARGET).obj
!include $(WXDIR)\src\makeprog.b32

View File

@@ -1,16 +0,0 @@
#
# File: makefile.g95
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart, 1999
#
# Makefile for wxWindows sample (Cygwin/Mingw32).
WXDIR = ../../..
TARGET=zip
OBJECTS = $(TARGET).o
include $(WXDIR)/src/makeprog.g95

View File

@@ -1,15 +0,0 @@
#
# Makefile for WATCOM
#
# Created by Julian Smart, January 1999
#
#
WXDIR = $(%WXWIN)
PROGRAM = zip
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.wat

Binary file not shown.

View File

@@ -1,9 +0,0 @@
<html><body>
<h1>ZIP archive</h1>
<h3>feature demo</h3>
<p>
Click on this <a href="pages.zip#zip:test.htm">link</a> to load page stored in ZIP
archive (<a href="pages.zip">pages.zip</a>). Enjoy it!
</body></html>

View File

@@ -1,192 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: test.cpp
// Purpose: wxHtml testing example
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "test.cpp"
#pragma interface "test.cpp"
#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/html/htmlwin.h>
#include <wx/fs_zip.h>
// ----------------------------------------------------------------------------
// private classes
// ----------------------------------------------------------------------------
// Define a new application type, each program should derive a class from wxApp
class MyApp : public wxApp
{
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)
virtual bool OnInit();
};
// Define a new frame type: this is going to be our main frame
class MyFrame : public wxFrame
{
public:
// ctor(s)
MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
// event handlers (these functions should _not_ be virtual)
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
void OnBack(wxCommandEvent& event);
void OnForward(wxCommandEvent& event);
private:
// any class wishing to process wxWindows events must use this macro
DECLARE_EVENT_TABLE()
};
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
// IDs for the controls and the menu commands
enum
{
// menu items
Minimal_Quit = 1,
Minimal_About,
Minimal_Back,
Minimal_Forward
};
// ----------------------------------------------------------------------------
// event tables and other macros for wxWindows
// ----------------------------------------------------------------------------
// the event tables connect the wxWindows events with the functions (event
// handlers) which process them. It can be also done at run-time, but for the
// simple menu events like this the static method is much simpler.
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
EVT_MENU(Minimal_About, MyFrame::OnAbout)
EVT_MENU(Minimal_Back, MyFrame::OnBack)
EVT_MENU(Minimal_Forward, MyFrame::OnForward)
END_EVENT_TABLE()
// Create a new application object: this macro will allow wxWindows to create
// the application object during program execution (it's better than using a
// static object for many reasons) and also declares the accessor function
// wxGetApp() which will return the reference of the right type (i.e. MyApp and
// not wxApp)
IMPLEMENT_APP(MyApp)
// ============================================================================
// implementation
// ============================================================================
// ----------------------------------------------------------------------------
// the application class
// ----------------------------------------------------------------------------
// `Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
#if wxUSE_LIBPNG
wxImage::AddHandler(new wxPNGHandler);
#endif
#if wxUSE_LIBJPEG
wxImage::AddHandler(new wxJPEGHandler);
#endif
wxFileSystem::AddHandler(new wxZipFSHandler);
// Create the main application window
MyFrame *frame = new MyFrame("wxHtmlWindow testing application",
wxPoint(50, 50), wxSize(640, 480));
// Show it and tell the application that it's our main window
// @@@ what does it do exactly, in fact? is it necessary here?
frame->Show(TRUE);
SetTopWindow(frame);
// success: wxApp::OnRun() will be called which will enter the main message
// loop and the application will run. If we returned FALSE here, the
// application would exit immediately.
return TRUE;
}
// ----------------------------------------------------------------------------
// main frame
// ----------------------------------------------------------------------------
wxHtmlWindow *html;
// frame constructor
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
: wxFrame((wxFrame *)NULL, -1, title, pos, size)
{
// create a menu bar
wxMenu *menuFile = new wxMenu;
wxMenu *menuNav = new wxMenu;
menuFile->Append(Minimal_Quit, "E&xit");
menuNav->Append(Minimal_Back, "Go &BACK");
menuNav->Append(Minimal_Forward, "Go &FORWARD");
// now append the freshly created menu to the menu bar...
wxMenuBar *menuBar = new wxMenuBar;
menuBar->Append(menuFile, "&File");
menuBar->Append(menuNav, "&Navigate");
// ... and attach this menu bar to the frame
SetMenuBar(menuBar);
CreateStatusBar(1);
{
html = new wxHtmlWindow(this);
html -> SetRelatedFrame(this, "HTML : %s");
html -> SetRelatedStatusBar(0);
html -> LoadPage("start.htm");
}
}
// event handlers
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
// TRUE is to force the frame to close
Close(TRUE);
}
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
}
void MyFrame::OnBack(wxCommandEvent& WXUNUSED(event))
{
if (!html -> HistoryBack()) wxMessageBox("You reached prehistory era!");
}
void MyFrame::OnForward(wxCommandEvent& WXUNUSED(event))
{
if (!html -> HistoryForward()) wxMessageBox("No more items in history!");
}

View File

@@ -1,2 +0,0 @@
#include "wx/msw/wx.rc"

View File

@@ -1,2 +0,0 @@
test.png

View File

@@ -1,23 +0,0 @@
#
# File: makefile.unx
# Author: Julian Smart
# Created: 1998
# Updated:
# Copyright: (c) 1998 Julian Smart
#
# "%W% %G%"
#
# Makefile for image example (UNIX).
top_srcdir = @top_srcdir@
top_builddir = ../..
program_dir = samples/image
DATAFILES = horse.png horse.jpg horse.bmp horse.gif horse.pcx horse.pnm horse.tif smile.xbm
PROGRAM=image
OBJECTS=$(PROGRAM).o
include ../../src/makeprog.env

View File

@@ -1,30 +0,0 @@
#*****************************************************************************
# *
# Make file for VMS *
# Author : J.Jansen (joukj@hrem.stm.tudelft.nl) *
# Date : 10 November 1999 *
# *
#*****************************************************************************
.first
define wx [--.include.wx]
.ifdef __WXMOTIF__
CXX_DEFINE = /define=(__WXMOTIF__=1)
.else
CXX_DEFINE =
.endif
.suffixes : .cpp
.cpp.obj :
cxx $(CXXFLAGS)$(CXX_DEFINE) $(MMS$TARGET_NAME).cpp
all :
$(MMS)$(MMSQUALIFIERS) image.exe
image.exe : image.obj
.ifdef __WXMOTIF__
cxxlink image,[--.lib]vms/opt
.endif
image.obj : image.cpp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Some files were not shown because too many files have changed in this diff Show More