wxPaintDC -> wxDC in wxListCtrl; fixed compile problems in wxTreeCtrl (return

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
This commit is contained in:
Julian Smart
1998-12-20 23:49:21 +00:00
parent 23fd5130c7
commit 1e6d94998f
75 changed files with 1987 additions and 1812 deletions

View 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

View 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}

View 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.}

View 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}

View 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

View 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}

View 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.}

View 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}}

547
docs/latex/wx/image.tex Normal file
View File

@@ -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.}

View 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}}

View 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.}

View 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
-------------------------------

View 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).

View 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

View 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__)

View 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);

View File

@@ -25,26 +25,30 @@
#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

View File

@@ -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_

View 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__)

View 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__)

View 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:

View 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

View 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)

View 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__)

View 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__)

View 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
TARGET=checklst
OBJECTS=$(TARGET).obj
THISDIR = $(WXDIR)\samples\checklst
!include $(WXDIR)\src\makeprog.msc
!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)
<<
checklst.res : checklst.rc $(WXDIR)\include\wx\msw\wx.rc
rc -r /i$(WXDIR)\include checklst
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb

View File

@@ -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

View 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
TARGET=controls
OBJECTS=$(TARGET).obj
THISDIR = $(WXDIR)\samples\controls
!include $(WXDIR)\src\makeprog.msc
!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)
<<
controls.res : controls.rc $(WXDIR)\include\wx\msw\wx.rc
rc -r /i$(WXDIR)\include controls
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb

17
samples/db/makefile.dos Normal file
View File

@@ -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

View 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
TARGET=dialogs
OBJECTS=$(TARGET).obj
THISDIR = $(WXDIR)\samples\dialogs
WXLIB = $(WXDIR)\lib\wx.lib
LIBS=$(WXLIB) oldnames libw llibcew commdlg shell ddeml
!include $(WXDIR)\src\makeprog.msc
!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)
<<
dialogs.res : dialogs.rc $(WXDIR)\include\msw\wx.rc
rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw dialogs
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb

View 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
TARGET=dnd
OBJECTS=$(TARGET).obj
THISDIR = $(WXDIR)\samples\dnd
!include $(WXDIR)\src\makeprog.msc
!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)
<<
dnd.res : dnd.rc $(WXDIR)\include\wx\msw\wx.rc
rc -r /i$(WXDIR)\include dnd
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb

View 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
TARGET=docview
OBJECTS=$(TARGET).obj view.obj doc.obj
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
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb
!include $(WXDIR)\src\makeprog.msc

View 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
TARGET=docview
OBJECTS=$(TARGET).obj doc.obj view.obj
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
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb
!include $(WXDIR)\src\makeprog.msc

View 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
TARGET=dynamic
OBJECTS=$(TARGET).obj
THISDIR = $(WXDIR)\samples\dynamic
!include $(WXDIR)\src\makeprog.msc
!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)
<<
dynamic.res : dynamic.rc $(WXDIR)\include\wx\msw\wx.rc
rc -r /i$(WXDIR)\include dynamic
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb

View 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);

View File

@@ -93,7 +93,7 @@ bool FortyApp::OnInit()
// Show the frame
frame->Show(TRUE);
return true;
return TRUE;
}
const wxColour& FortyApp::BackgroundColour()

8
samples/forty/forty.def Normal file
View File

@@ -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

View File

@@ -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

View 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
TARGET=test
OBJECTS = $(TARGET).obj
THISDIR = $(WXDIR)\samples\test
!include $(WXDIR)\src\makeprog.msc
!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)
<<
test.res : test.rc $(WXDIR)\include\wx\msw\wx.rc
rc -r /dFAFA_LIB /i$(WXDIR)\include test
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb

View File

@@ -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

View 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
TARGET=internat
OBJECTS = $(TARGET).obj
THISDIR = $(WXDIR)\samples\internat
!include $(WXDIR)\src\makeprog.msc
!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)
<<
internat.res : internat.rc $(WXDIR)\include\wx\msw\wx.rc
rc -r /i$(WXDIR)\include internat
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb

View 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
TARGET=joytest
OBJECTS = $(TARGET).obj
THISDIR = $(WXDIR)\samples\joytest
INC=/I$(WXDIR)\include
!include $(WXDIR)\src\makeprog.msc
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)
<<
joytest.res : joytest.rc $(WXDIR)\include\wx\msw\wx.rc
rc -r /i$(WXDIR)\include joytest
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb

View 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
TARGET=layout
OBJECTS = $(TARGET).obj
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
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb
!include $(WXDIR)\src\makeprog.msc

View 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
TARGET=listtest
OBJECTS = $(TARGET).obj
THISDIR = $(WXDIR)\samples\minimal
WXLIB = $(WXDIR)\lib\wx.lib
LIBS=$(WXLIB) oldnames libw llibcew commdlg shell ddeml
!include $(WXDIR)\src\makeprog.msc
!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)
<<
minimal.res : minimal.rc $(WXDIR)\include\msw\wx.rc
rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw minimal
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb

View 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
TARGET=mdi
OBJECTS = $(TARGET).obj
THISDIR = $(WXDIR)\samples\mdi
INC=/I$(WXDIR)\include
!include $(WXDIR)\src\makeprog.msc
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)
<<
mdi.res : mdi.rc $(WXDIR)\include\wx\msw\wx.rc
rc -r /i$(WXDIR)\include mdi
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb

View 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
TARGET=memcheck
OBJECTS = $(TARGET).obj
THISDIR = $(WXDIR)\samples\memcheck
WXLIB = $(WXDIR)\lib\wx.lib
LIBS=$(WXLIB) oldnames libw llibcew commdlg shell ddeml
!include $(WXDIR)\src\makeprog.msc
!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)
<<
memcheck.res : memcheck.rc $(WXDIR)\include\wx\msw\wx.rc
rc -r /i$(WXDIR)\include\wx memcheck
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb

View 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
TARGET=test
OBJECTS = $(TARGET).obj
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
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb
!include $(WXDIR)\src\makeprog.msc

View 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
TARGET=minimal
OBJECTS=$(TARGET).obj
THISDIR = $(WXDIR)\samples\minimal
!include $(WXDIR)\src\makeprog.msc
!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)
<<
minimal.res : minimal.rc $(WXDIR)\include\wx\msw\wx.rc
rc -r /i$(WXDIR)\include minimal
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb

View 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
TARGET=nativdlg
OBJECTS = $(TARGET).obj
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
!include $(WXDIR)\src\makeprog.msc
# 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)
<<
resource.res : resource.rc $(WXDIR)\include\msw\wx.rc
rc -r /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa resource
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb

View 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
TARGET=test
OBJECTS = $(TARGET).obj
THISDIR = $(WXDIR)\samples\tab
!include $(WXDIR)\src\makeprog.msc
!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)
<<
test.res : test.rc $(WXDIR)\include\wx\msw\wx.rc
rc -r /i$(WXDIR)\include test
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb

View File

@@ -1,4 +1,3 @@
* Last change: JS 26 Oct 98 6:29 pm
NAME Test
DESCRIPTION 'Notebook test'
EXETYPE WINDOWS

View 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
TARGET=ownerdrw
OBJECTS = $(TARGET).obj
THISDIR = $(WXDIR)\samples\ownerdrw
!include $(WXDIR)\src\makeprog.msc
!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)
<<
ownerdrw.res : ownerdrw.rc $(WXDIR)\include\wx\msw\wx.rc
rc -r /i$(WXDIR)\include ownerdrw
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb

View 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
TARGET=test
OBJECTS = $(TARGET).obj
THISDIR = $(WXDIR)\samples\tab
!include $(WXDIR)\src\makeprog.msc
!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)
<<
test.res : test.rc $(WXDIR)\include\wx\msw\wx.rc
rc -r /i$(WXDIR)\include test
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb

View 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
TARGET=test
OBJECTS = $(TARGET).obj
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
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb
!include $(WXDIR)\src\makeprog.msc

View 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
TARGET=treetest
OBJECTS = $(TARGET).obj
THISDIR = $(WXDIR)\samples\minimal
WXLIB = $(WXDIR)\lib\wx.lib
LIBS=$(WXLIB) oldnames libw llibcew commdlg shell ddeml
!include $(WXDIR)\src\makeprog.msc
!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)
<<
minimal.res : minimal.rc $(WXDIR)\include\msw\wx.rc
rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw minimal
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb

View File

@@ -1,4 +1,3 @@
* Last change: JS 28 Apr 97 1:45 pm
NAME TreeCtrl
DESCRIPTION 'TreeCtrl wxWindows application'
EXETYPE WINDOWS

View 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
TARGET=typetest
OBJECTS = $(TARGET).obj
THISDIR = $(WXDIR)\samples\typetest
!include $(WXDIR)\src\makeprog.msc
!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)
<<
typetest.res : typetest.rc $(WXDIR)\include\wx\msw\wx.rc
rc -r /i$(WXDIR)\include typetest
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb

View 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
TARGET=validate
OBJECTS = $(TARGET).obj
THISDIR = $(WXDIR)\samples\minimal
WXLIB = $(WXDIR)\lib\wx.lib
LIBS=$(WXLIB) oldnames libw llibcew commdlg shell ddeml
!include $(WXDIR)\src\makeprog.msc
!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)
<<
minimal.res : minimal.rc $(WXDIR)\include\msw\wx.rc
rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw minimal
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb

View File

@@ -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

View 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

View File

@@ -12,6 +12,13 @@
#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());

View File

@@ -11,6 +11,13 @@
#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"
//-----------------------------------------------------------------------------

View File

@@ -11,6 +11,13 @@
#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;

642
src/generic/notebook.cpp Normal file
View File

@@ -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);
}

View File

@@ -21,7 +21,14 @@
#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,

View 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

58
src/makeprog.msc Normal file
View File

@@ -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

View 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

View File

@@ -43,6 +43,7 @@
#include "wx/resource.h"
#endif
#include <ole2.h>
#include <string.h>
#include <ctype.h>

View 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);
}

View 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;

View 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;
}

View 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,23 +50,28 @@ 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 \
@@ -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,7 +119,14 @@ 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 \
@@ -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)

View 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

View 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
@@ -106,7 +106,9 @@
# 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__)