Misc. 16-bit compilation fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3568 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 1999-09-05 15:14:50 +00:00
parent ed75793627
commit 1044a386f0
28 changed files with 145 additions and 69 deletions

View File

@ -196,6 +196,17 @@ $(COMMDIR)/y_tab.c: $(COMMDIR)/dosyacc.c
$(COMMDIR)/lex_yy.c: $(COMMDIR)/doslex.c
copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
$(COMMDIR)/extended.obj: $*.c
cl @<<
$(CPPFLAGS2) /Fo$@ /c /Tc $*.c
<<
$(COMMDIR)/unzip.obj: $*.c
cl @<<
$(CPPFLAGS2) /Fo$@ /c /Tc $*.c
<<
$(OBJECTS): $(WXDIR)/include/wx/setup.h
# Peripheral components

View File

@ -120,10 +120,10 @@ http.cpp C S
imagbmp.cpp C
image.cpp C
imaggif.cpp C
imagjpeg.cpp C
imagpcx.cpp C
imagpng.cpp C
imagpnm.cpp C
imagjpeg.cpp C 32
imagpcx.cpp C 32
imagpng.cpp C 32
imagpnm.cpp C 32
intl.cpp C
ipcbase.cpp C
layout.cpp C
@ -233,7 +233,7 @@ ownerdrw.cpp M
palette.cpp M
pen.cpp M
penwin.cpp M
pnghand.cpp M
pnghand.cpp M 32
printdlg.cpp M
printwin.cpp M
radiobox.cpp M

View File

@ -1,6 +1,14 @@
#ifndef _WX_DIRDLG_H_BASE_
#define _WX_DIRDLG_H_BASE_
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
WXDLLEXPORT_DATA(extern const wxChar*) wxDirDialogNameStr;
WXDLLEXPORT_DATA(extern const wxChar*) wxDirDialogDefaultFolderStr;
WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
#if defined(__WXMSW__)
#if defined(__WIN16__) || defined(__GNUWIN32__) || defined(__SALFORDC__)
#include "wx/generic/dirdlgg.h"

View File

@ -105,11 +105,11 @@ public:
wxDirCtrl();
wxDirCtrl(wxWindow *parent, const wxWindowID id = -1,
const wxString &dir = "/",
const wxString &dir = wxDirDialogDefaultFolderStr,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
const long style = wxTR_HAS_BUTTONS,
const wxString& name = "wxTreeCtrl" );
const wxString& name = wxTreeCtrlNameStr );
void ShowHidden( const bool yesno );
void OnExpandItem(wxTreeEvent &event );
void OnCollapseItem(wxTreeEvent &event );

View File

@ -179,10 +179,10 @@ class WXDLLEXPORT wxTreeTextCtrl: public wxTextCtrl
wxTreeTextCtrl(void) {};
wxTreeTextCtrl( wxWindow *parent, const wxWindowID id,
bool *accept, wxString *res, wxTreeCtrl *owner,
const wxString &value = "",
const wxString &value = wxEmptyString,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
int style = 0, const wxValidator& validator = wxDefaultValidator,
const wxString &name = "wxTreeTextCtrlText" );
const wxString &name = wxTextCtrlNameStr );
void OnChar( wxKeyEvent &event );
void OnKillFocus( wxFocusEvent &event );

View File

