compilation fixes for non default wxUSE_XXX values (patch 662781)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18695 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-01-12 22:20:46 +00:00
parent 12c44eb56d
commit e30285abc6
28 changed files with 154 additions and 84 deletions

View File

@@ -1075,17 +1075,6 @@
# endif # endif
#endif /* wxUSE_WXHTML_HELP */ #endif /* wxUSE_WXHTML_HELP */
#if wxUSE_PRINTING_ARCHITECTURE
# if !wxUSE_COMBOBOX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "Print dialog requires wxUSE_COMBOBOX"
# else
# undef wxUSE_COMBOBOX
# define wxUSE_COMBOBOX 1
# endif
# endif
#endif /* wxUSE_PRINTING_ARCHITECTURE */
#if wxUSE_DOC_VIEW_ARCHITECTURE #if wxUSE_DOC_VIEW_ARCHITECTURE
# if !wxUSE_MENUS # if !wxUSE_MENUS
# ifdef wxABORT_ON_CONFIG_ERROR # ifdef wxABORT_ON_CONFIG_ERROR
@@ -1095,8 +1084,48 @@
# define wxUSE_MENUS 1 # define wxUSE_MENUS 1
# endif # endif
# endif # endif
# if !wxUSE_STREAMS && !wxUSE_STD_IOSTREAM
# ifdef wxABORT_ON_CONFIG_ERROR
# error "DocView requires wxUSE_STREAMS or wxUSE_STD_IOSTREAM"
# else
# undef wxUSE_STREAMS
# define wxUSE_STREAMS 1
# endif
# endif
#endif /* wxUSE_DOC_VIEW_ARCHITECTURE */ #endif /* wxUSE_DOC_VIEW_ARCHITECTURE */
#if wxUSE_PRINTING_ARCHITECTURE
# if !wxUSE_COMBOBOX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "Print dialog requires wxUSE_COMBOBOX"
# else
# undef wxUSE_COMBOBOX
# define wxUSE_COMBOBOX 1
# endif
# endif
# if !wxUSE_DOC_VIEW_ARCHITECTURE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "Print architecture requires wxUSE_DOC_VIEW_ARCHITECTURE"
# else
# undef wxUSE_DOC_VIEW_ARCHITECTURE
# define wxUSE_DOC_VIEW_ARCHITECTURE 1
# endif
# endif
#endif /* wxUSE_PRINTING_ARCHITECTURE */
#if wxUSE_MDI_ARCHITECTURE
# if !wxUSE_DOC_VIEW_ARCHITECTURE
# ifdef wxABORT_ON_CONFIG_ERROR
# error "MDI requires wxUSE_DOC_VIEW_ARCHITECTURE"
# else
# undef wxUSE_DOC_VIEW_ARCHITECTURE
# define wxUSE_DOC_VIEW_ARCHITECTURE 1
# endif
# endif
#endif /* wxUSE_MDI_ARCHITECTURE */
#if !wxUSE_FILEDLG #if !wxUSE_FILEDLG
# if wxUSE_DOC_VIEW_ARCHITECTURE || wxUSE_WXHTML_HELP # if wxUSE_DOC_VIEW_ARCHITECTURE || wxUSE_WXHTML_HELP
# ifdef wxABORT_ON_CONFIG_ERROR # ifdef wxABORT_ON_CONFIG_ERROR

View File

@@ -602,7 +602,7 @@ public:
float *descent = NULL, float *externalLeading = NULL, float *descent = NULL, float *externalLeading = NULL,
wxFont *theFont = NULL, bool use16bit = FALSE) const ; wxFont *theFont = NULL, bool use16bit = FALSE) const ;
void GetSize(float* width, float* height) const { int w, h; GetSize(& w, & h); *width = w; *height = h; } void GetSize(float* width, float* height) const { int w, h; GetSize(& w, & h); *width = w; *height = h; }
void GetSizeMM(float *width, float *height) const { long w, h; GetSizeMM(& w, & h); *width = (float) w; *height = (float) h; } void GetSizeMM(float *width, float *height) const { int w, h; GetSizeMM(& w, & h); *width = (float) w; *height = (float) h; }
#endif // WXWIN_COMPATIBILITY #endif // WXWIN_COMPATIBILITY

