]> git.saurik.com Git - wxWidgets.git/commitdiff
wxPaintDC -> wxDC in wxListCtrl; fixed compile problems in wxTreeCtrl (return
authorJulian Smart <julian@anthemion.co.uk>
Sun, 20 Dec 1998 23:49:21 +0000 (23:49 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 20 Dec 1998 23:49:21 +0000 (23:49 +0000)
types in wxCHECK_MSG); compiles again for 16-bit Windows, though dialogs don't work;
added generic notebook implementation (copied from wxMotif); fixed event handler
arg in wxDirDialog; added preliminary wxImage reference; removed some constructors from documentation; fixed wxIniConfig compilation

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

75 files changed:
distrib/msw/msw.rsp
docs/latex/wx/bitmap.tex
docs/latex/wx/brush.tex
docs/latex/wx/category.tex
docs/latex/wx/classes.tex
docs/latex/wx/colour.tex
docs/latex/wx/cursor.tex
docs/latex/wx/icon.tex
docs/latex/wx/image.tex [new file with mode: 0644]
docs/latex/wx/palette.tex
docs/latex/wx/pen.tex
docs/msw/install.txt
docs/msw/issues.txt
include/wx/defs.h
include/wx/dirdlg.h
include/wx/generic/dirdlgg.h
include/wx/generic/listctrl.h
include/wx/generic/notebook.h [new file with mode: 0644]
include/wx/imaglist.h
include/wx/listctrl.h
include/wx/msw/iniconf.h
include/wx/msw/private.h
include/wx/msw/window.h
include/wx/notebook.h
include/wx/treectrl.h
samples/checklst/makefile.dos
samples/config/makefile.dos [new file with mode: 0644]
samples/controls/makefile.dos
samples/db/makefile.dos [new file with mode: 0644]
samples/dialogs/makefile.dos
samples/dnd/makefile.dos
samples/docview/makefile.dos
samples/docvwmdi/makefile.dos
samples/dynamic/makefile.dos
samples/forty/canvas.cpp
samples/forty/forty.cpp
samples/forty/forty.def [new file with mode: 0644]
samples/forty/makefile.dos [new file with mode: 0644]
samples/grid/makefile.dos
samples/image/makefile.dos [new file with mode: 0644]
samples/internat/makefile.dos
samples/joytest/makefile.dos
samples/layout/makefile.dos
samples/listctrl/makefile.dos
samples/mdi/makefile.dos
samples/memcheck/makefile.dos
samples/minifram/makefile.dos
samples/minimal/makefile.dos
samples/nativdlg/makefile.dos
samples/notebook/makefile.dos
samples/notebook/test.def
samples/ownerdrw/makefile.dos
samples/tab/makefile.dos
samples/toolbar/makefile.dos
samples/treectrl/makefile.dos
samples/treectrl/treetest.def
samples/typetest/makefile.dos
samples/validate/makefile.dos
samples/wxpoem/makefile.dos [new file with mode: 0644]
src/common/config.cpp
src/generic/dirdlgg.cpp
src/generic/imaglist.cpp
src/generic/listctrl.cpp
src/generic/notebook.cpp [new file with mode: 0644]
src/generic/treectrl.cpp
src/makemsc.env
src/makeprog.msc [new file with mode: 0644]
src/msw/accel.cpp
src/msw/app.cpp
src/msw/dc.cpp
src/msw/frame.cpp
src/msw/iniconf.cpp
src/msw/makefile.dos
src/msw/tbarmsw.cpp
src/msw/utils.cpp

index cd00058ea5b5027345eb56d7a09ae9dbb857346b..8227e1cfeaa24bc0aea21ba88e287e885511ecc5 100644 (file)
@@ -11,6 +11,7 @@ tools/gettext/msgunfmt.exe
 src/makeb32.env
 src/makebcc.env
 src/makemsw.env
+src/makeprog.msw
 src/makewat.env
 src/makeprog.wat
 src/makesc.env
index f18676eb781f854384cb063c7b95aee8a01ad551..f847a82bf030eb809bc021d3f97776bf9576b732 100644 (file)
@@ -24,9 +24,7 @@ Default constructor.
 
 \func{}{wxBitmap}{\param{const wxBitmap\& }{bitmap}}
 
-\func{}{wxBitmap}{\param{const wxBitmap* }{bitmap}}
-
-Copy constructors.
+Copy constructor.
 
 \func{}{wxBitmap}{\param{void*}{ data}, \param{int}{ type}, \param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}}
 
@@ -61,7 +59,7 @@ Loads a bitmap from a file or resource.
 screen is used.}
 
 \docparam{name}{This can refer to a resource name under MS Windows, or a filename under MS Windows and X.
-Its meaning is determined by the {\it flags} parameter.}
+Its meaning is determined by the {\it type} parameter.}
 
 \docparam{type}{May be one of the following:
 
@@ -259,7 +257,7 @@ or set for the bitmap.
 
 \constfunc{wxMask*}{GetMask}{\void}
 
-Gets the associated mask if any) which may have been loaded from a file
+Gets the associated mask (if any) which may have been loaded from a file
 or set for the bitmap.
 
 \wxheading{See also}
index d707dcf87544789f70a082edc7eedcd0d02bacbd..5e75dc8cfd622fd0ed84745f9d8ea911def51bcd 100644 (file)
@@ -63,10 +63,6 @@ Constructs a stippled brush using a bitmap.
 
 Copy constructor. This uses reference counting so is a cheap operation.
 
-\func{}{wxBrush}{\param{const wxBrush*}{ brush}}
-
-Copy constructor. This uses reference counting so is a cheap operation.
-
 \wxheading{Parameters}
 
 \docparam{colour}{Colour object.}
index 0caaa8e29c75de87494080739a971ed1ab1c1ea4..f9b77862663599feaf37e627d567bafdc4da2347 100644 (file)
@@ -143,6 +143,7 @@ These classes are related to drawing on device contexts and windows.
 \twocolitem{\helpref{wxFont}{wxfont}}{Represents fonts}
 \twocolitem{\helpref{wxFontList}{wxfontlist}}{The list of previously-created fonts}
 \twocolitem{\helpref{wxIcon}{wxicon}}{A small, transparent bitmap for assigning to frames and drawing on device contexts}
+\twocolitem{\helpref{wxImage}{wximage}}{A platform-independent image class.}
 \twocolitem{\helpref{wxImageList}{wximagelist}}{A list of images, used with some controls}
 \twocolitem{\helpref{wxMask}{wxmask}}{Represents a mask to be used with a bitmap for transparent drawing}
 \twocolitem{\helpref{wxPen}{wxpen}}{Used for drawing lines on a device context}
index 3c434bb4de0e2f61beb6a20bd70156e309df8273..b6a2d2d4cf9d4e9717888ae9ebadc5827aecd41f 100644 (file)
@@ -90,6 +90,7 @@ $$\image{14cm;0cm}{wxclass.ps}$$
 \input helpinst.tex
 \input idleevt.tex
 \input icon.tex
+\input image.tex
 \input imaglist.tex
 \input ilayout.tex
 \input indlgevt.tex
index 3ad00632dbb4028d59081b670a87fd7f18c50dee..48690ef40e8e07693a1b690c5f356b959a6a9224 100644 (file)
@@ -33,6 +33,10 @@ Constructs a colour from red, green and blue values.
 Constructs a colour object using a colour name
 listed in {\bf wxTheColourDatabase}.
 
+\func{}{wxColour}{\param{const wxColour\&}{ colour}}
+
+Copy constructor.
+
 \wxheading{Parameters}
 
 \docparam{red}{The red value.}
@@ -43,6 +47,8 @@ listed in {\bf wxTheColourDatabase}.
 
 \docparam{colourName}{The colour name.}
 
+\docparam{colour}{The colour to copy.}
+
 \wxheading{See also}
 
 \helpref{wxColourDatabase}{wxcolourdatabase}
index ebe20a980308aa76c5f863368126c55b80b7ea0b..7d67eb607865c16e3f017dc17577f82d7184dca8 100644 (file)
@@ -55,10 +55,6 @@ Constructs a cursor using a cursor identifier.
 
 Copy constructor. This uses reference counting so is a cheap operation.
 
-\func{}{wxCursor}{\param{const wxCursor*}{ cursor}}
-
-Copy constructor. This uses reference counting so is a cheap operation.
-
 \wxheading{Parameters}
 
 \docparam{bits}{An array of bits.}
index 3e1df35864890bca803fe7ab868e45a2c89fd96c..87193b04c6c867e124cbea8f0acf3e3b3f4c3e78 100644 (file)
@@ -57,9 +57,7 @@ Default constructor.
 
 \func{}{wxIcon}{\param{const wxIcon\& }{icon}}
 
-\func{}{wxIcon}{\param{const wxIcon* }{icon}}
-
-Copy constructors.
+Copy constructor.
 
 \func{}{wxIcon}{\param{void*}{ data}, \param{int}{ type}, \param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}}
 
diff --git a/docs/latex/wx/image.tex b/docs/latex/wx/image.tex
new file mode 100644 (file)
index 0000000..6eac4c0
--- /dev/null
@@ -0,0 +1,547 @@
+\section{\class{wxImage}}\label{wximage}
+
+This class encapsulates a platform-independent image. An image can be created
+from data, or using the constructor taking a wxBitmap object. An image
+can be loaded from a file in a variety of formats, and is extensible to new formats
+via image format handlers. Functions are available to set and get image bits, so
+it can be used for basic image manipulation.
+
+A wxImage cannot (currently) be drawn directly to a wxDC. Instead, a platform-specific
+wxBitmap object must be created from it, and that bitmap drawn on the wxDC.
+
+\wxheading{Derived from}
+
+\helpref{wxObject}{wxobject}
+
+\wxheading{See also}
+
+\helpref{wxBitmap}{wxbitmap}
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxImage::wxImage}\label{wximageconstr}
+
+\func{}{wxImage}{\void}
+
+Default constructor.
+
+\func{}{wxImage}{\param{const wxImage\& }{image}}
+
+Copy constructor.
+
+\func{}{wxImage}{\param{const wxBitmap\&}{ bitmap}}
+
+Constructs an image from a platform-dependent bitmap.
+
+\func{}{wxImage}{\param{int}{ width}, \param{int}{ height}}
+
+Creates an image with the given width and height.
+
+\func{}{wxImage}{\param{const wxString\& }{name}, \param{long}{ type = wxBITMAP\_TYPE\_PNG}}
+
+Loads an image from a file.
+
+\wxheading{Parameters}
+
+\docparam{width}{Specifies the width of the image.}
+
+\docparam{height}{Specifies the height of the image.}
+
+\docparam{name}{This refers to an image filename. Its meaning is determined by the {\it type} parameter.}
+
+\docparam{type}{May be one of the following:
+
+\twocolwidtha{5cm}
+\begin{twocollist}
+\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_BMP}}}{Load a Windows bitmap file.}
+\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_GIF}}}{Load a GIF bitmap file.}
+\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_XBM}}}{Load an X bitmap file.}
+\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_XPM}}}{Load an XPM bitmap file.}
+\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_PNG}}}{Load a PNG bitmap file.}
+\end{twocollist}
+
+The validity of these flags depends on the platform and wxWindows configuration.
+If all possible wxWindows settings are used, the Windows platform supports BMP, BMP\_RESOURCE,
+XPM\_DATA, and XPM. Under X, the available formats are BMP, GIF, XBM, and XPM.}
+
+\wxheading{See also}
+
+\helpref{wxImage::LoadFile}{wximageloadfile}
+
+\membersection{wxImage::\destruct{wxImage}}
+
+\func{}{\destruct{wxImage}}{\void}
+
+Destructor.
+
+\membersection{wxImage::AddHandler}\label{wximageaddhandler}
+
+\func{static void}{AddHandler}{\param{wxImageHandler*}{ handler}}
+
+Adds a handler to the end of the static list of format handlers.
+
+\docparam{handler}{A new image format handler object. There is usually only one instance
+of a given handler class in an application session.}
+
+\wxheading{See also}
+
+\helpref{wxImageHandler}{wximagehandler}
+
+\membersection{wxImage::CleanUpHandlers}
+
+\func{static void}{CleanUpHandlers}{\void}
+
+Deletes all image handlers.
+
+This function is called by wxWindows on exit.
+
+\membersection{wxImage::ConvertToBitmap}\label{wximageconverttobitmap}
+
+\constfunc{wxBitmap}{ConvertToBitmap}{\void}
+
+Converts the image to a platform-specific bitmap object.
+
+\membersection{wxImage::Create}\label{wximagecreate}
+
+\func{bool}{Create}{\param{int}{ width}, \param{int}{ height}}
+
+Creates a fresh image.
+
+\wxheading{Parameters}
+
+\docparam{width}{The width of the image in pixels.}
+
+\docparam{height}{The height of the image in pixels.}
+
+\wxheading{Return value}
+
+TRUE if the call succeeded, FALSE otherwise.
+
+\membersection{wxImage::Destroy}\label{wximagedestroy}
+
+\func{bool}{Destroy}{\void}
+
+Destroys the image data.
+
+\membersection{wxImage::FindHandler}
+
+\func{static wxImageHandler*}{FindHandler}{\param{const wxString\& }{name}}
+
+Finds the handler with the given name.
+
+\func{static wxImageHandler*}{FindHandler}{\param{const wxString\& }{extension}, \param{long}{ imageType}}
+
+Finds the handler associated with the given extension and type.
+
+\func{static wxImageHandler*}{FindHandler}{\param{long }{imageType}}
+
+Finds the handler associated with the given image type.
+
+\docparam{name}{The handler name.}
+
+\docparam{extension}{The file extension, such as ``bmp".}
+
+\docparam{imageType}{The image type, such as wxBITMAP\_TYPE\_BMP.}
+
+\wxheading{Return value}
+
+A pointer to the handler if found, NULL otherwise.
+
+\wxheading{See also}
+
+\helpref{wxImageHandler}{wximagehandler}
+
+\membersection{wxImage::GetBlue}\label{wximagegetblue}
+
+\constfunc{unsigned char}{GetBlue}{\param{int}{ x}, \param{int}{ y}}
+
+Returns the blue intensity at the given coordinate.
+
+\membersection{wxImage::GetData}\label{wximagegetdata}
+
+\constfunc{unsigned char*}{GetData}{\void}
+
+Returns the image data as an array.
+
+\membersection{wxImage::GetGreen}\label{wximagegetgreen}
+
+\constfunc{unsigned char}{GetGreen}{\param{int}{ x}, \param{int}{ y}}
+
+Returns the green intensity at the given coordinate.
+
+\membersection{wxImage::GetRed}\label{wximagegetred}
+
+\constfunc{unsigned char}{GetRed}{\param{int}{ x}, \param{int}{ y}}
+
+Returns the red intensity at the given coordinate.
+
+\membersection{wxImage::GetHandlers}
+
+\func{static wxList\&}{GetHandlers}{\void}
+
+Returns the static list of image format handlers.
+
+\wxheading{See also}
+
+\helpref{wxImageHandler}{wximagehandler}
+
+\membersection{wxImage::GetHeight}\label{wximagegetheight}
+
+\constfunc{int}{GetHeight}{\void}
+
+Gets the height of the image in pixels.
+
+\membersection{wxImage::GetMaskBlue}\label{wximagegetmaskblue}
+
+\constfunc{unsigned char}{GetMaskBlue}{\void}
+
+Gets the blue value of the mask colour.
+
+\membersection{wxImage::GetMaskGreen}\label{wximagegetmaskgreen}
+
+\constfunc{unsigned char}{GetMaskGreen}{\void}
+
+Gets the green value of the mask colour.
+
+\membersection{wxImage::GetMaskRed}\label{wximagegetmaskred}
+
+\constfunc{unsigned char}{GetMaskRed}{\void}
+
+Gets the red value of the mask colour.
+
+\membersection{wxImage::GetWidth}\label{wximagegetwidth}
+
+\constfunc{int}{GetWidth}{\void}
+
+Gets the width of the image in pixels.
+
+\wxheading{See also}
+
+\helpref{wxImage::GetHeight}{wximagegetheight}
+
+\membersection{wxImage::HasMask}\label{wximagehasmask}
+
+\constfunc{bool}{HasMask}{\void}
+
+Returns TRUE if there is a mask active, FALSE otherwise.
+
+\membersection{wxImage::InitStandardHandlers}
+
+\func{static void}{InitStandardHandlers}{\void}
+
+Adds the standard image format handlers, which, depending on wxWindows
+configuration, can be handlers for Windows image, Windows image resource, and XPM.
+
+This function is called by wxWindows on startup.
+
+\wxheading{See also}
+
+\helpref{wxImageHandler}{wximagehandler}
+
+\membersection{wxImage::InsertHandler}
+
+\func{static void}{InsertHandler}{\param{wxImageHandler*}{ handler}}
+
+Adds a handler at the start of the static list of format handlers.
+
+\docparam{handler}{A new image format handler object. There is usually only one instance
+of a given handler class in an application session.}
+
+\wxheading{See also}
+
+\helpref{wxImageHandler}{wximagehandler}
+
+\membersection{wxImage::LoadFile}\label{wximageloadfile}
+
+\func{bool}{LoadFile}{\param{const wxString\&}{ name}, \param{long}{ type}}
+
+Loads an image from a file.
+
+\wxheading{Parameters}
+
+\docparam{name}{A filename.
+The meaning of {\it name} is determined by the {\it type} parameter.}
+
+\docparam{type}{One of the following values:
+
+\twocolwidtha{5cm}
+\begin{twocollist}
+\twocolitem{{\bf wxBITMAP\_TYPE\_BMP}}{Load a Windows image file.}
+\twocolitem{{\bf wxBITMAP\_TYPE\_GIF}}{Load a GIF image file.}
+\twocolitem{{\bf wxBITMAP\_TYPE\_XBM}}{Load an X image file.}
+\twocolitem{{\bf wxBITMAP\_TYPE\_XPM}}{Load an XPM image file.}
+\twocolitem{{\bf wxBITMAP\_TYPE\_PNG}}{Load a PNG image file.}
+\end{twocollist}
+
+The validity of these flags depends on the platform and wxWindows configuration.}
+
+\wxheading{Return value}
+
+TRUE if the operation succeeded, FALSE otherwise.
+
+\wxheading{See also}
+
+\helpref{wxImage::SaveFile}{wximagesavefile}
+
+\membersection{wxImage::Ok}\label{wximageok}
+
+\constfunc{bool}{Ok}{\void}
+
+Returns TRUE if image data is present.
+
+\membersection{wxImage::RemoveHandler}
+
+\func{static bool}{RemoveHandler}{\param{const wxString\& }{name}}
+
+Finds the handler with the given name, and removes it. The handler
+is not deleted.
+
+\docparam{name}{The handler name.}
+
+\wxheading{Return value}
+
+TRUE if the handler was found and removed, FALSE otherwise.
+
+\wxheading{See also}
+
+\helpref{wxImageHandler}{wximagehandler}
+
+\membersection{wxImage::SaveFile}\label{wximagesavefile}
+
+\func{bool}{SaveFile}{\param{const wxString\& }{name}, \param{int}{ type}}
+
+Saves a image in the named file.
+
+\wxheading{Parameters}
+
+\docparam{name}{A filename. The meaning of {\it name} is determined by the {\it type} parameter.}
+
+\docparam{type}{One of the following values:
+
+\twocolwidtha{5cm}
+\begin{twocollist}
+\twocolitem{{\bf wxBITMAP\_TYPE\_BMP}}{Save a Windows image file.}
+\twocolitem{{\bf wxBITMAP\_TYPE\_GIF}}{Save a GIF image file.}
+\twocolitem{{\bf wxBITMAP\_TYPE\_XBM}}{Save an X image file.}
+\twocolitem{{\bf wxBITMAP\_TYPE\_XPM}}{Save an XPM image file.}
+\twocolitem{{\bf wxBITMAP\_TYPE\_PNG}}{Save a PNG image file.}
+\end{twocollist}
+
+The validity of these flags depends on the platform and wxWindows configuration.}
+
+\wxheading{Return value}
+
+TRUE if the operation succeeded, FALSE otherwise.
+
+\wxheading{Remarks}
+
+Depending on how wxWindows has been configured, not all formats may be available.
+
+\wxheading{See also}
+
+\helpref{wxImage::LoadFile}{wximageloadfile}
+
+\membersection{wxImage::Scale}\label{wximagescale}
+
+\func{wxImage}{Scale}{\param{int}{ width}, \param{int}{ height}}
+
+Returns a scaled version of the image.
+
+\membersection{wxImage::SetData}\label{wximagesetdata}
+
+\func{void}{SetData}{\param{unsigned char*}{data}}
+
+Sets the image data.
+
+\membersection{wxImage::SetMask}\label{wximagesetmask}
+
+\func{void}{SetMask}{\param{bool}{ hasMask = TRUE}}
+
+Specifies whether there is a mask or not. The area of the mask is determined by the current mask colour.
+
+\membersection{wxImage::SetMaskColour}\label{wximagesetmaskcolour}
+
+\func{void}{SetMaskColour}{\param{unsigned char }{red}, \param{unsigned char }{blue}, \param{unsigned char }{green}}
+
+Sets the mask colour for this image.
+
+\membersection{wxImage::SetRGB}\label{wximagesetrgb}
+
+\func{void}{SetRGB}{\param{int }{x}, \param{int }{y}, \param{unsigned char }{red}, \param{unsigned char }{blue}, \param{unsigned char }{green}}
+
+Sets the pixel at the given coordinate.
+
+\membersection{wxImage::operator $=$}
+
+\func{wxImage\& }{operator $=$}{\param{const wxImage\& }{image}}
+
+Assignment operator. This operator does not copy any data, but instead
+passes a pointer to the data in {\it image} and increments a reference
+counter. It is a fast operation.
+
+\wxheading{Parameters}
+
+\docparam{image}{Image to assign.}
+
+\wxheading{Return value}
+
+Returns 'this' object.
+
+\membersection{wxImage::operator $==$}
+
+\func{bool}{operator $==$}{\param{const wxImage\& }{image}}
+
+Equality operator. This operator tests whether the internal data pointers are
+equal (a fast test).
+
+\wxheading{Parameters}
+
+\docparam{image}{Image to compare with 'this'}
+
+\wxheading{Return value}
+
+Returns TRUE if the images were effectively equal, FALSE otherwise.
+
+\membersection{wxImage::operator $!=$}
+
+\func{bool}{operator $!=$}{\param{const wxImage\& }{image}}
+
+Inequality operator. This operator tests whether the internal data pointers are
+unequal (a fast test).
+
+\wxheading{Parameters}
+
+\docparam{image}{Image to compare with 'this'}
+
+\wxheading{Return value}
+
+Returns TRUE if the images were unequal, FALSE otherwise.
+
+\section{\class{wxImageHandler}}\label{wximagehandler}
+
+\overview{Overview}{wximageoverview}
+
+This is the base class for implementing image file loading/saving, and image creation from data.
+It is used within wxImage and is not normally seen by the application.
+
+If you wish to extend the capabilities of wxImage, derive a class from wxImageHandler
+and add the handler using \helpref{wxImage::AddHandler}{wximageaddhandler} in your
+application initialisation.
+
+\wxheading{Derived from}
+
+\helpref{wxObject}{wxobject}
+
+\wxheading{See also}
+
+\helpref{wxImage}{wximage}
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxImageHandler::wxImageHandler}\label{wximagehandlerconstr}
+
+\func{}{wxImageHandler}{\void}
+
+Default constructor. In your own default constructor, initialise the members
+m\_name, m\_extension and m\_type.
+
+\membersection{wxImageHandler::\destruct{wxImageHandler}}
+
+\func{}{\destruct{wxImageHandler}}{\void}
+
+Destroys the wxImageHandler object.
+
+\membersection{wxImageHandler::GetName}
+
+\constfunc{wxString}{GetName}{\void}
+
+Gets the name of this handler.
+
+\membersection{wxImageHandler::GetExtension}
+
+\constfunc{wxString}{GetExtension}{\void}
+
+Gets the file extension associated with this handler.
+
+\membersection{wxImageHandler::GetType}
+
+\constfunc{long}{GetType}{\void}
+
+Gets the image type associated with this handler.
+
+\membersection{wxImageHandler::LoadFile}\label{wximagehandlerloadfile}
+
+\func{bool}{LoadFile}{\param{wxImage* }{image}, \param{const wxString\&}{ name}}
+
+Loads a image from a file or resource, putting the resulting data into {\it image}.
+
+\wxheading{Parameters}
+
+\docparam{image}{The image object which is to be affected by this operation.}
+
+\docparam{name}{Either a filename or a Windows resource name.
+The meaning of {\it name} is determined by the {\it type} parameter.}
+
+\wxheading{Return value}
+
+TRUE if the operation succeeded, FALSE otherwise.
+
+\wxheading{See also}
+
+\helpref{wxImage::LoadFile}{wximageloadfile}\\
+\helpref{wxImage::SaveFile}{wximagesavefile}\\
+\helpref{wxImageHandler::SaveFile}{wximagehandlersavefile}
+
+\membersection{wxImageHandler::SaveFile}\label{wximagehandlersavefile}
+
+\func{bool}{SaveFile}{\param{wxImage* }{image}, \param{const wxString\& }{name}}
+
+Saves a image in the named file.
+
+\wxheading{Parameters}
+
+\docparam{image}{The image object which is to be affected by this operation.}
+
+\docparam{name}{A filename. The meaning of {\it name} is determined by the {\it type} parameter.}
+
+\wxheading{Return value}
+
+TRUE if the operation succeeded, FALSE otherwise.
+
+\wxheading{See also}
+
+\helpref{wxImage::LoadFile}{wximageloadfile}\\
+\helpref{wxImage::SaveFile}{wximagesavefile}\\
+\helpref{wxImageHandler::LoadFile}{wximagehandlerloadfile}
+
+\membersection{wxImageHandler::SetName}
+
+\func{void}{SetName}{\param{const wxString\& }{name}}
+
+Sets the handler name.
+
+\wxheading{Parameters}
+
+\docparam{name}{Handler name.}
+
+\membersection{wxImageHandler::SetExtension}
+
+\func{void}{SetExtension}{\param{const wxString\& }{extension}}
+
+Sets the handler extension.
+
+\wxheading{Parameters}
+
+\docparam{extension}{Handler extension.}
+
+\membersection{wxImageHandler::SetType}
+
+\func{void}{SetType}{\param{long }{type}}
+
+Sets the handler type.
+
+\wxheading{Parameters}
+
+\docparam{name}{Handler type.}
+
+
index 14134b38da524e959cc850de03b4c0afec76016c..ded5bc1d290a427a141e904046d4791d0cfea5cd 100644 (file)
@@ -26,10 +26,6 @@ Default constructor.
 
 Copy constructor. This uses reference counting so is a cheap operation.
 