@ -36,9 +36,15 @@ class WXDLLEXPORT wxPNGHandler;
class WXDLLEXPORT wxJPEGHandler;
#endif
class WXDLLEXPORT wxBMPHandler;
#if wxUSE_GIF
class WXDLLEXPORT wxGIFHandler;
#endif
#if wxUSE_PNM
class WXDLLEXPORT wxPNMHandler;
#endif
#if wxUSE_PCX
class WXDLLEXPORT wxPCXHandler;
#endif
class WXDLLEXPORT wxImage;
//-----------------------------------------------------------------------------
@ -181,13 +187,13 @@ public:
virtual bool CanRead( wxInputStream& stream );
#endif
};
#endif
//-----------------------------------------------------------------------------
// wxPNMHandler
//-----------------------------------------------------------------------------
#if wxUSE_PNM
class WXDLLEXPORT wxPNMHandler : public wxImageHandler
{
DECLARE_DYNAMIC_CLASS(wxPNMHandler)
@ -208,11 +214,13 @@ public:
virtual bool CanRead( wxInputStream& stream );
#endif
};
#endif
//-----------------------------------------------------------------------------
// wxPCXHandler
//-----------------------------------------------------------------------------
#if wxUSE_PCX
class WXDLLEXPORT wxPCXHandler : public wxImageHandler
{
DECLARE_DYNAMIC_CLASS(wxPCXHandler)
@ -233,6 +241,7 @@ public:
virtual bool CanRead( wxInputStream& stream );
#endif
};
#endif
//-----------------------------------------------------------------------------
// wxImage

View File

@ -62,9 +62,17 @@
*/
#define wxUSE_LIBJPEG 0
/*
* Use gif
* Use GIF
*/
#define wxUSE_LIBGIF 0
#define wxUSE_LIBGIF 1
/*
* Use PCX
*/
#define wxUSE_PCX 1
/*
* Use PNM
*/
#define wxUSE_PNM 1
/*
* Use iODBC
*/

View File

@ -25,7 +25,7 @@ class WXDLLEXPORT wxDirDialog: public wxDialog
DECLARE_DYNAMIC_CLASS(wxDirDialog)
public:
wxDirDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr,
const wxString& defaultPath = "",
const wxString& defaultPath = wxEmptyString,
long style = 0, const wxPoint& pos = wxDefaultPosition);
inline void SetMessage(const wxString& message) { m_message = message; }

View File

@ -190,8 +190,12 @@
// Use PNG bitmap code
#define wxUSE_LIBJPEG 0
// Use JPEG bitmap code
#define wxUSE_LIBGIF 0
// Use GIF bitmap code
#define wxUSE_LIBGIF 1
// Use GIF bitmap code
#define wxUSE_PNM 1
// Use PNM bitmap code
#define wxUSE_PCX 1
// Use PCX bitmap code
#define wxUSE_SERIAL 0
// Use serialization (requires utils/serialize)
#define wxUSE_DYNLIB_CLASS 0
@ -383,6 +387,21 @@
#undef wxUSE_TOOLTIPS
#define wxUSE_TOOLTIPS 0
#undef wxUSE_LIBPNG
#define wxUSE_LIBPNG 0
#undef wxUSE_LIBJPEG
#define wxUSE_LIBJPEG 0
#undef wxUSE_LIBGIF
#define wxUSE_LIBGIF 0
#undef wxUSE_PNM
#define wxUSE_PNM 0
#undef wxUSE_PCX
#define wxUSE_PCX 0
#endif
#endif

View File

@ -344,6 +344,7 @@ protected:
int m_maxPage;
bool m_isOk;
bool m_printingPrepared; // Called OnPreparePrinting?
private:
void Init(wxPrintout *printout, wxPrintout *printoutForPrinting);

View File

@ -8,6 +8,16 @@
#include "wx/control.h"
#include "wx/event.h"
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
#ifdef __WXMSW__
WXDLLEXPORT_DATA(extern const char*) wxTreeCtrlNameStr;
#else
#define wxTreeCtrlNameStr "wxTreeCtrl"
#endif
// ----------------------------------------------------------------------------
// include the platform-dependent wxTreeCtrl class
// ----------------------------------------------------------------------------

View File

@ -95,4 +95,4 @@ bool wxGIFHandler::CanRead( wxInputStream& stream )
// wxUSE_STREAMS
#endif
// wxUSE_GIF
// wxUSE_LIBGIF

View File

@ -25,6 +25,8 @@
#include "wx/module.h"
#include "wx/log.h"
#if wxUSE_PCX
//-----------------------------------------------------------------------------
// PCX decoding
//-----------------------------------------------------------------------------
@ -272,7 +274,7 @@ bool wxPCXHandler::CanRead( wxInputStream& stream )
return (c == 10);
}
#endif // wxUSE_STREAMS
#endif // wxUSE_PCX