View File

@@ -18,7 +18,7 @@
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_MDI_ARCHITECTURE && wxUSE_DOC_VIEW_ARCHITECTURE #if wxUSE_MDI_ARCHITECTURE
#include "wx/docview.h" #include "wx/docview.h"
#include "wx/mdi.h" #include "wx/mdi.h"

View File

@@ -17,6 +17,9 @@
#endif #endif
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_DOC_VIEW_ARCHITECTURE
#include "wx/list.h" #include "wx/list.h"
#include "wx/cmndata.h" #include "wx/cmndata.h"
#include "wx/string.h" #include "wx/string.h"
@@ -586,6 +589,8 @@ bool WXDLLEXPORT wxTransferStreamToFile(wxSTD istream& stream, const wxString& f
// converts from/to a stream to/from a temporary file. // converts from/to a stream to/from a temporary file.
bool WXDLLEXPORT wxTransferFileToStream(const wxString& filename, wxOutputStream& stream); bool WXDLLEXPORT wxTransferFileToStream(const wxString& filename, wxOutputStream& stream);
bool WXDLLEXPORT wxTransferStreamToFile(wxInputStream& stream, const wxString& filename); bool WXDLLEXPORT wxTransferStreamToFile(wxInputStream& stream, const wxString& filename);
#endif #endif // wxUSE_STD_IOSTREAM
#endif // wxUSE_DOC_VIEW_ARCHITECTURE
#endif // _WX_DOCH__ #endif // _WX_DOCH__

View File

@@ -71,6 +71,17 @@ public:
virtual void DoSetVirtualSize(int x, int y); virtual void DoSetVirtualSize(int x, int y);
#if WXWIN_COMPATIBILITY
virtual void GetScrollUnitsPerPage(int *x_page, int *y_page) const;
virtual void CalcUnscrolledPosition(int x, int y, float *xx, float *yy) const;
// Need to do this otherwise the compiler gets confuced
// between float and int calls to this function.
void CalcUnscrolledPosition(int x, int y, int *xx, int *yy) const
{ wxScrollHelper::CalcScrolledPosition(x, y, xx, yy); }
wxPoint CalcUnscrolledPosition(const wxPoint& pt) const
{ return wxScrollHelper::CalcScrolledPosition(pt); }
#endif // WXWIN_COMPATIBILITY
protected: protected:
// this is needed for wxEVT_PAINT processing hack described in // this is needed for wxEVT_PAINT processing hack described in
// wxScrollHelperEvtHandler::ProcessEvent() // wxScrollHelperEvtHandler::ProcessEvent()

View File

@@ -91,8 +91,10 @@ public :
inline bool operator==(const wxPoint2DInt& pt) const; inline bool operator==(const wxPoint2DInt& pt) const;
inline bool operator!=(const wxPoint2DInt& pt) const; inline bool operator!=(const wxPoint2DInt& pt) const;
#if wxUSE_STREAMS
void WriteTo( wxDataOutputStream &stream ) const; void WriteTo( wxDataOutputStream &stream ) const;
void ReadFrom( wxDataInputStream &stream ); void ReadFrom( wxDataInputStream &stream );
#endif // wxUSE_STREAMS
wxInt32 m_x; wxInt32 m_x;
wxInt32 m_y; wxInt32 m_y;
@@ -738,8 +740,10 @@ public:
bool operator == (const wxRect2DInt& rect) const; bool operator == (const wxRect2DInt& rect) const;
bool operator != (const wxRect2DInt& rect) const; bool operator != (const wxRect2DInt& rect) const;
#if wxUSE_STREAMS
void WriteTo( wxDataOutputStream &stream ) const; void WriteTo( wxDataOutputStream &stream ) const;
void ReadFrom( wxDataInputStream &stream ); void ReadFrom( wxDataInputStream &stream );
#endif // wxUSE_STREAMS
wxInt32 m_x; wxInt32 m_x;
wxInt32 m_y; wxInt32 m_y;

View File

@@ -537,6 +537,20 @@ inline void WXDLLEXPORT wxVLog##level(arg1, const wxChar *szFormat, \
va_list argptr) {} \ va_list argptr) {} \
inline void WXDLLEXPORT wxLog##level(arg1, const wxChar *szFormat, ...) {} inline void WXDLLEXPORT wxLog##level(arg1, const wxChar *szFormat, ...) {}
// Empty Class to fake wxLogNull
class WXDLLEXPORT wxLogNull
{
public:
wxLogNull() {}
};
// Dummy macros to replace some functions.
#define wxSysErrorCode() (unsigned long)0
#define wxSysErrorMsg( X ) (const wxChar*)NULL
// Fake symbolic trace masks... for those that are used frequently
#define wxTRACE_OleCalls wxT("") // OLE interface calls
#endif // wxUSE_LOG/!wxUSE_LOG #endif // wxUSE_LOG/!wxUSE_LOG
// a generic function for all levels (level is passes as parameter) // a generic function for all levels (level is passes as parameter)
@@ -626,4 +640,3 @@ void WXDLLEXPORT wxSafeShowMessage(const wxString& title, const wxString& text);
#endif // _WX_LOG_H_ #endif // _WX_LOG_H_
// vi:sts=4:sw=4:et