-\func{}{wxPalette}{\param{const wxPalette*}{ palette}}
-
-Copy constructor. This uses reference counting so is a cheap operation.
-
 \func{}{wxPalette}{\param{int}{ n}, \param{const unsigned char* }{red},\\
  \param{const unsigned char* }{green}, \param{const unsigned char* }{blue}}
 
index c0490876e92d789a4f9c8c092a8bb09af3f07ece..2022597217a5919906f87599e1b136bbf1844cbb 100644 (file)
@@ -51,10 +51,6 @@ Constructs a stippled pen from a stipple bitmap and a width.
 
 Copy constructor. This uses reference counting so is a cheap operation.
 
-\func{}{wxPen}{\param{const wxPen*}{ pen}}
-
-Copy constructor. This uses reference counting so is a cheap operation.
-
 \wxheading{Parameters}
 
 \docparam{colour}{A colour object.}
index 32016ecef0cdec3669b6aa41e4ebf16f7e593270..09562235ec59a2a9da0a83a03c42f8d963310235 100644 (file)
@@ -58,8 +58,9 @@ Visual C++ 1.5 compilation
    make the wxWindows core library.
 2. Change directory to wx\samples and type 'nmake -f makefile.dos'
    to make all the samples. You can also make them individually.
-   NOTE: only a few samples have up-to-date makefiles, e.g.
-   minimal, docview, mdi. The utils makefile does not yet work.
+
+NOTE: 16-bit compilation is not recommended (see issues.txt):
+many things are broken, including dialog boxes.
 
 Borland C++ 4.5/5.0 compilation
 -------------------------------
index 73e607511fee834dc4073b436e32775b059cd73e..900bfa8600c8a0048245b3cdb89eabb1e6997762 100644 (file)
@@ -1,12 +1,6 @@
 Current issues and bugs
 -----------------------
 
-Owner-draw menus
-----------------
-
-If USE_OWNER_DRAWN = 1 and you create a wxMenu, you get 'all bets
-are off' memory checking warnings from wxWindows.
-
 Memory-checking subsystem
 -------------------------
 
@@ -14,5 +8,7 @@ This conflicts with wxUSE_IOSTREAMSH = 0 using MS VC++ 5.0
 (crashes the template code). It should be switched off if you
 wish to use wxUSE_IOSTREAMSH = 0.
 
-
-
+Many things seem to be broken for 16-bit Windows, including
+dialogs (crash in wxFindWinFromHandle). The generic tree, list
+and notebook controls don't work. The generic wxImageList drawing
+function doesn't work (wxDC::SelectObject problem).
index e50e07a8040d65b3868f7ca2b24f9bb5eedd7848..a43ff851bbd89e3dd89ded6326a027acce53bc01 100644 (file)
@@ -940,8 +940,10 @@ typedef void *          WXMEASUREITEMSTRUCT;
 typedef void *          WXLPCREATESTRUCT;
 #ifdef __GNUWIN32__
 typedef int (*WXFARPROC)();
-#else
+#elif defined(__WIN32__)
 typedef int (__stdcall *WXFARPROC)();
+#else
+typedef int (*WXFARPROC)();
 #endif
 
 #endif
index 6be23181a96c672b44cb13156d63560a2578e728..26f944b3f1b663877a9a4df5f22e28074dd221bc 100644 (file)
@@ -2,7 +2,11 @@
 #define _WX_DIRDLG_H_BASE_
 
 #if defined(__WXMSW__)
+#ifdef __WIN16__
+#include "wx/generic/dirdlgg.h"
+#else
 #include "wx/msw/dirdlg.h"
+#endif
 #elif defined(__WXMOTIF__)
 #include "wx/generic/dirdlgg.h"
 #elif defined(__WXGTK__)
index c70aedf6eb9c439afb3bba3ca52daeca99d0e53b..10fefdce310f3ec6cf971da203aeceb01457054d 100644 (file)
@@ -95,7 +95,7 @@ class WXDLLEXPORT wxDirDialog: public wxDialog
     int ShowModal();
 
     void OnTreeSelected( wxTreeEvent &event );
-    void OnTreeKeyDown( wxKeyEvent &event );
+    void OnTreeKeyDown( wxTreeEvent &event );
     void OnSize(wxSizeEvent& event);
     void OnOK(wxCommandEvent& event);
     void OnCancel(wxCommandEvent& event); 
index 81c34064dfab389a803c40c9f4b967495a405403..ff5bc55e13463f293e7fbc86ac79df7cda122ad4 100644 (file)
 #include "wx/scrolwin.h"
 #include "wx/settings.h"
 
+#if wxUSE_DRAG_AND_DROP
+class WXDLLEXPORT wxDropTarget;
+#endif
+
 //-----------------------------------------------------------------------------
 // classes
 //-----------------------------------------------------------------------------
 
-class wxListItem;
-class wxListEvent;
-class wxListCtrl;
+class WXDLLEXPORT wxListItem;
+class WXDLLEXPORT wxListEvent;
+class WXDLLEXPORT wxListCtrl;
 
 //-----------------------------------------------------------------------------
 // internal classes
 //-----------------------------------------------------------------------------
 
-class wxListHeaderData;
-class wxListItemData;
-class wxListLineData;
+class WXDLLEXPORT wxListHeaderData;
+class WXDLLEXPORT wxListItemData;
+class WXDLLEXPORT wxListLineData;
 
-class wxListHeaderWindow;
-class wxListMainWindow;
+class WXDLLEXPORT wxListHeaderWindow;
+class WXDLLEXPORT wxListMainWindow;
 
-class wxListRenameTimer;
+class WXDLLEXPORT wxListRenameTimer;
 //class wxListTextCtrl;
 
 //-----------------------------------------------------------------------------
