http://agnes.dida.physik.uni-essen.de/~janjaap/mingw32
+The makefile has small problems with Cygwin´s tools
+so it is recommended not to use these (but MingGW32
+and its make.exe).
+
-> Set your path so that it includes the directory
where your compiler and tools reside
-> Assume that you installed the wxWindows sources
to c:\wxWin\include\wx\msw\setup.h
-> Edit c:\wxWin\include\wx\msw\setup.h so that
most features are enabled (i.e. defined to 1) with
- #define wxUSE_SOCKETS 1
- #define wxUSE_HTML 1
+ #define wxUSE_SOCKETS 0
+ #define wxUSE_HTML 0
#define wxUSE_THREADS 1
- #define wxUSE_FS_INET 1
- #define wxUSE_FS_ZIP 1
+ #define wxUSE_FS_INET 0
+ #define wxUSE_FS_ZIP 0
#define wxUSE_BUSYINFO 1
#define wxUSE_DYNLIB_CLASS 1
#define wxUSE_ZIPSTREAM 1
+ #define wxUSE_JPEGLIB 1
+ #define wxUSE_PNGLIB 1
- and disbale iostreams with
+ and disable iostreams with
#define wxUSE_STD_IOSTREAM 0
-> type: cd c:\wxWin\src\msw
-> type: make -f makefile.g95
copy *.* \wxmsw_dist\wxMSW\src\jpeg
cd ..
+cd xpm
+md \wxmsw_dist\wxMSW\src\xpm
+copy *.* \wxmsw_dist\wxMSW\src\xpm
+cd ..
+
cd ..
echo Samples dir..
resource.cpp C
sckaddr.cpp C S
sckfile.cpp C S
-sckint.cpp C S
sckipc.cpp C S
sckstrm.cpp C S
socket.cpp C S
#! File: g95.t
#! Purpose: tmake template file from which makefile.g95 is generated by running
#! tmake -t g95 wxwin.pro -o makefile.g95
-#! Author: Vadim Zeitlin
+#! Author: Vadim Zeitlin, Robert Roebling, Julian Smart
#! Created: 14.07.99
#! Version: $Id$
#!#############################################################################
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE G95.T!
#
-# File: makefile.unx
-# Author: Julian Smart
+# File: makefile.g95
+# Author: Julian Smart, Robert Roebling, Vadim Zeitlin
# Created: 1993
-# Updated:
-# Copyright:(c) 1993, AIAI, University of Edinburgh
-#
-# "@(#)makefile.unx 1.2 5/9/94"
+# Updated: 1999
+# Copyright:(c) 1993, AIAI, University of Edinburgh,
+# Copyright:(c) 1999, Vadim Zeitlin
+# Copyright:(c) 1999, Robert Roebling
#
# Makefile for libwx.a
# Replace this with your own path if necessary
WXDIR = ../..
-# All common UNIX compiler flags and options are now in
+# All common compiler flags and options are now in
# this central makefile.
include $(WXDIR)/src/makeg95.env
-# IMPORTANT: if you want to link in subsidiary libraries,
-# required for some optional parts of wxWindows, you must
-# set EXTRATARGETS and EXTRAOBJS to match the settings in wx_setup.h.
-# Having done this, you won't have to worry about linking them
-# into each application.
-#
-# Here's the full list.
-# prologio: Required if using the wxWindows resource facility
-# USE_WX_RESOURCES should be 1
-# xmgauge: Gauge class (required for Motif only)
-# USE_GAUGE should be 1
-# xpm: XPM pixmap support
-# USE_XPM_IN_X should be 1
-# wxstring: string class
-# USE_GNU_WXSTRING should be 1
-#
-# Unfortunately, 'ar' doesn't like combining objects and libraries,
-# so we must identify all the objects from the subordinate libraries. Yuck!
-XPMSRC=../../contrib/wxxpm/objects$(GUISUFFIX)
-XPMOBJS=$(XPMSRC)/crbuffri.$(OBJSUFF) $(XPMSRC)/crbuffrp.$(OBJSUFF) $(XPMSRC)/crdatfri.$(OBJSUFF) $(XPMSRC)/crdatfrp.$(OBJSUFF)\
- $(XPMSRC)/create.$(OBJSUFF) $(XPMSRC)/crifrbuf.$(OBJSUFF) $(XPMSRC)/crifrdat.$(OBJSUFF) $(XPMSRC)/crpfrbuf.$(OBJSUFF) $(XPMSRC)/crpfrdat.$(OBJSUFF)\
- $(XPMSRC)/data.$(OBJSUFF) $(XPMSRC)/hashtab.$(OBJSUFF) $(XPMSRC)/misc.$(OBJSUFF) $(XPMSRC)/parse.$(OBJSUFF) $(XPMSRC)/rdftodat.$(OBJSUFF)\
- $(XPMSRC)/rdftoi.$(OBJSUFF) $(XPMSRC)/rdftop.$(OBJSUFF) $(XPMSRC)/rgb.$(OBJSUFF) $(XPMSRC)/scan.$(OBJSUFF) $(XPMSRC)/simx.$(OBJSUFF)\
- $(XPMSRC)/wrffrdat.$(OBJSUFF) $(XPMSRC)/wrffri.$(OBJSUFF) $(XPMSRC)/wrffrp.$(OBJSUFF)
-
# Subordinate library possibilities
EXTRAOBJS=
-GENDIR=../generic
-COMMDIR=../common
-XPMDIR=../xpm
-OLEDIR=ole
-MSWDIR=.
+GENDIR = $(WXDIR)/src/generic
+COMMDIR = $(WXDIR)/src/common
+XPMDIR = $(WXDIR)/src/xpm
+PNGDIR = $(WXDIR)/src/png
+JPEGDIR = $(WXDIR)/src/jpeg
+ZLIBDIR = $(WXDIR)/src/zlib
+OLEDIR = $(WXDIR)/src/msw/ole
+MSWDIR = $(WXDIR)/src/msw
DOCDIR = $(WXDIR)\docs
-GENERICOBJS= #$ ExpandList("WXGENERICOBJS");
+GENERICOBJS = \
+ #$ ExpandList("WXGENERICOBJS");
-COMMONOBJS = \
+COMMONOBJS = \
$(COMMDIR)/y_tab.$(OBJSUFF) \
#$ ExpandList("WXCOMMONOBJS");
-MSWOBJS = #$ ExpandList("WXMSWOBJS");
+MSWOBJS = \
+ #$ ExpandList("WXMSWOBJS");
+
+ZLIBOBJS = \
+ $(ZLIBDIR)/adler32.$(OBJSUFF) \
+ $(ZLIBDIR)/compress.$(OBJSUFF) \
+ $(ZLIBDIR)/crc32.$(OBJSUFF) \
+ $(ZLIBDIR)/gzio.$(OBJSUFF) \
+ $(ZLIBDIR)/uncompr.$(OBJSUFF) \
+ $(ZLIBDIR)/deflate.$(OBJSUFF) \
+ $(ZLIBDIR)/trees.$(OBJSUFF) \
+ $(ZLIBDIR)/zutil.$(OBJSUFF) \
+ $(ZLIBDIR)/inflate.$(OBJSUFF) \
+ $(ZLIBDIR)/infblock.$(OBJSUFF) \
+ $(ZLIBDIR)/inftrees.$(OBJSUFF) \
+ $(ZLIBDIR)/infcodes.$(OBJSUFF) \
+ $(ZLIBDIR)/infutil.$(OBJSUFF) \
+ $(ZLIBDIR)/inffast.$(OBJSUFF)
+
+PNGOBJS = \
+ $(PNGDIR)/png.$(OBJSUFF) \
+ $(PNGDIR)/pngread.$(OBJSUFF) \
+ $(PNGDIR)/pngrtran.$(OBJSUFF) \
+ $(PNGDIR)/pngrutil.$(OBJSUFF) \
+ $(PNGDIR)/pngpread.$(OBJSUFF) \
+ $(PNGDIR)/pngtrans.$(OBJSUFF) \
+ $(PNGDIR)/pngwrite.$(OBJSUFF) \
+ $(PNGDIR)/pngwtran.$(OBJSUFF) \
+ $(PNGDIR)/pngwutil.$(OBJSUFF) \
+ $(PNGDIR)/pngerror.$(OBJSUFF) \
+ $(PNGDIR)/pngmem.$(OBJSUFF) \
+ $(PNGDIR)/pngwio.$(OBJSUFF) \
+ $(PNGDIR)/pngrio.$(OBJSUFF) \
+ $(PNGDIR)/pngget.$(OBJSUFF) \
+ $(PNGDIR)/pngset.$(OBJSUFF)
+
+
+JPEGOBJS = \
+ $(JPEGDIR)/jcomapi.$(OBJSUFF) \
+ $(JPEGDIR)/jutils.$(OBJSUFF) \
+ $(JPEGDIR)/jerror.$(OBJSUFF) \
+ $(JPEGDIR)/jmemmgr.$(OBJSUFF) \
+ $(JPEGDIR)/jmemnobs.$(OBJSUFF) \
+ $(JPEGDIR)/jcapimin.$(OBJSUFF) \
+ $(JPEGDIR)/jcapistd.$(OBJSUFF) \
+ $(JPEGDIR)/jctrans.$(OBJSUFF) \
+ $(JPEGDIR)/jcparam.$(OBJSUFF) \
+ $(JPEGDIR)/jdatadst.$(OBJSUFF) \
+ $(JPEGDIR)/jcinit.$(OBJSUFF) \
+ $(JPEGDIR)/jcmaster.$(OBJSUFF) \
+ $(JPEGDIR)/jcmarker.$(OBJSUFF) \
+ $(JPEGDIR)/jcmainct.$(OBJSUFF) \
+ $(JPEGDIR)/jcprepct.$(OBJSUFF) \
+ $(JPEGDIR)/jccoefct.$(OBJSUFF) \
+ $(JPEGDIR)/jccolor.$(OBJSUFF) \
+ $(JPEGDIR)/jcsample.$(OBJSUFF) \
+ $(JPEGDIR)/jchuff.$(OBJSUFF) \
+ $(JPEGDIR)/jcphuff.$(OBJSUFF) \
+ $(JPEGDIR)/jcdctmgr.$(OBJSUFF) \
+ $(JPEGDIR)/jfdctfst.$(OBJSUFF) \
+ $(JPEGDIR)/jfdctflt.$(OBJSUFF) \
+ $(JPEGDIR)/jfdctint.$(OBJSUFF) \
+ $(JPEGDIR)/jdapimin.$(OBJSUFF) \
+ $(JPEGDIR)/jdapistd.$(OBJSUFF) \
+ $(JPEGDIR)/jdtrans.$(OBJSUFF) \
+ $(JPEGDIR)/jdatasrc.$(OBJSUFF) \
+ $(JPEGDIR)/jdmaster.$(OBJSUFF) \
+ $(JPEGDIR)/jdinput.$(OBJSUFF) \
+ $(JPEGDIR)/jdmarker.$(OBJSUFF) \
+ $(JPEGDIR)/jdhuff.$(OBJSUFF) \
+ $(JPEGDIR)/jdphuff.$(OBJSUFF) \
+ $(JPEGDIR)/jdmainct.$(OBJSUFF) \
+ $(JPEGDIR)/jdcoefct.$(OBJSUFF) \
+ $(JPEGDIR)/jdpostct.$(OBJSUFF) \
+ $(JPEGDIR)/jddctmgr.$(OBJSUFF) \
+ $(JPEGDIR)/jidctfst.$(OBJSUFF) \
+ $(JPEGDIR)/jidctflt.$(OBJSUFF) \
+ $(JPEGDIR)/jidctint.$(OBJSUFF) \
+ $(JPEGDIR)/jidctred.$(OBJSUFF) \
+ $(JPEGDIR)/jdsample.$(OBJSUFF) \
+ $(JPEGDIR)/jdcolor.$(OBJSUFF) \
+ $(JPEGDIR)/jquant1.$(OBJSUFF) \
+ $(JPEGDIR)/jquant2.$(OBJSUFF) \
+ $(JPEGDIR)/jdmerge.$(OBJSUFF)
XPMOBJECTS = $(XPMDIR)/crbuffri.o\
$(XPMDIR)/crdatfri.o\
$(XPMDIR)/simx.o $(XPMDIR)/wrffrdat.o\
$(XPMDIR)/wrffrp.o $(XPMDIR)/wrffri.o
-OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) # $(XPMOBJECTS)
+OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) \
+ $(JPEGOBJS) $(PNGOBJS) $(ZLIBOBJS) # $(XPMOBJECTS)
all: $(OBJECTS) $(WXLIB)
-base:
- cd $(WXDIR)/src/common; $(MAKE) -f makefile.g95 GUI=$(GUI) GUISUFFIX=$(GUISUFFIX) CC=$(CC)\
- OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' DEBUGFLAGS='$(DEBUGFLAGS)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)'
-
-
$(WXLIB): $(OBJECTS) $(EXTRAOBJS)
ar $(AROPTIONS) $@ $(EXTRAOBJS) $(OBJECTS)
$(RANLIB) $@
# $(YACC) $(COMMDIR)/parser.y
# mv y.tab.c $(COMMDIR)/y_tab.c
-# Extra targets
-rcparser:
- cd $(WXDIR)/utils/rcparser/src; $(MAKE) -f makefile.g95
- cd $(WXDIR)/src/msw
-
-clean_rcp:
- cd $(WXDIR)/utils/rcparser/src; $(MAKE) -f makefile.g95 clean
- cd $(WXDIR)/src/msw
-
clean:
-erase *.o
-erase core
-erase ..\common\lex_yy.c
-erase ..\common\*.o
-erase ..\generic\*.o
+ -erase ..\png\*.o
+ -erase ..\zlib\*.o
+ -erase ..\jpeg\*.o
-erase ..\..\lib\libwx$(GUISUFFIX).a
cleanall: clean
dc.DrawText( "This is text", 110, 10 );
- dc.DrawIcon( wxICON(mondrian), 110, 40 );
+ dc.SetFont( wxFont( 18, wxSWISS, 0, 0 ) );
+
+ dc.DrawText( "This is Swiss 18pt text.", 110, 40 );
+
+ long length;
+ long height;
+ long descent;
+ dc.GetTextExtent( "This is Swiss 18pt text.", &length, &height, &descent );
+ wxString text;
+ text.Printf( "Dimensions are length %ld, height %ld, descent %ld", length, height, descent );
+ dc.DrawText( text, 110, 80 );
+
+ dc.DrawRectangle( 100, 40, 4, height );
+
+ text.Printf( "CharHeight() returns: %d", dc.GetCharHeight() );
+ dc.DrawText( text, 110, 120 );
+
+
+ dc.DrawIcon( wxICON(mondrian), 310, 40 );
- DrawTestLines( 0, 20, 0, dc );
+ DrawTestLines( 0, 200, 0, dc );
- DrawTestLines( 0, 220, 1, dc );
+ DrawTestLines( 0, 400, 1, dc );
- DrawTestLines( 0, 420, 2, dc );
+ DrawTestLines( 0, 600, 2, dc );
- DrawTestLines( 0, 620, 6, dc );
+ DrawTestLines( 0, 800, 6, dc );
}
if (m_textBackgroundColour.Ok())
(void)SetBkColor(GetHdc(), old_background);
+ // background colour is used only for DrawText, otherwise
+ // always TRANSPARENT, RR
+ SetBkMode(GetHdc(), TRANSPARENT);
+
CalcBoundingBox(x, y);
long w, h;
{
m_backgroundMode = mode;
+ // SetBackgroundColour now only refers to text background
+ // and m_backgroundMode is used there
+
+/*
if (m_backgroundMode == wxTRANSPARENT)
::SetBkMode(GetHdc(), TRANSPARENT);
else
- ::SetBkMode(GetHdc(), OPAQUE);
+ ::SetBkMode(GetHdc(), OPAQUE);
+*/
}
void wxDC::SetLogicalFunction(int function)
m_canvas = the_canvas;
m_hDC = (WXHDC) ::GetDC(GetWinHwnd(the_canvas));
+ // the background mode is only used for text background
+ // and is set in DrawText() to OPAQUE as required, other-
+ // wise always TRANSPARENT, RR
+ ::SetBkMode( GetHdc(), TRANSPARENT );
+
SetBackground(wxBrush(m_canvas->GetBackgroundColour(), wxSOLID));
}
ms_cache.Add(new wxPaintDCInfo(m_canvas, this));
}
+ // the background mode is only used for text background
+ // and is set in DrawText() to OPAQUE as required, other-
+ // wise always TRANSPARENT, RR
+ ::SetBkMode( GetHdc(), TRANSPARENT );
+
SetBackground(wxBrush(m_canvas->GetBackgroundColour(), wxSOLID));
}
#include "wx/utils.h"
#endif
-#include "wx/dcmemory.h"
+#include "wx/msw/private.h"
-#include <windows.h>
-#include "wx/msw/winundef.h"
+#include "wx/dcmemory.h"
#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC)
SetBrush(*wxWHITE_BRUSH);
SetPen(*wxBLACK_PEN);
+
+ // the background mode is only used for text background
+ // and is set in DrawText() to OPAQUE as required, other-
+ // wise always TRANSPARENT, RR
+ ::SetBkMode( GetHdc(), TRANSPARENT );
+
}
wxMemoryDC::wxMemoryDC(wxDC *old_dc)
SetBrush(*wxWHITE_BRUSH);
SetPen(*wxBLACK_PEN);
+
+ // the background mode is only used for text background
+ // and is set in DrawText() to OPAQUE as required, other-
+ // wise always TRANSPARENT, RR
+ ::SetBkMode( GetHdc(), TRANSPARENT );
+
}
wxMemoryDC::~wxMemoryDC(void)
{
m_hDC = (WXHDC) ::GetDC((HWND) NULL);
m_hDCCount ++;
+
+ // the background mode is only used for text background
+ // and is set in DrawText() to OPAQUE as required, other-
+ // wise always TRANSPARENT, RR
+ ::SetBkMode( GetHdc(), TRANSPARENT );
}
wxScreenDC::~wxScreenDC(void)
-# This file was automatically generated by tmake at 17:20, 1999/07/21
+# This file was automatically generated by tmake at 17:53, 1999/07/23
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE G95.T!
#
-# File: makefile.unx
-# Author: Julian Smart
+# File: makefile.g95
+# Author: Julian Smart, Robert Roebling, Vadim Zeitlin
# Created: 1993
-# Updated:
-# Copyright:(c) 1993, AIAI, University of Edinburgh
-#
-# "@(#)makefile.unx 1.2 5/9/94"
+# Updated: 1999
+# Copyright:(c) 1993, AIAI, University of Edinburgh,
+# Copyright:(c) 1999, Vadim Zeitlin
+# Copyright:(c) 1999, Robert Roebling
#
# Makefile for libwx.a
# Replace this with your own path if necessary
WXDIR = ../..
-# All common UNIX compiler flags and options are now in
+# All common compiler flags and options are now in
# this central makefile.
include $(WXDIR)/src/makeg95.env
-# IMPORTANT: if you want to link in subsidiary libraries,
-# required for some optional parts of wxWindows, you must
-# set EXTRATARGETS and EXTRAOBJS to match the settings in wx_setup.h.
-# Having done this, you won't have to worry about linking them
-# into each application.
-#
-# Here's the full list.
-# prologio: Required if using the wxWindows resource facility
-# USE_WX_RESOURCES should be 1
-# xmgauge: Gauge class (required for Motif only)
-# USE_GAUGE should be 1
-# xpm: XPM pixmap support
-# USE_XPM_IN_X should be 1
-# wxstring: string class
-# USE_GNU_WXSTRING should be 1
-#
-# Unfortunately, 'ar' doesn't like combining objects and libraries,
-# so we must identify all the objects from the subordinate libraries. Yuck!
-XPMSRC=../../contrib/wxxpm/objects$(GUISUFFIX)
-XPMOBJS=$(XPMSRC)/crbuffri.$(OBJSUFF) $(XPMSRC)/crbuffrp.$(OBJSUFF) $(XPMSRC)/crdatfri.$(OBJSUFF) $(XPMSRC)/crdatfrp.$(OBJSUFF)\
- $(XPMSRC)/create.$(OBJSUFF) $(XPMSRC)/crifrbuf.$(OBJSUFF) $(XPMSRC)/crifrdat.$(OBJSUFF) $(XPMSRC)/crpfrbuf.$(OBJSUFF) $(XPMSRC)/crpfrdat.$(OBJSUFF)\
- $(XPMSRC)/data.$(OBJSUFF) $(XPMSRC)/hashtab.$(OBJSUFF) $(XPMSRC)/misc.$(OBJSUFF) $(XPMSRC)/parse.$(OBJSUFF) $(XPMSRC)/rdftodat.$(OBJSUFF)\
- $(XPMSRC)/rdftoi.$(OBJSUFF) $(XPMSRC)/rdftop.$(OBJSUFF) $(XPMSRC)/rgb.$(OBJSUFF) $(XPMSRC)/scan.$(OBJSUFF) $(XPMSRC)/simx.$(OBJSUFF)\
- $(XPMSRC)/wrffrdat.$(OBJSUFF) $(XPMSRC)/wrffri.$(OBJSUFF) $(XPMSRC)/wrffrp.$(OBJSUFF)
-
# Subordinate library possibilities
EXTRAOBJS=
-GENDIR=../generic
-COMMDIR=../common
-XPMDIR=../xpm
-OLEDIR=ole
-MSWDIR=.
+GENDIR = $(WXDIR)/src/generic
+COMMDIR = $(WXDIR)/src/common
+XPMDIR = $(WXDIR)/src/xpm
+PNGDIR = $(WXDIR)/src/png
+JPEGDIR = $(WXDIR)/src/jpeg
+ZLIBDIR = $(WXDIR)/src/zlib
+OLEDIR = $(WXDIR)/src/msw/ole
+MSWDIR = $(WXDIR)/src/msw
DOCDIR = $(WXDIR)\docs
-GENERICOBJS= $(GENDIR)/busyinfo.$(OBJSUFF) \
+GENERICOBJS = \
+ $(GENDIR)/busyinfo.$(OBJSUFF) \
$(GENDIR)/choicdgg.$(OBJSUFF) \
$(GENDIR)/dirdlgg.$(OBJSUFF) \
$(GENDIR)/extdlgg.$(OBJSUFF) \
$(GENDIR)/textdlgg.$(OBJSUFF) \
$(GENDIR)/tipdlg.$(OBJSUFF)
-COMMONOBJS = \
+COMMONOBJS = \
$(COMMDIR)/y_tab.$(OBJSUFF) \
$(COMMDIR)/cmndata.$(OBJSUFF) \
$(COMMDIR)/config.$(OBJSUFF) \
$(COMMDIR)/resource.$(OBJSUFF) \
$(COMMDIR)/sckaddr.$(OBJSUFF) \
$(COMMDIR)/sckfile.$(OBJSUFF) \
- $(COMMDIR)/sckint.$(OBJSUFF) \
$(COMMDIR)/sckipc.$(OBJSUFF) \
$(COMMDIR)/sckstrm.$(OBJSUFF) \
$(COMMDIR)/socket.$(OBJSUFF) \
$(COMMDIR)/zipstream.$(OBJSUFF) \
$(COMMDIR)/zstream.$(OBJSUFF)
-MSWOBJS = accel.$(OBJSUFF) \
+MSWOBJS = \
+ accel.$(OBJSUFF) \
app.$(OBJSUFF) \
bitmap.$(OBJSUFF) \
bmpbuttn.$(OBJSUFF) \
window.$(OBJSUFF) \
xpmhand.$(OBJSUFF)
+ZLIBOBJS = \
+ $(ZLIBDIR)/adler32.$(OBJSUFF) \
+ $(ZLIBDIR)/compress.$(OBJSUFF) \
+ $(ZLIBDIR)/crc32.$(OBJSUFF) \
+ $(ZLIBDIR)/gzio.$(OBJSUFF) \
+ $(ZLIBDIR)/uncompr.$(OBJSUFF) \
+ $(ZLIBDIR)/deflate.$(OBJSUFF) \
+ $(ZLIBDIR)/trees.$(OBJSUFF) \
+ $(ZLIBDIR)/zutil.$(OBJSUFF) \
+ $(ZLIBDIR)/inflate.$(OBJSUFF) \
+ $(ZLIBDIR)/infblock.$(OBJSUFF) \
+ $(ZLIBDIR)/inftrees.$(OBJSUFF) \
+ $(ZLIBDIR)/infcodes.$(OBJSUFF) \
+ $(ZLIBDIR)/infutil.$(OBJSUFF) \
+ $(ZLIBDIR)/inffast.$(OBJSUFF)
+
+PNGOBJS = \
+ $(PNGDIR)/png.$(OBJSUFF) \
+ $(PNGDIR)/pngread.$(OBJSUFF) \
+ $(PNGDIR)/pngrtran.$(OBJSUFF) \
+ $(PNGDIR)/pngrutil.$(OBJSUFF) \
+ $(PNGDIR)/pngpread.$(OBJSUFF) \
+ $(PNGDIR)/pngtrans.$(OBJSUFF) \
+ $(PNGDIR)/pngwrite.$(OBJSUFF) \
+ $(PNGDIR)/pngwtran.$(OBJSUFF) \
+ $(PNGDIR)/pngwutil.$(OBJSUFF) \
+ $(PNGDIR)/pngerror.$(OBJSUFF) \
+ $(PNGDIR)/pngmem.$(OBJSUFF) \
+ $(PNGDIR)/pngwio.$(OBJSUFF) \
+ $(PNGDIR)/pngrio.$(OBJSUFF) \
+ $(PNGDIR)/pngget.$(OBJSUFF) \
+ $(PNGDIR)/pngset.$(OBJSUFF)
+
+
+JPEGOBJS = \
+ $(JPEGDIR)/jcomapi.$(OBJSUFF) \
+ $(JPEGDIR)/jutils.$(OBJSUFF) \
+ $(JPEGDIR)/jerror.$(OBJSUFF) \
+ $(JPEGDIR)/jmemmgr.$(OBJSUFF) \
+ $(JPEGDIR)/jmemnobs.$(OBJSUFF) \
+ $(JPEGDIR)/jcapimin.$(OBJSUFF) \
+ $(JPEGDIR)/jcapistd.$(OBJSUFF) \
+ $(JPEGDIR)/jctrans.$(OBJSUFF) \
+ $(JPEGDIR)/jcparam.$(OBJSUFF) \
+ $(JPEGDIR)/jdatadst.$(OBJSUFF) \
+ $(JPEGDIR)/jcinit.$(OBJSUFF) \
+ $(JPEGDIR)/jcmaster.$(OBJSUFF) \
+ $(JPEGDIR)/jcmarker.$(OBJSUFF) \
+ $(JPEGDIR)/jcmainct.$(OBJSUFF) \
+ $(JPEGDIR)/jcprepct.$(OBJSUFF) \
+ $(JPEGDIR)/jccoefct.$(OBJSUFF) \
+ $(JPEGDIR)/jccolor.$(OBJSUFF) \
+ $(JPEGDIR)/jcsample.$(OBJSUFF) \
+ $(JPEGDIR)/jchuff.$(OBJSUFF) \
+ $(JPEGDIR)/jcphuff.$(OBJSUFF) \
+ $(JPEGDIR)/jcdctmgr.$(OBJSUFF) \
+ $(JPEGDIR)/jfdctfst.$(OBJSUFF) \
+ $(JPEGDIR)/jfdctflt.$(OBJSUFF) \
+ $(JPEGDIR)/jfdctint.$(OBJSUFF) \
+ $(JPEGDIR)/jdapimin.$(OBJSUFF) \
+ $(JPEGDIR)/jdapistd.$(OBJSUFF) \
+ $(JPEGDIR)/jdtrans.$(OBJSUFF) \
+ $(JPEGDIR)/jdatasrc.$(OBJSUFF) \
+ $(JPEGDIR)/jdmaster.$(OBJSUFF) \
+ $(JPEGDIR)/jdinput.$(OBJSUFF) \
+ $(JPEGDIR)/jdmarker.$(OBJSUFF) \
+ $(JPEGDIR)/jdhuff.$(OBJSUFF) \
+ $(JPEGDIR)/jdphuff.$(OBJSUFF) \
+ $(JPEGDIR)/jdmainct.$(OBJSUFF) \
+ $(JPEGDIR)/jdcoefct.$(OBJSUFF) \
+ $(JPEGDIR)/jdpostct.$(OBJSUFF) \
+ $(JPEGDIR)/jddctmgr.$(OBJSUFF) \
+ $(JPEGDIR)/jidctfst.$(OBJSUFF) \
+ $(JPEGDIR)/jidctflt.$(OBJSUFF) \
+ $(JPEGDIR)/jidctint.$(OBJSUFF) \
+ $(JPEGDIR)/jidctred.$(OBJSUFF) \
+ $(JPEGDIR)/jdsample.$(OBJSUFF) \
+ $(JPEGDIR)/jdcolor.$(OBJSUFF) \
+ $(JPEGDIR)/jquant1.$(OBJSUFF) \
+ $(JPEGDIR)/jquant2.$(OBJSUFF) \
+ $(JPEGDIR)/jdmerge.$(OBJSUFF)
+
XPMOBJECTS = $(XPMDIR)/crbuffri.o\
$(XPMDIR)/crdatfri.o\
$(XPMDIR)/create.o $(XPMDIR)/crifrbuf.o\
$(XPMDIR)/simx.o $(XPMDIR)/wrffrdat.o\
$(XPMDIR)/wrffrp.o $(XPMDIR)/wrffri.o
-OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) # $(XPMOBJECTS)
+OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) \
+ $(JPEGOBJS) $(PNGOBJS) $(ZLIBOBJS) # $(XPMOBJECTS)
all: $(OBJECTS) $(WXLIB)
-base:
- cd $(WXDIR)/src/common; $(MAKE) -f makefile.g95 GUI=$(GUI) GUISUFFIX=$(GUISUFFIX) CC=$(CC)\
- OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' DEBUGFLAGS='$(DEBUGFLAGS)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)'
-
-
$(WXLIB): $(OBJECTS) $(EXTRAOBJS)
ar $(AROPTIONS) $@ $(EXTRAOBJS) $(OBJECTS)
$(RANLIB) $@
# $(YACC) $(COMMDIR)/parser.y
# mv y.tab.c $(COMMDIR)/y_tab.c
-# Extra targets
-rcparser:
- cd $(WXDIR)/utils/rcparser/src; $(MAKE) -f makefile.g95
- cd $(WXDIR)/src/msw
-
-clean_rcp:
- cd $(WXDIR)/utils/rcparser/src; $(MAKE) -f makefile.g95 clean
- cd $(WXDIR)/src/msw
-
clean:
-erase *.o
-erase core
-erase ..\common\lex_yy.c
-erase ..\common\*.o
-erase ..\generic\*.o
+ -erase ..\png\*.o
+ -erase ..\zlib\*.o
+ -erase ..\jpeg\*.o
-erase ..\..\lib\libwx$(GUISUFFIX).a
cleanall: clean
wxPen::wxPen()
{
- if ( wxThePenList )
+ if (wxThePenList)
wxThePenList->AddPen(this);
}
wxPen::wxPen(const wxBitmap& stipple, int Width)
{
- m_refData = new wxPenRefData;
+ m_refData = new wxPenRefData;
// M_PENDATA->m_colour = col;
- M_PENDATA->m_stipple = stipple;
- M_PENDATA->m_width = Width;
- M_PENDATA->m_style = wxSTIPPLE;
- M_PENDATA->m_join = wxJOIN_ROUND ;
- M_PENDATA->m_cap = wxCAP_ROUND ;
- M_PENDATA->m_nbDash = 0 ;
- M_PENDATA->m_dash = 0 ;
- M_PENDATA->m_hPen = 0 ;
+ M_PENDATA->m_stipple = stipple;
+ M_PENDATA->m_width = Width;
+ M_PENDATA->m_style = wxSTIPPLE;
+ M_PENDATA->m_join = wxJOIN_ROUND ;
+ M_PENDATA->m_cap = wxCAP_ROUND ;
+ M_PENDATA->m_nbDash = 0 ;
+ M_PENDATA->m_dash = 0 ;
+ M_PENDATA->m_hPen = 0 ;
- RealizeResource();
+ RealizeResource();
- if ( wxThePenList )
- wxThePenList->AddPen(this);
+ if (wxThePenList)
+ wxThePenList->AddPen(this);
}
bool wxPen::RealizeResource()
{
- if (M_PENDATA && (M_PENDATA->m_hPen == 0))
- {
- if (M_PENDATA->m_style==wxTRANSPARENT)
- {
- M_PENDATA->m_hPen = (WXHPEN) ::GetStockObject(NULL_PEN);
- return TRUE;
- }
-
- COLORREF ms_colour = 0 ;
- ms_colour = M_PENDATA->m_colour.GetPixel() ;
-
- // Join style, Cap style, Pen Stippling only on Win32.
- // Currently no time to find equivalent on Win3.1, sorry
- // [if such equiv exist!!]
+ if (M_PENDATA && (M_PENDATA->m_hPen == 0))
+ {
+ if (M_PENDATA->m_style==wxTRANSPARENT)
+ {
+ M_PENDATA->m_hPen = (WXHPEN) ::GetStockObject(NULL_PEN);
+ return TRUE;
+ }
+
+ COLORREF ms_colour = 0;
+ ms_colour = M_PENDATA->m_colour.GetPixel();
+
+ // Join style, Cap style, Pen Stippling only on Win32.
+ // Currently no time to find equivalent on Win3.1, sorry
+ // [if such equiv exist!!]
#ifdef __WIN32__
- if (M_PENDATA->m_join==wxJOIN_ROUND &&
- M_PENDATA->m_cap==wxCAP_ROUND &&
- M_PENDATA->m_style!=wxUSER_DASH &&
- M_PENDATA->m_style!=wxSTIPPLE &&
- M_PENDATA->m_width <= 1
- )
- M_PENDATA->m_hPen = (WXHPEN) CreatePen(wx2msPenStyle(M_PENDATA->m_style), M_PENDATA->m_width, ms_colour);
- else
- {
- DWORD ms_style = PS_GEOMETRIC|wx2msPenStyle(M_PENDATA->m_style) ;
-
- LOGBRUSH logb ;
-
- switch(M_PENDATA->m_join)
- {
- case wxJOIN_BEVEL: ms_style |= PS_JOIN_BEVEL ; break ;
- case wxJOIN_MITER: ms_style |= PS_JOIN_MITER ; break ;
- default:
- case wxJOIN_ROUND: ms_style |= PS_JOIN_ROUND ; break ;
- }
-
- switch(M_PENDATA->m_cap)
- {
- case wxCAP_PROJECTING: ms_style |= PS_ENDCAP_SQUARE ; break ;
- case wxCAP_BUTT: ms_style |= PS_ENDCAP_FLAT ; break ;
- default:
- case wxCAP_ROUND: ms_style |= PS_ENDCAP_ROUND ; break ;
- }
-
- switch(M_PENDATA->m_style)
- {
- case wxSTIPPLE:
- logb.lbStyle = BS_PATTERN ;
- if (M_PENDATA->m_stipple.Ok())
- logb.lbHatch = (LONG)M_PENDATA->m_stipple.GetHBITMAP() ;
- else
- logb.lbHatch = (LONG)0 ;
- break ;
- case wxBDIAGONAL_HATCH:
- logb.lbStyle = BS_HATCHED ;
- logb.lbHatch = HS_BDIAGONAL ;
- break ;
- case wxCROSSDIAG_HATCH:
- logb.lbStyle = BS_HATCHED ;
- logb.lbHatch = HS_DIAGCROSS ;
- break ;
- case wxFDIAGONAL_HATCH:
- logb.lbStyle = BS_HATCHED ;
- logb.lbHatch = HS_FDIAGONAL ;
- break ;
- case wxCROSS_HATCH:
- logb.lbStyle = BS_HATCHED ;
- logb.lbHatch = HS_CROSS ;
- break ;
- case wxHORIZONTAL_HATCH:
- logb.lbStyle = BS_HATCHED ;
- logb.lbHatch = HS_HORIZONTAL ;
- break ;
- case wxVERTICAL_HATCH:
- logb.lbStyle = BS_HATCHED ;
- logb.lbHatch = HS_VERTICAL ;
- break ;
- default:
- logb.lbStyle = BS_SOLID ;
- // this should be unnecessary (it's unused) but suppresses the Purigy
- // messages about uninitialized memory read
+ if (M_PENDATA->m_join==wxJOIN_ROUND &&
+ M_PENDATA->m_cap==wxCAP_ROUND &&
+ M_PENDATA->m_style!=wxUSER_DASH &&
+ M_PENDATA->m_style!=wxSTIPPLE &&
+ M_PENDATA->m_width <= 1)
+ {
+ M_PENDATA->m_hPen =
+ (WXHPEN) CreatePen( wx2msPenStyle(M_PENDATA->m_style),
+ M_PENDATA->m_width,
+ ms_colour );
+ }
+ else
+ {
+ DWORD ms_style = PS_GEOMETRIC | wx2msPenStyle(M_PENDATA->m_style);
+
+ switch(M_PENDATA->m_join)
+ {
+ case wxJOIN_BEVEL: ms_style |= PS_JOIN_BEVEL; break;
+ case wxJOIN_MITER: ms_style |= PS_JOIN_MITER; break;
+ default:
+ case wxJOIN_ROUND: ms_style |= PS_JOIN_ROUND; break;
+ }
+
+ switch(M_PENDATA->m_cap)
+ {
+ case wxCAP_PROJECTING: ms_style |= PS_ENDCAP_SQUARE; break;
+ case wxCAP_BUTT: ms_style |= PS_ENDCAP_FLAT; break;
+ default:
+ case wxCAP_ROUND: ms_style |= PS_ENDCAP_ROUND; break;
+ }
+
+ LOGBRUSH logb;
+
+ switch(M_PENDATA->m_style)
+ {
+ case wxSTIPPLE:
+ logb.lbStyle = BS_PATTERN ;
+ if (M_PENDATA->m_stipple.Ok())
+ logb.lbHatch = (LONG)M_PENDATA->m_stipple.GetHBITMAP();
+ else
+ logb.lbHatch = (LONG)0;
+ break;
+ case wxBDIAGONAL_HATCH:
+ logb.lbStyle = BS_HATCHED;
+ logb.lbHatch = HS_BDIAGONAL;
+ break;
+ case wxCROSSDIAG_HATCH:
+ logb.lbStyle = BS_HATCHED;
+ logb.lbHatch = HS_DIAGCROSS;
+ break;
+ case wxFDIAGONAL_HATCH:
+ logb.lbStyle = BS_HATCHED;
+ logb.lbHatch = HS_FDIAGONAL;
+ break;
+ case wxCROSS_HATCH:
+ logb.lbStyle = BS_HATCHED;
+ logb.lbHatch = HS_CROSS;
+ break;
+ case wxHORIZONTAL_HATCH:
+ logb.lbStyle = BS_HATCHED;
+ logb.lbHatch = HS_HORIZONTAL;
+ break;
+ case wxVERTICAL_HATCH:
+ logb.lbStyle = BS_HATCHED;
+ logb.lbHatch = HS_VERTICAL;
+ break;
+ default:
+ logb.lbStyle = BS_SOLID;
#ifdef __WXDEBUG__
- logb.lbHatch = 0;
+ // this should be unnecessary (it's unused) but suppresses the Purigy
+ // messages about uninitialized memory read
+ logb.lbHatch = 0;
#endif
- break ;
- }
- logb.lbColor = ms_colour ;
- wxDash *real_dash ;
- if (M_PENDATA->m_style==wxUSER_DASH && M_PENDATA->m_nbDash && M_PENDATA->m_dash)
- {
- wxBell();
- real_dash = new wxDash[M_PENDATA->m_nbDash] ;
- int i;
- for (i=0;i<M_PENDATA->m_nbDash;i++)
- real_dash[i] = M_PENDATA->m_dash[i] * M_PENDATA->m_width ;
- }
- else
- real_dash = 0 ;
-
- // Win32s doesn't have ExtCreatePen function...
- if (wxGetOsVersion()==wxWINDOWS_NT || wxGetOsVersion()==wxWIN95)
- M_PENDATA->m_hPen = (WXHPEN) ExtCreatePen(ms_style,M_PENDATA->m_width,&logb,
- M_PENDATA->m_style==wxUSER_DASH ? M_PENDATA->m_nbDash:0, (const DWORD *)real_dash);
- else
- M_PENDATA->m_hPen = (WXHPEN) CreatePen(wx2msPenStyle(M_PENDATA->m_style), M_PENDATA->m_width, ms_colour);
-
- if (real_dash)
- delete [] real_dash ;
- }
+ break;
+ }
+
+ logb.lbColor = ms_colour;
+
+ wxDash *real_dash;
+ if (M_PENDATA->m_style==wxUSER_DASH && M_PENDATA->m_nbDash && M_PENDATA->m_dash)
+ {
+ real_dash = new wxDash[M_PENDATA->m_nbDash];
+ int i;
+ for (i=0; i<M_PENDATA->m_nbDash; i++)
+ real_dash[i] = M_PENDATA->m_dash[i] * M_PENDATA->m_width;
+ }
+ else
+ {
+ real_dash = 0;
+ }
+
+ // Win32s doesn't have ExtCreatePen function...
+ if (wxGetOsVersion()==wxWINDOWS_NT || wxGetOsVersion()==wxWIN95)
+ {
+ M_PENDATA->m_hPen =
+ (WXHPEN) ExtCreatePen( ms_style,
+ M_PENDATA->m_width,
+ &logb,
+ M_PENDATA->m_style==wxUSER_DASH
+ ? M_PENDATA->m_nbDash
+ : 0,
+ (const DWORD*)real_dash );
+ }
+ else
+ {
+ M_PENDATA->m_hPen =
+ (WXHPEN) CreatePen( wx2msPenStyle(M_PENDATA->m_style),
+ M_PENDATA->m_width,
+ ms_colour );
+ }
+
+ if (real_dash)
+ delete [] real_dash;
+ }
#else
- M_PENDATA->m_hPen = (WXHPEN) CreatePen(wx2msPenStyle(M_PENDATA->m_style), M_PENDATA->m_width, ms_colour);
+ M_PENDATA->m_hPen =
+ (WXHPEN) CreatePen( wx2msPenStyle(M_PENDATA->m_style),
+ M_PENDATA->m_width,
+ ms_colour );
#endif
#ifdef WXDEBUG_CREATE
- if (M_PENDATA->m_hPen==0)
- wxError("Cannot create pen","Internal error") ;
+ if (M_PENDATA->m_hPen==0)
+ wxError("Cannot create pen","Internal error") ;
#endif
- return TRUE;
- }
- return FALSE;
+ return TRUE;
+ }
+ return FALSE;
}
WXHANDLE wxPen::GetResourceHandle()
int wx2msPenStyle(int wx_style)
{
- int cstyle;
-/***
+ int cstyle;
+ switch (wx_style)
+ {
+ case wxDOT:
+ cstyle = PS_DOT;
+ break;
+
+ case wxDOT_DASH:
+ cstyle = PS_DASHDOT;
+ break;
+
+ case wxSHORT_DASH:
+ case wxLONG_DASH:
+ cstyle = PS_DASH;
+ break;
+
+ case wxTRANSPARENT:
+ cstyle = PS_NULL;
+ break;
+
+ case wxUSER_DASH:
#ifdef __WIN32__
- DWORD vers = GetVersion() ;
- WORD high = HIWORD(vers) ; // high bit=0 for NT, 1 for Win32s
-#endif
-***/
- switch (wx_style)
- {
- case wxDOT:
- cstyle = PS_DOT;
- break;
- case wxSHORT_DASH:
- case wxLONG_DASH:
- cstyle = PS_DASH;
- break;
- case wxTRANSPARENT:
- cstyle = PS_NULL;
- break;
- case wxUSER_DASH:
- // User dash style not supported on Win3.1, sorry...
-#ifdef __WIN32__
- // Win32s doesn't have PS_USERSTYLE
-/***
- if ((high&0x8000)==0)
-***/
- if (wxGetOsVersion()==wxWINDOWS_NT)
- cstyle = PS_USERSTYLE ;
- else
- cstyle = PS_DOT ; // We must make a choice... This is mine!
+ // Win32s doesn't have PS_USERSTYLE
+ if (wxGetOsVersion()==wxWINDOWS_NT || wxGetOsVersion()==wxWIN95)
+ cstyle = PS_USERSTYLE;
+ else
+ cstyle = PS_DOT; // We must make a choice... This is mine!
#else
- cstyle = PS_DASH ;
+ cstyle = PS_DASH;
#endif
- break ;
- case wxSOLID:
- default:
- cstyle = PS_SOLID;
- break;
- }
- return cstyle;
+ break;
+ case wxSOLID:
+ default:
+ cstyle = PS_SOLID;
+ break;
+ }
+ return cstyle;
}