View File

@@ -87,7 +87,6 @@ public:
// -------------- // --------------
// event handlers // event handlers
// bool OnClose();
void OnCharHook(wxKeyEvent& event); void OnCharHook(wxKeyEvent& event);
void OnCloseWindow(wxCloseEvent& event); void OnCloseWindow(wxCloseEvent& event);

View File

@@ -22,7 +22,7 @@ WXDLLEXPORT_DATA(extern const char*) wxDialogNameStr;
class WXDLLEXPORT wxDialog : public wxDialogBase class WXDLLEXPORT wxDialog : public wxDialogBase
{ {
DECLARE_DYNAMIC_CLASS(wxDialog) DECLARE_DYNAMIC_CLASS(wxDialog)
public: public:
wxDialog(); wxDialog();
@@ -49,49 +49,48 @@ public:
{ {
Create(parent, id, title, pos, size, style, name); Create(parent, id, title, pos, size, style, name);
} }
bool Create(wxWindow *parent, wxWindowID id, bool Create(wxWindow *parent, wxWindowID id,
const wxString& title, // bool modal = FALSE, // TODO make this a window style? const wxString& title, // bool modal = FALSE, // TODO make this a window style?
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE, long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = wxDialogNameStr); const wxString& name = wxDialogNameStr);
~wxDialog(); ~wxDialog();
virtual bool Destroy(); virtual bool Destroy();
virtual bool Show(bool show = TRUE); virtual bool Show(bool show = TRUE);
void SetTitle(const wxString& title); void SetTitle(const wxString& title);
void SetModal(bool flag); void SetModal(bool flag);
virtual bool IsModal() const virtual bool IsModal() const
{ return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); } { return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); }
virtual int ShowModal(); virtual int ShowModal();
virtual void EndModal(int retCode); virtual void EndModal(int retCode);
// Implementation // Implementation
virtual void ChangeFont(bool keepOriginalSize = TRUE); virtual void ChangeFont(bool keepOriginalSize = TRUE);
virtual void ChangeBackgroundColour(); virtual void ChangeBackgroundColour();
virtual void ChangeForegroundColour(); virtual void ChangeForegroundColour();
inline WXWidget GetTopWidget() const { return m_mainWidget; } inline WXWidget GetTopWidget() const { return m_mainWidget; }
inline WXWidget GetClientWidget() const { return m_mainWidget; } inline WXWidget GetClientWidget() const { return m_mainWidget; }
// Standard buttons // Standard buttons
void OnOK(wxCommandEvent& event); void OnOK(wxCommandEvent& event);
void OnApply(wxCommandEvent& event); void OnApply(wxCommandEvent& event);
void OnCancel(wxCommandEvent& event); void OnCancel(wxCommandEvent& event);
// Responds to colour changes // Responds to colour changes
void OnSysColourChanged(wxSysColourChangedEvent& event); void OnSysColourChanged(wxSysColourChangedEvent& event);
// bool OnClose();
void OnCharHook(wxKeyEvent& event); void OnCharHook(wxKeyEvent& event);
void OnCloseWindow(wxCloseEvent& event); void OnCloseWindow(wxCloseEvent& event);
private: private:
virtual bool DoCreate( wxWindow* parent, wxWindowID id, virtual bool DoCreate( wxWindow* parent, wxWindowID id,
const wxString& title, const wxString& title,
@@ -108,9 +107,9 @@ protected:
virtual void DoSetSize(int x, int y, virtual void DoSetSize(int x, int y,
int width, int height, int width, int height,
int sizeFlags = wxSIZE_AUTO); int sizeFlags = wxSIZE_AUTO);
virtual void DoSetClientSize(int width, int height); virtual void DoSetClientSize(int width, int height);
private: private:
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };

View File

@@ -48,7 +48,7 @@ public:
const wxString& name = wxButtonNameStr); const wxString& name = wxButtonNameStr);
#if WXWIN_COMPATIBILITY #if WXWIN_COMPATIBILITY
wxBitmap *GetBitmap() const { return (wxBitmap *) & m_bmp; } wxBitmap *GetBitmap() const { return (wxBitmap *) &GetBitmapLabel(); }
#endif #endif
// Implementation // Implementation