@@ -164,7 +168,7 @@ enum {
 // wxListItem
 //-----------------------------------------------------------------------------
 
-class wxListItem: public wxObject
+class WXDLLEXPORT wxListItem: public wxObject
 {
   DECLARE_DYNAMIC_CLASS(wxListItem)
 
@@ -230,7 +234,7 @@ typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&);
 //  wxListItemData (internal)
 //-----------------------------------------------------------------------------
 
-class wxListItemData : public wxObject
+class WXDLLEXPORT wxListItemData : public wxObject
 {
   DECLARE_DYNAMIC_CLASS(wxListItemData);
 
@@ -269,7 +273,7 @@ class wxListItemData : public wxObject
 //  wxListHeaderData (internal)
 //-----------------------------------------------------------------------------
 
-class wxListHeaderData : public wxObject
+class WXDLLEXPORT wxListHeaderData : public wxObject
 {
   DECLARE_DYNAMIC_CLASS(wxListHeaderData);
 
@@ -304,7 +308,7 @@ class wxListHeaderData : public wxObject
 //  wxListLineData (internal)
 //-----------------------------------------------------------------------------
 
-class wxListLineData : public wxObject
+class WXDLLEXPORT wxListLineData : public wxObject
 {
   DECLARE_DYNAMIC_CLASS(wxListLineData);
 
@@ -320,13 +324,13 @@ class wxListLineData : public wxObject
     int                 m_spacing;
     wxListMainWindow   *m_owner;
 
-    void DoDraw( wxPaintDC *dc, bool hilight, bool paintBG );
+    void DoDraw( wxDC *dc, bool hilight, bool paintBG );
 
   public:
     wxListLineData( void ) {};
     wxListLineData( wxListMainWindow *owner, int mode, wxBrush *hilightBrush );
-    void CalculateSize( wxPaintDC *dc, int spacing );
-    void SetPosition( wxPaintDC *dc, int x, int y,  int window_width );
+    void CalculateSize( wxDC *dc, int spacing );
+    void SetPosition( wxDC *dc, int x, int y,  int window_width );
     void SetColumnPosition( int index, int x );
     void GetSize( int &width, int &height );
     void GetExtent( int &x, int &y, int &width, int &height );
@@ -341,8 +345,8 @@ class wxListLineData : public wxObject
     void GetRect( wxRectangle &rect );
     void Hilight( bool on );
     void ReverseHilight( void );
-    void DrawRubberBand( wxPaintDC *dc, bool on );
-    void Draw( wxPaintDC *dc );
+    void DrawRubberBand( wxDC *dc, bool on );
+    void Draw( wxDC *dc );
     bool IsInRect( int x, int y, const wxRectangle &rect );
     bool IsHilighted( void );
     void AssignRect( wxRectangle &dest, int x, int y, int width, int height );
@@ -353,7 +357,7 @@ class wxListLineData : public wxObject
 //  wxListHeaderWindow (internal)
 //-----------------------------------------------------------------------------
 
-class wxListHeaderWindow : public wxWindow
+class WXDLLEXPORT wxListHeaderWindow : public wxWindow
 {
   DECLARE_DYNAMIC_CLASS(wxListHeaderWindow)
 
@@ -372,7 +376,7 @@ class wxListHeaderWindow : public wxWindow
     wxListHeaderWindow( wxWindow *win, wxWindowID id, wxListMainWindow *owner,
       const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
       long style = 0, const wxString &name = "columntitles" );
-    void DoDrawRect( wxPaintDC *dc, int x, int y, int w, int h );
+    void DoDrawRect( wxDC *dc, int x, int y, int w, int h );
     void OnPaint( wxPaintEvent &event );
     void DrawCurrent();
     void OnMouse( wxMouseEvent &event );
@@ -385,7 +389,7 @@ class wxListHeaderWindow : public wxWindow
 // wxListRenameTimer (internal)
 //-----------------------------------------------------------------------------
 
-class wxListRenameTimer: public wxTimer
+class WXDLLEXPORT wxListRenameTimer: public wxTimer
 {
  private:
    wxListMainWindow   *m_owner;
@@ -399,7 +403,7 @@ class wxListRenameTimer: public wxTimer
 //  wxListTextCtrl (internal)
 //-----------------------------------------------------------------------------
 
-class wxListTextCtrl: public wxTextCtrl
+class WXDLLEXPORT wxListTextCtrl: public wxTextCtrl
 {
   DECLARE_DYNAMIC_CLASS(wxListTextCtrl);
 
@@ -426,7 +430,7 @@ class wxListTextCtrl: public wxTextCtrl
 //  wxListMainWindow (internal)
 //-----------------------------------------------------------------------------
 
-class wxListMainWindow: public wxScrolledWindow
+class WXDLLEXPORT wxListMainWindow: public wxScrolledWindow
 {
   DECLARE_DYNAMIC_CLASS(wxListMainWindow);
 
@@ -480,7 +484,7 @@ class wxListMainWindow: public wxScrolledWindow
     void OnSetFocus( wxFocusEvent &event );
     void OnKillFocus( wxFocusEvent &event );
     void OnSize( wxSizeEvent &event );
-    void DrawImage( int index, wxPaintDC *dc, int x, int y );
+    void DrawImage( int index, wxDC *dc, int x, int y );
     void GetImageSize( int index, int &width, int &height );
     int GetIndexOfLine( const wxListLineData *line );
     int GetTextLength( wxString &s );  // should be const
@@ -528,7 +532,7 @@ class wxListMainWindow: public wxScrolledWindow
 // wxListCtrl
 //-----------------------------------------------------------------------------
 
-class wxListCtrl: public wxControl
+class WXDLLEXPORT wxListCtrl: public wxControl
 {
   DECLARE_DYNAMIC_CLASS(wxListCtrl);
 
@@ -611,10 +615,13 @@ class wxListCtrl: public wxControl
     void SetForegroundColour( const wxColour &colour );
     void SetFont( const wxFont &font );
     
+#if wxUSE_DRAG_AND_DROP
     void SetDropTarget( wxDropTarget *dropTarget )
       { m_mainWin->SetDropTarget( dropTarget ); }
     wxDropTarget *GetDropTarget() const
       { return m_mainWin->GetDropTarget(); }
+#endif
+
     void SetCursor( const wxCursor &cursor )
       { if (m_mainWin) m_mainWin->wxWindow::SetCursor( cursor); }
     wxColour GetBackgroundColour() const
diff --git a/include/wx/generic/notebook.h b/include/wx/generic/notebook.h
new file mode 100644 (file)
index 0000000..df4e960
--- /dev/null
@@ -0,0 +1,247 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        notebook.h
+// Purpose:     wxNotebook class (a.k.a. property sheet, tabbed dialog)
+// Author:      Julian Smart
+// Modified by:
+// RCS-ID:      $Id$
+// Copyright:   (c) Julian Smart
+// Licence:    wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_NOTEBOOK_H_
+#define _WX_NOTEBOOK_H_
+
+#ifdef __GNUG__
+#pragma interface "notebook.h"
+#endif
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+#include "wx/dynarray.h"
+#include "wx/event.h"
+#include "wx/control.h"
+#include "wx/generic/tabg.h"
+
+// ----------------------------------------------------------------------------
+// types
+// ----------------------------------------------------------------------------
+
+// fwd declarations
+class WXDLLEXPORT wxImageList;
+class WXDLLEXPORT wxWindow;
+
+// array of notebook pages
+typedef wxWindow wxNotebookPage;  // so far, any window can be a page
+WX_DEFINE_ARRAY(wxNotebookPage *, wxArrayPages);
+
+// ----------------------------------------------------------------------------
+// notebook events
+// ----------------------------------------------------------------------------
+class WXDLLEXPORT wxNotebookEvent : public wxCommandEvent
+{
+public:
+  wxNotebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0, 
+                  int nSel = -1, int nOldSel = -1)
+    : wxCommandEvent(commandType, id) { m_nSel = nSel; m_nOldSel = nOldSel; }
+
+  // accessors
+  int GetSelection() const { return m_nSel; }
+  int GetOldSelection() const { return m_nOldSel; }
+
+  void SetSelection(int sel) { m_nSel = sel; }
+  void SetOldSelection(int oldSel) { m_nOldSel = oldSel; }
+
+private:
+  int m_nSel,     // currently selected page
+      m_nOldSel;  // previously selected page
+
+  DECLARE_DYNAMIC_CLASS(wxNotebookEvent)
+};
+
+// ----------------------------------------------------------------------------
+// wxNotebook
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxNotebook;
+
+// This reuses wxTabView to draw the tabs.
+class WXDLLEXPORT wxNotebookTabView: public wxTabView
+{
+DECLARE_DYNAMIC_CLASS(wxNotebookTabView)
+public:
+  wxNotebookTabView(wxNotebook* notebook, long style = wxTAB_STYLE_DRAW_BOX | wxTAB_STYLE_COLOUR_INTERIOR);
+  ~wxNotebookTabView(void);
+
+  // Called when a tab is activated
+  virtual void OnTabActivate(int activateId, int deactivateId);
+
+protected:
+   wxNotebook*      m_notebook;
+};
+
+class wxNotebook : public wxControl
+{
+public:
+  // ctors
+  // -----
+    // default for dynamic class
+  wxNotebook();
+    // the same arguments as for wxControl (@@@ any special styles?)
+  wxNotebook(wxWindow *parent,
+             wxWindowID id, 
+             const wxPoint& pos = wxDefaultPosition,
+             const wxSize& size = wxDefaultSize,
+             long style = 0,
+             const wxString& name = "notebook");
+    // Create() function
+  bool Create(wxWindow *parent,
+              wxWindowID id, 
+              const wxPoint& pos = wxDefaultPosition,
+              const wxSize& size = wxDefaultSize,
+              long style = 0,
+              const wxString& name = "notebook");
+    // dtor
+  ~wxNotebook();
+
+  // accessors
+  // ---------
+    // get number of pages in the dialog
+  int GetPageCount() const;
+
+  // Find the position of the wxNotebookPage, -1 if not found.
+  int FindPagePosition(wxNotebookPage* page) const;
+
+    // set the currently selected page, return the index of the previously
+    // selected one (or -1 on error)
+    // NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events
+  int SetSelection(int nPage);
+    // cycle thru the tabs
+  void AdvanceSelection(bool bForward = TRUE);
+    // get the currently selected page
+  int GetSelection() const { return m_nSelection; }
+
+    // set/get the title of a page
+  bool SetPageText(int nPage, const wxString& strText);
+  wxString GetPageText(int nPage) const;
+
+  // image list stuff: each page may have an image associated with it. All
+  // the images belong to an image list, so you have to
+  // 1) create an image list
+  // 2) associate it with the notebook
+  // 3) set for each page it's image
+    // associate image list with a control
+  void SetImageList(wxImageList* imageList);
+    // get pointer (may be NULL) to the associated image list
+  wxImageList* GetImageList() const { return m_pImageList; }
+
+    // sets/returns item's image index in the current image list
+  int  GetPageImage(int nPage) const;
+  bool SetPageImage(int nPage, int nImage);
+
+    // currently it's always 1 because wxGTK doesn't support multi-row
+    // tab controls
+  int GetRowCount() const;
+
+  // control the appearance of the notebook pages
+    // set the size (the same for all pages)
+  void SetPageSize(const wxSize& size);
+    // set the padding between tabs (in pixels)
+  void SetPadding(const wxSize& padding);
+
+  // operations
+  // ----------
+    // remove one page from the notebook, and delete the page.
+  bool DeletePage(int nPage);
+  bool DeletePage(wxNotebookPage* page);
+    // remove one page from the notebook, without deleting the page.
+  bool RemovePage(int nPage);
+  bool RemovePage(wxNotebookPage* page);
+    // remove all pages
+  bool DeleteAllPages();
+    // adds a new page to the notebook (it will be deleted ny the notebook,
+    // don't delete it yourself). If bSelect, this page becomes active.
+  bool AddPage(wxNotebookPage *pPage,
+               const wxString& strText,
+               bool bSelect = FALSE,
+               int imageId = -1);
+    // the same as AddPage(), but adds it at the specified position
+  bool InsertPage(int nPage,
+                  wxNotebookPage *pPage,
+                  const wxString& strText,
+                  bool bSelect = FALSE,
+                  int imageId = -1);
+    // get the panel which represents the given page
+  wxNotebookPage *GetPage(int nPage) { return m_aPages[nPage]; }
+
+  // callbacks
+  // ---------
+  void OnSize(wxSizeEvent& event);
+  void OnIdle(wxIdleEvent& event);
+  void OnSelChange(wxNotebookEvent& event);
+  void OnSetFocus(wxFocusEvent& event);
+  void OnNavigationKey(wxNavigationKeyEvent& event);
+  
+  // base class virtuals
+  // -------------------
+  virtual void Command(wxCommandEvent& event);
+  virtual void SetConstraintSizes(bool recurse = TRUE);
+  virtual bool DoPhase(int nPhase);
+
+// Implementation
+
+  // wxNotebook on Motif uses a generic wxTabView to implement itself.
+  inline wxTabView *GetTabView() const { return m_tabView; }
+  inline void SetTabView(wxTabView *v) { m_tabView = v; }
+  
+  void OnMouseEvent(wxMouseEvent& event);
+  void OnPaint(wxPaintEvent& event);
+
+  virtual wxRect GetAvailableClientSize();
+
+  // Implementation: calculate the layout of the view rect
+  // and resize the children if required
+  bool RefreshLayout(bool force = TRUE);
+
+protected:
+  // common part of all ctors
+  void Init();
+
+  // helper functions
+  void ChangePage(int nOldSel, int nSel); // change pages
+
+  wxImageList  *m_pImageList; // we can have an associated image list
+  wxArrayPages  m_aPages;     // array of pages
+
+  int m_nSelection;           // the current selection (-1 if none)
+
+  wxTabView*   m_tabView;
+
+  DECLARE_DYNAMIC_CLASS(wxNotebook)
+  DECLARE_EVENT_TABLE()
+};
+
+// ----------------------------------------------------------------------------
+// event macros
+// ----------------------------------------------------------------------------
+typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&);
+
+#define EVT_NOTEBOOK_PAGE_CHANGED(id, fn)                                   \
+  {                                                                         \
+    wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,                                    \
+    id,                                                                     \
+    -1,                                                                     \
+    (wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn,  \
+    NULL                                                                    \
+  },
+
+#define EVT_NOTEBOOK_PAGE_CHANGING(id, fn)                                  \
+  {                                                                         \
+    wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, \                                 \
+    id,                                                                     \
+    -1,                                                                     \
+    (wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn,  \
+    NULL                                                                    \
+  },
+
+#endif // _WX_NOTEBOOK_H_
index e62b821a80117394ac251734d145396157a57b2c..7aa92ee1bf7f0bbec246891dbc3dd3a23e8ceb4a 100644 (file)
@@ -2,7 +2,11 @@
 #define _WX_IMAGLIST_H_BASE_
 
 #if defined(__WXMSW__)
+#ifdef __WIN16__
+#include "wx/generic/imaglist.h"
+#else
 #include "wx/msw/imaglist.h"
+#endif
 #elif defined(__WXMOTIF__)
 #include "wx/generic/imaglist.h"
 #elif defined(__WXGTK__)
index d1fd4f90432e5b7788f824860fbf772d92789cd1..1e5c3480c8330b4f575a980d0225cbc1c2cd2d3c 100644 (file)
@@ -2,7 +2,11 @@
 #define _WX_LISTCTRL_H_BASE_
 
 #if defined(__WXMSW__)
+#ifdef __WIN16__
+#include "wx/generic/listctrl.h"
+#else
 #include "wx/msw/listctrl.h"
+#endif
 #elif defined(__WXMOTIF__)
 #include "wx/generic/listctrl.h"
 #elif defined(__WXGTK__)
index 76449ced018ebd0235f96c5917b4bff0cde8bcff..6d214806e944357390665fa6bfd4684e39369bd7 100644 (file)
@@ -91,8 +91,8 @@ public:
 
   virtual bool Flush(bool bCurrentOnly = FALSE);
 
-  virtual bool DeleteEntry(const char *szKey, bool bGroupIfEmptyAlso);
-  virtual bool DeleteGroup(const char *szKey);
+  virtual bool DeleteEntry(const wxString& Key, bool bGroupIfEmptyAlso);
+  virtual bool DeleteGroup(const wxString& szKey);
   virtual bool DeleteAll();
 
 private:
index de33833beacf2514a39837fb2e9de5f9fd95a337..8a64ec87962140afa9048c0961cbe4f8a398dcd1 100644 (file)
@@ -46,6 +46,9 @@ WXDLLEXPORT wxFont wxCreateFontFromLogFont(LOGFONT *logFont); // , bool createNe
 #    if defined (__WIN32__) && defined(STRICT)
        typedef long (_stdcall * WndProcCast) (HWND, unsigned int, unsigned int, long);
 #      define CASTWNDPROC (WndProcCast)
+#    elif defined(__WIN16__)
+       typedef int (PASCAL * WndProcCast) ();
+#      define CASTWNDPROC (WndProcCast)
 #    else
 #      define CASTWNDPROC
 #    endif
index cef7278a857e12777fa1d83cfc6d93b8f28b496f..8f151883fba6f4c713ad1c1479b9770055c066a8 100644 (file)
@@ -81,6 +81,33 @@ WXDLLEXPORT_DATA(extern const char*) wxPanelNameStr;
 WXDLLEXPORT_DATA(extern const wxSize) wxDefaultSize;
 WXDLLEXPORT_DATA(extern const wxPoint) wxDefaultPosition;
 
+//-----------------------------------------------------------------------------
+// wxClientData
+//-----------------------------------------------------------------------------
+
+class wxClientData
+{
+public:
+    wxClientData() { }
+    virtual ~wxClientData() { }
+};
+
+//-----------------------------------------------------------------------------
+// wxStringClientData
+//-----------------------------------------------------------------------------
+
+class wxStringClientData: public wxClientData
+{
+public:
+    wxStringClientData() { }
+    wxStringClientData( wxString &data ) { m_data = data; }
+    void SetData( wxString &data ) { m_data = data; }
+    wxString GetData() const { return m_data; }
+    
+private:
+    wxString  m_data;
+};
+
 class WXDLLEXPORT wxWindow : public wxEvtHandler
 {
   DECLARE_ABSTRACT_CLASS(wxWindow)
index 4d2aaafc5c0c55b69e6a186d074bd8b00c49c798..42c138cfbf69ae0e51eff703307be52abce408f6 100644 (file)
@@ -2,7 +2,11 @@
 #define _WX_NOTEBOOK_H_BASE_
 
 #if defined(__WXMSW__)
+#ifdef __WIN16__
+  #include  "wx/generic/notebook.h"
+#else
   #include  "wx/msw/notebook.h"
+#endif
 #elif defined(__WXMOTIF__)
   #include  "wx/motif/notebook.h"
 #elif defined(__WXGTK__)
index 0fce45a8a2ee0dfc6e8f5ec582d2681e6a56ed13..fc3a89e1b3319e6747fe53673ce4741ef53404b3 100644 (file)
@@ -2,7 +2,11 @@
 #define _WX_TREECTRL_H_BASE_
 
 #if defined(__WXMSW__)
+#ifdef __WIN16__
+#include "wx/generic/treectrl.h"
+#else
 #include "wx/msw/treectrl.h"
+#endif
 #elif defined(__WXMOTIF__)
 #include "wx/generic/treectrl.h"
 #elif defined(__WXGTK__)
index c33ea5e45008d05bfa3a9d98c0e8edd42a6a9fd2..78232aa5712498bacdd59506c0ffdd68c5fdc895 100644 (file)
@@ -1,65 +1,17 @@
 #
 # File:                makefile.dos
 # Author:      Julian Smart
-# Created:     1993
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds checklst example (DOS).
+# Makefile : Builds 16-bit sample, VC++ 1.5
 # Use FINAL=1 argument to nmake to build final version with no debugging
 # info
 
 WXDIR = $(WXWIN)
 
-!include $(WXDIR)\src\makemsc.env
-
-THISDIR = $(WXDIR)\samples\checklst
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-HEADERS =
-SOURCES = checklst.$(SRCSUFF)
-OBJECTS = checklst.obj
-
-all:    checklst.exe
-
-wx:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos FINAL=$(FINAL)
-        cd $(THISDIR)
-
-wxclean:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos clean
-        cd $(THISDIR)
-
-checklst.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) checklst.obj checklst.def checklst.res
-        link $(LINKFLAGS) @<<
-checklst.obj $(WXDIR)\src\msw\dummy.obj,
-checklst,
-NUL,
-$(LIBS),
-checklst.def
-;
-<<
-        rc -K checklst.res
-
-checklst.obj:      checklst.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
+TARGET=checklst
+OBJECTS=$(TARGET).obj
 
-checklst.res :      checklst.rc $(WXDIR)\include\wx\msw\wx.rc
-    rc -r /i$(WXDIR)\include checklst
+!include $(WXDIR)\src\makeprog.msc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.sbr
-        -erase *.pdb
diff --git a/samples/config/makefile.dos b/samples/config/makefile.dos
new file mode 100644 (file)
index 0000000..0a87032
--- /dev/null
@@ -0,0 +1,17 @@
+#
+# File:                makefile.dos
+# Author:      Julian Smart
+# Created:     1998
+# Updated:     
+#
+# Makefile : Builds 16-bit sample, VC++ 1.5
+# Use FINAL=1 argument to nmake to build final version with no debugging
+# info
+
+WXDIR = $(WXWIN)
+
+TARGET=conftest
+OBJECTS=$(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.msc
+
index 81466d023dfbe1ecb2317b69508c7e3235d7ae3c..f1170311a5ae3019c2797495c5cd8b61c666e663 100644 (file)
@@ -1,65 +1,17 @@
 #
 # File:                makefile.dos
 # Author:      Julian Smart
-# Created:     1993
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds controls example (DOS).
+# Makefile : Builds 16-bit sample, VC++ 1.5
 # Use FINAL=1 argument to nmake to build final version with no debugging
 # info
 
 WXDIR = $(WXWIN)
 
-!include $(WXDIR)\src\makemsc.env
-
-THISDIR = $(WXDIR)\samples\controls
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-HEADERS =
-SOURCES = controls.$(SRCSUFF)
-OBJECTS = controls.obj
-
-all:    controls.exe
-
-wx:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos FINAL=$(FINAL)
-        cd $(THISDIR)
-
-wxclean:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos clean
-        cd $(THISDIR)
-
-controls.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) controls.obj controls.def controls.res
-        link $(LINKFLAGS) @<<
-controls.obj $(WXDIR)\src\msw\dummy.obj,
-controls,
-NUL,
-$(LIBS),
-controls.def
-;
-<<
-        rc -K controls.res
-
-controls.obj:      controls.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
+TARGET=controls
+OBJECTS=$(TARGET).obj
 
-controls.res :      controls.rc $(WXDIR)\include\wx\msw\wx.rc
-    rc -r /i$(WXDIR)\include controls
+!include $(WXDIR)\src\makeprog.msc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.sbr
-        -erase *.pdb
diff --git a/samples/db/makefile.dos b/samples/db/makefile.dos
new file mode 100644 (file)
index 0000000..437ac4e
--- /dev/null
@@ -0,0 +1,17 @@
+#
+# File:                makefile.dos
+# Author:      Julian Smart
+# Created:     1998
+# Updated:     
+#
+# Makefile : Builds 16-bit sample, VC++ 1.5
+# Use FINAL=1 argument to nmake to build final version with no debugging
+# info
+
+WXDIR = $(WXWIN)
+
+TARGET=dbtest
+OBJECTS=$(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.msc
+
index dd0e10c4a15224deea7ff55f8c1aeb51a2369406..639f27668f8c150807b81bedfadd9b6d24b75951 100644 (file)
@@ -1,81 +1,17 @@
 #
 # File:                makefile.dos
 # Author:      Julian Smart
-# Created:     1993
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds dialogs example (DOS).
+# Makefile : Builds 16-bit sample, VC++ 1.5
 # Use FINAL=1 argument to nmake to build final version with no debugging
 # info
 
 WXDIR = $(WXWIN)
 
-!include $(WXDIR)\src\makemsc.env
-
-THISDIR = $(WXDIR)\samples\dialogs
-WXLIB = $(WXDIR)\lib\wx.lib
-LIBS=$(WXLIB) oldnames libw llibcew commdlg shell ddeml
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-INC=/I$(WXDIR)\include\msw /I$(WXDIR)\include\base
-
-# Set this to nothing if using MS C++ 7
-ZOPTION=/Z7
-
-!if "$(FINAL)" == "0"
-CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od /YuWX_PREC.H /DDEBUG=$(DEBUG) /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC)
-LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:512
-!else
-CPPFLAGS=/AL /W3 /G2sw /Ox /YuWX_PREC.H /Dwx_msw /DDEBUG=$(DEBUG) /Fp$(WXDIR)\src\msw\wx.pch $(INC)
-LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:512
-!endif
-
-HEADERS =
-SOURCES = dialogs.$(SRCSUFF)
-OBJECTS = dialogs.obj
-
-all:    dialogs.exe
-
-wx:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos FINAL=$(FINAL)
-        cd $(THISDIR)
-
-wxclean:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos clean
-        cd $(THISDIR)
-
-
-dialogs.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) $(OBJECTS) dialogs.def dialogs.res
-        link $(LINKFLAGS) @<<
-$(OBJECTS) $(WXDIR)\src\msw\dummy.obj,
-dialogs,
-NUL,
-$(LIBS),
-dialogs.def
-;
-<<
-        rc -30 -K dialogs.res
-
-dialogs.obj:      dialogs.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
+TARGET=dialogs
+OBJECTS=$(TARGET).obj
 
-dialogs.res :      dialogs.rc $(WXDIR)\include\msw\wx.rc
-    rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw dialogs
+!include $(WXDIR)\src\makeprog.msc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.sbr
-        -erase *.pdb
index 46906a90e461fa62f11797c61312882b697822b5..dd90a7a9df4e0a2faf6fe4edbaea5578d930e36e 100644 (file)
@@ -1,65 +1,17 @@
 #
 # File:                makefile.dos
 # Author:      Julian Smart
-# Created:     1993
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds dnd example (DOS).
+# Makefile : Builds 16-bit sample, VC++ 1.5
 # Use FINAL=1 argument to nmake to build final version with no debugging
 # info
 
 WXDIR = $(WXWIN)
 
-!include $(WXDIR)\src\makemsc.env
-
-THISDIR = $(WXDIR)\samples\dnd
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-HEADERS =
-SOURCES = dnd.$(SRCSUFF)
-OBJECTS = dnd.obj
-
-all:    dnd.exe
-
-wx:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos FINAL=$(FINAL)
-        cd $(THISDIR)
-
-wxclean:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos clean
-        cd $(THISDIR)
-
-dnd.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) dnd.obj dnd.def dnd.res
-        link $(LINKFLAGS) @<<
-dnd.obj $(WXDIR)\src\msw\dummy.obj,
-dnd,
-NUL,
-$(LIBS),
-dnd.def
-;
-<<
-        rc -K dnd.res
-
-dnd.obj:      dnd.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
+TARGET=dnd
+OBJECTS=$(TARGET).obj
 
-dnd.res :      dnd.rc $(WXDIR)\include\wx\msw\wx.rc
-    rc -r /i$(WXDIR)\include dnd
+!include $(WXDIR)\src\makeprog.msc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.sbr
-        -erase *.pdb
index 3e32b22dce5aadac44d398c6eaa378f26212b31f..033f382e7d0dc74c4f3b1cd8924872fe672aed85 100644 (file)
@@ -1,74 +1,17 @@
 #
 # File:                makefile.dos
 # Author:      Julian Smart
-# Created:     1995
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1995, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds docview example (DOS).
+# Makefile : Builds 16-bit sample, VC++ 1.5
 # Use FINAL=1 argument to nmake to build final version with no debugging
 # info
 
 WXDIR = $(WXWIN)
 
-!include $(WXDIR)\src\makemsc.env
-
-THISDIR = $(WXDIR)\samples\docview
-INC=/I$(WXDIR)\include
-
-HEADERS = docview.h
-SOURCES = docview.$(SRCSUFF)
-OBJECTS = docview.obj doc.obj view.obj
-
-all:    docview.exe
-
-wx:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos
-        cd $(THISDIR)
-
-wxclean:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos clean
-        cd $(THISDIR)
-
-
-docview.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) $(OBJECTS) docview.def docview.res
-        link $(LINKFLAGS) @<<
-$(WXDIR)\src\msw\dummy.obj $(OBJECTS),
-docview,
-NUL,
-$(LIBS),
-docview.def
-;
-<<
-        rc -30 -K docview.res
-
-docview.obj:      docview.h docview.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
-
-view.obj:      view.h view.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
-
-doc.obj:      doc.h doc.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
-
-docview.res :      docview.rc $(WXDIR)\include\wx\msw\wx.rc
-    rc -r /dFAFA_LIB /i$(WXDIR)\include docview
+TARGET=docview
+OBJECTS=$(TARGET).obj view.obj doc.obj
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.sbr
-        -erase *.pdb
+!include $(WXDIR)\src\makeprog.msc
 
index f1132c9c7f21a2ca5403ed646d5329a6c43c5b58..04760719b376b21dc7e2d6406c951ceac9b455ce 100644 (file)
@@ -1,74 +1,17 @@
 #
 # File:                makefile.dos
 # Author:      Julian Smart
-# Created:     1995
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1995, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds docview example (DOS).
+# Makefile : Builds 16-bit sample, VC++ 1.5
 # Use FINAL=1 argument to nmake to build final version with no debugging
 # info
 
 WXDIR = $(WXWIN)
 
-!include $(WXDIR)\src\makemsc.env
-
-THISDIR = $(WXDIR)\samples\docvwmdi
-INC=/I$(WXDIR)\include
-
-HEADERS = docview.h
-SOURCES = docview.$(SRCSUFF)
-OBJECTS = docview.obj doc.obj view.obj
-
-all:    docview.exe
-
-wx:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos
-        cd $(THISDIR)
-
-wxclean:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos clean
-        cd $(THISDIR)
-
-
-docview.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) $(OBJECTS) docview.def docview.res
-        link $(LINKFLAGS) @<<
-$(WXDIR)\src\msw\dummy.obj $(OBJECTS),
-docview,
-NUL,
-$(LIBS),
-docview.def
-;
-<<
-        rc -30 -K docview.res
-
-docview.obj:      docview.h docview.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
-
-view.obj:      view.h view.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
-
-doc.obj:      doc.h doc.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
-
-docview.res :      docview.rc $(WXDIR)\include\wx\msw\wx.rc
-    rc -r /dFAFA_LIB /i$(WXDIR)\include docview
+TARGET=docview
+OBJECTS=$(TARGET).obj doc.obj view.obj
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.sbr
-        -erase *.pdb
+!include $(WXDIR)\src\makeprog.msc
 
index 1305df9589ef68d3498c3ab911b5fc9d4d60c3ef..d4109ed7dc37afccc8fad947393c2342279a5f5a 100644 (file)
@@ -1,65 +1,17 @@
 #
 # File:                makefile.dos
 # Author:      Julian Smart
-# Created:     1993
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds dynamic example (DOS).
+# Makefile : Builds 16-bit sample, VC++ 1.5
 # Use FINAL=1 argument to nmake to build final version with no debugging
 # info
 
 WXDIR = $(WXWIN)
 
-!include $(WXDIR)\src\makemsc.env
-
-THISDIR = $(WXDIR)\samples\dynamic
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-HEADERS =
-SOURCES = dynamic.$(SRCSUFF)
-OBJECTS = dynamic.obj
-
-all:    dynamic.exe
-
-wx:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos FINAL=$(FINAL)
-        cd $(THISDIR)
-
-wxclean:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos clean
-        cd $(THISDIR)
-
-dynamic.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) dynamic.obj dynamic.def dynamic.res
-        link $(LINKFLAGS) @<<
-dynamic.obj $(WXDIR)\src\msw\dummy.obj,
-dynamic,
-NUL,
-$(LIBS),
-dynamic.def
-;
-<<
-        rc -K dynamic.res
-
-dynamic.obj:      dynamic.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
+TARGET=dynamic
+OBJECTS=$(TARGET).obj
 
-dynamic.res :      dynamic.rc $(WXDIR)\include\wx\msw\wx.rc
-    rc -r /i$(WXDIR)\include dynamic
+!include $(WXDIR)\src\makeprog.msc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.sbr
-        -erase *.pdb
index 7a5dfe401021914edda747c941195f6a7e639cc0..2ba1f15c5bf0c595bb2c51b515ed1d99d1abc57f 100644 (file)
@@ -51,7 +51,7 @@ FortyCanvas::FortyCanvas(wxWindow* parent, int x, int y, int w, int h) :
        m_font = wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxNORMAL);
 #endif
        SetBackgroundColour(FortyApp::BackgroundColour());
-       AllowDoubleClick(true);
+       AllowDoubleClick(TRUE);
 
        m_handCursor = new wxCursor(wxCURSOR_HAND);
        m_arrowCursor = new wxCursor(wxCURSOR_ARROW);
index 570fe85df035ba8a8afcf8a28adba51f2f0245f9..6195e27f4be933e61fce213e19a72a32b8145947 100644 (file)
@@ -93,7 +93,7 @@ bool FortyApp::OnInit()
        // Show the frame
        frame->Show(TRUE);
 
-       return true;
+       return TRUE;
 }
 
 const wxColour& FortyApp::BackgroundColour()
diff --git a/samples/forty/forty.def b/samples/forty/forty.def
new file mode 100644 (file)
index 0000000..a096488
--- /dev/null
@@ -0,0 +1,8 @@
+NAME         Forty
+DESCRIPTION  'Forty Thieves'
+EXETYPE      WINDOWS
+STUB         'WINSTUB.EXE'
+CODE         PRELOAD MOVEABLE DISCARDABLE
+DATA         PRELOAD MOVEABLE MULTIPLE
+HEAPSIZE     4048
+STACKSIZE    16000
diff --git a/samples/forty/makefile.dos b/samples/forty/makefile.dos
new file mode 100644 (file)
index 0000000..150d0b9
--- /dev/null
@@ -0,0 +1,17 @@
+#
+# File:                makefile.dos
+# Author:      Julian Smart
+# Created:     1998
+# Updated:     
+#
+# Makefile : Builds 16-bit sample, VC++ 1.5
+# Use FINAL=1 argument to nmake to build final version with no debugging
+# info
+
+WXDIR = $(WXWIN)
+
+TARGET=forty
+OBJECTS = $(TARGET).obj canvas.obj card.obj game.obj pile.obj playerdg.obj scoredg.obj scorefil.obj
+
+!include $(WXDIR)\src\makeprog.msc
+
index 23a7e87223eff0fee4ba821d8d1f491904aa2e24..13e3a4ce8eeef60898c11fc6c1f1a9e8f12374bd 100644 (file)
@@ -1,66 +1,17 @@
 #
 # File:                makefile.dos
 # Author:      Julian Smart
-# Created:     1993
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds grid test example (DOS).
+# Makefile : Builds 16-bit sample, VC++ 1.5
 # Use FINAL=1 argument to nmake to build final version with no debugging
 # info
 
 WXDIR = $(WXWIN)
 
-!include $(WXDIR)\src\makemsc.env
-
-THISDIR = $(WXDIR)\samples\test
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-HEADERS =
-SOURCES = test.$(SRCSUFF)
-OBJECTS = test.obj
-
-all:    test.exe
-
-wx:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos FINAL=$(FINAL)
-        cd $(THISDIR)
-
-wxclean:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos clean
-        cd $(THISDIR)
-
-
-test.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) test.obj test.def test.res
-        link $(LINKFLAGS) @<<
-test.obj $(WXDIR)\src\msw\dummy.obj,
-test,
-NUL,
-$(LIBS),
-test.def
-;
-<<
-        rc -30 -K test.res
-
-test.obj:      test.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
+TARGET=test
+OBJECTS = $(TARGET).obj
 
-test.res :      test.rc $(WXDIR)\include\wx\msw\wx.rc
-    rc -r /dFAFA_LIB /i$(WXDIR)\include test
+!include $(WXDIR)\src\makeprog.msc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.sbr
-        -erase *.pdb
diff --git a/samples/image/makefile.dos b/samples/image/makefile.dos
new file mode 100644 (file)
index 0000000..788ca91
--- /dev/null
@@ -0,0 +1,17 @@
+#
+# File:                makefile.dos
+# Author:      Julian Smart
+# Created:     1998
+# Updated:     
+#
+# Makefile : Builds 16-bit sample, VC++ 1.5
+# Use FINAL=1 argument to nmake to build final version with no debugging
+# info
+
+WXDIR = $(WXWIN)
+
+TARGET=image
+OBJECTS = $(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.msc
+
index 99b18d80754b00bad5fc05bd02bdc1a960aeaad2..3bb51f5fe2b4af71041eef88111d15297d50fb3b 100644 (file)
@@ -1,65 +1,17 @@
 #
 # File:                makefile.dos
 # Author:      Julian Smart
-# Created:     1993
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds internat example (DOS).
+# Makefile : Builds 16-bit sample, VC++ 1.5
 # Use FINAL=1 argument to nmake to build final version with no debugging
 # info
 
 WXDIR = $(WXWIN)
 
-!include $(WXDIR)\src\makemsc.env
-
-THISDIR = $(WXDIR)\samples\internat
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-HEADERS =
-SOURCES = internat.$(SRCSUFF)
-OBJECTS = internat.obj
-
-all:    internat.exe
-
-wx:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos FINAL=$(FINAL)
-        cd $(THISDIR)
-
-wxclean:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos clean
-        cd $(THISDIR)
-
-internat.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) internat.obj internat.def internat.res
-        link $(LINKFLAGS) @<<
-internat.obj $(WXDIR)\src\msw\dummy.obj,
-internat,
-NUL,
-$(LIBS),
-internat.def
-;
-<<
-        rc -K internat.res
-
-internat.obj:      internat.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
+TARGET=internat
+OBJECTS = $(TARGET).obj
 
-internat.res :      internat.rc $(WXDIR)\include\wx\msw\wx.rc
-    rc -r /i$(WXDIR)\include internat
+!include $(WXDIR)\src\makeprog.msc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.sbr
-        -erase *.pdb
index b2ddbcf9f5ef1107cd5761f9dd748e665d45fc6d..df94746c2ee67e0cce87a05cab2333d85779f305 100644 (file)
@@ -1,63 +1,17 @@
 #
 # File:                makefile.dos
 # Author:      Julian Smart
-# Created:     1993
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds joytest example (DOS).
+# Makefile : Builds 16-bit sample, VC++ 1.5
 # Use FINAL=1 argument to nmake to build final version with no debugging
 # info
 
 WXDIR = $(WXWIN)
 
-!include $(WXDIR)\src\makemsc.env
-
-THISDIR = $(WXDIR)\samples\joytest
-INC=/I$(WXDIR)\include
-
-HEADERS = joytest.h
-SOURCES = joytest.$(SRCSUFF)
-OBJECTS = joytest.obj
-
-all:    joytest.exe
-
-wx:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos
-        cd $(THISDIR)
-
-wxclean:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos clean
-        cd $(THISDIR)
-
-
-joytest.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) joytest.obj joytest.def joytest.res
-        link $(LINKFLAGS) @<<
-$(WXDIR)\src\msw\dummy.obj joytest.obj,
-joytest,
-NUL,
-$(LIBS),
-joytest.def
-;
-<<
-        rc -K joytest.res
-
-joytest.obj:      joytest.h joytest.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
+TARGET=joytest
+OBJECTS = $(TARGET).obj
 
