From 6e47faf150479ef1171b696bde7ba504c81af481 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sat, 6 Nov 1999 10:39:19 +0000 Subject: [PATCH] Fixed image sample, dsp files etc. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- distrib/msw/zipdist.bat | 1 + docs/readme.txt | 56 +++++++++++++++++------------------ samples/controls/controls.cpp | 24 ++++++++++++--- samples/image/image.cpp | 19 ++++++++++-- src/msw/makefile.b32 | 8 ++++- src/msw/makefile.bcc | 8 ++++- src/msw/makefile.vc | 4 ++- src/msw/makefile.wat | 10 ++++++- src/wxvc.dsp | 12 ++++++++ src/wxvc_dll.dsp | 12 ++++++++ utils/projgen/makeproj.cpp | 1 + 11 files changed, 117 insertions(+), 38 deletions(-) diff --git a/distrib/msw/zipdist.bat b/distrib/msw/zipdist.bat index 3d29053894..7982c42b50 100755 --- a/distrib/msw/zipdist.bat +++ b/distrib/msw/zipdist.bat @@ -129,6 +129,7 @@ rem Now invoke WISE install on the new wxwin2.wse set wisecmd="c:\Program Files\wise\wise32.exe" /C %WXWIN\distrib\msw\wxwin2.wse echo Invoking %wisecmd... start /w %wisecmd +Rem ren %WXWIN\deliver\setup.EXE %WXWIN\deliver\setup_%version%.exe cd %dest diff --git a/docs/readme.txt b/docs/readme.txt index 616cda1de0..a8b5870f96 100644 --- a/docs/readme.txt +++ b/docs/readme.txt @@ -66,43 +66,43 @@ Zip set Depending on what you downloaded, you may have one or more of these ports. You may unarchive any or all of the ports into the same directory hierarchy. The zip archive set comprises the -following: - -wx200gen.zip Generic source code and samples (required) -wx200msw.zip Windows-specific source code -wx200mot.zip Motif-specific source code -wx200gtk.zip GTK-specific source code -wx200stubs.zip Stubs ('empty port') source. Needs - wx200gen.zip/tgz. -wx200doc.zip Documentation source code (not required) -wx200hlp.zip WinHelp documentation -wx200pdf.zip Acrobat PDF documentation -wx200htm.zip HTML documentation -wx200vc.zip MS VC++ 5/6 project files -wx200bc.zip Borland C++ 5 project files -wx200cw.zip Metrowerks CodeWarrior 4.1 project files -jpeg.zip Optional JPEG library -ogl3.zip Optional Object Graphics Library -glcanvas.zip Optional wxGLCanvas class (Motif, GTK, MSW) -tex2rtf2.zip Tex2RTF documentation tool +following, where x is the minor version and y the release number: + +wx2_x_y_gen.zip Generic source code and samples (required) +wx2_x_y_msw.zip Windows-specific source code +wx2_x_y_mot.zip Motif-specific source code +wx2_x_y_gtk.zip GTK-specific source code +wx2_x_y_stubs.zip Stubs ('empty port') source. Needs + wx2_x_y_gen.zip/tgz. +wx2_x_y_doc.zip Documentation source code (not required) +wx2_x_y_hlp.zip WinHelp documentation +wx2_x_y_pdf.zip Acrobat PDF documentation +wx2_x_y_htm.zip HTML documentation +wx2_x_y_vc.zip MS VC++ 5/6 project files +wx2_x_y_bc.zip Borland C++ 5 project files +wx2_x_y_cw.zip Metrowerks CodeWarrior 4.1 project files +jpeg.zip Optional JPEG library +ogl3.zip Optional Object Graphics Library +glcanvas.zip Optional wxGLCanvas class (Motif, GTK, MSW) +tex2rtf2.zip Tex2RTF documentation tool wxWindows for GTK distribution ------------------------------ -wxGTK-2.x.x.tgz wxGTK source distribution. You will - need the HTML and/or PDF documentation - from the zip set (above). +wxGTK-2.x.y.tgz wxGTK source distribution. You will + need the HTML and/or PDF documentation + from the zip set (above). wxWindows for Motif distribution -------------------------------- -wxMotif-2.x.x.tgz wxMotif source distribution. You will - need the HTML and/or PDF documentation - -- OR -- from the zip set (above). +wxMotif-2.x.y.tgz wxMotif source distribution. You will + need the HTML and/or PDF documentation + -- OR -- from the zip set (above). -wx200gen.zip -wx200msw.zip -wx200mot.zip +wx2_x_y_gen.zip +wx2_x_y_msw.zip +wx2_x_y_mot.zip jpeg.zip wxWindows for Windows distribution diff --git a/samples/controls/controls.cpp b/samples/controls/controls.cpp index 1ee379db8e..8eb3a59945 100644 --- a/samples/controls/controls.cpp +++ b/samples/controls/controls.cpp @@ -701,11 +701,18 @@ void MyPanel::OnListBox( wxCommandEvent &event ) wxStringClientData *obj = ((wxStringClientData *)event.GetClientObject()); m_text->AppendText( "ListBox event client data string is: '" ); - m_text->AppendText( obj ? obj->GetData() : wxString("none")); + if (obj) // BC++ doesn't like use of '? .. : .. ' in this context + m_text->AppendText( obj->GetData() ); + else + m_text->AppendText( wxString("none") ); + m_text->AppendText( "'\n" ); m_text->AppendText( "ListBox control client data string is: '" ); obj = (wxStringClientData *)listbox->GetClientObject(listbox->GetSelection()); - m_text->AppendText( obj ? obj->GetData() : wxString("none")); + if (obj) + m_text->AppendText( obj->GetData() ); + else + m_text->AppendText( wxString("none") ); m_text->AppendText( "'\n" ); } @@ -793,11 +800,20 @@ void MyPanel::OnChoice( wxCommandEvent &event ) wxStringClientData *obj = ((wxStringClientData *)event.GetClientObject()); m_text->AppendText( "Choice event client data string is: '" ); - m_text->AppendText( obj ? obj->GetData() : wxString("none")); + + if (obj) + m_text->AppendText( obj->GetData() ); + else + m_text->AppendText( wxString("none") ); + m_text->AppendText( "'\n" ); m_text->AppendText( "Choice control client data string is: '" ); obj = (wxStringClientData *)choice->GetClientObject(choice->GetSelection()); - m_text->AppendText( obj ? obj->GetData() : wxString("none")); + + if (obj) + m_text->AppendText( obj->GetData() ); + else + m_text->AppendText( wxString("none") ); m_text->AppendText( "'\n" ); } diff --git a/samples/image/image.cpp b/samples/image/image.cpp index fe40a70b0b..687a1e1f22 100644 --- a/samples/image/image.cpp +++ b/samples/image/image.cpp @@ -96,6 +96,7 @@ MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id, my_horse_gif = (wxBitmap*) NULL; my_horse_bmp = (wxBitmap*) NULL; my_horse_pcx = (wxBitmap*) NULL; + my_horse_pnm = (wxBitmap*) NULL; my_square = (wxBitmap*) NULL; my_anti = (wxBitmap*) NULL; @@ -133,26 +134,32 @@ MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id, wxLogError("Can't load JPG image"); else my_horse_jpeg = new wxBitmap( image.ConvertToBitmap() ); - + +#if wxUSE_GIF if ( !image.LoadFile( dir + wxString("horse.gif") ) ) wxLogError("Can't load GIF image"); else my_horse_gif = new wxBitmap( image.ConvertToBitmap() ); +#endif +#if wxUSE_PCX if ( !image.LoadFile( dir + wxString("horse.pcx"), wxBITMAP_TYPE_PCX ) ) wxLogError("Can't load PCX image"); else my_horse_pcx = new wxBitmap( image.ConvertToBitmap() ); +#endif if ( !image.LoadFile( dir + wxString("horse.bmp"), wxBITMAP_TYPE_BMP ) ) wxLogError("Can't load BMP image"); else my_horse_bmp = new wxBitmap( image.ConvertToBitmap() ); +#if wxUSE_PNM if ( !image.LoadFile( dir + wxString("horse.pnm"), wxBITMAP_TYPE_PNM ) ) wxLogError("Can't load PNM image"); else my_horse_pnm = new wxBitmap( image.ConvertToBitmap() ); +#endif image.LoadFile( dir + wxString("test.png") ); my_square = new wxBitmap( image.ConvertToBitmap() ); @@ -216,7 +223,7 @@ void MyCanvas::CreateAntiAliasedBitmap() dc.Clear(); - dc.SetFont( wxFont( 24, wxDECORATIVE, wxDEFAULT, wxDEFAULT ) ); + dc.SetFont( wxFont( 24, wxDECORATIVE, wxNORMAL, wxNORMAL) ); dc.SetTextForeground( "RED" ); dc.DrawText( "This is anti-aliased Text.", 20, 20 ); dc.DrawText( "And a Rectangle.", 20, 60 ); @@ -317,9 +324,17 @@ bool MyApp::OnInit() wxImage::AddHandler( new wxJPEGHandler ); #endif +#if wxUSE_GIF wxImage::AddHandler( new wxGIFHandler ); +#endif + +#if wxUSE_PCX wxImage::AddHandler( new wxPCXHandler ); +#endif + +#if wxUSE_PNM wxImage::AddHandler( new wxPNMHandler ); +#endif wxFrame *frame = new MyFrame(); frame->Show( TRUE ); diff --git a/src/msw/makefile.b32 b/src/msw/makefile.b32 index bd2d8dbdaa..5f6803b6fc 100644 --- a/src/msw/makefile.b32 +++ b/src/msw/makefile.b32 @@ -1,6 +1,6 @@ -# This file was automatically generated by tmake at 00:24, 1999/10/28 +# This file was automatically generated by tmake at 10:03, 1999/11/06 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T! # @@ -135,6 +135,7 @@ COMMONOBJS = \ $(MSWDIR)\filefn.obj \ $(MSWDIR)\filesys.obj \ $(MSWDIR)\fontcmn.obj \ + $(MSWDIR)\fontmap.obj \ $(MSWDIR)\framecmn.obj \ $(MSWDIR)\fs_inet.obj \ $(MSWDIR)\fs_zip.obj \ @@ -238,6 +239,7 @@ MSWOBJS = $(MSWDIR)\accel.obj \ $(MSWDIR)\filedlg.obj \ $(MSWDIR)\font.obj \ $(MSWDIR)\fontdlg.obj \ + $(MSWDIR)\fontutil.obj \ $(MSWDIR)\frame.obj \ $(MSWDIR)\gauge95.obj \ $(MSWDIR)\gdiobj.obj \ @@ -414,6 +416,8 @@ $(MSWDIR)\font.obj: $(MSWDIR)\font.$(SRCSUFF) $(MSWDIR)\fontdlg.obj: $(MSWDIR)\fontdlg.$(SRCSUFF) +$(MSWDIR)\fontutil.obj: $(MSWDIR)\fontutil.$(SRCSUFF) + $(MSWDIR)\frame.obj: $(MSWDIR)\frame.$(SRCSUFF) $(MSWDIR)\gauge95.obj: $(MSWDIR)\gauge95.$(SRCSUFF) @@ -583,6 +587,8 @@ $(MSWDIR)\filesys.obj: $(COMMDIR)\filesys.$(SRCSUFF) $(MSWDIR)\fontcmn.obj: $(COMMDIR)\fontcmn.$(SRCSUFF) +$(MSWDIR)\fontmap.obj: $(COMMDIR)\fontmap.$(SRCSUFF) + $(MSWDIR)\framecmn.obj: $(COMMDIR)\framecmn.$(SRCSUFF) $(MSWDIR)\fs_inet.obj: $(COMMDIR)\fs_inet.$(SRCSUFF) diff --git a/src/msw/makefile.bcc b/src/msw/makefile.bcc index 5e26611f21..75fd5670d3 100644 --- a/src/msw/makefile.bcc +++ b/src/msw/makefile.bcc @@ -1,6 +1,6 @@ -# This file was automatically generated by tmake at 00:24, 1999/10/28 +# This file was automatically generated by tmake at 10:04, 1999/11/06 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BCC.T! # @@ -126,6 +126,7 @@ COMMONOBJS = \ $(MSWDIR)\filefn.obj \ $(MSWDIR)\filesys.obj \ $(MSWDIR)\fontcmn.obj \ + $(MSWDIR)\fontmap.obj \ $(MSWDIR)\framecmn.obj \ $(MSWDIR)\fs_inet.obj \ $(MSWDIR)\fs_zip.obj \ @@ -210,6 +211,7 @@ MSWOBJS = $(MSWDIR)\accel.obj \ $(MSWDIR)\filedlg.obj \ $(MSWDIR)\font.obj \ $(MSWDIR)\fontdlg.obj \ + $(MSWDIR)\fontutil.obj \ $(MSWDIR)\frame.obj \ $(MSWDIR)\gaugemsw.obj \ $(MSWDIR)\gdiobj.obj \ @@ -349,6 +351,8 @@ $(MSWDIR)\font.obj: $(MSWDIR)\font.$(SRCSUFF) $(MSWDIR)\fontdlg.obj: $(MSWDIR)\fontdlg.$(SRCSUFF) +$(MSWDIR)\fontutil.obj: $(MSWDIR)\fontutil.$(SRCSUFF) + $(MSWDIR)\frame.obj: $(MSWDIR)\frame.$(SRCSUFF) $(MSWDIR)\gaugemsw.obj: $(MSWDIR)\gaugemsw.$(SRCSUFF) @@ -494,6 +498,8 @@ $(MSWDIR)\filesys.obj: $(COMMDIR)\filesys.$(SRCSUFF) $(MSWDIR)\fontcmn.obj: $(COMMDIR)\fontcmn.$(SRCSUFF) +$(MSWDIR)\fontmap.obj: $(COMMDIR)\fontmap.$(SRCSUFF) + $(MSWDIR)\framecmn.obj: $(COMMDIR)\framecmn.$(SRCSUFF) $(MSWDIR)\fs_inet.obj: $(COMMDIR)\fs_inet.$(SRCSUFF) diff --git a/src/msw/makefile.vc b/src/msw/makefile.vc index f91bce82cb..2ccad8bb08 100644 --- a/src/msw/makefile.vc +++ b/src/msw/makefile.vc @@ -1,4 +1,4 @@ -# This file was automatically generated by tmake at 00:24, 1999/10/28 +# This file was automatically generated by tmake at 10:04, 1999/11/06 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE VC.T! # File: makefile.vc @@ -152,6 +152,7 @@ COMMONOBJS = \ ..\common\$D\filefn.obj \ ..\common\$D\filesys.obj \ ..\common\$D\fontcmn.obj \ + ..\common\$D\fontmap.obj \ ..\common\$D\framecmn.obj \ ..\common\$D\fs_inet.obj \ ..\common\$D\fs_zip.obj \ @@ -256,6 +257,7 @@ MSWOBJS = ..\msw\$D\accel.obj \ ..\msw\$D\filedlg.obj \ ..\msw\$D\font.obj \ ..\msw\$D\fontdlg.obj \ + ..\msw\$D\fontutil.obj \ ..\msw\$D\frame.obj \ ..\msw\$D\gauge95.obj \ ..\msw\$D\gdiobj.obj \ diff --git a/src/msw/makefile.wat b/src/msw/makefile.wat index 8913e7e749..5316ad6087 100644 --- a/src/msw/makefile.wat +++ b/src/msw/makefile.wat @@ -1,6 +1,6 @@ #!/binb/wmake.exe -# This file was automatically generated by tmake at 00:24, 1999/10/28 +# This file was automatically generated by tmake at 10:10, 1999/11/06 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T! # @@ -108,6 +108,7 @@ COMMONOBJS = & filefn.obj & filesys.obj & fontcmn.obj & + fontmap.obj & framecmn.obj & fs_inet.obj & fs_zip.obj & @@ -211,6 +212,7 @@ MSWOBJS = accel.obj & filedlg.obj & font.obj & fontdlg.obj & + fontutil.obj & frame.obj & gauge95.obj & gaugemsw.obj & @@ -400,6 +402,9 @@ font.obj: $(MSWDIR)\font.cpp fontdlg.obj: $(MSWDIR)\fontdlg.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< +fontutil.obj: $(MSWDIR)\fontutil.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + frame.obj: $(MSWDIR)\frame.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< @@ -648,6 +653,9 @@ filesys.obj: $(COMMDIR)\filesys.cpp fontcmn.obj: $(COMMDIR)\fontcmn.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< +fontmap.obj: $(COMMDIR)\fontmap.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + framecmn.obj: $(COMMDIR)\framecmn.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< diff --git a/src/wxvc.dsp b/src/wxvc.dsp index b2e174e0b3..a22bfcbf6c 100644 --- a/src/wxvc.dsp +++ b/src/wxvc.dsp @@ -196,6 +196,10 @@ SOURCE=.\common\fontcmn.cpp # End Source File # Begin Source File +SOURCE=.\common\fontmap.cpp +# End Source File +# Begin Source File + SOURCE=.\common\framecmn.cpp # End Source File # Begin Source File @@ -784,6 +788,14 @@ SOURCE=.\msw\fontdlg.cpp # End Source File # Begin Source File +SOURCE=.\msw\fontenum.cpp +# End Source File +# Begin Source File + +SOURCE=.\msw\fontutil.cpp +# End Source File +# Begin Source File + SOURCE=.\msw\frame.cpp # End Source File # Begin Source File diff --git a/src/wxvc_dll.dsp b/src/wxvc_dll.dsp index 16222f40b6..b25b2551bb 100644 --- a/src/wxvc_dll.dsp +++ b/src/wxvc_dll.dsp @@ -203,6 +203,10 @@ SOURCE=.\common\fontcmn.cpp # End Source File # Begin Source File +SOURCE=.\common\fontmap.cpp +# End Source File +# Begin Source File + SOURCE=.\common\framecmn.cpp # End Source File # Begin Source File @@ -782,6 +786,14 @@ SOURCE=.\msw\fontdlg.cpp # End Source File # Begin Source File +SOURCE=.\msw\fontenum.cpp +# End Source File +# Begin Source File + +SOURCE=.\msw\fontutil.cpp +# End Source File +# Begin Source File + SOURCE=.\msw\frame.cpp # End Source File # Begin Source File diff --git a/utils/projgen/makeproj.cpp b/utils/projgen/makeproj.cpp index 105993925b..e5380e9cd6 100644 --- a/utils/projgen/makeproj.cpp +++ b/utils/projgen/makeproj.cpp @@ -217,6 +217,7 @@ void MyApp::GenerateSamples(const wxString& dir) GenerateSample("DocVwMDIVC", "docview", dir + wxString("/samples/docvwmdi"), wxStringList("docview.cpp", "doc.cpp", "view.cpp", "docview.h", "doc.h", "view.h", 0)); GenerateSample("DynamicVC", "dynamic", dir + wxString("/samples/dynamic"), wxStringList("dynamic.cpp", 0)); + GenerateSample("DrawingVC", "drawing", dir + wxString("/samples/drawing"), wxStringList("drawing.cpp", 0)); GenerateSample("FortyVC", "forty", dir + wxString("/samples/forty"), wxStringList("forty.cpp", "canvas.cpp", "card.cpp", "game.cpp", "pile.cpp", "playerdg.cpp", "scoredg.cpp", "scorefil.cpp", "canvas.h", "forty.h", "card.h", "game.h", "pile.h", "playerdg.h", "scoredg.h", "scorefil.h", -- 2.45.2