View File

@@ -79,7 +79,6 @@ public:
virtual bool Show(bool show = TRUE); virtual bool Show(bool show = TRUE);
// event handlers // event handlers
bool OnClose();
void OnCharHook(wxKeyEvent& event); void OnCharHook(wxKeyEvent& event);
void OnCloseWindow(wxCloseEvent& event); void OnCloseWindow(wxCloseEvent& event);

View File

@@ -110,7 +110,6 @@ public:
// //
// Event handlers // Event handlers
// //
bool OnClose(void);
void OnCharHook(wxKeyEvent& rEvent); void OnCharHook(wxKeyEvent& rEvent);
void OnCloseWindow(wxCloseEvent& rEvent); void OnCloseWindow(wxCloseEvent& rEvent);

View File

@@ -475,6 +475,7 @@ bool wxAppBase::CheckBuildOptions(const wxBuildOptions& opts)
static void LINKAGEMODE SetTraceMasks() static void LINKAGEMODE SetTraceMasks()
{ {
#if wxUSE_LOG
wxString mask; wxString mask;
if ( wxGetEnv(wxT("WXTRACE"), &mask) ) if ( wxGetEnv(wxT("WXTRACE"), &mask) )
{ {
@@ -482,6 +483,7 @@ static void LINKAGEMODE SetTraceMasks()
while ( tkn.HasMoreTokens() ) while ( tkn.HasMoreTokens() )
wxLog::AddTraceMask(tkn.GetNextToken()); wxLog::AddTraceMask(tkn.GetNextToken());
} }
#endif // wxUSE_LOG
} }
// wxASSERT() helper // wxASSERT() helper

View File

@@ -20,7 +20,7 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_MDI_ARCHITECTURE && wxUSE_DOC_VIEW_ARCHITECTURE #if wxUSE_MDI_ARCHITECTURE
#include "wx/docmdi.h" #include "wx/docmdi.h"

View File