-joytest.res :      joytest.rc $(WXDIR)\include\wx\msw\wx.rc
-    rc -r /i$(WXDIR)\include joytest
+!include $(WXDIR)\src\makeprog.msc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.sbr
-        -erase *.pdb
index 8ecd7c560835b0c47972bcf588392eac3e1405c9..e963c12e94945b0edae0e69f1cfda2219f0678d8 100644 (file)
@@ -1,85 +1,17 @@
 #
 # File:                makefile.dos
 # Author:      Julian Smart
-# Created:     1993
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds layout example (DOS).
+# Makefile : Builds 16-bit sample, VC++ 1.5
 # Use FINAL=1 argument to nmake to build final version with no debugging
-# info.
+# info
 
-# Set WXDIR for your system
 WXDIR = $(WXWIN)
 
-!include $(WXDIR)\src\makemsc.env
-
-THISDIR = $(WXDIR)\samples\layout
-WXLIB = $(WXDIR)\lib\wx.lib
-LIBS=$(WXLIB) oldnames libw llibcew commdlg ddeml shell mmsystem
-INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw
-DUMMY=$(WXDIR)\src\msw\dummy.obj
-
-# Set this to nothing if using MS C++ 7
-ZOPTION=/Z7
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-!if "$(FINAL)" == "0"
-CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od $(INC) /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch
-LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:512
-!else
-CPPFLAGS=/AL /W3 /G2sw $(INC) /Ox /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch
-LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:512
-!endif
-
-HEADERS = layout.h
-SOURCES = layout.$(SRCSUFF)
-OBJECTS = layout.obj
-
-layout:    layout.exe
-
-all:    wx layout.exe
-
-wx:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos FINAL=$(FINAL)
-        cd $(THISDIR)
-
-wxclean:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos clean
-        cd $(THISDIR)
-
-
-layout.exe:      $(DUMMY) $(WXLIB) layout.obj layout.def layout.res
-        link $(LINKFLAGS) @<<
-$(DUMMY) layout.obj,
-layout,
-NUL,
-$(LIBS),
-layout.def
-;
-<<
-        rc -31 -K layout.res
-
-layout.obj:      layout.h layout.$(SRCSUFF) $(DUMMY)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
-
-layout.res :      layout.rc $(WXDIR)\include\msw\wx.rc
-    rc -r /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa layout
+TARGET=layout
+OBJECTS = $(TARGET).obj
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.sbr
-        -erase *.pdb
+!include $(WXDIR)\src\makeprog.msc
 
index 5b65a93c365534ac8bb2f3f740fa8cb35933820a..ed9ccc0bed18cf12a11f028f03f76293da9cb724 100644 (file)
@@ -1,81 +1,17 @@
 #
 # File:                makefile.dos
 # Author:      Julian Smart
-# Created:     1993
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds minimal example (DOS).
+# Makefile : Builds 16-bit sample, VC++ 1.5
 # Use FINAL=1 argument to nmake to build final version with no debugging
 # info
 
 WXDIR = $(WXWIN)
 
-!include $(WXDIR)\src\makemsc.env
-
-THISDIR = $(WXDIR)\samples\minimal
-WXLIB = $(WXDIR)\lib\wx.lib
-LIBS=$(WXLIB) oldnames libw llibcew commdlg shell ddeml
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-INC=/I$(WXDIR)\include\msw /I$(WXDIR)\include\base
-
-# Set this to nothing if using MS C++ 7
-ZOPTION=/Z7
-
-!if "$(FINAL)" == "0"
-CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC)
-LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:512
-!else
-CPPFLAGS=/AL /W3 /G2sw /Ox /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC)
-LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:512
-!endif
-
-HEADERS =
-SOURCES = minimal.$(SRCSUFF)
-OBJECTS = minimal.obj
-
-all:    minimal.exe
-
-wx:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos FINAL=$(FINAL)
-        cd $(THISDIR)
-
-wxclean:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos clean
-        cd $(THISDIR)
-
-
-minimal.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) minimal.obj minimal.def minimal.res
-        link $(LINKFLAGS) @<<
-minimal.obj $(WXDIR)\src\msw\dummy.obj,
-minimal,
-NUL,
-$(LIBS),
-minimal.def
-;
-<<
-        rc -30 -K minimal.res
-
-minimal.obj:      minimal.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
+TARGET=listtest
+OBJECTS = $(TARGET).obj
 
-minimal.res :      minimal.rc $(WXDIR)\include\msw\wx.rc
-    rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw minimal
+!include $(WXDIR)\src\makeprog.msc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.sbr
-        -erase *.pdb
index 1bd3983dc80c39cc4cdf1d310185d623984dcd53..54c483503e527554a7b7d01740c35ace5bc954bc 100644 (file)
@@ -1,63 +1,17 @@
 #
 # File:                makefile.dos
 # Author:      Julian Smart
-# Created:     1993
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds mdi example (DOS).
+# Makefile : Builds 16-bit sample, VC++ 1.5
 # Use FINAL=1 argument to nmake to build final version with no debugging
 # info
 
 WXDIR = $(WXWIN)
 
-!include $(WXDIR)\src\makemsc.env
-
-THISDIR = $(WXDIR)\samples\mdi
-INC=/I$(WXDIR)\include
-
-HEADERS = mdi.h
-SOURCES = mdi.$(SRCSUFF)
-OBJECTS = mdi.obj
-
-all:    mdi.exe
-
-wx:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos
-        cd $(THISDIR)
-
-wxclean:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos clean
-        cd $(THISDIR)
-
-
-mdi.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) mdi.obj mdi.def mdi.res
-        link $(LINKFLAGS) @<<
-$(WXDIR)\src\msw\dummy.obj mdi.obj,
-mdi,
-NUL,
-$(LIBS),
-mdi.def
-;
-<<
-        rc -K mdi.res
-
-mdi.obj:      mdi.h mdi.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
+TARGET=mdi
+OBJECTS = $(TARGET).obj
 
-mdi.res :      mdi.rc $(WXDIR)\include\wx\msw\wx.rc
-       rc -r /i$(WXDIR)\include mdi
+!include $(WXDIR)\src\makeprog.msc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.sbr
-        -erase *.pdb
index e3f1acfaf4446c53a46ed18aacecc177cece05d7..400017d264318d9cf6f0b8c2acf2871399092093 100644 (file)
@@ -1,87 +1,17 @@
 #
 # File:                makefile.dos
 # Author:      Julian Smart
-# Created:     1993
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds memcheck example (DOS).
+# Makefile : Builds 16-bit sample, VC++ 1.5
 # Use FINAL=1 argument to nmake to build final version with no debugging
 # info
 
 WXDIR = $(WXWIN)
 
-!include $(WXDIR)\src\makemsc.env
-
-THISDIR = $(WXDIR)\samples\memcheck
-WXLIB = $(WXDIR)\lib\wx.lib
-LIBS=$(WXLIB) oldnames libw llibcew commdlg shell ddeml
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-!ifndef DEBUG
-DEBUG=0
-!endif
-
-INC=/I$(WXDIR)\include\msw /I$(WXDIR)\include\base
-
-# Set this to nothing if using MS C++ 7
-ZOPTION=/Z7
-
-!if "$(FINAL)" == "0"
-CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /DDEBUG=$(DEBUG) /G2sw /Od /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC)
-CPPFLAGS2=/AL /W3 /Zi $(ZOPTION) /DDEBUG /G2sw /Od /Dwx_msw $(INC)
-LINKFLAGS=/NOD /CO /ONERROR:NOEXE /NOE /SEG:512
-!else
-CPPFLAGS=/AL /W3 /G2sw /Ox /YuWX_PREC.H /DDEBUG=$(DEBUG) /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC)
-CPPFLAGS2=/AL /W3 /G2sw /Ox /DDEBUG /Dwx_msw $(INC)
-LINKFLAGS=/NOD /ONERROR:NOEXE /NOE /SEG:512
-!endif
-
-HEADERS =
-SOURCES = memcheck.$(SRCSUFF)
-OBJECTS = memcheck.obj
-
-all:    memcheck.exe
-
-wx:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos FINAL=$(FINAL)
-        cd $(THISDIR)
-
-wxclean:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos clean
-        cd $(THISDIR)
-
-
-memcheck.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) $(OBJECTS) memcheck.def memcheck.res
-        link $(LINKFLAGS) @<<
-$(OBJECTS) $(WXDIR)\src\msw\dummy.obj,
-memcheck,
-NUL,
-$(LIBS),
-memcheck.def
-;
-<<
-        rc -30 -K memcheck.res
-
-memcheck.obj:      memcheck.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
+TARGET=memcheck
+OBJECTS = $(TARGET).obj
 