View File

@ -23,6 +23,8 @@
#include "wx/log.h"
#include "wx/txtstrm.h"
#if wxUSE_PNM
#ifdef __WXMSW__
#include <windows.h>
#endif
@ -158,4 +160,5 @@ bool wxPNMHandler::CanRead( wxInputStream& stream )
#endif // wxUSE_STREAMS
#endif // wxUSE_PNM

View File

@ -563,8 +563,10 @@ void wxPrintPreviewBase::Init(wxPrintout *printout,
m_leftMargin = 40;
m_pageWidth = 0;
m_pageHeight = 0;
m_printingPrepared = FALSE;
printout->OnPreparePrinting();
// Too soon! Moved to RenderPage.
// printout->OnPreparePrinting();
// Get some parameters from the printout, if defined
int selFrom, selTo;
@ -678,6 +680,13 @@ bool wxPrintPreviewBase::RenderPage(int pageNum)
m_previewPrintout->SetDC(&memoryDC);
m_previewPrintout->SetPageSizePixels(m_pageWidth, m_pageHeight);
// Need to delay OnPreparePrinting until here, so we have enough information.
if (!m_printingPrepared)
{
m_previewPrintout->OnPreparePrinting();
m_printingPrepared = TRUE;
}
m_previewPrintout->OnBeginPrinting();
if (!m_previewPrintout->OnBeginDocument(m_printDialogData.GetFromPage(), m_printDialogData.GetToPage()))

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
// Name: sizer.cpp
// Purpose: provide new wxSizer class for layounting
// Purpose: provide new wxSizer class for layout
// Author: Robert Roebling and Robin Dunn
// Modified by:
// Created:

View File

@ -85,7 +85,12 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro
return FALSE;
printout->SetIsPreview(FALSE);
printout->OnPreparePrinting();
// 4/9/99, JACS: this is a silly place to allow preparation, considering
// the DC and no parameters have been set in the printout object.
// Moved further down.
// printout->OnPreparePrinting();
// Get some parameters from the printout, if defined
int fromPage, toPage;
@ -170,6 +175,8 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro
// Create an abort window
wxBeginBusyCursor();
printout->OnPreparePrinting();
int
pagesPerCopy = m_printDialogData.GetToPage()-m_printDialogData.GetFromPage()+1,
totalPages = pagesPerCopy * m_printDialogData.GetNoCopies(),

View File

@ -1296,7 +1296,7 @@ void wxTreeCtrl::SetImageList(wxImageList *imageList)
// May be toggle off. Then wxTreeCtrl will spread when
// necessary (which might look ugly).
#if 1
wxPaintDC dc(this);
wxClientDC dc(this);
m_lineHeight = (int)(dc.GetCharHeight() + 4);
int
width = 0,
@ -1527,7 +1527,7 @@ void wxTreeCtrl::DrawBorder(wxTreeItemId &item)
wxGenericTreeItem *i=item.m_pItem;
wxPaintDC dc(this);
wxClientDC dc(this);
PrepareDC( dc );
dc.SetLogicalFunction(wxINVERT);
@ -1546,7 +1546,7 @@ void wxTreeCtrl::DrawLine(wxTreeItemId &item, bool below)
wxGenericTreeItem *i=item.m_pItem;
wxPaintDC dc(this);
wxClientDC dc(this);
PrepareDC( dc );
dc.SetLogicalFunction(wxINVERT);

View File

@ -176,6 +176,8 @@ const wxChar *wxFileSelectorPromptStr = _T("Select a file");
const wxChar *wxFileSelectorDefaultWildcardStr = _T("*.*");
const wxChar *wxInternalErrorStr = _T("wxWindows Internal Error");
const wxChar *wxFatalErrorStr = _T("wxWindows Fatal Error");
const wxChar *wxDirDialogNameStr = _T("wxDirCtrl");
const wxChar *wxDirDialogDefaultFolderStr = _T("/");
/* See wx/utils.h */
const wxChar *wxFloatToStringStr = _T("%.2f");

View File

@ -176,6 +176,8 @@ const wxChar *wxFileSelectorPromptStr = _T("Select a file");
const wxChar *wxFileSelectorDefaultWildcardStr = _T("*.*");
const wxChar *wxInternalErrorStr = _T("wxWindows Internal Error");
const wxChar *wxFatalErrorStr = _T("wxWindows Fatal Error");
const wxChar *wxDirDialogNameStr = _T("wxDirCtrl");
const wxChar *wxDirDialogDefaultFolderStr = _T("/");
/* See wx/utils.h */
const wxChar *wxFloatToStringStr = _T("%.2f");

View File

@ -129,6 +129,8 @@ const char *wxFileSelectorPromptStr = "Select a file";
const char *wxFileSelectorDefaultWildcardStr = "*.*";
const char *wxInternalErrorStr = "wxWindows Internal Error";
const char *wxFatalErrorStr = "wxWindows Fatal Error";
const char *wxDirDialogNameStr = "wxDirCtrl";
const char *wxDirDialogDefaultFolderStr = "/";
// See wx/utils.h
const char *wxFloatToStringStr = "%.2f";

View File

@ -135,7 +135,9 @@ wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]
#else // Win16
wxAcceleratorTable::wxAcceleratorTable(int WXUNUSED(n), const wxAcceleratorEntry WXUNUSED(entries)[])
{
wxFAIL_MSG("not implemented");
// No, we simply gracefully degrade; we don't expect the
// developer to pepper their code with #ifdefs just for this.
// wxFAIL_MSG("not implemented");
}
#endif // Win32/16