@@ -894,7 +894,7 @@ wxList *wxFTP::GetList(const wxString& wildcard, bool details)
{ {
wxSocketBase *sock = GetPort(); wxSocketBase *sock = GetPort();
if (!sock) if (!sock)
return FALSE; return NULL;
wxList *file_list = new wxList; wxList *file_list = new wxList;
wxString line; wxString line;
// NLST : List of Filenames (including Directory's !) // NLST : List of Filenames (including Directory's !)

View File

@@ -152,6 +152,7 @@ void wxRect2DDouble::ConstrainTo( const wxRect2DDouble &rect )
// wxPoint2D // wxPoint2D
#if wxUSE_STREAMS
void wxPoint2DInt::WriteTo( wxDataOutputStream &stream ) const void wxPoint2DInt::WriteTo( wxDataOutputStream &stream ) const
{ {
stream.Write32( m_x ); stream.Write32( m_x );
@@ -163,6 +164,7 @@ void wxPoint2DInt::ReadFrom( wxDataInputStream &stream )
m_x = stream.Read32(); m_x = stream.Read32();
m_y = stream.Read32(); m_y = stream.Read32();
} }
#endif // wxUSE_STREAMS
wxDouble wxPoint2DInt::GetVectorAngle() const wxDouble wxPoint2DInt::GetVectorAngle() const
{ {
@@ -338,6 +340,7 @@ wxRect2DInt& wxRect2DInt::operator=( const wxRect2DInt &r )
return *this; return *this;
} }
#if wxUSE_STREAMS
void wxRect2DInt::WriteTo( wxDataOutputStream &stream ) const void wxRect2DInt::WriteTo( wxDataOutputStream &stream ) const
{ {
stream.Write32( m_x ); stream.Write32( m_x );
@@ -353,5 +356,6 @@ void wxRect2DInt::ReadFrom( wxDataInputStream &stream )
m_width = stream.Read32(); m_width = stream.Read32();
m_height = stream.Read32(); m_height = stream.Read32();
} }
#endif // wxUSE_STREAMS
#endif // wxUSE_GEOMETRY #endif // wxUSE_GEOMETRY

View File

@@ -20,7 +20,7 @@
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_IMAGE && wxUSE_STREAMS #if wxUSE_IMAGE
#include "wx/imagbmp.h" #include "wx/imagbmp.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
@@ -52,6 +52,8 @@
IMPLEMENT_DYNAMIC_CLASS(wxBMPHandler,wxImageHandler) IMPLEMENT_DYNAMIC_CLASS(wxBMPHandler,wxImageHandler)
#if wxUSE_STREAMS
#ifndef BI_RGB #ifndef BI_RGB
#define BI_RGB 0 #define BI_RGB 0
#define BI_RLE8 1 #define BI_RLE8 1
@@ -964,6 +966,8 @@ bool wxBMPHandler::DoCanRead(wxInputStream& stream)
return hdr[0] == 'B' && hdr[1] == 'M'; return hdr[0] == 'B' && hdr[1] == 'M';
} }
#endif // wxUSE_STREAMS
#if wxUSE_ICO_CUR #if wxUSE_ICO_CUR
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -972,6 +976,8 @@ bool wxBMPHandler::DoCanRead(wxInputStream& stream)
IMPLEMENT_DYNAMIC_CLASS(wxICOHandler, wxBMPHandler) IMPLEMENT_DYNAMIC_CLASS(wxICOHandler, wxBMPHandler)
#if wxUSE_STREAMS
struct ICONDIRENTRY struct ICONDIRENTRY
{ {
wxUint8 bWidth; // Width of the image wxUint8 bWidth; // Width of the image
@@ -1288,6 +1294,7 @@ bool wxICOHandler::DoCanRead(wxInputStream& stream)
return hdr[0] == '\0' && hdr[1] == '\0' && hdr[2] == '\1' && hdr[3] == '\0'; return hdr[0] == '\0' && hdr[1] == '\0' && hdr[2] == '\1' && hdr[3] == '\0';
} }
#endif // wxUSE_STREAMS
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -1296,6 +1303,8 @@ bool wxICOHandler::DoCanRead(wxInputStream& stream)
IMPLEMENT_DYNAMIC_CLASS(wxCURHandler, wxICOHandler) IMPLEMENT_DYNAMIC_CLASS(wxCURHandler, wxICOHandler)
#if wxUSE_STREAMS
bool wxCURHandler::DoCanRead(wxInputStream& stream) bool wxCURHandler::DoCanRead(wxInputStream& stream)
{ {
stream.SeekI(0); stream.SeekI(0);
@@ -1307,12 +1316,16 @@ bool wxCURHandler::DoCanRead(wxInputStream& stream)
return hdr[0] == '\0' && hdr[1] == '\0' && hdr[2] == '\2' && hdr[3] == '\0'; return hdr[0] == '\0' && hdr[1] == '\0' && hdr[2] == '\2' && hdr[3] == '\0';
} }
#endif // wxUSE_STREAMS
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxANIHandler // wxANIHandler
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxANIHandler, wxCURHandler) IMPLEMENT_DYNAMIC_CLASS(wxANIHandler, wxCURHandler)
#if wxUSE_STREAMS
bool wxANIHandler::LoadFile(wxImage *image, wxInputStream& stream, bool wxANIHandler::LoadFile(wxImage *image, wxInputStream& stream,
bool verbose, int index) bool verbose, int index)
{ {
@@ -1470,6 +1483,8 @@ int wxANIHandler::GetImageCount(wxInputStream& stream)
return wxNOT_FOUND; return wxNOT_FOUND;
} }
#endif // wxUSE_STREAMS
#endif // wxUSE_ICO_CUR #endif // wxUSE_ICO_CUR
#endif // wxUSE_IMAGE && wxUSE_STREAMS #endif // wxUSE_IMAGE