-memcheck.res :      memcheck.rc $(WXDIR)\include\wx\msw\wx.rc
-    rc -r /i$(WXDIR)\include\wx memcheck
+!include $(WXDIR)\src\makeprog.msc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.sbr
-        -erase *.pdb
index 98f93ab7bbb6866580eb779ab4c5e8fe3a5ca986..13e3a4ce8eeef60898c11fc6c1f1a9e8f12374bd 100644 (file)
@@ -1,87 +1,17 @@
 #
 # File:                makefile.dos
 # Author:      Julian Smart
-# Created:     1993
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds wxToolbar sample
+# Makefile : Builds 16-bit sample, VC++ 1.5
 # Use FINAL=1 argument to nmake to build final version with no debugging
 # info
 
-# Set WXDIR for your system
 WXDIR = $(WXWIN)
 
-!include $(WXDIR)\src\makemsc.env
-
-BBARDIR = $(WXDIR)\samples\toolbar
-
-INC = /I$(WXDIR)\include\base /I$(WXDIR)\include\msw
-
-THISDIR = $(BBARDIR)
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-# Default is to output RTF for WinHelp
-!ifndef WINHELP
-WINHELP=-winhelp
-!endif
-
-# Set this to nothing if using MS C++ 7
-ZOPTION=/Z7
-
-!if "$(FINAL)" == "0"
-CPPFLAGS=/AL /Gt8 /W3 /Zi $(ZOPTION) /G2sw /Od /YuWX_PREC.H $(INC) /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch
-CFLAGS=/AL /Gt8 /W3 /Zi $(ZOPTION) /G2sw /Od $(INC) /Dwx_msw
-LINKFLAGS=/NOD /CO /SEG:512 /ONERROR:NOEXE
-!else
-CPPFLAGS=/AL /Gt8 /W3 /G2sw /Os /YuWX_PREC.H $(INC) /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch
-CFLAGS=/AL /Gt8 /W3 /Zi $(ZOPTION) /G2sw /Od $(INC) /Dwx_msw
-LINKFLAGS=/NOD /SEG:512 /ONERROR:NOEXE
-!endif
-
-OBJECTS = test.obj
-
-all:    test.exe
-
-wx:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos FINAL=$(FINAL)
-        cd $(THISDIR)
-
-wxclean:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos clean
-        cd $(THISDIR)
-
-test.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) test.obj test.def test.res
-        link $(LINKFLAGS) @<<
-$(WXDIR)\src\msw\dummy.obj test.obj,
-test,
-NUL,
-$(LIBS),
-test.def
-;
-<<
-        rc -30 -K test.res
-
-test.obj:      test.h test.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
-
-test.res :      test.rc $(WXDIR)\include\msw\wx.rc
-    rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw test
+TARGET=test
+OBJECTS = $(TARGET).obj
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.sbr
-        -erase *.pdb
+!include $(WXDIR)\src\makeprog.msc
 
index aa7e6ddf53a1bb079dc1849955e54ef835374a98..6319446109fc306ec3acd0b82ec91cfe3a7e6333 100644 (file)
@@ -1,65 +1,17 @@
 #
 # File:                makefile.dos
 # Author:      Julian Smart
-# Created:     1993
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds minimal example (DOS).
+# Makefile : Builds 16-bit sample, VC++ 1.5
 # Use FINAL=1 argument to nmake to build final version with no debugging
 # info
 
 WXDIR = $(WXWIN)
 
-!include $(WXDIR)\src\makemsc.env
-
-THISDIR = $(WXDIR)\samples\minimal
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-HEADERS =
-SOURCES = minimal.$(SRCSUFF)
-OBJECTS = minimal.obj
-
-all:    minimal.exe
-
-wx:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos FINAL=$(FINAL)
-        cd $(THISDIR)
-
-wxclean:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos clean
-        cd $(THISDIR)
-
-minimal.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) minimal.obj minimal.def minimal.res
-        link $(LINKFLAGS) @<<
-minimal.obj $(WXDIR)\src\msw\dummy.obj,
-minimal,
-NUL,
-$(LIBS),
-minimal.def
-;
-<<
-        rc -K minimal.res
-
-minimal.obj:      minimal.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
+TARGET=minimal
+OBJECTS=$(TARGET).obj
 
-minimal.res :      minimal.rc $(WXDIR)\include\wx\msw\wx.rc
-    rc -r /i$(WXDIR)\include minimal
+!include $(WXDIR)\src\makeprog.msc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.sbr
-        -erase *.pdb
index 6096ca810ce52c1e4c2a975b8e80afcd30657539..32d5aa720b33f47ec558d30a91173f0d0af8ae15 100644 (file)
@@ -1,86 +1,17 @@
 #
 # File:                makefile.dos
 # Author:      Julian Smart
-# Created:     1993
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds resource example (DOS).
+# Makefile : Builds 16-bit sample, VC++ 1.5
 # Use FINAL=1 argument to nmake to build final version with no debugging
-# info.
+# info
 
-# Set WXDIR for your system
 WXDIR = $(WXWIN)
 
-!include $(WXDIR)\src\makemsc.env
-
-THISDIR = $(WXDIR)\samples\resource
-WXLIB = $(WXDIR)\lib\wx.lib
-LIBS=$(WXLIB) oldnames libw llibcew commdlg ddeml shell mmsystem
-INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw
-DUMMY=$(WXDIR)\src\msw\dummy.obj
-
-# Set this to nothing if using MS C++ 7
-ZOPTION=/Z7
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-PRECOMP = /YuWX_PREC.H /Fp$(WXDIR)\src\msw\wx.pch
-
-!if "$(FINAL)" == "0"
-CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od $(INC) $(PRECOMP) /Dwx_msw
-LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:256
-!else
-CPPFLAGS=/AL /W3 /G2sw $(INC) /Ox $(PRECOMP) /Dwx_msw
-LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:256
-!endif
-
-HEADERS = resource.h
-SOURCES = resource.$(SRCSUFF)
-OBJECTS = resource.obj
-
-resource:    resource.exe
-
-all:    wx resource.exe
-
-wx:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos FINAL=$(FINAL)
-        cd $(THISDIR)
-
-wxclean:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos clean
-        cd $(THISDIR)
-
-
-resource.exe:      $(DUMMY) $(WXLIB) resource.obj resource.def resource.res
-        link $(LINKFLAGS) @<<
-$(DUMMY) resource.obj,
-resource,
-NUL,
-$(LIBS),
-resource.def
-;
-<<
-        rc -31 -K resource.res
-
-resource.obj:      resource.h resource.$(SRCSUFF) dialog1.wxr $(DUMMY)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
+TARGET=nativdlg
+OBJECTS = $(TARGET).obj
 
-resource.res :      resource.rc $(WXDIR)\include\msw\wx.rc
-    rc -r /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa resource
+!include $(WXDIR)\src\makeprog.msc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.sbr
-        -erase *.pdb
index 032e661e154e42cb12a7589837b6e487edbd9131..13e3a4ce8eeef60898c11fc6c1f1a9e8f12374bd 100644 (file)
@@ -1,65 +1,17 @@
 #
 # File:                makefile.dos
 # Author:      Julian Smart
-# Created:     1993
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds tab example (DOS).
+# Makefile : Builds 16-bit sample, VC++ 1.5
 # Use FINAL=1 argument to nmake to build final version with no debugging
 # info
 
 WXDIR = $(WXWIN)
 
-!include $(WXDIR)\src\makemsc.env
-
-THISDIR = $(WXDIR)\samples\tab
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-HEADERS =
-SOURCES = test.$(SRCSUFF)
-OBJECTS = test.obj
-
-all:    test.exe
-
-wx:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos FINAL=$(FINAL)
-        cd $(THISDIR)
-
-wxclean:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos clean
-        cd $(THISDIR)
-
-test.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) test.obj test.def test.res
-        link $(LINKFLAGS) @<<
-test.obj $(WXDIR)\src\msw\dummy.obj,
-test,
-NUL,
-$(LIBS),
-test.def
-;
-<<
-        rc -K test.res
-
-test.obj:      test.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
+TARGET=test
+OBJECTS = $(TARGET).obj
 
-test.res :      test.rc $(WXDIR)\include\wx\msw\wx.rc
-    rc -r /i$(WXDIR)\include test
+!include $(WXDIR)\src\makeprog.msc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.sbr
-        -erase *.pdb
index b8dbdf8b5d72cc16ecdde8bfc8175ac8c8257ca7..43b2ed390729723549d9f389cb180b506d630537 100644 (file)
@@ -1,4 +1,3 @@
-      *   Last change:  JS   26 Oct 98    6:29 pm
 NAME         Test
 DESCRIPTION  'Notebook test'
 EXETYPE      WINDOWS
index 71c72681ac0631f54992d79e14043f7c1cb63a07..8dc0bc94452f7f2df941deca16657e195a7461ab 100644 (file)
@@ -1,65 +1,17 @@
 #
 # File:                makefile.dos
 # Author:      Julian Smart
-# Created:     1993
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds ownerdrw example (DOS).
+# Makefile : Builds 16-bit sample, VC++ 1.5
 # Use FINAL=1 argument to nmake to build final version with no debugging
 # info
 
 WXDIR = $(WXWIN)
 
-!include $(WXDIR)\src\makemsc.env
-
-THISDIR = $(WXDIR)\samples\ownerdrw
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-HEADERS =
-SOURCES = ownerdrw.$(SRCSUFF)
-OBJECTS = ownerdrw.obj
-
-all:    ownerdrw.exe
-
-wx:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos FINAL=$(FINAL)
-        cd $(THISDIR)
-
-wxclean:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos clean
-        cd $(THISDIR)
-
-ownerdrw.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) ownerdrw.obj ownerdrw.def ownerdrw.res
-        link $(LINKFLAGS) @<<
-ownerdrw.obj $(WXDIR)\src\msw\dummy.obj,
-ownerdrw,
-NUL,
-$(LIBS),
-ownerdrw.def
-;
-<<
-        rc -K ownerdrw.res
-
-ownerdrw.obj:      ownerdrw.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
+TARGET=ownerdrw
+OBJECTS = $(TARGET).obj
 
-ownerdrw.res :      ownerdrw.rc $(WXDIR)\include\wx\msw\wx.rc
-    rc -r /i$(WXDIR)\include ownerdrw
+!include $(WXDIR)\src\makeprog.msc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.sbr
-        -erase *.pdb
index 032e661e154e42cb12a7589837b6e487edbd9131..13e3a4ce8eeef60898c11fc6c1f1a9e8f12374bd 100644 (file)
@@ -1,65 +1,17 @@
 #
 # File:                makefile.dos
 # Author:      Julian Smart
-# Created:     1993
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds tab example (DOS).
+# Makefile : Builds 16-bit sample, VC++ 1.5
 # Use FINAL=1 argument to nmake to build final version with no debugging
 # info
 
 WXDIR = $(WXWIN)
 
-!include $(WXDIR)\src\makemsc.env
-
-THISDIR = $(WXDIR)\samples\tab
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-HEADERS =
-SOURCES = test.$(SRCSUFF)
-OBJECTS = test.obj
-
-all:    test.exe
-
-wx:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos FINAL=$(FINAL)
-        cd $(THISDIR)
-
-wxclean:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos clean
-        cd $(THISDIR)
-
-test.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) test.obj test.def test.res
-        link $(LINKFLAGS) @<<
-test.obj $(WXDIR)\src\msw\dummy.obj,
-test,
-NUL,
-$(LIBS),
-test.def
-;
-<<
-        rc -K test.res
-
-test.obj:      test.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
+TARGET=test
+OBJECTS = $(TARGET).obj
 
-test.res :      test.rc $(WXDIR)\include\wx\msw\wx.rc
-    rc -r /i$(WXDIR)\include test
+!include $(WXDIR)\src\makeprog.msc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.sbr
-        -erase *.pdb
index 98f93ab7bbb6866580eb779ab4c5e8fe3a5ca986..13e3a4ce8eeef60898c11fc6c1f1a9e8f12374bd 100644 (file)
@@ -1,87 +1,17 @@
 #
 # File:                makefile.dos
 # Author:      Julian Smart
-# Created:     1993
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds wxToolbar sample
+# Makefile : Builds 16-bit sample, VC++ 1.5
 # Use FINAL=1 argument to nmake to build final version with no debugging
 # info
 
-# Set WXDIR for your system
 WXDIR = $(WXWIN)
 
-!include $(WXDIR)\src\makemsc.env
-
-BBARDIR = $(WXDIR)\samples\toolbar
-
-INC = /I$(WXDIR)\include\base /I$(WXDIR)\include\msw
-
-THISDIR = $(BBARDIR)
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-# Default is to output RTF for WinHelp
-!ifndef WINHELP
-WINHELP=-winhelp
-!endif
-
-# Set this to nothing if using MS C++ 7
-ZOPTION=/Z7
-
-!if "$(FINAL)" == "0"
-CPPFLAGS=/AL /Gt8 /W3 /Zi $(ZOPTION) /G2sw /Od /YuWX_PREC.H $(INC) /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch
-CFLAGS=/AL /Gt8 /W3 /Zi $(ZOPTION) /G2sw /Od $(INC) /Dwx_msw
-LINKFLAGS=/NOD /CO /SEG:512 /ONERROR:NOEXE
-!else
-CPPFLAGS=/AL /Gt8 /W3 /G2sw /Os /YuWX_PREC.H $(INC) /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch
-CFLAGS=/AL /Gt8 /W3 /Zi $(ZOPTION) /G2sw /Od $(INC) /Dwx_msw
-LINKFLAGS=/NOD /SEG:512 /ONERROR:NOEXE
-!endif
-
-OBJECTS = test.obj
-
-all:    test.exe
-
-wx:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos FINAL=$(FINAL)
-        cd $(THISDIR)
-
-wxclean:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos clean
-        cd $(THISDIR)
-
-test.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) test.obj test.def test.res
-        link $(LINKFLAGS) @<<
-$(WXDIR)\src\msw\dummy.obj test.obj,
-test,
-NUL,
-$(LIBS),
-test.def
-;
-<<
-        rc -30 -K test.res
-
-test.obj:      test.h test.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
-
-test.res :      test.rc $(WXDIR)\include\msw\wx.rc
-    rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw test
+TARGET=test
+OBJECTS = $(TARGET).obj
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.sbr
-        -erase *.pdb
+!include $(WXDIR)\src\makeprog.msc
 
index 5b65a93c365534ac8bb2f3f740fa8cb35933820a..c1d52b22bfc53abda153d53d1a312a215f8b1e81 100644 (file)
@@ -1,81 +1,17 @@
 #
 # File:                makefile.dos
 # Author:      Julian Smart
-# Created:     1993
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds minimal example (DOS).
+# Makefile : Builds 16-bit sample, VC++ 1.5
 # Use FINAL=1 argument to nmake to build final version with no debugging
 # info
 
 WXDIR = $(WXWIN)
 
-!include $(WXDIR)\src\makemsc.env
-
-THISDIR = $(WXDIR)\samples\minimal
-WXLIB = $(WXDIR)\lib\wx.lib
-LIBS=$(WXLIB) oldnames libw llibcew commdlg shell ddeml
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-INC=/I$(WXDIR)\include\msw /I$(WXDIR)\include\base
-
-# Set this to nothing if using MS C++ 7
-ZOPTION=/Z7
-
-!if "$(FINAL)" == "0"
-CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC)
-LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:512
-!else
-CPPFLAGS=/AL /W3 /G2sw /Ox /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC)
-LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:512
-!endif
-
-HEADERS =
-SOURCES = minimal.$(SRCSUFF)
-OBJECTS = minimal.obj
-
-all:    minimal.exe
-
-wx:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos FINAL=$(FINAL)
-        cd $(THISDIR)
-
-wxclean:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos clean
-        cd $(THISDIR)
-
-
-minimal.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) minimal.obj minimal.def minimal.res
-        link $(LINKFLAGS) @<<
-minimal.obj $(WXDIR)\src\msw\dummy.obj,
-minimal,
-NUL,
-$(LIBS),
-minimal.def
-;
-<<
-        rc -30 -K minimal.res
-
-minimal.obj:      minimal.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
+TARGET=treetest
+OBJECTS = $(TARGET).obj
 
-minimal.res :      minimal.rc $(WXDIR)\include\msw\wx.rc
-    rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw minimal
+!include $(WXDIR)\src\makeprog.msc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.sbr
-        -erase *.pdb
index 8c952e6f001eda78bf81f88cf60a35710f86fdfd..714586eb59b884ac2228566d24982eec6ee4a0a5 100644 (file)
@@ -1,4 +1,3 @@
-      *   Last change:  JS   28 Apr 97    1:45 pm
 NAME         TreeCtrl
 DESCRIPTION  'TreeCtrl wxWindows application'
 EXETYPE      WINDOWS
index 0c9debf866ee022ea5025f74b5609280c0f16d7e..837e509b02a6e310113f8e90919b6331c825f7f3 100644 (file)
@@ -1,65 +1,17 @@
 #
 # File:                makefile.dos
 # Author:      Julian Smart
-# Created:     1993
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds typetest example (DOS).
+# Makefile : Builds 16-bit sample, VC++ 1.5
 # Use FINAL=1 argument to nmake to build final version with no debugging
 # info
 
 WXDIR = $(WXWIN)
 
-!include $(WXDIR)\src\makemsc.env
-
-THISDIR = $(WXDIR)\samples\typetest
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-HEADERS =
-SOURCES = typetest.$(SRCSUFF)
-OBJECTS = typetest.obj
-
-all:    typetest.exe
-
-wx:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos FINAL=$(FINAL)
-        cd $(THISDIR)
-
-wxclean:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos clean
-        cd $(THISDIR)
-
-typetest.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) typetest.obj typetest.def typetest.res
-        link $(LINKFLAGS) @<<
-typetest.obj $(WXDIR)\src\msw\dummy.obj,
-typetest,
-NUL,
-$(LIBS),
-typetest.def
-;
-<<
-        rc -K typetest.res
-
-typetest.obj:      typetest.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
+TARGET=typetest
+OBJECTS = $(TARGET).obj
 
-typetest.res :      typetest.rc $(WXDIR)\include\wx\msw\wx.rc
-    rc -r /i$(WXDIR)\include typetest
+!include $(WXDIR)\src\makeprog.msc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.sbr
-        -erase *.pdb
index 5b65a93c365534ac8bb2f3f740fa8cb35933820a..b8a1ba210448c274f64dc2e8c4c25b66627236c6 100644 (file)
@@ -1,81 +1,17 @@
 #
 # File:                makefile.dos
 # Author:      Julian Smart
-# Created:     1993
+# Created:     1998
 # Updated:     
-# Copyright:   (c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds minimal example (DOS).
+# Makefile : Builds 16-bit sample, VC++ 1.5
 # Use FINAL=1 argument to nmake to build final version with no debugging
 # info
 
 WXDIR = $(WXWIN)
 
-!include $(WXDIR)\src\makemsc.env
-
-THISDIR = $(WXDIR)\samples\minimal
-WXLIB = $(WXDIR)\lib\wx.lib
-LIBS=$(WXLIB) oldnames libw llibcew commdlg shell ddeml
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-INC=/I$(WXDIR)\include\msw /I$(WXDIR)\include\base
-
-# Set this to nothing if using MS C++ 7
-ZOPTION=/Z7
-
-!if "$(FINAL)" == "0"
-CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC)
-LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:512
-!else
-CPPFLAGS=/AL /W3 /G2sw /Ox /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC)
-LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:512
-!endif
-
-HEADERS =
-SOURCES = minimal.$(SRCSUFF)
-OBJECTS = minimal.obj
-
-all:    minimal.exe
-
-wx:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos FINAL=$(FINAL)
-        cd $(THISDIR)
-
-wxclean:
-        cd $(WXDIR)\src\msw
-        nmake -f makefile.dos clean
-        cd $(THISDIR)
-
-
-minimal.exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) minimal.obj minimal.def minimal.res
-        link $(LINKFLAGS) @<<
-minimal.obj $(WXDIR)\src\msw\dummy.obj,
-minimal,
-NUL,
-$(LIBS),
-minimal.def
-;
-<<
-        rc -30 -K minimal.res
-
-minimal.obj:      minimal.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
+TARGET=validate
+OBJECTS = $(TARGET).obj
 
