From 9ffdee8074b1581d2c8ad6e6b16f536a42e42dd1 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 1 Nov 1999 11:27:38 +0000 Subject: [PATCH] Added some makefiles to HTML samples; added help.ico for wxHTML; make richedit sample compile (but without clipboard ops) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- distrib/msw/generic.rsp | 15 +++++++++++++++ docs/html/index.htm | 10 ++++++++++ docs/latex/wx/wx.hpj | 2 +- include/wx/html/msw/help.ico | Bin 0 -> 1078 bytes include/wx/html/msw/wxhtml.rc | 1 + samples/html/about/makefile.b32 | 16 ++++++++++++++++ samples/html/about/makefile.wat | 15 +++++++++++++++ samples/html/help/makefile.b32 | 16 ++++++++++++++++ samples/html/help/makefile.wat | 15 +++++++++++++++ samples/html/helpview/helpview.rc | 3 +++ samples/html/helpview/makefile.b32 | 16 ++++++++++++++++ samples/html/helpview/makefile.wat | 15 +++++++++++++++ samples/html/printing/makefile.b32 | 16 ++++++++++++++++ samples/html/printing/makefile.wat | 15 +++++++++++++++ samples/html/test/makefile.b32 | 16 ++++++++++++++++ samples/html/test/makefile.wat | 15 +++++++++++++++ samples/html/virtual/makefile.b32 | 16 ++++++++++++++++ samples/html/virtual/makefile.wat | 15 +++++++++++++++ samples/html/widget/makefile.b32 | 16 ++++++++++++++++ samples/html/widget/makefile.wat | 15 +++++++++++++++ samples/html/zip/makefile.b32 | 16 ++++++++++++++++ samples/html/zip/makefile.wat | 15 +++++++++++++++ samples/richedit/wxllist.cpp | 20 +++++++++++++++++--- samples/richedit/wxllist.h | 4 +++- samples/richedit/wxlwindow.cpp | 2 +- src/html/helpfrm.cpp | 6 ++++++ utils/projgen/makeproj.cpp | 1 + 27 files changed, 306 insertions(+), 6 deletions(-) create mode 100644 include/wx/html/msw/help.ico create mode 100644 samples/html/about/makefile.b32 create mode 100644 samples/html/about/makefile.wat create mode 100644 samples/html/help/makefile.b32 create mode 100644 samples/html/help/makefile.wat create mode 100644 samples/html/helpview/makefile.b32 create mode 100644 samples/html/helpview/makefile.wat create mode 100644 samples/html/printing/makefile.b32 create mode 100644 samples/html/printing/makefile.wat create mode 100644 samples/html/test/makefile.b32 create mode 100644 samples/html/test/makefile.wat create mode 100644 samples/html/virtual/makefile.b32 create mode 100644 samples/html/virtual/makefile.wat create mode 100644 samples/html/widget/makefile.b32 create mode 100644 samples/html/widget/makefile.wat create mode 100644 samples/html/zip/makefile.b32 create mode 100644 samples/html/zip/makefile.wat diff --git a/distrib/msw/generic.rsp b/distrib/msw/generic.rsp index 560c128109..697c671c3b 100644 --- a/distrib/msw/generic.rsp +++ b/distrib/msw/generic.rsp @@ -910,6 +910,21 @@ samples/html/zip/*.png samples/html/zip/*.ico samples/html/zip/*.htm samples/html/zip/*.html +samples/html/zip/*.zip + +samples/html/helpview/*.cpp +samples/html/helpview/*.h +samples/html/helpview/makefile* +samples/html/helpview/*.rc +samples/html/helpview/*.def +samples/html/helpview/*.bmp +samples/html/helpview/*.xpm +samples/html/helpview/*.xbm +samples/html/helpview/*.png +samples/html/helpview/*.ico +samples/html/helpview/*.htm +samples/html/helpview/*.html +samples/html/helpview/test.zip samples/richedit/*.cpp samples/richedit/*.h diff --git a/docs/html/index.htm b/docs/html/index.htm index b5c0f39264..e561f4b877 100644 --- a/docs/html/index.htm +++ b/docs/html/index.htm @@ -216,6 +216,16 @@ fully-fledged application!
  • help: shows how to use wxHelpController.
  • html: a number of demos for the wxHTML class library, used inside applications and also as a help facility. +
  • image: shows off the cross-platform wxImage class.
  • internat: use of wxWindows' internationalization support.
  • joytest: tests the wxJoystick class (currently Windows and GTK only). diff --git a/docs/latex/wx/wx.hpj b/docs/latex/wx/wx.hpj index 5bf567ae88..43d8c37176 100644 --- a/docs/latex/wx/wx.hpj +++ b/docs/latex/wx/wx.hpj @@ -1,5 +1,5 @@ [OPTIONS] -BMROOT=d:\wx2\wxWind~1\docs/latex/wx ; Assume that bitmaps are where the source is +BMROOT=d:\wx2\wxWindows\docs\latex\wx ; Assume that bitmaps are where the source is TITLE=wxWindows Manual CONTENTS=Contents COMPRESS=HIGH diff --git a/include/wx/html/msw/help.ico b/include/wx/html/msw/help.ico new file mode 100644 index 0000000000000000000000000000000000000000..b37bc8092ffb29a0f468d383ac4453047b471cf1 GIT binary patch literal 1078 zcmb7Dv2KGf5PgJ7K|*Ty12a__J67sIJ}G;LSjrGSCsK!2x*_CGI(B3$Lsa*jjRTEP zlOCM!-aGpa+Xs+fhO#W6@;L(@Xp17?Wdhu%z>-`^T~QOqBLGS``U*BL=)^xsp=b0C!jo`^r@Jk15;74QQbT_pGb literal 0 HcmV?d00001 diff --git a/include/wx/html/msw/wxhtml.rc b/include/wx/html/msw/wxhtml.rc index 99c310f430..8aa6f17f6c 100644 --- a/include/wx/html/msw/wxhtml.rc +++ b/include/wx/html/msw/wxhtml.rc @@ -13,4 +13,5 @@ panel BITMAP "wx/html/msw/panel.bmp" book ICON "wx/html/msw/book.ico" folder ICON "wx/html/msw/folder.ico" page ICON "wx/html/msw/page.ico" +wxhelp ICON "wx/html/msw/help.ico" diff --git a/samples/html/about/makefile.b32 b/samples/html/about/makefile.b32 new file mode 100644 index 0000000000..934f65577e --- /dev/null +++ b/samples/html/about/makefile.b32 @@ -0,0 +1,16 @@ +# +# 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 + diff --git a/samples/html/about/makefile.wat b/samples/html/about/makefile.wat new file mode 100644 index 0000000000..02018bbe57 --- /dev/null +++ b/samples/html/about/makefile.wat @@ -0,0 +1,15 @@ +# +# Makefile for WATCOM +# +# Created by Julian Smart, January 1999 +# +# + +WXDIR = $(%WXWIN) + +PROGRAM = about +OBJECTS = $(PROGRAM).obj + +!include $(WXDIR)\src\makeprog.wat + + diff --git a/samples/html/help/makefile.b32 b/samples/html/help/makefile.b32 new file mode 100644 index 0000000000..b7ca4da597 --- /dev/null +++ b/samples/html/help/makefile.b32 @@ -0,0 +1,16 @@ +# +# 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 + diff --git a/samples/html/help/makefile.wat b/samples/html/help/makefile.wat new file mode 100644 index 0000000000..f49017db23 --- /dev/null +++ b/samples/html/help/makefile.wat @@ -0,0 +1,15 @@ +# +# Makefile for WATCOM +# +# Created by Julian Smart, January 1999 +# +# + +WXDIR = $(%WXWIN) + +PROGRAM = help +OBJECTS = $(PROGRAM).obj + +!include $(WXDIR)\src\makeprog.wat + + diff --git a/samples/html/helpview/helpview.rc b/samples/html/helpview/helpview.rc index 7fa90c817b..131846183b 100644 --- a/samples/html/helpview/helpview.rc +++ b/samples/html/helpview/helpview.rc @@ -1,2 +1,5 @@ +/* We need this to get the right default icon. */ +aaaaaa ICON "wx/html/msw/help.ico" + #include "wx/msw/wx.rc" #include "wx/html/msw/wxhtml.rc" diff --git a/samples/html/helpview/makefile.b32 b/samples/html/helpview/makefile.b32 new file mode 100644 index 0000000000..2e21dfdb82 --- /dev/null +++ b/samples/html/helpview/makefile.b32 @@ -0,0 +1,16 @@ +# +# 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 + diff --git a/samples/html/helpview/makefile.wat b/samples/html/helpview/makefile.wat new file mode 100644 index 0000000000..89750a9cfb --- /dev/null +++ b/samples/html/helpview/makefile.wat @@ -0,0 +1,15 @@ +# +# Makefile for WATCOM +# +# Created by Julian Smart, January 1999 +# +# + +WXDIR = $(%WXWIN) + +PROGRAM = helpview +OBJECTS = $(PROGRAM).obj + +!include $(WXDIR)\src\makeprog.wat + + diff --git a/samples/html/printing/makefile.b32 b/samples/html/printing/makefile.b32 new file mode 100644 index 0000000000..6e1400dbdf --- /dev/null +++ b/samples/html/printing/makefile.b32 @@ -0,0 +1,16 @@ +# +# 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 + diff --git a/samples/html/printing/makefile.wat b/samples/html/printing/makefile.wat new file mode 100644 index 0000000000..ebd7bff092 --- /dev/null +++ b/samples/html/printing/makefile.wat @@ -0,0 +1,15 @@ +# +# Makefile for WATCOM +# +# Created by Julian Smart, January 1999 +# +# + +WXDIR = $(%WXWIN) + +PROGRAM = printing +OBJECTS = $(PROGRAM).obj + +!include $(WXDIR)\src\makeprog.wat + + diff --git a/samples/html/test/makefile.b32 b/samples/html/test/makefile.b32 new file mode 100644 index 0000000000..95ddc80d76 --- /dev/null +++ b/samples/html/test/makefile.b32 @@ -0,0 +1,16 @@ +# +# 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 + diff --git a/samples/html/test/makefile.wat b/samples/html/test/makefile.wat new file mode 100644 index 0000000000..81a83e42a9 --- /dev/null +++ b/samples/html/test/makefile.wat @@ -0,0 +1,15 @@ +# +# Makefile for WATCOM +# +# Created by Julian Smart, January 1999 +# +# + +WXDIR = $(%WXWIN) + +PROGRAM = test +OBJECTS = $(PROGRAM).obj + +!include $(WXDIR)\src\makeprog.wat + + diff --git a/samples/html/virtual/makefile.b32 b/samples/html/virtual/makefile.b32 new file mode 100644 index 0000000000..38d315208f --- /dev/null +++ b/samples/html/virtual/makefile.b32 @@ -0,0 +1,16 @@ +# +# 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 + diff --git a/samples/html/virtual/makefile.wat b/samples/html/virtual/makefile.wat new file mode 100644 index 0000000000..c47938e66e --- /dev/null +++ b/samples/html/virtual/makefile.wat @@ -0,0 +1,15 @@ +# +# Makefile for WATCOM +# +# Created by Julian Smart, January 1999 +# +# + +WXDIR = $(%WXWIN) + +PROGRAM = virtual +OBJECTS = $(PROGRAM).obj + +!include $(WXDIR)\src\makeprog.wat + + diff --git a/samples/html/widget/makefile.b32 b/samples/html/widget/makefile.b32 new file mode 100644 index 0000000000..df58de4cac --- /dev/null +++ b/samples/html/widget/makefile.b32 @@ -0,0 +1,16 @@ +# +# 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 + diff --git a/samples/html/widget/makefile.wat b/samples/html/widget/makefile.wat new file mode 100644 index 0000000000..e8e59102d9 --- /dev/null +++ b/samples/html/widget/makefile.wat @@ -0,0 +1,15 @@ +# +# Makefile for WATCOM +# +# Created by Julian Smart, January 1999 +# +# + +WXDIR = $(%WXWIN) + +PROGRAM = widget +OBJECTS = $(PROGRAM).obj + +!include $(WXDIR)\src\makeprog.wat + + diff --git a/samples/html/zip/makefile.b32 b/samples/html/zip/makefile.b32 new file mode 100644 index 0000000000..ecfe11bddc --- /dev/null +++ b/samples/html/zip/makefile.b32 @@ -0,0 +1,16 @@ +# +# 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 + diff --git a/samples/html/zip/makefile.wat b/samples/html/zip/makefile.wat new file mode 100644 index 0000000000..5a52da2bb3 --- /dev/null +++ b/samples/html/zip/makefile.wat @@ -0,0 +1,15 @@ +# +# Makefile for WATCOM +# +# Created by Julian Smart, January 1999 +# +# + +WXDIR = $(%WXWIN) + +PROGRAM = zip +OBJECTS = $(PROGRAM).obj + +!include $(WXDIR)\src\makeprog.wat + + diff --git a/samples/richedit/wxllist.cpp b/samples/richedit/wxllist.cpp index 97e4fc2001..8391d67407 100644 --- a/samples/richedit/wxllist.cpp +++ b/samples/richedit/wxllist.cpp @@ -2382,10 +2382,23 @@ wxLayoutList::FindObjectScreen(wxDC &dc, wxPoint const pos, cursorPos->y = line->GetLineNumber(); bool foundinline = true; + long cx = 0; + // Now, find the object in the line: - wxLOiterator i = line->FindObjectScreen(dc, this, + wxLOiterator i; + + if (cursorPos) + { + i = line->FindObjectScreen(dc, this, + pos.x, + &cx, + &foundinline); + cursorPos->x = cx; + } + else + i = line->FindObjectScreen(dc, this, pos.x, - cursorPos ? &cursorPos->x : NULL, + NULL, &foundinline); if ( found ) *found = didFind && foundinline; @@ -2831,8 +2844,9 @@ wxLayoutList::GetSelection(wxLayoutDataObject *wxlo, bool invalidate) exp->content.object->Write(string); delete exp; } - +#if 0 // FIXME: DnD/Clipboard API has changed, what should this be? wxlo->SetData(string.c_str(), string.Length()+1); +#endif } return llist; } diff --git a/samples/richedit/wxllist.h b/samples/richedit/wxllist.h index 940e3aca6b..39fe178646 100644 --- a/samples/richedit/wxllist.h +++ b/samples/richedit/wxllist.h @@ -1215,12 +1215,14 @@ private: own format. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -class wxLayoutDataObject : public wxPrivateDataObject +class wxLayoutDataObject : public wxCustomDataObject { public: wxLayoutDataObject(void) { +#if 0 // TODO: No longer exists, what should we do instead? SetId("application/wxlayoutlist"); +#endif //m_format.SetAtom((GdkAtom) 222222); } }; diff --git a/samples/richedit/wxlwindow.cpp b/samples/richedit/wxlwindow.cpp index c2c73c171c..43ec7781c4 100644 --- a/samples/richedit/wxlwindow.cpp +++ b/samples/richedit/wxlwindow.cpp @@ -1099,7 +1099,7 @@ wxLayoutWindow::Paste(bool primary) wxTextDataObject data; if (wxTheClipboard->IsSupported( data.GetFormat() )) { - wxTheClipboard->GetData(&data); + wxTheClipboard->GetData(data); wxString text = data.GetText(); wxLayoutImportText( m_llist, text); SetDirty(); diff --git a/src/html/helpfrm.cpp b/src/html/helpfrm.cpp index e4162ea35d..5391df1b7d 100644 --- a/src/html/helpfrm.cpp +++ b/src/html/helpfrm.cpp @@ -139,6 +139,12 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, const wxString& ti wxFrame::Create(parent, id, _("Help"), wxPoint(m_Cfg.x, m_Cfg.y), wxSize(m_Cfg.w, m_Cfg.h)); +#ifdef __WXMSW__ + wxIcon frameIcon("wxhelp", wxBITMAP_TYPE_ICO_RESOURCE); + if (frameIcon.Ok()) + SetIcon(frameIcon); +#endif + int notebook_page = 0; CreateStatusBar(); diff --git a/utils/projgen/makeproj.cpp b/utils/projgen/makeproj.cpp index 1dc76015c5..821d7bd497 100644 --- a/utils/projgen/makeproj.cpp +++ b/utils/projgen/makeproj.cpp @@ -227,6 +227,7 @@ void MyApp::GenerateSamples(const wxString& dir) GenerateSample("VirtualVC", "virtual", dir + wxString("/samples/html/virtual"), wxStringList("virtual.cpp", 0)); GenerateSample("WidgetVC", "widget", dir + wxString("/samples/html/widget"), wxStringList("widget.cpp", 0)); GenerateSample("ZipVC", "zip", dir + wxString("/samples/html/zip"), wxStringList("zip.cpp", 0)); + GenerateSample("HelpViewVC", "helpview", dir + wxString("/samples/html/helpview"), wxStringList("helpview.cpp", 0)); GenerateSample("ImageVC", "image", dir + wxString("/samples/image"), wxStringList("image.cpp", 0)); GenerateSample("InternatVC", "internat", dir + wxString("/samples/internat"), wxStringList("internat.cpp", 0)); -- 2.45.2