View File

@@ -23,7 +23,7 @@
# include "wx/defs.h" # include "wx/defs.h"
#endif #endif
#if wxUSE_IMAGE && wxUSE_STREAMS && wxUSE_PCX #if wxUSE_IMAGE && wxUSE_PCX
#include "wx/imagpcx.h" #include "wx/imagpcx.h"
#include "wx/wfstream.h" #include "wx/wfstream.h"
@@ -35,6 +35,14 @@
#include "wx/list.h" #include "wx/list.h"
#include "wx/object.h" #include "wx/object.h"
//-----------------------------------------------------------------------------
// wxPCXHandler
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxPCXHandler,wxImageHandler)
#if wxUSE_STREAMS
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// RLE encoding and decoding // RLE encoding and decoding
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -429,8 +437,6 @@ int SavePCX(wxImage *image, wxOutputStream& stream)
// wxPCXHandler // wxPCXHandler
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxPCXHandler,wxImageHandler)
bool wxPCXHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose, int WXUNUSED(index) ) bool wxPCXHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose, int WXUNUSED(index) )
{ {
int error; int error;
@@ -494,5 +500,7 @@ bool wxPCXHandler::DoCanRead( wxInputStream& stream )
return c == 10; return c == 10;
} }
#endif // wxUSE_STREAMS && wxUSE_PCX #endif // wxUSE_STREAMS
#endif // wxUSE_IMAGE && wxUSE_PCX

View File

@@ -54,7 +54,7 @@
IMPLEMENT_DYNAMIC_CLASS(wxPNGHandler,wxImageHandler) IMPLEMENT_DYNAMIC_CLASS(wxPNGHandler,wxImageHandler)
#if wxUSE_LIBPNG #if wxUSE_STREAMS
#ifndef PNGLINKAGEMODE #ifndef PNGLINKAGEMODE
#ifdef __WATCOMC__ #ifdef __WATCOMC__

View File

@@ -47,6 +47,8 @@ extern "C"
IMPLEMENT_DYNAMIC_CLASS(wxTIFFHandler,wxImageHandler) IMPLEMENT_DYNAMIC_CLASS(wxTIFFHandler,wxImageHandler)
#if wxUSE_STREAMS
extern "C" extern "C"
{ {
@@ -377,8 +379,7 @@ bool wxTIFFHandler::DoCanRead( wxInputStream& stream )
(hdr[0] == 'M' && hdr[1] == 'M'); (hdr[0] == 'M' && hdr[1] == 'M');
} }
#endif // wxUSE_STREAMS
#endif #endif // wxUSE_LIBTIFF
// wxUSE_LIBTIFF

View File