-minimal.res :      minimal.rc $(WXDIR)\include\msw\wx.rc
-    rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw minimal
+!include $(WXDIR)\src\makeprog.msc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.sbr
-        -erase *.pdb
diff --git a/samples/wxpoem/makefile.dos b/samples/wxpoem/makefile.dos
new file mode 100644 (file)
index 0000000..84d5daa
--- /dev/null
@@ -0,0 +1,17 @@
+#
+# File:                makefile.dos
+# Author:      Julian Smart
+# Created:     1998
+# Updated:     
+#
+# Makefile : Builds 16-bit sample, VC++ 1.5
+# Use FINAL=1 argument to nmake to build final version with no debugging
+# info
+
+WXDIR = $(WXWIN)
+
+TARGET=wxpoem
+OBJECTS = $(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.msc
+
index 1510e939a72c3c6fd3f1c00786ceca49c34cdfae..9f25a1f05b1602d63ff24fcbf7813cf90692f083 100644 (file)
@@ -42,7 +42,7 @@
 // we must include (one of) these files for wxConfigBase::Create
 #if defined(__WXMSW__) && defined(wxCONFIG_WIN32_NATIVE)
   #ifdef __WIN32__
-    #include  <wx/msw/regconf.h>
+    #include  <wx/msw/iniconf.h>
   #else  //WIN16
     #include  <wx/msw/iniconf.h>
   #endif
index db260cf827c9666004c95ea5ad58b0008e1205b5..f670a131b50083ffb582391e2ae0a51cf15a2097 100644 (file)
 #pragma implementation "dirdlgg.h"
 #endif
 
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
 #include "wx/defs.h"
 #include "wx/utils.h"
 #include "wx/dialog.h"
@@ -126,8 +133,8 @@ class wxDirCtrl: public wxTreeCtrl
              const wxSize& size = wxDefaultSize,
              const long style = wxTR_HAS_BUTTONS,
              const wxString& name = "wxTreeCtrl" );
-    void OnExpandItem( const wxTreeEvent &event );
-    void OnCollapseItem( const wxTreeEvent &event );
+    void OnExpandItem(wxTreeEvent &event );
+    void OnCollapseItem(wxTreeEvent &event );
     void ShowHidden( const bool yesno );
     DECLARE_EVENT_TABLE()
  protected:
@@ -235,7 +242,7 @@ void wxDirCtrl::CreateItems(const wxTreeItemId &parent)
   }
 }
 
-void wxDirCtrl::OnExpandItem( const wxTreeEvent &event )
+void wxDirCtrl::OnExpandItem(wxTreeEvent &event )
 {
   if (event.GetItem() == m_rootId)
   {
@@ -273,7 +280,7 @@ void wxDirCtrl::OnExpandItem( const wxTreeEvent &event )
 };
 
 
-void wxDirCtrl::OnCollapseItem( const wxTreeEvent &event )
+void wxDirCtrl::OnCollapseItem(wxTreeEvent &event )
 {
   wxTreeItemId child, parent = event.GetItem();
   long cookie;
@@ -414,7 +421,7 @@ void wxDirDialog::OnTreeSelected( wxTreeEvent &event )
     m_input->SetValue( *(data->m_path) );
 };
 
-void wxDirDialog::OnTreeKeyDown( wxKeyEvent &WXUNUSED(event) )
+void wxDirDialog::OnTreeKeyDown( wxTreeEvent &WXUNUSED(event) )
 {
   wxDirItemData *data = 
     (wxDirItemData*)m_dir->GetItemData(m_dir->GetSelection());
index 29ad9cdb7518cef1650a9f7b324d4083bbd23181..95614a8281fabb07dbd7f687dcaa5eed0df1f24c 100644 (file)
 #pragma implementation "imaglist.h"
 #endif
  
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
 #include "wx/imaglist.h"
 
 //-----------------------------------------------------------------------------
index 192ddb36a0bd06529e9e563e085f3c6b0cd9e8db..4e5824aabba235b58d5a171880a78022f91aae2a 100644 (file)
 #pragma implementation "listctrl.h"
 #endif
 
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
 #include "wx/dcscreen.h"
 #include "wx/app.h"
 #include "wx/listctrl.h"
@@ -73,7 +80,7 @@ void wxListItemData::SetPosition( int x, int y )
     m_ypos = y;
 }
 
-void wxListItemData::SetSize( int const width, int height )
+void wxListItemData::SetSize( int width, int height )
 {
     if (width != -1) m_width = width;
     if (height != -1) m_height = height;
@@ -260,7 +267,7 @@ wxListLineData::wxListLineData( wxListMainWindow *owner, int mode, wxBrush *hili
     m_spacing = 0;
 }
 
-void wxListLineData::CalculateSize( wxPaintDC *dc, int spacing )
+void wxListLineData::CalculateSize( wxDC *dc, int spacing )
 {
     m_spacing = spacing;
     switch (m_mode)
@@ -319,7 +326,7 @@ void wxListLineData::CalculateSize( wxPaintDC *dc, int spacing )
     }
 }
 
-void wxListLineData::SetPosition( wxPaintDC *dc, int x, int y, int window_width )
+void wxListLineData::SetPosition( wxDC *dc, int x, int y, int window_width )
 {
   m_bound_all.x = x;
   m_bound_all.y = y;
@@ -470,7 +477,7 @@ void wxListLineData::SetItem( int index, const wxListItem &info )
     }
 }
 
-void wxListLineData::GetItem( int const index, wxListItem &info )
+void wxListLineData::GetItem( int index, wxListItem &info )
 {
     int i = index;
     wxNode *node = m_items.Nth( i );
@@ -516,7 +523,7 @@ int wxListLineData::GetImage( int index )
     return -1;
 }
 
-void wxListLineData::DoDraw( wxPaintDC *dc, bool hilight, bool paintBG )
+void wxListLineData::DoDraw( wxDC *dc, bool hilight, bool paintBG )
 {
     long dev_x = dc->LogicalToDeviceX( m_bound_all.x-2 );
     long dev_y = dc->LogicalToDeviceY( m_bound_all.y-2 );
@@ -616,7 +623,7 @@ void wxListLineData::ReverseHilight( void )
         m_owner->DeselectLine( this );
 }
 
-void wxListLineData::DrawRubberBand( wxPaintDC *dc, bool on )
+void wxListLineData::DrawRubberBand( wxDC *dc, bool on )
 {
     if (on)
     {
@@ -627,7 +634,7 @@ void wxListLineData::DrawRubberBand( wxPaintDC *dc, bool on )
     }
 }
 
-void wxListLineData::Draw( wxPaintDC *dc )
+void wxListLineData::Draw( wxDC *dc )
 {
     DoDraw( dc, m_hilighted, m_hilighted );
 }
@@ -696,7 +703,7 @@ wxListHeaderWindow::~wxListHeaderWindow( void )
     delete m_resizeCursor;
 }
 
-void wxListHeaderWindow::DoDrawRect( wxPaintDC *dc, int x, int y, int w, int h )
+void wxListHeaderWindow::DoDrawRect( wxDC *dc, int x, int y, int w, int h )
 {
     const int m_corner = 1;
 
@@ -1536,7 +1543,7 @@ void wxListMainWindow::OnSize( wxSizeEvent &WXUNUSED(event) )
 */
 }
 
-void wxListMainWindow::DrawImage( int index, wxPaintDC *dc, int x, int y )
+void wxListMainWindow::DrawImage( int index, wxDC *dc, int x, int y )
 {
     if ((m_mode & wxLC_ICON) && (m_normal_image_list))
     {
@@ -1577,7 +1584,7 @@ void wxListMainWindow::GetImageSize( int index, int &width, int &height )
 
 int wxListMainWindow::GetTextLength( wxString &s )
 {
-    wxPaintDC dc( this );
+    wxClientDC dc( this );
     long lw = 0;
     long lh = 0;
     dc.GetTextExtent( s, &lw, &lh );
@@ -1891,7 +1898,7 @@ void wxListMainWindow::CalculatePositions( void )
 {
     if (!m_lines.First()) return;
 
-    wxPaintDC dc( this );
+    wxClientDC dc( this );
     dc.SetFont( GetFont() );
 
     int iconSpacing = 0;
diff --git a/src/generic/notebook.cpp b/src/generic/notebook.cpp
new file mode 100644 (file)
index 0000000..cced371
--- /dev/null
@@ -0,0 +1,642 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        notebook.cpp
+// Purpose:     implementation of wxNotebook
+// Author:      Julian Smart
+// Modified by:
+// Created:     17/09/98
+// RCS-ID:      $Id$
+// Copyright:   (c) Julian Smart
+// Licence:     wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+// ============================================================================
+// declarations
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+#ifdef __GNUG__
+#pragma implementation "notebook.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#include  <wx/string.h>
+#include  <wx/log.h>
+#include  <wx/imaglist.h>
+#include  <wx/generic/notebook.h>
+#include  <wx/dcclient.h>
+
+// ----------------------------------------------------------------------------
+// macros
+// ----------------------------------------------------------------------------
+
+// check that the page index is valid
+#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((nPage) < GetPageCount()))
+
+// ----------------------------------------------------------------------------
+// event table
+// ----------------------------------------------------------------------------
+
+#if !USE_SHARED_LIBRARIES
+BEGIN_EVENT_TABLE(wxNotebook, wxControl)
+    EVT_NOTEBOOK_PAGE_CHANGED(-1, wxNotebook::OnSelChange)
+    EVT_SIZE(wxNotebook::OnSize)
+    EVT_PAINT(wxNotebook::OnPaint)
+    EVT_MOUSE_EVENTS(wxNotebook::OnMouseEvent)
+    EVT_SET_FOCUS(wxNotebook::OnSetFocus)
+    EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey)
+    EVT_IDLE(wxNotebook::OnIdle)
+END_EVENT_TABLE()
+
+IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl)
+IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxCommandEvent)
+#endif
+
+// ============================================================================
+// implementation
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// wxNotebook construction
+// ----------------------------------------------------------------------------
+
+// common part of all ctors
+void wxNotebook::Init()
+{
+    m_tabView = (wxNotebookTabView*) NULL;
+    m_pImageList = NULL;
+    m_nSelection = -1;
+}
+
+// default for dynamic class
+wxNotebook::wxNotebook()
+{
+    Init();
+}
+
+// the same arguments as for wxControl
+wxNotebook::wxNotebook(wxWindow *parent,
+                       wxWindowID id,
+                       const wxPoint& pos,
+                       const wxSize& size,
+                       long style,
+                       const wxString& name)
+{
+    Init();
+
+    Create(parent, id, pos, size, style, name);
+}
+
+// Create() function
+bool wxNotebook::Create(wxWindow *parent,
+                        wxWindowID id,
+                        const wxPoint& pos,
+                        const wxSize& size,
+                        long style,
+                        const wxString& name)
+{
+    // base init
+    SetName(name);
+
+    m_windowId = id == -1 ? NewControlId() : id;
+
+    // It's like a normal window...
+    if (!wxWindow::Create(parent, id, pos, size, style, name))
+        return FALSE;
+
+    SetTabView(new wxNotebookTabView(this));
+
+    return TRUE;
+}
+
+// dtor
+wxNotebook::~wxNotebook()
+{
+    delete m_tabView;
+}
+
+// ----------------------------------------------------------------------------
+// wxNotebook accessors
+// ----------------------------------------------------------------------------
+int wxNotebook::GetPageCount() const
+{
+    return m_aPages.Count();
+}
+
+int wxNotebook::GetRowCount() const
+{
+    // TODO
+    return 0;
+}
+
+int wxNotebook::SetSelection(int nPage)
+{
+    if (nPage == -1)
+      return 0;
+
+    wxASSERT( IS_VALID_PAGE(nPage) );
+
+    wxNotebookPage* pPage = GetPage(nPage);
+
+    m_tabView->SetTabSelection((int) (long) pPage);
+
+    // TODO
+    return 0;
+}
+
+void wxNotebook::AdvanceSelection(bool bForward)
+{
+    int nSel = GetSelection();
+    int nMax = GetPageCount() - 1;
+    if ( bForward )
+        SetSelection(nSel == nMax ? 0 : nSel + 1);
+    else
+        SetSelection(nSel == 0 ? nMax : nSel - 1);
+}
+
+bool wxNotebook::SetPageText(int nPage, const wxString& strText)
+{
+    wxASSERT( IS_VALID_PAGE(nPage) );
+
+    wxNotebookPage* page = GetPage(nPage);
+    if (page)
+    {
+        m_tabView->SetTabText((int) (long) page, strText);
+        Refresh();
+        return TRUE;
+    }
+
+    return FALSE;
+}
+
+wxString wxNotebook::GetPageText(int nPage) const
+{
+    wxASSERT( IS_VALID_PAGE(nPage) );
+
+    wxNotebookPage* page = ((wxNotebook*)this)->GetPage(nPage);
+    if (page)
+        return m_tabView->GetTabText((int) (long) page);
+    else
+        return wxEmptyString;
+}
+
+int wxNotebook::GetPageImage(int nPage) const
+{
+    wxASSERT( IS_VALID_PAGE(nPage) );
+
+    // TODO
+    return 0;
+}
+
+bool wxNotebook::SetPageImage(int nPage, int nImage)
+{
+    wxASSERT( IS_VALID_PAGE(nPage) );
+
+    // TODO
+    return FALSE;
+}
+
+void wxNotebook::SetImageList(wxImageList* imageList)
+{ 
+    m_pImageList = imageList;
+    // TODO
+}
+
+// ----------------------------------------------------------------------------
+// wxNotebook operations
+// ----------------------------------------------------------------------------
+
+// remove one page from the notebook and delete it
+bool wxNotebook::DeletePage(int nPage)
+{
+    wxCHECK( IS_VALID_PAGE(nPage), FALSE );
+
+    if (m_nSelection != -1)
+    {
+        m_aPages[m_nSelection]->Show(FALSE);
+        m_aPages[m_nSelection]->Lower();
+    }
+
+    wxNotebookPage* pPage = GetPage(nPage);
+    m_tabView->RemoveTab((int) (long) pPage);
+
+    delete m_aPages[nPage];
+    m_aPages.Remove(nPage);
+
+    if (m_aPages.GetCount() == 0)
+    {
+      m_nSelection = -1;
+      m_tabView->SetTabSelection(-1, FALSE);
+    }
+    else if (m_nSelection > -1)
+    {
+      m_nSelection = -1;
+      m_tabView->SetTabSelection((int) (long) GetPage(0), FALSE);
+      if (m_nSelection != 0)
+        ChangePage(-1, 0);
+    }
+
+    RefreshLayout(FALSE);
+
+    return TRUE;
+}
+
+bool wxNotebook::DeletePage(wxNotebookPage* page)
+{
+    int pagePos = FindPagePosition(page);
+    if (pagePos > -1)
+        return DeletePage(pagePos);
+    else
+        return FALSE;
+}
+
+// remove one page from the notebook
+bool wxNotebook::RemovePage(int nPage)
+{
+    wxCHECK( IS_VALID_PAGE(nPage), FALSE );
+
+    m_aPages[nPage]->Show(FALSE);
+    //    m_aPages[nPage]->Lower();
+
+    wxNotebookPage* pPage = GetPage(nPage);
+    m_tabView->RemoveTab((int) (long) pPage);
+
+    m_aPages.Remove(nPage);
+
+    if (m_aPages.GetCount() == 0)
+    {
+      m_nSelection = -1;
+      m_tabView->SetTabSelection(-1, TRUE);
+    }
+    else if (m_nSelection > -1)
+    {
+      // Only change the selection if the page we
+      // deleted was the selection.
+      if (nPage == m_nSelection)
+      {
+         m_nSelection = -1;
+         // Select the first tab. Generates a ChangePage.
+         m_tabView->SetTabSelection((int) (long) GetPage(0), TRUE);
+      }
+      else
+      {
+       // We must adjust which tab we think is selected.
+        // If greater than the page we deleted, it must be moved down
+        // a notch.
+        if (m_nSelection > nPage)
+          m_nSelection -- ;
+      }
+    }
+
+    RefreshLayout(FALSE);
+
+    return TRUE;
+}
+
+bool wxNotebook::RemovePage(wxNotebookPage* page)
+{
+    int pagePos = FindPagePosition(page);
+    if (pagePos > -1)
+        return RemovePage(pagePos);
+    else
+        return FALSE;
+}
+
+// Find the position of the wxNotebookPage, -1 if not found.
+int wxNotebook::FindPagePosition(wxNotebookPage* page) const
+{
+    int nPageCount = GetPageCount();
+    int nPage;
+    for ( nPage = 0; nPage < nPageCount; nPage++ )
+        if (m_aPages[nPage] == page)
+            return nPage;
+    return -1;
+}
+
+// remove all pages
+bool wxNotebook::DeleteAllPages()
+{
+    m_tabView->ClearTabs(TRUE);
+
+    int nPageCount = GetPageCount();
+    int nPage;
+    for ( nPage = 0; nPage < nPageCount; nPage++ )
+        delete m_aPages[nPage];
+
+    m_aPages.Clear();
+
+    return TRUE;
+}
+
+// add a page to the notebook
+bool wxNotebook::AddPage(wxNotebookPage *pPage,
+                         const wxString& strText,
+                         bool bSelect,
+                         int imageId)
+{
+    return InsertPage(GetPageCount(), pPage, strText, bSelect, imageId);
+}
+
+// same as AddPage() but does it at given position
+bool wxNotebook::InsertPage(int nPage,
+                            wxNotebookPage *pPage,
+                            const wxString& strText,
+                            bool bSelect,
+                            int imageId)
+{
+    wxASSERT( pPage != NULL );
+    wxCHECK( IS_VALID_PAGE(nPage) || nPage == GetPageCount(), FALSE );
+
+    m_tabView->AddTab((int) (long) pPage, strText);
+    if (!bSelect)
+      pPage->Show(FALSE);
+
+    // save the pointer to the page
+    m_aPages.Insert(pPage, nPage);
+
+    if (bSelect)
+    {
+        // This will cause ChangePage to be called, via OnSelPage
+        m_tabView->SetTabSelection((int) (long) pPage, TRUE);
+    }
+
+    // some page must be selected: either this one or the first one if there is
+    // still no selection
+    if ( m_nSelection == -1 )
+      ChangePage(-1, 0);
+
+    RefreshLayout(FALSE);
+
+    return TRUE;
+}
+
+// ----------------------------------------------------------------------------
+// wxNotebook callbacks
+// ----------------------------------------------------------------------------
+
+// @@@ OnSize() is used for setting the font when it's called for the first
+//     time because doing it in ::Create() doesn't work (for unknown reasons)
+void wxNotebook::OnSize(wxSizeEvent& event)
+{
+    static bool s_bFirstTime = TRUE;
+    if ( s_bFirstTime ) {
+        // TODO: any first-time-size processing.
+        s_bFirstTime = FALSE;
+    }
+
+    RefreshLayout();
+
+    // Processing continues to next OnSize
+    event.Skip();
+}
+
+// This was supposed to cure the non-display of the notebook
+// until the user resizes the window.
+// What's going on?
+void wxNotebook::OnIdle(wxIdleEvent& event)
+{
+    static bool s_bFirstTime = TRUE;
+    if ( s_bFirstTime ) {
+      /*
+      wxSize sz(GetSize());
+      sz.x ++;
+      SetSize(sz);
+      sz.x --;
+      SetSize(sz);
+      */
+
+      /*
+      wxSize sz(GetSize());
+      wxSizeEvent sizeEvent(sz, GetId());
+      sizeEvent.SetEventObject(this);
+      GetEventHandler()->ProcessEvent(sizeEvent);
+      Refresh();
+      */
+      s_bFirstTime = FALSE;
+    }
+    event.Skip();
+}
+
+// Implementation: calculate the layout of the view rect
+// and resize the children if required
+bool wxNotebook::RefreshLayout(bool force)
+{
+    if (m_tabView)
+    {
+        wxRect oldRect = m_tabView->GetViewRect();
+
+        int cw, ch;
+        GetClientSize(& cw, & ch);
+
+        int tabHeight = m_tabView->GetTotalTabHeight();
+        wxRect rect;
+        rect.x = 4;
+        rect.y = tabHeight + 4;
+        rect.width = cw - 8;
+        rect.height = ch - 4 - rect.y ;
+  
+        m_tabView->SetViewRect(rect);
+
+        m_tabView->Layout();
+
+        // Need to do it a 2nd time to get the tab height with
+        // the new view width, since changing the view width changes the
+        // tab layout.
+        tabHeight = m_tabView->GetTotalTabHeight();
+        rect.x = 4;
+        rect.y = tabHeight + 4;
+        rect.width = cw - 8;
+        rect.height = ch - 4 - rect.y ;
+  
+        m_tabView->SetViewRect(rect);
+
+        m_tabView->Layout();
+
+        if (!force && (rect == oldRect))
+          return FALSE;
+
+        // fit the notebook page to the tab control's display area
+
+        unsigned int nCount = m_aPages.Count();
+        for ( unsigned int nPage = 0; nPage < nCount; nPage++ ) {
+            wxNotebookPage *pPage = m_aPages[nPage];
+            if (pPage->IsShown())
+            {
+                wxRect clientRect = GetAvailableClientSize();
+                pPage->SetSize(clientRect.x, clientRect.y, clientRect.width, clientRect.height);
+                if ( pPage->GetAutoLayout() )
+                   pPage->Layout();
+            }
+        }
+        Refresh();
+    }
+    return TRUE;
+}
+
+void wxNotebook::OnSelChange(wxNotebookEvent& event)
+{
+    // is it our tab control?
+    if ( event.GetEventObject() == this )
+    {
+        if (event.GetSelection() != m_nSelection)
+          ChangePage(event.GetOldSelection(), event.GetSelection());
+    }
+
+    // we want to give others a chance to process this message as well
+    event.Skip();
+}
+
+void wxNotebook::OnSetFocus(wxFocusEvent& event)
+{
+    // set focus to the currently selected page if any
+    if ( m_nSelection != -1 )
+        m_aPages[m_nSelection]->SetFocus();
+
+    event.Skip();
+}
+
+void wxNotebook::OnNavigationKey(wxNavigationKeyEvent& event)
+{
+    if ( event.IsWindowChange() ) {
+        // change pages
+        AdvanceSelection(event.GetDirection());
+    }
+    else {
+        // pass to the parent
+        if ( GetParent() ) {
+            event.SetCurrentFocus(this);
+            GetParent()->ProcessEvent(event);
+        }
+    }
+}
+
+// ----------------------------------------------------------------------------
+// wxNotebook base class virtuals
+// ----------------------------------------------------------------------------
+
+// override these 2 functions to do nothing: everything is done in OnSize
+
+void wxNotebook::SetConstraintSizes(bool /* recurse */)
+{
+    // don't set the sizes of the pages - their correct size is not yet known
+    wxControl::SetConstraintSizes(FALSE);
+}
+
+bool wxNotebook::DoPhase(int /* nPhase */)
+{
+    return TRUE;
+}
+
+void wxNotebook::Command(wxCommandEvent& event)
+{
+    wxFAIL_MSG("wxNotebook::Command not implemented");
+}
+
+// ----------------------------------------------------------------------------
+// wxNotebook helper functions
+// ----------------------------------------------------------------------------
+
+// hide the currently active panel and show the new one
+void wxNotebook::ChangePage(int nOldSel, int nSel)
+{
+  //  cout << "ChangePage: " << nOldSel << ", " << nSel << "\n";
+    wxASSERT( nOldSel != nSel ); // impossible
+
+    if ( nOldSel != -1 ) {
+        m_aPages[nOldSel]->Show(FALSE);
+        m_aPages[nOldSel]->Lower();
+    }
+
+    wxNotebookPage *pPage = m_aPages[nSel];
+
+    wxRect clientRect = GetAvailableClientSize();
+    pPage->SetSize(clientRect.x, clientRect.y, clientRect.width, clientRect.height);
+
+    pPage->Show(TRUE);
+    pPage->Raise();
+    pPage->SetFocus();
+
+    Refresh();
+
+    m_nSelection = nSel;
+}
+
+void wxNotebook::OnMouseEvent(wxMouseEvent& event)
+{
+  if (m_tabView)
+    m_tabView->OnEvent(event);
+}
+
+void wxNotebook::OnPaint(wxPaintEvent& WXUNUSED(event) )
+{
+    wxPaintDC dc(this);
+    if (m_tabView)
+        m_tabView->Draw(dc);
+}
+
+wxRect wxNotebook::GetAvailableClientSize()
+{
+    int cw, ch;
+    GetClientSize(& cw, & ch);
+
+    int tabHeight = m_tabView->GetTotalTabHeight();
+
+    // TODO: these margins should be configurable.
+    wxRect rect;
+    rect.x = 6;
+    rect.y = tabHeight + 6;
+    rect.width = cw - 12;
+    rect.height = ch - 4 - rect.y ;
+
+    return rect;
+}
+
+/*
+ * wxNotebookTabView
+ */
+IMPLEMENT_CLASS(wxNotebookTabView, wxTabView)
+
+wxNotebookTabView::wxNotebookTabView(wxNotebook *notebook, long style): wxTabView(style)
+{
+  m_notebook = notebook;
+
+  m_notebook->SetTabView(this);
+
+  SetWindow(m_notebook);
+}
+
+wxNotebookTabView::~wxNotebookTabView(void)
+{
+}
+
+// Called when a tab is activated
+void wxNotebookTabView::OnTabActivate(int activateId, int deactivateId)
+{
+  if (!m_notebook)
+    return;
+
+  wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, m_notebook->GetId());
+
+  // Translate from wxTabView's ids (which aren't position-dependent)
+  // to wxNotebook's (which are).
+  wxNotebookPage* pActive = (wxNotebookPage*) activateId;
+  wxNotebookPage* pDeactive = (wxNotebookPage*) deactivateId;
+
+  int activatePos = m_notebook->FindPagePosition(pActive);
+  int deactivatePos = m_notebook->FindPagePosition(pDeactive);
+
+  event.SetEventObject(m_notebook);
+  event.SetSelection(activatePos);
+  event.SetOldSelection(deactivatePos);
+  m_notebook->GetEventHandler()->ProcessEvent(event);
+}
+
+
index 052f03b240799bdd85d309a79507f8b5872113de..3a2dea9902848b9a511732dd9dfe4378b02dda73 100644 (file)
   #pragma implementation "treectrl.h"
 #endif
 