View File

@ -153,6 +153,8 @@ const wxChar *wxFileSelectorDefaultWildcardStr = _T("*.*");
const wxChar *wxInternalErrorStr = _T("wxWindows Internal Error");
const wxChar *wxFatalErrorStr = _T("wxWindows Fatal Error");
const wxChar *wxTreeCtrlNameStr = _T("treeCtrl");
const wxChar *wxDirDialogNameStr = _T("wxDirCtrl");
const wxChar *wxDirDialogDefaultFolderStr = _T("/");
// See wx/utils.h
const wxChar *wxFloatToStringStr = _T("%.2f");

View File

@ -1,6 +1,6 @@
# This file was automatically generated by tmake at 16:27, 1999/08/29
# This file was automatically generated by tmake at 15:37, 1999/09/05
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T!
#

View File

@ -735,7 +735,7 @@ cleanall: clean
MFTYPE=bcc
makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
cd $(WXWIN)\distrib\msw\tmake
tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
copy makefile.$(MFTYPE) $(WXWIN)\src\msw
#makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
# cd $(WXWIN)\distrib\msw\tmake
# tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
# copy makefile.$(MFTYPE) $(WXWIN)\src\msw

View File

@ -1,6 +1,6 @@
# This file was automatically generated by tmake at 15:14, 1999/08/18
# This file was automatically generated by tmake at 14:47, 1999/09/05
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE DOS.T!
#
@ -101,6 +101,7 @@ COMMONOBJS = \
$(COMMDIR)\dynarray.obj \
$(COMMDIR)\dynlib.obj \
$(COMMDIR)\event.obj \
$(COMMDIR)\extended.obj \
$(COMMDIR)\ffile.obj \
$(COMMDIR)\file.obj \
$(COMMDIR)\fileconf.obj \
@ -116,9 +117,6 @@ COMMONOBJS = \
$(COMMDIR)\imagbmp.obj \
$(COMMDIR)\image.obj \
$(COMMDIR)\imaggif.obj \
$(COMMDIR)\imagjpeg.obj \
$(COMMDIR)\imagpcx.obj \
$(COMMDIR)\imagpnm.obj \
$(COMMDIR)\intl.obj \
$(COMMDIR)\ipcbase.obj \
$(COMMDIR)\layout.obj \
@ -132,7 +130,6 @@ COMMONOBJS = \
$(COMMDIR)\odbc.obj \
$(COMMDIR)\paper.obj \
$(COMMDIR)\prntbase.obj \
$(COMMDIR)\process.obj \
$(COMMDIR)\resource.obj \
$(COMMDIR)\sizer.obj \
$(COMMDIR)\strconv.obj \
@ -146,6 +143,7 @@ COMMONOBJS = \
$(COMMDIR)\timercmn.obj \
$(COMMDIR)\tokenzr.obj \
$(COMMDIR)\txtstrm.obj \
$(COMMDIR)\unzip.obj \
$(COMMDIR)\utilscmn.obj \
$(COMMDIR)\valgen.obj \
$(COMMDIR)\validate.obj \
@ -156,14 +154,8 @@ COMMONOBJS = \
$(COMMDIR)\wxchar.obj \
$(COMMDIR)\wxexpr.obj \
$(COMMDIR)\zipstrm.obj \
$(COMMDIR)\extended.obj \
$(COMMDIR)\unzip.obj \
$(COMMDIR)\zstream.obj
# Won't compile
# $(COMMDIR)\imagpng.obj \
#
MSWOBJS = $(MSWDIR)\accel.obj \
$(MSWDIR)\app.obj \
$(MSWDIR)\bitmap.obj \
@ -238,9 +230,6 @@ MSWOBJS = $(MSWDIR)\accel.obj \
$(MSWDIR)\window.obj \
$(MSWDIR)\xpmhand.obj
# Won't compile
# $(MSWDIR)\pnghand.obj \
#
# TODO: Implement XPM and PNG targets in this makefile!
# $(OLEDIR)\xpmhand \
# $(OLEDIR)\pnghand \
@ -832,26 +821,11 @@ $(COMMDIR)/imaggif.obj: $*.$(SRCSUFF)
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
<<
$(COMMDIR)/imagjpeg.obj: $*.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
<<
$(COMMDIR)/imagpcx.obj: $*.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
<<
$(COMMDIR)/imagpng.obj: $*.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
<<
$(COMMDIR)/imagpnm.obj: $*.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
<<
$(COMMDIR)/intl.obj: $*.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
@ -917,11 +891,6 @@ $(COMMDIR)/prntbase.obj: $*.$(SRCSUFF)
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
<<
$(COMMDIR)/process.obj: $*.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
<<
$(COMMDIR)/resource.obj: $*.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
@ -1238,7 +1207,8 @@ cleanall: clean
MFTYPE=dos
makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
cd $(WXWIN)\distrib\msw\tmake
tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
copy makefile.$(MFTYPE) $(WXWIN)\src\msw
# Don't regenerate! We're out of sync for now.
#makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
# cd $(WXWIN)\distrib\msw\tmake
# tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE)
# copy makefile.$(MFTYPE) $(WXWIN)\src\msw

View File

@ -99,7 +99,11 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt
return FALSE;
printout->SetIsPreview(FALSE);
printout->OnPreparePrinting();
// 4/9/99, JACS: this is a silly place to allow preparation, considering
// the DC and no parameters have been set in the printout object.
// Moved further down.
// printout->OnPreparePrinting();
// Get some parameters from the printout, if defined
int fromPage, toPage;
@ -186,6 +190,8 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt
// Create an abort window
wxBeginBusyCursor();
printout->OnPreparePrinting();
wxWindow *win = CreateAbortWindow(parent, printout);
wxYield();

View File

@ -28,7 +28,10 @@
#endif
#include "wx/log.h"
#ifdef __WIN32__
#include "wx/process.h"
#endif
#include "wx/msw/private.h"
@ -113,7 +116,6 @@ static DWORD wxExecuteThread(wxExecuteData *data)
return 0;
}
#endif
// window procedure of a hidden window which is created just to receive
// the notification message when a process exits
@ -146,6 +148,7 @@ LRESULT APIENTRY _EXPORT wxExecuteWindowCbk(HWND hWnd, UINT message,
return 0;
}
#endif
extern wxChar wxPanelClassName[];