@@ -1069,6 +1069,7 @@ wxString wxGetCurrentDir()
// wxDoExecuteWithCapture() helper: reads an entire stream into one array // wxDoExecuteWithCapture() helper: reads an entire stream into one array
// //
// returns TRUE if ok, FALSE if error // returns TRUE if ok, FALSE if error
#if wxUSE_STREAMS
static bool ReadAll(wxInputStream *is, wxArrayString& output) static bool ReadAll(wxInputStream *is, wxArrayString& output)
{ {
wxCHECK_MSG( is, FALSE, _T("NULL stream in wxExecute()?") ); wxCHECK_MSG( is, FALSE, _T("NULL stream in wxExecute()?") );
@@ -1097,6 +1098,7 @@ static bool ReadAll(wxInputStream *is, wxArrayString& output)
return cont; return cont;
} }
#endif // wxUSE_STREAMS
// this is a private function because it hasn't a clean interface: the first // this is a private function because it hasn't a clean interface: the first
// array is passed by reference, the second by pointer - instead we have 2 // array is passed by reference, the second by pointer - instead we have 2

View File

@@ -1177,7 +1177,9 @@ bool wxWindowBase::TransferDataToWindow()
if ( validator && !validator->TransferToWindow() ) if ( validator && !validator->TransferToWindow() )
{ {
wxLogWarning(_("Could not transfer data to window")); wxLogWarning(_("Could not transfer data to window"));
#if wxUSE_LOG
wxLog::FlushActive(); wxLog::FlushActive();
#endif // wxUSE_LOG
return FALSE; return FALSE;
} }

View File

@@ -1146,7 +1146,7 @@ static int OpenLogFile(wxFile& file, wxString *pFilename)
#endif // !(wxUSE_LOGGUI || wxUSE_LOGWINDOW) #endif // !(wxUSE_LOGGUI || wxUSE_LOGWINDOW)
#if wxUSE_TEXTCTRL #if wxUSE_LOG && wxUSE_GUI && wxUSE_TEXTCTRL
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxLogTextCtrl implementation // wxLogTextCtrl implementation
@@ -1173,6 +1173,6 @@ void wxLogTextCtrl::DoLogString(const wxChar *szString, time_t WXUNUSED(t))
m_pTextCtrl->AppendText(msg); m_pTextCtrl->AppendText(msg);
} }
#endif // wxUSE_TEXTCTRL #endif // wxUSE_LOG && wxUSE_GUI && wxUSE_TEXTCTRL
// vi:sts=4:sw=4:et // vi:sts=4:sw=4:et

View File

@@ -701,8 +701,10 @@ int wxEntry(WXHINSTANCE hInstance,
// we can't simply double-click on the error message and get to that // we can't simply double-click on the error message and get to that
// line in the source. So VC++ at least, let's have a sensible default. // line in the source. So VC++ at least, let's have a sensible default.
#ifdef __VISUALC__ #ifdef __VISUALC__
#if wxUSE_LOG
wxLog::SetTimestamp(NULL); wxLog::SetTimestamp(NULL);
#endif #endif // wxUSE_LOG
#endif // __VISUALC__
// init the app // init the app
int retValue = wxEntryInitGui() && wxTheApp->OnInit() ? 0 : -1; int retValue = wxEntryInitGui() && wxTheApp->OnInit() ? 0 : -1;
@@ -1300,9 +1302,11 @@ bool wxApp::Yield(bool onlyIfNeeded)
// MT-FIXME // MT-FIXME
static bool s_inYield = FALSE; static bool s_inYield = FALSE;
#if wxUSE_LOG
// disable log flushing from here because a call to wxYield() shouldn't // disable log flushing from here because a call to wxYield() shouldn't
// normally result in message boxes popping up &c // normally result in message boxes popping up &c
wxLog::Suspend(); wxLog::Suspend();
#endif // wxUSE_LOG
if ( s_inYield ) if ( s_inYield )
{ {
@@ -1333,8 +1337,10 @@ bool wxApp::Yield(bool onlyIfNeeded)
// if there are pending events, we must process them. // if there are pending events, we must process them.
ProcessPendingEvents(); ProcessPendingEvents();
#if wxUSE_LOG
// let the logs be flashed again // let the logs be flashed again
wxLog::Resume(); wxLog::Resume();
#endif // wxUSE_LOG
s_inYield = FALSE; s_inYield = FALSE;

View File

@@ -389,11 +389,11 @@ bool wxBitmap::Create(int w, int h, int d)
} }
SetHBITMAP((WXHBITMAP)hbmp); SetHBITMAP((WXHBITMAP)hbmp);
}
#if WXWIN_COMPATIBILITY_2 #if WXWIN_COMPATIBILITY_2
GetBitmapData()->m_ok = hbmp != 0; GetBitmapData()->m_ok = hbmp != 0;
#endif // WXWIN_COMPATIBILITY_2 #endif // WXWIN_COMPATIBILITY_2
}
return Ok(); return Ok();
} }