-#include "wx/treectrl.h"
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#include "wx/generic/treectrl.h"
 #include "wx/settings.h"
 #include "wx/log.h"
 #include "wx/intl.h"
@@ -34,6 +41,8 @@
 // array types
 // -----------------------------------------------------------------------------
 
+class WXDLLEXPORT wxGenericTreeItem;
+
 WX_DEFINE_ARRAY(wxGenericTreeItem *, wxArrayTreeItems);
 
 // -----------------------------------------------------------------------------
@@ -525,14 +534,14 @@ bool wxTreeCtrl::IsBold(const wxTreeItemId& item) const
 
 wxTreeItemId wxTreeCtrl::GetParent(const wxTreeItemId& item) const
 {
-  wxCHECK_MSG( item.IsOk(), NULL, "invalid tree item" );
+  wxCHECK_MSG( item.IsOk(), wxTreeItemId(), "invalid tree item" );
 
   return item.m_pItem->GetParent();
 }
 
 wxTreeItemId wxTreeCtrl::GetFirstChild(const wxTreeItemId& item, long& cookie) const
 {
-  wxCHECK_MSG( item.IsOk(), NULL, "invalid tree item" );
+  wxCHECK_MSG( item.IsOk(), wxTreeItemId(), "invalid tree item" );
 
   cookie = 0;
   return GetNextChild(item, cookie);
@@ -540,7 +549,7 @@ wxTreeItemId wxTreeCtrl::GetFirstChild(const wxTreeItemId& item, long& cookie) c
 
 wxTreeItemId wxTreeCtrl::GetNextChild(const wxTreeItemId& item, long& cookie) const
 {
-  wxCHECK_MSG( item.IsOk(), NULL, "invalid tree item" );
+  wxCHECK_MSG( item.IsOk(), wxTreeItemId(), "invalid tree item" );
 
   wxArrayTreeItems& children = item.m_pItem->GetChildren();
   if ( (size_t)cookie < children.Count() )
@@ -550,20 +559,20 @@ wxTreeItemId wxTreeCtrl::GetNextChild(const wxTreeItemId& item, long& cookie) co
   else
   {
     // there are no more of them
-    return NULL;
+    return wxTreeItemId();
   }
 }
 
 wxTreeItemId wxTreeCtrl::GetNextSibling(const wxTreeItemId& item) const
 {
-  wxCHECK_MSG( item.IsOk(), NULL, "invalid tree item" );
+  wxCHECK_MSG( item.IsOk(), wxTreeItemId(), "invalid tree item" );
 
   wxGenericTreeItem *i = item.m_pItem;
   wxGenericTreeItem *parent = i->GetParent();
   if ( parent == NULL )
   {
     // root item doesn't have any siblings
-    return NULL;
+    return wxTreeItemId();
   }
 
   wxArrayTreeItems& siblings = parent->GetChildren();
@@ -571,51 +580,51 @@ wxTreeItemId wxTreeCtrl::GetNextSibling(const wxTreeItemId& item) const
   wxASSERT( index != NOT_FOUND ); // I'm not a child of my parent?
 
   size_t n = (size_t)(index + 1);
-  return n == siblings.Count() ? (wxGenericTreeItem*)NULL : siblings[n];
+  return n == siblings.Count() ? wxTreeItemId() : siblings[n];
 }
 
 wxTreeItemId wxTreeCtrl::GetPrevSibling(const wxTreeItemId& item) const
 {
-  wxCHECK_MSG( item.IsOk(), NULL, "invalid tree item" );
+  wxCHECK_MSG( item.IsOk(), wxTreeItemId(), "invalid tree item" );
 
   wxGenericTreeItem *i = item.m_pItem;
   wxGenericTreeItem *parent = i->GetParent();
   if ( parent == NULL )
   {
     // root item doesn't have any siblings
-    return NULL;
+    return wxTreeItemId();
   }
 
   wxArrayTreeItems& siblings = parent->GetChildren();
   int index = siblings.Index(i);
   wxASSERT( index != NOT_FOUND ); // I'm not a child of my parent?
 
-  return index == 0 ? (wxGenericTreeItem*)NULL : siblings[(size_t)(index - 1)];
+  return index == 0 ? wxTreeItemId() : siblings[(size_t)(index - 1)];
 }
 
 wxTreeItemId wxTreeCtrl::GetFirstVisibleItem() const
 {
   wxFAIL_MSG("not implemented");
 
-  return NULL;
+  return wxTreeItemId();
 }
 
 wxTreeItemId wxTreeCtrl::GetNextVisible(const wxTreeItemId& item) const
 {
-  wxCHECK_MSG( item.IsOk(), NULL, "invalid tree item" );
+  wxCHECK_MSG( item.IsOk(), wxTreeItemId(), "invalid tree item" );
 
   wxFAIL_MSG("not implemented");
 
-  return NULL;
+  return wxTreeItemId();
 }
 
 wxTreeItemId wxTreeCtrl::GetPrevVisible(const wxTreeItemId& item) const
 {
-  wxCHECK_MSG( item.IsOk(), NULL, "invalid tree item" );
+  wxCHECK_MSG( item.IsOk(), wxTreeItemId(), "invalid tree item" );
 
   wxFAIL_MSG("not implemented");
 
-  return NULL;
+  return wxTreeItemId();
 }
 
 // -----------------------------------------------------------------------------
@@ -657,7 +666,7 @@ wxTreeItemId wxTreeCtrl::AddRoot(const wxString& text,
                                  int image, int selImage,
                                  wxTreeItemData *data)
 {
-  wxCHECK_MSG( !m_anchor, NULL, "tree can have only one root" );
+  wxCHECK_MSG( !m_anchor, wxTreeItemId(), "tree can have only one root" );
 
   wxClientDC dc(this);
   m_anchor = new wxGenericTreeItem((wxGenericTreeItem *)NULL, text, dc,
index e12f7b692b0b4e742d7aebd95a6484666e0dc4cf..f21ae55fec849199a4f7b16e9ec345aee8a14c07 100644 (file)
@@ -51,7 +51,7 @@ DEBUG_FLAGS=
 LINK_DEBUG_FLAGS=
 !endif
 
-LIBS=$(WXLIB) $(EXTRALIBS) oldnames libw llibcew commdlg ddeml shell mmsystem $(WXDIR)\src\msw\ctl3d\msvc\ctl3dv2.lib
+LIBS=$(WXLIB) $(EXTRALIBS) oldnames libw llibcew commdlg ddeml shell mmsystem ole2 $(WXDIR)\src\msw\ctl3d\msvc\ctl3dv2.lib
 
 !if "$(DLL)" == "0"
 PCH=WX.PCH
diff --git a/src/makeprog.msc b/src/makeprog.msc
new file mode 100644 (file)
index 0000000..298f229
--- /dev/null
@@ -0,0 +1,58 @@
+#
+# File:                makeprog.msc
+# Author:      Julian Smart
+# Created:     1998
+# Updated:     
+#
+# "%W% %G%"
+#
+# Include file for 16-bit samples
+# Use FINAL=1 argument to nmake to build final version with no debugging
+# info
+
+WXDIR = $(WXWIN)
+
+!include $(WXDIR)\src\makemsc.env
+
+!ifndef FINAL
+FINAL=0
+!endif
+
+.cpp.obj:
+        cl @<<
+$(CPPFLAGS) /c /Tp $*.cpp
+<<
+
+all:    $(TARGET).exe
+
+wx:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.dos FINAL=$(FINAL)
+        cd $(THISDIR)
+
+wxclean:
+        cd $(WXDIR)\src\msw
+        nmake -f makefile.dos clean
+        cd $(THISDIR)
+
+$(TARGET).exe:      $(WXDIR)\src\msw\dummy.obj $(WXLIB) $(OBJECTS) $(TARGET).def $(TARGET).res
+        link $(LINKFLAGS) /NOE @<<
+$(OBJECTS) $(WXDIR)\src\msw\dummy.obj,
+$(TARGET),
+NUL,
+$(LIBS),
+$(TARGET).def
+;
+<<
+        rc -K $(TARGET).res
+
+$(TARGET).res :      $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
+    rc -r /i$(WXDIR)\include $(TARGET)
+
+clean:
+        -erase *.obj
+        -erase *.exe
+        -erase *.res
+        -erase *.map
+        -erase *.sbr
+        -erase *.pdb
index 86a28418e465bafdd6098664f388a064632c568d..448cec07ea5d0915306d81e82cb451b1b0271e7a 100644 (file)
@@ -61,7 +61,10 @@ wxAcceleratorRefData::~wxAcceleratorRefData()
 {
   if (m_hAccel)
   {
+    // This function not available in WIN16
+#ifndef __WIN16__
     DestroyAcceleratorTable((HACCEL) m_hAccel);
+#endif
   }
   m_hAccel = 0 ;
 }
@@ -99,6 +102,8 @@ extern int wxCharCodeWXToMSW(int id, bool *isVirtual);
 // Create from an array
 wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[])
 {
+    // Not available in WIN16
+#ifndef __WIN16__
     m_refData = new wxAcceleratorRefData;
 
     ACCEL* arr = new ACCEL[n];
@@ -128,6 +133,7 @@ wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]
     delete[] arr;
 
     M_ACCELDATA->m_ok = (M_ACCELDATA->m_hAccel != 0);
+#endif
 }
 
 bool wxAcceleratorTable::Ok(void) const
index 300ec55493318d9e44e4d752c243aaafb65754e3..a1d526fa5c538f701e6a158a8e21ec2c0c4714fc 100644 (file)
@@ -43,6 +43,7 @@
   #include "wx/resource.h"
 #endif
 
+#include <ole2.h>
 #include <string.h>
 #include <ctype.h>
 
index 9367a7d761c246e21968ccd479fb7bfd4fa74f0d..25997d4c27ba59f81a8736e9239ae0a82aaa3db3 100644 (file)
@@ -194,7 +194,11 @@ void wxDC::SetClippingRegion(const wxRegion& region)
   m_clipX2 = box.x + box.width;
   m_clipY2 = box.y + box.height;
 
+#ifdef __WIN16__
+  SelectClipRgn((HDC) m_hDC, (HRGN) region.GetHRGN());
+#else
   ExtSelectClipRgn((HDC) m_hDC, (HRGN) region.GetHRGN(), RGN_AND);
+#endif
 }
 
 void wxDC::DoClipping(WXHDC dc)
@@ -887,11 +891,14 @@ bool wxDC::StartDoc(const wxString& message)
 #endif
 #endif
 
+#ifndef __WIN16__
   if (ret <= 0)
   {
     DWORD lastError = GetLastError();
     wxDebugMsg("wxDC::StartDoc failed with error: %d\n", lastError);
   }
+#endif
+
   return (ret > 0);
 }
 