View File

@@ -2035,25 +2035,6 @@ void wxDC::SetLogicalScale(double x, double y)
m_logicalScaleY = y; m_logicalScaleY = y;
} }
#if WXWIN_COMPATIBILITY
void wxDC::DoGetTextExtent(const wxString& string, float *x, float *y,
float *descent, float *externalLeading,
wxFont *theFont, bool use16bit) const
{
#ifdef __WXMICROWIN__
if (!GetHDC()) return;
#endif
wxCoord x1, y1, descent1, externalLeading1;
GetTextExtent(string, & x1, & y1, & descent1, & externalLeading1, theFont, use16bit);
*x = x1; *y = y1;
if (descent)
*descent = descent1;
if (externalLeading)
*externalLeading = externalLeading1;
}
#endif
#if wxUSE_DC_CACHEING #if wxUSE_DC_CACHEING
/* /*

View File

@@ -2298,8 +2298,10 @@ LRESULT WXDLLEXPORT APIENTRY _EXPORT wxWndProc(HWND hWnd, UINT message, WPARAM w
{ {
// trace all messages - useful for the debugging // trace all messages - useful for the debugging
#ifdef __WXDEBUG__ #ifdef __WXDEBUG__
#if wxUSE_LOG
wxLogTrace(wxTraceMessages, wxT("Processing %s(wParam=%8lx, lParam=%8lx)"), wxLogTrace(wxTraceMessages, wxT("Processing %s(wParam=%8lx, lParam=%8lx)"),
wxGetMessageName(message), (long) wParam, lParam); wxGetMessageName(message), (long) wParam, lParam);
#endif // wxUSE_LOG
#endif // __WXDEBUG__ #endif // __WXDEBUG__
wxWindowMSW *wnd = wxFindWinFromHandle((WXHWND) hWnd); wxWindowMSW *wnd = wxFindWinFromHandle((WXHWND) hWnd);
@@ -2892,8 +2894,10 @@ long wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam
if ( !processed ) if ( !processed )
{ {
#ifdef __WXDEBUG__ #ifdef __WXDEBUG__
#if wxUSE_LOG
wxLogTrace(wxTraceMessages, wxT("Forwarding %s to DefWindowProc."), wxLogTrace(wxTraceMessages, wxT("Forwarding %s to DefWindowProc."),
wxGetMessageName(message)); wxGetMessageName(message));
#endif // wxUSE_LOG
#endif // __WXDEBUG__ #endif // __WXDEBUG__
rc.result = MSWDefWindowProc(message, wParam, lParam); rc.result = MSWDefWindowProc(message, wParam, lParam);
} }

View File

@@ -2887,18 +2887,5 @@ void wxDC::SetLogicalScale(
m_logicalScaleY = dY; m_logicalScaleY = dY;
}; // end of wxDC::SetLogicalScale }; // end of wxDC::SetLogicalScale
#if WXWIN_COMPATIBILITY
void wxDC::DoGetTextExtent(const wxString& string, float *x, float *y,
float *descent, float *externalLeading,
wxFont *theFont, bool use16bit) const
{
wxCoord x1, y1, descent1, externalLeading1;
GetTextExtent(string, & x1, & y1, & descent1, & externalLeading1, theFont, use16bit);
*x = x1; *y = y1;
if (descent)
*descent = descent1;
if (externalLeading)
*externalLeading = externalLeading1;
}
#endif