index 8759c68272c8d6be89a074f2a4b85665c4314a58..8f1e6f9db3593540942938492f89c38e85631186 100644 (file)
@@ -612,8 +612,10 @@ void wxFrame::MSWCreate(int id, wxWindow *parent, const char *wclass, wxWindow *
 
   WXDWORD extendedStyle = MakeExtendedStyle(style);
 
+#ifndef __WIN16__
   if (style & wxFRAME_TOOL_WINDOW)
     extendedStyle |= WS_EX_TOOLWINDOW;
+#endif
 
   if (style & wxSTAY_ON_TOP)
     extendedStyle |= WS_EX_TOPMOST;
index 2076a1f3d88400e09fb33752b2a808aeb21b81c6..b49e6d93486773db6f28d0c16e68f1509b40a4f6 100644 (file)
@@ -398,7 +398,7 @@ bool wxIniConfig::Flush(bool /* bCurrentOnly */)
 // delete
 // ----------------------------------------------------------------------------
 
-bool wxIniConfig::DeleteEntry(const char *szKey, bool bGroupIfEmptyAlso)
+bool wxIniConfig::DeleteEntry(const wxString& szKey, bool bGroupIfEmptyAlso)
 {
   // passing NULL as value to WritePrivateProfileString deletes the key
   if ( !Write(szKey, (const char *)NULL) )
@@ -417,7 +417,7 @@ bool wxIniConfig::DeleteEntry(const char *szKey, bool bGroupIfEmptyAlso)
   return bOk;
 }
 
-bool wxIniConfig::DeleteGroup(const char *szKey)
+bool wxIniConfig::DeleteGroup(const wxString& szKey)
 {
   wxConfigPathChanger path(this, szKey);
 
@@ -432,6 +432,10 @@ bool wxIniConfig::DeleteGroup(const char *szKey)
   return bOk;
 }
 
+#ifndef MAX_PATH
+#define MAX_PATH 256
+#endif
+
 bool wxIniConfig::DeleteAll()
 {
   // first delete our group in win.ini
@@ -448,7 +452,7 @@ bool wxIniConfig::DeleteAll()
   wxString strFile = szBuf;
   strFile << '\\' << m_strLocalFilename;
 
-  if ( !DeleteFile(strFile) ) {
+  if ( !wxRemoveFile(strFile) ) {
     wxLogSysError(_("Can't delete the INI file '%s'"), strFile.c_str());
     return FALSE;
   }
index f49334d46e2125ca8ee9eb46c78762bea4fd9d82..0314a8a54da661460ec694a7f3a858cafd4d537a 100644 (file)
@@ -23,14 +23,12 @@ DUMMYOBJ=dummy.obj
 # This one overrides the others, to be consistent with the settings in wx_setup.h
 MINIMAL_WXWINDOWS_SETUP=0
 
-USE_CTL3D=1
 USE_XPM_IN_MSW=0
+USE_CTL3D=1
 
 !if "$(MINIMAL_WXWINDOWS_SETUP)" == "1"
 USE_CTL3D=0
-USE_IMAGE_LOADING_IN_MSW=0
 USE_XPM_IN_MSW=0
-USE_GNU_WXSTRING=0
 !endif
 
 PERIPH_LIBS=
@@ -52,24 +50,29 @@ COMMDIR=..\common
 OLEDIR=.\ole
 MSWDIR=.
 
-DOCDIR = $(WXDIR)\docs
-
 GENERICOBJS= \
   $(GENDIR)\choicdgg.obj \
-  $(GENDIR)\colrdlgg.obj \
-  $(GENDIR)\fontdlgg.obj \
+  $(GENDIR)\dirdlgg.obj \
   $(GENDIR)\gridg.obj \
-  $(GENDIR)\helpxlp.obj \
-  $(GENDIR)\msgdlgg.obj \
+  $(GENDIR)\imaglist.obj \
+  $(GENDIR)\listctrl.obj \
+  $(GENDIR)\notebook.obj \
   $(GENDIR)\panelg.obj \
-  $(GENDIR)\printps.obj \
-  $(GENDIR)\prntdlgg.obj \
   $(GENDIR)\scrolwin.obj \
   $(GENDIR)\splitter.obj \
   $(GENDIR)\statusbr.obj \
   $(GENDIR)\tabg.obj \
-  $(GENDIR)\textdlgg.obj
-
+  $(GENDIR)\textdlgg.obj\
+  $(GENDIR)\treectrl.obj
+
+# Don't need these generic objects for Windows
+#  $(GENDIR)\msgdlgg.obj \
+#  $(GENDIR)\fontdlgg.obj \
+#  $(GENDIR)\colrdlgg.obj \
+#  $(GENDIR)\printps.obj \
+#  $(GENDIR)\prntdlgg.obj \
+# $(GENDIR)\helpxlp.obj \
 COMMONOBJS = \
   $(COMMDIR)\config.obj \
   $(COMMDIR)\cmndata.obj \
@@ -81,7 +84,6 @@ COMMONOBJS = \
   $(COMMDIR)\filefn.obj \
   $(COMMDIR)\framecmn.obj \
   $(COMMDIR)\gdicmn.obj \
-  $(COMMDIR)\image.obj \
   $(COMMDIR)\intl.obj \
   $(COMMDIR)\helpbase.obj \
   $(COMMDIR)\ipcbase.obj \
@@ -91,7 +93,6 @@ COMMONOBJS = \
   $(COMMDIR)\module.obj \
   $(COMMDIR)\object.obj \
   $(COMMDIR)\odbc.obj \
-  $(COMMDIR)\postscrp.obj \
   $(COMMDIR)\process.obj \
   $(COMMDIR)\prntbase.obj \
   $(COMMDIR)\resource.obj \
@@ -118,8 +119,15 @@ COMMONOBJS = \
   $(COMMDIR)\extended.obj \
   $(COMMDIR)\wincmn.obj
 
-#  $(COMMDIR)\fileconf.obj # Doens't compile (nested classes)
+# Doesn't compile (nested classes)
+# $(COMMDIR)\fileconf.obj\
+
+# Fails when including png.h, on jmp_buf.
+#  $(COMMDIR)\image.obj \
 
+# Don't need this
+# $(COMMDIR)\postscrp.obj \
 MSWOBJS = \
   $(MSWDIR)\accel.obj \
   $(MSWDIR)\app.obj \
@@ -146,7 +154,6 @@ MSWOBJS = \
   $(MSWDIR)\dde.obj \
   $(MSWDIR)\dialog.obj \
   $(MSWDIR)\dib.obj \
-  $(MSWDIR)\dirdlg.obj \
   $(MSWDIR)\filedlg.obj \
   $(MSWDIR)\font.obj \
   $(MSWDIR)\fontdlg.obj \
@@ -155,10 +162,9 @@ MSWOBJS = \
   $(MSWDIR)\gdiobj.obj \
   $(MSWDIR)\helpwin.obj \
   $(MSWDIR)\icon.obj \
-  $(MSWDIR)\imaglist.obj \
+  $(MSWDIR)\iniconf.obj\
   $(MSWDIR)\joystick.obj \
   $(MSWDIR)\listbox.obj \
-  $(MSWDIR)\listctrl.obj \
   $(MSWDIR)\main.obj \
   $(MSWDIR)\mdi.obj \
   $(MSWDIR)\menu.obj\
@@ -186,18 +192,23 @@ MSWOBJS = \
   $(MSWDIR)\tbarmsw.obj \
   $(MSWDIR)\textctrl.obj \
   $(MSWDIR)\timer.obj \
-  $(MSWDIR)\treectrl.obj \
   $(MSWDIR)\utils.obj \
   $(MSWDIR)\utilsexc.obj \
   $(MSWDIR)\wave.obj \
   $(MSWDIR)\window.obj \
-  $(OLEDIR)\droptgt.obj \
   $(OLEDIR)\dropsrc.obj \
-  $(OLEDIR)\dataobj.obj \
-  $(OLEDIR)\oleutils.obj \
-  $(OLEDIR)\uuid.obj
+  $(OLEDIR)\droptgt.obj
 
+#  $(OLEDIR)\automtn.obj \
+#  $(OLEDIR)\dataobj.obj \
+#  $(OLEDIR)\oleutils.obj \
+#  $(OLEDIR)\uuid.obj
+
+# Not appropriate for 16-bit Windows
 #  $(MSWDIR)\registry.obj \
+#  $(MSWDIR)\dirdlg.obj \
+#  $(MSWDIR)\treectrl.obj \
+#  $(MSWDIR)\listctrl.obj \
 
 OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
 
@@ -431,6 +442,11 @@ $(MSWDIR)/icon.obj:     $*.$(SRCSUFF)
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
 <<
 
+$(MSWDIR)/iniconf.obj:     $*.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
+<<
+
 $(MSWDIR)/imaglist.obj:     $*.$(SRCSUFF)
         cl @<<
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
@@ -641,6 +657,11 @@ $(OLEDIR)/uuid.obj:     $*.$(SRCSUFF)
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
 <<
 
+$(OLEDIR)/automtn.obj:     $*.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
+<<
+
 ########################################################
 # Common objects (always compiled)
 
@@ -704,6 +725,11 @@ $(COMMDIR)/helpbase.obj:     $*.$(SRCSUFF)
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
 <<
 
+$(COMMDIR)/image.obj:     $*.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
+<<
+
 $(COMMDIR)/intl.obj:     $*.$(SRCSUFF)
         cl @<<
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
@@ -909,6 +935,11 @@ $(GENDIR)/colrdlgg.obj:     $*.$(SRCSUFF)
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
 <<
 
+$(GENDIR)/dirdlgg.obj:     $*.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
+<<
+
 $(GENDIR)/fontdlgg.obj:     $*.$(SRCSUFF)
         cl @<<
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
@@ -919,6 +950,21 @@ $(GENDIR)/gridg.obj:     $*.$(SRCSUFF)
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
 <<
 
+$(GENDIR)/imaglist.obj:     $*.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
+<<
+
+$(GENDIR)/listctrl.obj:     $*.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
+<<
+
+$(GENDIR)/notebook.obj:     $*.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
+<<
+
 $(GENDIR)/helpxlp.obj:     $*.$(SRCSUFF)
         cl @<<
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
@@ -969,6 +1015,11 @@ $(GENDIR)/textdlgg.obj:     $*.$(SRCSUFF)
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
 <<
 
+$(GENDIR)/treectrl.obj:     $*.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
+<<
+
 $(OBJECTS):    $(WXDIR)/include/wx/setup.h
 
 # Peripheral components
@@ -1005,223 +1056,4 @@ clean: $(PERIPH_CLEAN_TARGET)
 
 cleanall: clean
 
-# Making documents
-docs:   hlp
-hlp:    wxhlp faqhlp refhlp
-wxhlp:  $(DOCDIR)/winhelp/wx.hlp
-faqhlp: $(DOCDIR)/winhelp/faq.hlp
-refhlp: $(DOCDIR)/winhelp/techref.hlp
-rtf:    $(DOCDIR)/winhelp/wx.rtf
-faqrtf: $(DOCDIR)/winhelp/faq.rtf
-html:  wxhtml faqhtml
-wxhtml:        $(DOCDIR)\html\wx\wx.htm
-faqhtml: $(DOCDIR)\html\faq\faq.htm
-ps:     faqps wxps referencps
-wxps:  $(WXDIR)\docs\ps\wx.ps
-faqps: $(WXDIR)\docs\ps\faq.ps
-referencps:    $(WXDIR)\docs\ps\referenc.ps
-
-alldocs: allhlp allhtml allps
-
-allhlp: wxhlp faqhlp
-        nmake -f makefile.dos hlp
-        cd $(WXDIR)\utils\wxprop\src
-        nmake -f makefile.dos hlp
-        cd $(WXDIR)\utils\dialoged\src
-        nmake -f makefile.dos hlp
-        cd $(THISDIR)
-
-#        cd $(WXDIR)\utils\wxhelp\src
-#        nmake -f makefile.dos hlp
-#        cd $(WXDIR)\utils\wxhelp2\src
-#        nmake -f makefile.dos hlp
-#        cd $(WXDIR)\utils\prologio\src
-#        nmake -f makefile.dos hlp
-#        cd $(WXDIR)\utils\tex2rtf\src
-#        nmake -f makefile.dos hlp
-#        cd $(WXDIR)\utils\wxgraph\src
-#        nmake -f makefile.dos hlp
-#        cd $(WXDIR)\utils\wxchart\src
-#        nmake -f makefile.dos hlp
-#        cd $(WXDIR)\utils\wxtree\src
-#        nmake -f makefile.dos hlp
-#        cd $(WXDIR)\utils\wxbuild\src
-#        nmake -f makefile.dos hlp
-#        cd $(WXDIR)\utils\wxgrid\src
-#        nmake -f makefile.dos hlp
-#        cd $(WXDIR)\utils\wxtab\src
-#        nmake -f makefile.dos hlp
-
-#        cd $(WXDIR)\utils\wxclips\src
-#        nmake -f makefile.dos hlp
-#        cd $(WXDIR)\utils\clips2c\src
-#        nmake -f makefile.dos hlp
-
-allhtml: wxhtml faqhtml
-        nmake -f makefile.dos html
-        cd $(WXDIR)\utils\wxprop\src
-        cd $(THISDIR)
-
-#        nmake -f makefile.dos html
-#        cd $(WXDIR)\utils\dialoged\src
-#        nmake -f makefile.dos html
-#        cd $(WXDIR)\utils\hytext\src
-#        nmake -f makefile.dos html
-#        cd $(WXDIR)\utils\wxhelp\src
-#        nmake -f makefile.dos html
-#        cd $(WXDIR)\utils\wxhelp2\src
-#        nmake -f makefile.dos html
-#        cd $(WXDIR)\utils\prologio\src
-#        nmake -f makefile.dos html
-#        cd $(WXDIR)\utils\tex2rtf\src
-#        nmake -f makefile.dos html
-#        cd $(WXDIR)\utils\wxgraph\src
-#        nmake -f makefile.dos html
-#        cd $(WXDIR)\utils\wxchart\src
-#        nmake -f makefile.dos html
-#        cd $(WXDIR)\utils\wxtree\src
-#        nmake -f makefile.dos html
-#        cd $(WXDIR)\utils\wxtab\src
-#        nmake -f makefile.dos html
-
-#        cd $(WXDIR)\utils\wxclips\src
-#        nmake -f makefile.dos html
-#        cd $(WXDIR)\utils\clips2c\src
-#        nmake -f makefile.dos html
-
-allps: wxps faqps
-        nmake -f makefile.dos ps
-        cd $(WXDIR)\utils\wxhelp\src
-        nmake -f makefile.dos ps
-        cd $(WXDIR)\utils\wxhelp2\src
-        nmake -f makefile.dos ps
-        cd $(WXDIR)\utils\tex2rtf\src
-        nmake -f makefile.dos ps
-        cd $(WXDIR)\utils\wxgraph\src
-        nmake -f makefile.dos ps
-        cd $(WXDIR)\utils\wxchart\src
-        nmake -f makefile.dos ps
-        cd $(WXDIR)\utils\wxtree\src
-        nmake -f makefile.dos ps
-        cd $(WXDIR)\utils\wxprop\src
-        nmake -f makefile.dos ps
-        cd $(WXDIR)\utils\dialoged\src
-        nmake -f makefile.dos ps
-        cd $(THISDIR)
-
-#        cd $(WXDIR)\utils\wxtab\src
-#        nmake -f makefile.dos ps
-#        cd $(WXDIR)\utils\prologio\src
-#        nmake -f makefile.dos ps
-#        cd $(WXDIR)\utils\wxclips\src
-#        nmake -f makefile.dos ps
-#        cd $(WXDIR)\utils\clips2c\src
-#        nmake -f makefile.dos ps
-
-$(DOCDIR)/winhelp/wx.hlp:         $(DOCDIR)/latex/wx/wx.rtf $(DOCDIR)/latex/wx/wx.hpj
-        cd $(DOCDIR)/latex/wx
-        -erase wx.ph
-        hc wx
-        move wx.hlp $(DOCDIR)\winhelp\wx.hlp
-        move wx.cnt $(DOCDIR)\winhelp\wx.cnt
-        cd $(THISDIR)
-
-$(DOCDIR)/winhelp/faq.hlp:         $(DOCDIR)/latex/faq/faq.rtf $(DOCDIR)/latex/faq/faq.hpj
-        cd $(DOCDIR)/latex/faq
-        -erase faq.ph
-        hc faq
-        move faq.hlp $(DOCDIR)\winhelp\faq.hlp
-        move faq.cnt $(DOCDIR)\winhelp\faq.cnt
-        cd $(THISDIR)
-
-$(DOCDIR)/winhelp/techref.hlp:         $(DOCDIR)/latex/techref/techref.rtf $(DOCDIR)/latex/techref/techref.hpj
-        cd $(DOCDIR)/latex/techref
-        -erase techref.ph
-        hc techref
-        move techref.hlp $(DOCDIR)\winhelp\techref.hlp
-        move techref.cnt $(DOCDIR)\winhelp\techref.cnt
-        cd $(THISDIR)
-
-$(DOCDIR)/latex/wx/wx.rtf:         $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/manual.tex
-        cd $(DOCDIR)\latex\wx
-        -start /w tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/latex/wx/wx.rtf -twice -winhelp
-        cd $(THISDIR)
-
-$(DOCDIR)/latex/faq/faq.rtf:         $(DOCDIR)/latex/faq/faq.tex
-        cd $(DOCDIR)\latex\faq
-        -start /w tex2rtf $(DOCDIR)/latex/faq/faq.tex $(DOCDIR)/latex/faq/faq.rtf -twice -winhelp
-        cd $(THISDIR)
-
-$(DOCDIR)/latex/techref/techref.rtf:         $(DOCDIR)/latex/techref/techref.tex
-        cd $(DOCDIR)\latex\techref
-        -start /w tex2rtf $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)/latex/techref/techref.rtf -twice -winhelp
-        cd $(THISDIR)
-
-$(DOCDIR)\html\wx\wx.htm:         $(DOCDIR)\latex\wx\classes.tex $(DOCDIR)\latex\wx\body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)\latex\wx\manual.tex
-        cd $(DOCDIR)\latex\wx
-        -mkdir $(DOCDIR)\html\wx
-        -start /w tex2rtf $(DOCDIR)\latex\wx\manual.tex $(DOCDIR)\html\wx\wx.htm -twice -html -macros $(DOCDIR)\tex2rtf.ini
-        -erase $(DOCDIR)\html\wx\*.con
-        -erase $(DOCDIR)\html\wx\*.ref
-        -erase $(DOCDIR)\latex\wx\*.con
-        -erase $(DOCDIR)\latex\wx\*.ref
-        cd $(THISDIR)
-
-$(DOCDIR)\html\faq\faq.htm:         $(DOCDIR)\latex\faq\faq.tex
-        cd $(DOCDIR)\latex\faq
-        -mkdir $(DOCDIR)\html\faq
-        -start /w tex2rtf $(DOCDIR)\latex\faq\faq.tex $(DOCDIR)\html\faq\faq.htm -twice -html -macros $(DOCDIR)\tex2rtf.ini
-        -erase $(DOCDIR)\html\faq\*.con
-        -erase $(DOCDIR)\html\faq\*.ref
-        -erase $(DOCDIR)\latex\faq\*.con
-        -erase $(DOCDIR)\latexfaq\*.ref
-        cd $(THISDIR)
-
-$(WXDIR)\docs\latex\wx\manual.dvi:     $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/manual.tex
-       cd $(WXDIR)\docs\latex\wx
-        -latex manual
-        -latex manual
-        -makeindx manual
-        -bibtex manual
-        -latex manual
-        -latex manual
-        cd $(THISDIR)
-
-$(WXDIR)\docs\ps\wx.ps:        $(WXDIR)\docs\latex\wx\manual.dvi
-       cd $(WXDIR)\docs\latex\wx
-        -dvips32 -o wx.ps manual
-        move wx.ps $(WXDIR)\docs\ps\wx.ps
-        cd $(THISDIR)
-
-$(WXDIR)\docs\latex\wx\referenc.dvi:   $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/referenc.tex
-       cd $(WXDIR)\docs\latex\wx
-        -latex referenc
-        -latex referenc
-        -makeindx referenc
-        -bibtex referenc
-        -latex referenc
-        -latex referenc
-        cd $(THISDIR)
-
-$(WXDIR)\docs\ps\referenc.ps:  $(WXDIR)\docs\latex\wx\referenc.dvi
-       cd $(WXDIR)\docs\latex\wx
-        -dvips32 -o referenc.ps referenc
-        move referenc.ps $(WXDIR)\docs\ps\referenc.ps
-        cd $(THISDIR)
-
-$(WXDIR)\docs\latex\faq\faq.dvi:       $(DOCDIR)/latex/faq/faq.tex
-       cd $(WXDIR)\docs\latex\faq
-        -latex faq
-        -latex faq
-        -makeindx faq
-        -latex faq
-        -latex faq
-        cd $(THISDIR)
-
-$(WXDIR)\docs\ps\faq.ps:       $(WXDIR)\docs\latex\faq\faq.dvi
-       cd $(WXDIR)\docs\latex\faq
-        -dvips32 -o faq.ps faq
-        move faq.ps $(WXDIR)\docs\ps\faq.ps
-        cd $(THISDIR)
-
 
index 15dd0eafaed6589c6716a9357f308c892c6c87d2..99104456ffcc3626f01b90ab930414ebfa3a4185 100644 (file)
@@ -339,14 +339,13 @@ wxToolBarTool *wxToolBarMSW::AddTool(int index, const wxBitmap& bitmap, const wx
 
   // TODO: use the mapping code from wxToolBar95 to get it right in this class
 #if !defined(__WIN32__) && !defined(__WIN386__)
-  wxBitmap *bitmap2 = NULL;
+  wxBitmap bitmap2;
   if (toggle)
   {
-    bitmap2 = new wxBitmap;
-    bitmap2->SetHBITMAP( (WXHBITMAP) CreateMappedBitmap(wxGetInstance(), (HBITMAP) ((wxBitmap& )bitmap).GetHBITMAP()));
+    bitmap2.SetHBITMAP( (WXHBITMAP) CreateMappedBitmap(wxGetInstance(), (HBITMAP) ((wxBitmap& )bitmap).GetHBITMAP()));
   }
 
-  wxToolBarTool *tool = new wxToolBarTool(index, bitmap, *bitmap2, toggle, xPos, yPos, helpString1, helpString2);
+  wxToolBarTool *tool = new wxToolBarTool(index, bitmap, bitmap2, toggle, xPos, yPos, helpString1, helpString2);
 #else
   wxToolBarTool *tool = new wxToolBarTool(index, bitmap, wxNullBitmap, toggle, xPos, yPos, helpString1, helpString2);
 #endif
index fdb322892cf4b93e08496e4c710e1e681dfa7b08..88a1de8e60a8a598628f291ad9b489b26b1ca508 100644 (file)
@@ -72,7 +72,7 @@
 
 //// BEGIN for console support: VC++ only
 
-#if defined(__WXDEBUG__) && defined(_MSC_VER) && !defined(__NO_VC_CRTDBG__)
+#if defined(__WXDEBUG__) && !defined(__WIN16__) && defined(_MSC_VER) && !defined(__NO_VC_CRTDBG__)
     #define wxUSE_VC_CRTDBG
 #else
     #undef wxUSE_VC_CRTDBG
 #  undef new
 #  endif
 
+#ifndef __WIN16__
 #  include <crtdbg.h>
+#endif
 
 #  if defined(__WXDEBUG__) && wxUSE_GLOBAL_MEMORY_OPERATORS && wxUSE_DEBUG_NEW_ALWAYS
 #  define new new(__FILE__,__LINE__)