Cleared up DEBUG define mess, defines are now called __WXDEBUG__ and WXDEBUG.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Karsten Ballüder
1998-07-10 11:14:17 +00:00
parent 8b9518ee4a
commit b2aef89b7a
39 changed files with 150 additions and 150 deletions

View File

@@ -9,8 +9,8 @@
// Licence: wxWindows license // Licence: wxWindows license
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef __DEBUGH__ #ifndef __WXDEBUGH__
#define __DEBUGH__ #define __WXDEBUGH__
#include <assert.h> #include <assert.h>
@@ -31,7 +31,7 @@
<BR> <BR>
<BR> <BR>
Extensive use of these macros is recommended! Remember that ASSERTs are Extensive use of these macros is recommended! Remember that ASSERTs are
disabled in final (without DEBUG defined) build, so they add strictly disabled in final (without WXDEBUG defined) build, so they add strictly
nothing to your program's code. On the other hand, CHECK macros do stay nothing to your program's code. On the other hand, CHECK macros do stay
even in release builds, but in general are not much of a burden, while even in release builds, but in general are not much of a burden, while
a judicious use of them might increase your program's stability. a judicious use of them might increase your program's stability.
@@ -43,7 +43,7 @@
/** @name Macros which are completely disabled in 'release' mode */ /** @name Macros which are completely disabled in 'release' mode */
//@{ //@{
#ifdef __DEBUG__ #ifdef __WXDEBUG__
/** /**
this function may be redefined to do something non trivial and is called this function may be redefined to do something non trivial and is called
whenever one of debugging macros fails (i.e. condition is false in an whenever one of debugging macros fails (i.e. condition is false in an
@@ -62,7 +62,7 @@
// no more bugs ;-) // no more bugs ;-)
#define wxASSERT(cond) #define wxASSERT(cond)
#define wxASSERT_MSG(x, m) #define wxASSERT_MSG(x, m)
#endif //DEBUG #endif //WXDEBUG
/// special form of assert: always triggers it (in debug mode) /// special form of assert: always triggers it (in debug mode)
#define wxFAIL wxASSERT(0) #define wxFAIL wxASSERT(0)
@@ -99,5 +99,5 @@
//@} //@}
#endif // __DEBUGH__ #endif // __WXDEBUGH__

View File

@@ -283,7 +283,7 @@ DECLARE_LOG_FUNCTION(SysError);
void WXDLLEXPORT wxLogSysError(long lErrCode, wxTString strFormat, ...); void WXDLLEXPORT wxLogSysError(long lErrCode, wxTString strFormat, ...);
// debug functions do nothing in release mode // debug functions do nothing in release mode
#ifdef __DEBUG__ #ifdef __WXDEBUG__
// NB: debug functions don't translate their arguments // NB: debug functions don't translate their arguments
extern void WXDLLEXPORT wxLogDebug(const char *szFormat, ...); extern void WXDLLEXPORT wxLogDebug(const char *szFormat, ...);
@@ -321,7 +321,7 @@ const char* WXDLLEXPORT wxSysErrorMsg(unsigned long nErrCode = 0);
// debug only logging functions: use them with API name and error code // debug only logging functions: use them with API name and error code
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#ifdef __DEBUG__ #ifdef __WXDEBUG__
#define wxLogApiError(api, rc) \ #define wxLogApiError(api, rc) \
wxLogDebug("At %s(%d) '%s' failed with error %lx (%s).", \ wxLogDebug("At %s(%d) '%s' failed with error %lx (%s).", \
__FILE__, __LINE__, api, \ __FILE__, __LINE__, api, \

View File

@@ -23,7 +23,7 @@
info, or to be a straight call to the new operator. info, or to be a straight call to the new operator.
*/ */
#if (DEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT #if (WXDEBUG && USE_MEMORY_TRACING) || USE_WXDEBUG_CONTEXT
#include <stddef.h> #include <stddef.h>
@@ -39,7 +39,7 @@
#define WXDEBUG_NEW new(__FILE__,__LINE__) #define WXDEBUG_NEW new(__FILE__,__LINE__)
#endif #endif
#if DEBUG #if WXDEBUG
void * wxDebugAlloc(size_t size, char * fileName, int lineNum, bool isObject, bool isVect = FALSE); void * wxDebugAlloc(size_t size, char * fileName, int lineNum, bool isObject, bool isVect = FALSE);
void wxDebugFree(void * buf, bool isVect = FALSE); void wxDebugFree(void * buf, bool isVect = FALSE);
@@ -263,7 +263,7 @@ void WXDLLEXPORT wxTraceLevel(int level, const char *fmt ...);
#define WXTRACE wxTrace #define WXTRACE wxTrace
#define WXTRACELEVEL wxTraceLevel #define WXTRACELEVEL wxTraceLevel
#else // else part for the #if DEBUG #else // else part for the #if WXDEBUG
inline void wxTrace(const char *WXUNUSED(fmt)) {} inline void wxTrace(const char *WXUNUSED(fmt)) {}
inline void wxTraceLevel(int WXUNUSED(level), const char *WXUNUSED(fmt)) {} inline void wxTraceLevel(int WXUNUSED(level), const char *WXUNUSED(fmt)) {}
@@ -272,7 +272,7 @@ inline void wxTraceLevel(int WXUNUSED(level), const char *WXUNUSED(fmt)) {}
#define WXTRACELEVEL TRUE ? (void)0 : wxTraceLevel #define WXTRACELEVEL TRUE ? (void)0 : wxTraceLevel
#define WXDEBUG_NEW new #define WXDEBUG_NEW new
#endif // DEBUG #endif // WXDEBUG
#endif #endif
// __MEMORYH__ // __MEMORYH__

View File

@@ -121,7 +121,7 @@ bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount);
// Debugging support // Debugging support
// ============================================================================ // ============================================================================
#if defined(__DEBUG__) && defined(_MSC_VER) && (_MSC_VER > 1000) #if defined(__WXDEBUG__) && defined(_MSC_VER) && (_MSC_VER > 1000)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// //
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -137,10 +137,10 @@ void wxLogQueryInterface(const char *szInterface, REFIID riid);
void wxLogAddRef (const char *szInterface, ULONG cRef); void wxLogAddRef (const char *szInterface, ULONG cRef);
void wxLogRelease(const char *szInterface, ULONG cRef); void wxLogRelease(const char *szInterface, ULONG cRef);
#else //!DEBUG #else //!WXDEBUG
#define wxLogQueryInterface(szInterface, riid) #define wxLogQueryInterface(szInterface, riid)
#define wxLogAddRef(szInterface, cRef) #define wxLogAddRef(szInterface, cRef)
#define wxLogRelease(szInterface, cRef) #define wxLogRelease(szInterface, cRef)
#endif //DEBUG #endif //WXDEBUG
#endif //_OLEUTILS_H #endif //_OLEUTILS_H

View File

@@ -116,13 +116,13 @@
// NOW MANDATORY: don't change. // NOW MANDATORY: don't change.
#define USE_MEMORY_TRACING 1 #define USE_MEMORY_TRACING 1
// If 1, enables debugging versions of wxObject::new and // If 1, enables debugging versions of wxObject::new and
// wxObject::delete *IF* DEBUG is also defined. // wxObject::delete *IF* WXDEBUG is also defined.
// WARNING: this code may not work with all architectures, especially // WARNING: this code may not work with all architectures, especially
// if alignment is an issue. // if alignment is an issue.
#define USE_DEBUG_CONTEXT 1 #define USE_WXDEBUG_CONTEXT 1
// If 1, enables wxDebugContext, for // If 1, enables wxDebugContext, for
// writing error messages to file, etc. // writing error messages to file, etc.
// If DEBUG is not defined, will still use // If WXDEBUG is not defined, will still use
// normal memory operators. // normal memory operators.
// It's recommended to set this to 1, // It's recommended to set this to 1,
// since you may well need to output // since you may well need to output

View File

@@ -206,7 +206,7 @@ class WXDLLEXPORT wxObject
bool IsKindOf(wxClassInfo *info); bool IsKindOf(wxClassInfo *info);
#if DEBUG && USE_MEMORY_TRACING #if WXDEBUG && USE_MEMORY_TRACING
void * operator new (size_t size, char * fileName = NULL, int lineNum = 0); void * operator new (size_t size, char * fileName = NULL, int lineNum = 0);
void operator delete (void * buf); void operator delete (void * buf);
@@ -218,7 +218,7 @@ class WXDLLEXPORT wxObject
#endif #endif
#if DEBUG || USE_DEBUG_CONTEXT #if WXDEBUG || USE_WXDEBUG_CONTEXT
virtual void Dump(ostream& str); virtual void Dump(ostream& str);
#endif #endif
@@ -256,7 +256,7 @@ private:
int m_count; int m_count;
}; };
#if DEBUG && USE_GLOBAL_MEMORY_OPERATORS #if WXDEBUG && USE_GLOBAL_MEMORY_OPERATORS
#ifndef WXDEBUG_NEW #ifndef WXDEBUG_NEW
#define WXDEBUG_NEW new(__FILE__,__LINE__) #define WXDEBUG_NEW new(__FILE__,__LINE__)
#endif #endif

View File

@@ -182,7 +182,7 @@ class WXDLLEXPORT wxDebugStreamBuf: public streambuf
int sync(void); int sync(void);
}; };
#if DEBUG && USE_GLOBAL_MEMORY_OPERATORS #if WXDEBUG && USE_GLOBAL_MEMORY_OPERATORS
#define new WXDEBUG_NEW #define new WXDEBUG_NEW
#endif #endif

View File

@@ -5660,7 +5660,7 @@ fi
if test "$USE_DEBUG_FLAG" = 1 ; then if test "$USE_DEBUG_FLAG" = 1 ; then
cat >> confdefs.h <<EOF cat >> confdefs.h <<EOF
#define DEBUG $USE_DEBUG_FLAG #define WXDEBUG $USE_DEBUG_FLAG
EOF EOF
fi fi

View File

@@ -946,7 +946,7 @@ fi
AC_SUBST(DEBUG) AC_SUBST(DEBUG)
if test "$USE_DEBUG_FLAG" = 1 ; then if test "$USE_DEBUG_FLAG" = 1 ; then
AC_DEFINE_UNQUOTED(DEBUG,$USE_DEBUG_FLAG) AC_DEFINE_UNQUOTED(WXDEBUG,$USE_DEBUG_FLAG)
fi fi
if test "$USE_MEM_TRACING" = 1 ; then if test "$USE_MEM_TRACING" = 1 ; then

View File

@@ -27,8 +27,8 @@
#include "wx/date.h" #include "wx/date.h"
#if !DEBUG #if !WXDEBUG
#error You must set DEBUG to 1 on the 'make' command line or make.env. #error You must set WXDEBUG to 1 on the 'make' command line or make.env.
#endif #endif
#define new WXDEBUG_NEW #define new WXDEBUG_NEW

View File

@@ -130,7 +130,7 @@ void wxLogVerbose(wxTString strFormat, ...)
} }
// debug functions // debug functions
#ifdef __DEBUG__ #ifdef __WXDEBUG__
#define IMPLEMENT_LOG_DEBUG_FUNCTION(level) \ #define IMPLEMENT_LOG_DEBUG_FUNCTION(level) \
void wxLog##level(const char *szFormat, ...) \ void wxLog##level(const char *szFormat, ...) \
{ \ { \
@@ -291,7 +291,7 @@ void wxLog::DoLog(wxLogLevel level, const char *szString)
case wxLOG_Trace: case wxLOG_Trace:
case wxLOG_Debug: case wxLOG_Debug:
#ifdef __DEBUG__ #ifdef __WXDEBUG__
#ifdef __WIN32__ #ifdef __WIN32__
// in addition to normal logging, also send the string to debugger // in addition to normal logging, also send the string to debugger
// (don't prepend "Debug" here: it will go to debug window anyhow) // (don't prepend "Debug" here: it will go to debug window anyhow)
@@ -448,7 +448,7 @@ void wxLogGui::DoLog(wxLogLevel level, const char *szString)
case wxLOG_Trace: case wxLOG_Trace:
case wxLOG_Debug: case wxLOG_Debug:
#ifdef __DEBUG__ #ifdef __WXDEBUG__
#ifdef __WIN32__ #ifdef __WIN32__
OutputDebugString(szString); OutputDebugString(szString);
OutputDebugString("\n\r"); OutputDebugString("\n\r");
@@ -809,7 +809,7 @@ const char *wxSysErrorMsg(unsigned long nErrCode)
// debug helper // debug helper
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#ifdef __DEBUG__ #ifdef __WXDEBUG__
// this function is called when an assert fails // this function is called when an assert fails
void wxOnAssert(const char *szFile, int nLine, const char *szMsg) void wxOnAssert(const char *szFile, int nLine, const char *szMsg)
@@ -854,5 +854,5 @@ void wxOnAssert(const char *szFile, int nLine, const char *szMsg)
} }
} }
#endif //DEBUG #endif //WXDEBUG

View File

@@ -24,7 +24,7 @@
#include "wx/defs.h" #include "wx/defs.h"
#endif #endif
#if (DEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT #if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT
#ifdef __GNUG__ #ifdef __GNUG__
// #pragma implementation // #pragma implementation
@@ -623,7 +623,7 @@ void wxDebugContext::TraverseList (PmSFV func, wxMemStruct *from)
*/ */
bool wxDebugContext::PrintList (void) bool wxDebugContext::PrintList (void)
{ {
#if DEBUG #if WXDEBUG
if (!HasStream()) if (!HasStream())
return FALSE; return FALSE;
@@ -637,7 +637,7 @@ bool wxDebugContext::PrintList (void)
bool wxDebugContext::Dump(void) bool wxDebugContext::Dump(void)
{ {
#if DEBUG #if WXDEBUG
if (!HasStream()) if (!HasStream())
return FALSE; return FALSE;
@@ -687,7 +687,7 @@ static wxDebugStatsStruct *InsertStatsStruct(wxDebugStatsStruct *head, wxDebugSt
bool wxDebugContext::PrintStatistics(bool detailed) bool wxDebugContext::PrintStatistics(bool detailed)
{ {
#if DEBUG #if WXDEBUG
if (!HasStream()) if (!HasStream())
return FALSE; return FALSE;
@@ -860,7 +860,7 @@ int wxDebugContext::CountObjectsLeft(void)
// We'll only do malloc and free for the moment: leave the interesting // We'll only do malloc and free for the moment: leave the interesting
// stuff for the wxObject versions. // stuff for the wxObject versions.
#if DEBUG && USE_GLOBAL_MEMORY_OPERATORS #if WXDEBUG && USE_GLOBAL_MEMORY_OPERATORS
#ifdef new #ifdef new
#undef new #undef new
@@ -1074,7 +1074,7 @@ void wxTraceLevel(int level, const char *fmt ...)
#endif #endif
} }
#else // USE_MEMORY_TRACING && DEBUG #else // USE_MEMORY_TRACING && WXDEBUG
void wxTrace(const char *WXUNUSED(fmt) ...) void wxTrace(const char *WXUNUSED(fmt) ...)
{ {
} }

View File

@@ -25,11 +25,11 @@
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>
#if (DEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT #if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT
#include "wx/memory.h" #include "wx/memory.h"
#endif #endif
#if DEBUG || USE_DEBUG_CONTEXT #if WXDEBUG || USE_DEBUG_CONTEXT
// for wxObject::Dump // for wxObject::Dump
#include <iostream.h> #include <iostream.h>
#endif #endif
@@ -69,7 +69,7 @@ bool wxObject::IsKindOf(wxClassInfo *info)
return FALSE; return FALSE;
} }
#if DEBUG || USE_DEBUG_CONTEXT #if WXDEBUG || USE_DEBUG_CONTEXT
void wxObject::Dump(ostream& str) void wxObject::Dump(ostream& str)
{ {
if (GetClassInfo() && GetClassInfo()->GetClassName()) if (GetClassInfo() && GetClassInfo()->GetClassName())
@@ -79,7 +79,7 @@ void wxObject::Dump(ostream& str)
} }
#endif #endif
#if DEBUG && USE_MEMORY_TRACING #if WXDEBUG && USE_MEMORY_TRACING
#ifdef new #ifdef new
#undef new #undef new

View File

@@ -183,7 +183,7 @@
/********************** DO NOT CHANGE BELOW THIS POINT **********************/ /********************** DO NOT CHANGE BELOW THIS POINT **********************/
/**************************** DEBUGGING FEATURES ****************************/ /**************************** WXDEBUGGING FEATURES ****************************/
/* Compatibility with 1.66 API. /* Compatibility with 1.66 API.
Level 0: no backward compatibility, all new features Level 0: no backward compatibility, all new features
@@ -193,9 +193,9 @@
/* /*
* Enables debugging: memory tracing, assert, etc. * Enables debugging: memory tracing, assert, etc.
*/ */
#undef DEBUG #undef WXDEBUG
/* /*
* Enables debugging version of wxObject::new and wxObject::delete (IF DEBUG) * Enables debugging version of wxObject::new and wxObject::delete (IF WXDEBUG)
* WARNING: this code may not work with all architectures, especially * WARNING: this code may not work with all architectures, especially
* if alignment is an issue. * if alignment is an issue.
*/ */

View File

@@ -1,7 +1,7 @@
s|*OS*|@OS@|g s|*OS*|@OS@|g
s|*WXBASEDIR*|@WXBASEDIR@|g s|*WXBASEDIR*|@WXBASEDIR@|g
s|*PROFILE*|@PROFILE@|g s|*PROFILE*|@PROFILE@|g
s|*DEBUG*|@DEBUG@|g s|*WXDEBUG*|@WXDEBUG@|g
s|*OPTIMISE*|@OPTIMISE@|g s|*OPTIMISE*|@OPTIMISE@|g
s|*CC*|@CC@|g s|*CC*|@CC@|g
s|*CFLAGS*|@CFLAGS@|g s|*CFLAGS*|@CFLAGS@|g

View File

@@ -183,7 +183,7 @@
/********************** DO NOT CHANGE BELOW THIS POINT **********************/ /********************** DO NOT CHANGE BELOW THIS POINT **********************/
/**************************** DEBUGGING FEATURES ****************************/ /**************************** WXDEBUGGING FEATURES ****************************/
/* Compatibility with 1.66 API. /* Compatibility with 1.66 API.
Level 0: no backward compatibility, all new features Level 0: no backward compatibility, all new features
@@ -193,9 +193,9 @@
/* /*
* Enables debugging: memory tracing, assert, etc. * Enables debugging: memory tracing, assert, etc.
*/ */
#undef DEBUG #undef WXDEBUG
/* /*
* Enables debugging version of wxObject::new and wxObject::delete (IF DEBUG) * Enables debugging version of wxObject::new and wxObject::delete (IF WXDEBUG)
* WARNING: this code may not work with all architectures, especially * WARNING: this code may not work with all architectures, especially
* if alignment is an issue. * if alignment is an issue.
*/ */

View File

@@ -1,7 +1,7 @@
s|*OS*|@OS@|g s|*OS*|@OS@|g
s|*WXBASEDIR*|@WXBASEDIR@|g s|*WXBASEDIR*|@WXBASEDIR@|g
s|*PROFILE*|@PROFILE@|g s|*PROFILE*|@PROFILE@|g
s|*DEBUG*|@DEBUG@|g s|*WXDEBUG*|@WXDEBUG@|g
s|*OPTIMISE*|@OPTIMISE@|g s|*OPTIMISE*|@OPTIMISE@|g
s|*CC*|@CC@|g s|*CC*|@CC@|g
s|*CFLAGS*|@CFLAGS@|g s|*CFLAGS*|@CFLAGS@|g

View File

@@ -12,7 +12,7 @@ FINAL=0
!if "$(FINAL)" == "0" !if "$(FINAL)" == "0"
OPT = -Od OPT = -Od
DEBUG_FLAGS= -v -DDEBUG=1 -D__DEBUG__ -DUSE_DEFINE DEBUG_FLAGS= -v -DWXDEBUG=1 -D__WXDEBUG__ -DUSE_DEFINE
!else !else
OPT = -O2 OPT = -O2
DEBUG_FLAGS = -DUSE_DEFINE DEBUG_FLAGS = -DUSE_DEFINE

View File

@@ -14,7 +14,7 @@ FINAL=0
!if "$(FINAL)" == "0" !if "$(FINAL)" == "0"
LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
OPT = -Od OPT = -Od
DEBUG_FLAGS= -v -D__DEBUG__ -DDEBUG=1 DEBUG_FLAGS= -v -D__WXDEBUG__ -DWXDEBUG=1
!else !else
LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
OPT = -O2 OPT = -O2

View File

@@ -31,13 +31,13 @@ WXBASEINC = $(WXDIR)\include\base
FINAL=0 FINAL=0
!endif !endif
!ifndef DEBUG !ifndef WXDEBUG
DEBUG=0 WXDEBUG=0
!endif !endif
all: all:
cd $(WXDIR)\src\msw cd $(WXDIR)\src\msw
nmake -f makefile.dos FINAL=$(FINAL) DEBUG=$(DEBUG) nmake -f makefile.dos FINAL=$(FINAL) WXDEBUG=$(WXDEBUG)
cd $(THISDIR) cd $(THISDIR)
clean: clean:

View File

@@ -8,7 +8,7 @@
# to override makefile variables. See wx/install/install.txt. # to override makefile variables. See wx/install/install.txt.
# And you can override specific variables on the make command line, e.g. # And you can override specific variables on the make command line, e.g.
# #
# make -f makefile.unix DEBUG='' # make -f makefile.unix WXDEBUG=''
# #
# You may prefer to use the GNU configure script than raw makefiles - # You may prefer to use the GNU configure script than raw makefiles -
# see contrib/wxshlib. # see contrib/wxshlib.
@@ -64,10 +64,10 @@ OPTIONS= # -D__MINGW32__ # -D__EGCS__
# Debugging information # Debugging information
# AIX: comment out. # AIX: comment out.
# IRIX: -g3 # IRIX: -g3
DEBUGFLAGS = -ggdb -D__DEBUG__ DEBUGFLAGS = -ggdb -D__WXDEBUG__
# Debug/trace mode. 1 or more for debugging. # Debug/trace mode. 1 or more for debugging.
DEBUG=0 WXDEBUG=0
WIN95=1 WIN95=1
@@ -203,8 +203,8 @@ LDLIBS = $(LIBS)
OBJDIR = objects$(GUISUFFIX) OBJDIR = objects$(GUISUFFIX)
# You shouldn't need to change these... # You shouldn't need to change these...
CPPFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) -DDEBUG='$(DEBUG)' $(WARN) $(OPT) CPPFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) -DWXDEBUG='$(WXDEBUG)' $(WARN) $(OPT)
CFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) -DDEBUG='$(DEBUG)' $(WARN) $(OPT) CFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) -DWXDEBUG='$(WXDEBUG)' $(WARN) $(OPT)
LDFLAGS = -Wl,--subsystem,windows -mwindows -L$(WXDIR)/lib LDFLAGS = -Wl,--subsystem,windows -mwindows -L$(WXDIR)/lib
# Extra patch link for XView # Extra patch link for XView

View File

@@ -56,8 +56,8 @@ LIBS=$(WXLIB) $(EXTRALIBS) oldnames libw llibcew commdlg ddeml shell mmsystem $(
!if "$(DLL)" == "0" !if "$(DLL)" == "0"
PCH=WX.PCH PCH=WX.PCH
PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\src\msw\$(PCH) PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\src\msw\$(PCH)
CPPFLAGS= $(DEBUG_FLAGS) $(OPTIONS) $(INC) $(EXTRAFLAGS) /DDEBUG=1 /D__DEBUG__ /AL /Gt4 /Gx- /W4 /G2sw $(OPT) /D__WINDOWS__ $(PRECOMP) CPPFLAGS= $(DEBUG_FLAGS) $(OPTIONS) $(INC) $(EXTRAFLAGS) /DWXDEBUG=1 /D__WXDEBUG__ /AL /Gt4 /Gx- /W4 /G2sw $(OPT) /D__WINDOWS__ $(PRECOMP)
CPPFLAGS2= $(DEBUG_FLAGS) $(OPTIONS) $(INC) $(EXTRAFLAGS) /DDEBUG=1 /D__DEBUG__ /AL /Gt4 /Gx- /W4 /G2sw $(OPT) /D__WINDOWS__ CPPFLAGS2= $(DEBUG_FLAGS) $(OPTIONS) $(INC) $(EXTRAFLAGS) /DWXDEBUG=1 /D__WXDEBUG__ /AL /Gt4 /Gx- /W4 /G2sw $(OPT) /D__WINDOWS__
LINKFLAGS=$(LINK_DEBUG_FLAGS) /NOD /SEG:512 /ONERROR:NOEXE LINKFLAGS=$(LINK_DEBUG_FLAGS) /NOD /SEG:512 /ONERROR:NOEXE
DUMMY=dummy DUMMY=dummy
!else !else

View File

@@ -24,7 +24,7 @@ WXBASEINC = $(WXDIR)\include\base
OBJSUFF=obj OBJSUFF=obj
SRCSUFF=cpp SRCSUFF=cpp
DEBUG=0 WXDEBUG=0
!ifneq NOPRECOMP 1 !ifneq NOPRECOMP 1
PRECOMP = /fh=$(WXDIR)\src\msw\watcom.pch PRECOMP = /fh=$(WXDIR)\src\msw\watcom.pch
@@ -127,7 +127,7 @@ DEBUGINFO = debug all # Linking: comment out if operating in a non-debuggable
# The Watcom-recommended flags for optimum Pentium speed are: # The Watcom-recommended flags for optimum Pentium speed are:
# /oneatx /zp4 /5 /fpi87 /fp5 # /oneatx /zp4 /5 /fpi87 /fp5
OPTFLAGS=/ox /5r # /DDEBUG=1 OPTFLAGS=/ox /5r # /DWXDEBUG=1
# /d1 for line numbers only: anything else produces an enormous wx32.lib # /d1 for line numbers only: anything else produces an enormous wx32.lib
CPPFLAGS = /bt=nt /w1 /D__WIN32__ /zq $(OPTFLAGS) $(MODEL) $(PRECOMP) /d1 /d__WINDOWS__ $(EXTRACPPFLAGS) CPPFLAGS = /bt=nt /w1 /D__WIN32__ /zq $(OPTFLAGS) $(MODEL) $(PRECOMP) /d1 /d__WINDOWS__ $(EXTRACPPFLAGS)

View File

@@ -422,7 +422,7 @@ int wxEntry(WXHINSTANCE hInstance, WXHINSTANCE WXUNUSED(hPrevInstance), char *m_
{ {
wxhInstance = (HINSTANCE) hInstance; wxhInstance = (HINSTANCE) hInstance;
#if (DEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT #if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT
#if !defined(_WINDLL) #if !defined(_WINDLL)
streambuf* sBuf = new wxDebugStreamBuf; streambuf* sBuf = new wxDebugStreamBuf;
@@ -574,7 +574,7 @@ int wxEntry(WXHINSTANCE hInstance, WXHINSTANCE WXUNUSED(hPrevInstance), char *m_
delete [] command[0] ; delete [] command[0] ;
delete [] command ; delete [] command ;
#if (DEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT #if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT
// At this point we want to check if there are any memory // At this point we want to check if there are any memory
// blocks that aren't part of the wxDebugContext itself, // blocks that aren't part of the wxDebugContext itself,
// as a special case. Then when dumping we need to ignore // as a special case. Then when dumping we need to ignore

View File

@@ -161,7 +161,7 @@ bool wxBrush::RealizeResource(void)
M_BRUSHDATA->m_hBrush = (WXHBRUSH) CreateSolidBrush(ms_colour) ; M_BRUSHDATA->m_hBrush = (WXHBRUSH) CreateSolidBrush(ms_colour) ;
break; break;
} }
#ifdef DEBUG_CREATE #ifdef WXDEBUG_CREATE
if (M_BRUSHDATA->m_hBrush==NULL) wxError("Cannot create brush","Internal error") ; if (M_BRUSHDATA->m_hBrush==NULL) wxError("Cannot create brush","Internal error") ;
#endif #endif
return TRUE; return TRUE;

View File

@@ -130,14 +130,14 @@ wxDC::~wxDC(void)
// DC. // DC.
void wxDC::SelectOldObjects(WXHDC dc) void wxDC::SelectOldObjects(WXHDC dc)
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxDC::SelectOldObjects %X\n", this); wxDebugMsg("wxDC::SelectOldObjects %X\n", this);
#endif #endif
if (dc) if (dc)
{ {
if (m_oldBitmap) if (m_oldBitmap)
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxDC::SelectOldObjects: Selecting old HBITMAP %X\n", m_oldBitmap); wxDebugMsg("wxDC::SelectOldObjects: Selecting old HBITMAP %X\n", m_oldBitmap);
#endif #endif
::SelectObject((HDC) dc, (HBITMAP) m_oldBitmap); ::SelectObject((HDC) dc, (HBITMAP) m_oldBitmap);
@@ -149,7 +149,7 @@ void wxDC::SelectOldObjects(WXHDC dc)
m_oldBitmap = 0 ; m_oldBitmap = 0 ;
if (m_oldPen) if (m_oldPen)
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxDC::SelectOldObjects: Selecting old HPEN %X\n", m_oldPen); wxDebugMsg("wxDC::SelectOldObjects: Selecting old HPEN %X\n", m_oldPen);
#endif #endif
::SelectObject((HDC) dc, (HPEN) m_oldPen); ::SelectObject((HDC) dc, (HPEN) m_oldPen);
@@ -157,7 +157,7 @@ void wxDC::SelectOldObjects(WXHDC dc)
m_oldPen = 0 ; m_oldPen = 0 ;
if (m_oldBrush) if (m_oldBrush)
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxDC::SelectOldObjects: Selecting old HBRUSH %X\n", m_oldBrush); wxDebugMsg("wxDC::SelectOldObjects: Selecting old HBRUSH %X\n", m_oldBrush);
#endif #endif
::SelectObject((HDC) dc, (HBRUSH) m_oldBrush); ::SelectObject((HDC) dc, (HBRUSH) m_oldBrush);
@@ -165,7 +165,7 @@ void wxDC::SelectOldObjects(WXHDC dc)
m_oldBrush = 0 ; m_oldBrush = 0 ;
if (m_oldFont) if (m_oldFont)
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxDC::SelectOldObjects: Selecting old HFONT %X\n", m_oldFont); wxDebugMsg("wxDC::SelectOldObjects: Selecting old HFONT %X\n", m_oldFont);
#endif #endif
::SelectObject((HDC) dc, (HFONT) m_oldFont); ::SelectObject((HDC) dc, (HFONT) m_oldFont);
@@ -173,12 +173,12 @@ void wxDC::SelectOldObjects(WXHDC dc)
m_oldFont = 0 ; m_oldFont = 0 ;
if (m_oldPalette) if (m_oldPalette)
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxDC::SelectOldObjects: Selecting old HPALETTE %X\n", m_oldPalette); wxDebugMsg("wxDC::SelectOldObjects: Selecting old HPALETTE %X\n", m_oldPalette);
#endif #endif
::SelectPalette((HDC) dc, (HPALETTE) m_oldPalette, TRUE); ::SelectPalette((HDC) dc, (HPALETTE) m_oldPalette, TRUE);
} }
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxDC::SelectOldObjects: Done.\n"); wxDebugMsg("wxDC::SelectOldObjects: Done.\n");
#endif #endif
m_oldPalette = 0 ; m_oldPalette = 0 ;
@@ -217,11 +217,11 @@ void wxDC::DestroyClippingRegion(void)
if (m_clipping && m_hDC) if (m_clipping && m_hDC)
{ {
HRGN rgn = CreateRectRgn(0, 0, 32000, 32000); HRGN rgn = CreateRectRgn(0, 0, 32000, 32000);
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxDC::DestroyClippingRegion: Selecting HRGN %X\n", rgn); wxDebugMsg("wxDC::DestroyClippingRegion: Selecting HRGN %X\n", rgn);
#endif #endif
SelectClipRgn((HDC) m_hDC, rgn); SelectClipRgn((HDC) m_hDC, rgn);
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxDC::DestroyClippingRegion: Deleting HRGN %X\n", rgn); wxDebugMsg("wxDC::DestroyClippingRegion: Deleting HRGN %X\n", rgn);
#endif #endif
DeleteObject(rgn); DeleteObject(rgn);
@@ -267,7 +267,7 @@ void wxDC::SetPalette(const wxPalette& palette)
if (m_oldPalette) if (m_oldPalette)
{ {
::SelectPalette((HDC) m_hDC, (HPALETTE) m_oldPalette, TRUE); ::SelectPalette((HDC) m_hDC, (HPALETTE) m_oldPalette, TRUE);
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxDC::SetPalette: set old palette %X\n", m_oldPalette); wxDebugMsg("wxDC::SetPalette: set old palette %X\n", m_oldPalette);
#endif #endif
m_oldPalette = 0; m_oldPalette = 0;
@@ -282,7 +282,7 @@ void wxDC::SetPalette(const wxPalette& palette)
if (!m_oldPalette) if (!m_oldPalette)
m_oldPalette = (WXHPALETTE) oldPal; m_oldPalette = (WXHPALETTE) oldPal;
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxDC::SetPalette %X: selected palette %X\n", this, m_palette.GetHPALETTE()); wxDebugMsg("wxDC::SetPalette %X: selected palette %X\n", this, m_palette.GetHPALETTE());
if (oldPal) if (oldPal)
wxDebugMsg("wxDC::SetPalette: oldPal was palette %X\n", oldPal); wxDebugMsg("wxDC::SetPalette: oldPal was palette %X\n", oldPal);
@@ -639,7 +639,7 @@ void wxDC::SetFont(const wxFont& the_font)
if (m_font.Ok() && m_font.GetResourceHandle()) if (m_font.Ok() && m_font.GetResourceHandle())
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxDC::SetFont: Selecting HFONT %X\n", m_font.GetResourceHandle()); wxDebugMsg("wxDC::SetFont: Selecting HFONT %X\n", m_font.GetResourceHandle());
#endif #endif
HFONT f = (HFONT) ::SelectObject((HDC) m_hDC, (HFONT) m_font.GetResourceHandle()); HFONT f = (HFONT) ::SelectObject((HDC) m_hDC, (HFONT) m_font.GetResourceHandle());
@@ -713,7 +713,7 @@ void wxDC::DrawText(const wxString& text, long x, long y, bool use16bit)
{ {
if (m_font.Ok() && m_font.GetResourceHandle()) if (m_font.Ok() && m_font.GetResourceHandle())
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxDC::DrawText: Selecting HFONT %X\n", m_font.GetResourceHandle()); wxDebugMsg("wxDC::DrawText: Selecting HFONT %X\n", m_font.GetResourceHandle());
#endif #endif
HFONT f = (HFONT) ::SelectObject((HDC) m_hDC, (HFONT) m_font.GetResourceHandle()); HFONT f = (HFONT) ::SelectObject((HDC) m_hDC, (HFONT) m_font.GetResourceHandle());

View File

@@ -91,7 +91,7 @@ void wxMemoryDC::SelectObject(const wxBitmap& bitmap)
return; return;
m_selectedBitmap.SetSelectedInto(this); m_selectedBitmap.SetSelectedInto(this);
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxMemoryDC::SelectObject: Selecting HBITMAP %X\n", m_selectedBitmap.GetHBITMAP()); wxDebugMsg("wxMemoryDC::SelectObject: Selecting HBITMAP %X\n", m_selectedBitmap.GetHBITMAP());
#endif #endif
HBITMAP bm = ::SelectObject((HDC) m_hDC, (HBITMAP) m_selectedBitmap.GetHBITMAP()); HBITMAP bm = ::SelectObject((HDC) m_hDC, (HBITMAP) m_selectedBitmap.GetHBITMAP());

View File

@@ -197,7 +197,7 @@ bool wxFont::RealizeResource(void)
M_FONTDATA->m_hFont = (WXHFONT) CreateFont(nHeight, 0, 0, 0,ff_weight,ff_italic,(BYTE)ff_underline, M_FONTDATA->m_hFont = (WXHFONT) CreateFont(nHeight, 0, 0, 0,ff_weight,ff_italic,(BYTE)ff_underline,
0, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, 0, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
PROOF_QUALITY, DEFAULT_PITCH | ff_family, (ff_face == "" ? NULL : (const char *)ff_face)); PROOF_QUALITY, DEFAULT_PITCH | ff_family, (ff_face == "" ? NULL : (const char *)ff_face));
#ifdef DEBUG_CREATE #ifdef WXDEBUG_CREATE
if (m_hFont==NULL) wxError("Cannot create font","Internal Error") ; if (m_hFont==NULL) wxError("Cannot create font","Internal Error") ;
#endif #endif
return (M_FONTDATA->m_hFont != (WXHFONT) NULL); return (M_FONTDATA->m_hFont != (WXHFONT) NULL);

View File

@@ -596,7 +596,7 @@ void wxFrame::MSWCreate(int id, wxWindow *parent, const char *wclass, wxWindow *
bool wxFrame::MSWOnPaint(void) bool wxFrame::MSWOnPaint(void)
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxFrameWnd::OnPaint %d\n", handle); wxDebugMsg("wxFrameWnd::OnPaint %d\n", handle);
#endif #endif
RECT rect; RECT rect;
@@ -653,7 +653,7 @@ WXHICON wxFrame::MSWOnQueryDragIcon(void)
void wxFrame::MSWOnSize(int x, int y, WXUINT id) void wxFrame::MSWOnSize(int x, int y, WXUINT id)
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxFrameWnd::OnSize %d\n", m_hWnd); wxDebugMsg("wxFrameWnd::OnSize %d\n", m_hWnd);
#endif #endif
switch (id) switch (id)
@@ -690,7 +690,7 @@ void wxFrame::MSWOnSize(int x, int y, WXUINT id)
bool wxFrame::MSWOnClose(void) bool wxFrame::MSWOnClose(void)
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxFrameWnd::OnClose %d\n", handle); wxDebugMsg("wxFrameWnd::OnClose %d\n", handle);
#endif #endif
return Close(); return Close();
@@ -698,7 +698,7 @@ bool wxFrame::MSWOnClose(void)
bool wxFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control) bool wxFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxFrameWnd::OnCommand %d\n", handle); wxDebugMsg("wxFrameWnd::OnCommand %d\n", handle);
#endif #endif
if (cmd == 0 || cmd == 1 ) // Can be either a menu command or an accelerator. if (cmd == 0 || cmd == 1 ) // Can be either a menu command or an accelerator.
@@ -782,7 +782,7 @@ void wxFrame::OnSize(wxSizeEvent& event)
{ {
int client_x, client_y; int client_x, client_y;
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxFrame::OnSize: about to set the child's size.\n"); wxDebugMsg("wxFrame::OnSize: about to set the child's size.\n");
#endif #endif
@@ -803,7 +803,7 @@ void wxFrame::OnActivate(wxActivateEvent& event)
if (!child->IsKindOf(CLASSINFO(wxFrame)) && if (!child->IsKindOf(CLASSINFO(wxFrame)) &&
!child->IsKindOf(CLASSINFO(wxDialog))) !child->IsKindOf(CLASSINFO(wxDialog)))
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxFrame::OnActivate: about to set the child's focus.\n"); wxDebugMsg("wxFrame::OnActivate: about to set the child's focus.\n");
#endif #endif
child->SetFocus(); child->SetFocus();

View File

@@ -121,7 +121,7 @@ bool wxMDIParentFrame::Create(wxWindow *parent,
m_windowMenu = (WXHMENU) ::LoadMenu(wxGetInstance(), "wxWindowMenu"); m_windowMenu = (WXHMENU) ::LoadMenu(wxGetInstance(), "wxWindowMenu");
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("Loaded m_windowMenu %d\n", m_windowMenu); wxDebugMsg("Loaded m_windowMenu %d\n", m_windowMenu);
#endif #endif
@@ -514,7 +514,7 @@ bool wxMDIParentFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
} }
if (id >= 0xF000) if (id >= 0xF000)
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxMDIFrame::OnCommand %d: system command: calling default window proc\n", GetHWND()); wxDebugMsg("wxMDIFrame::OnCommand %d: system command: calling default window proc\n", GetHWND());
#endif #endif
return FALSE; // Get WndProc to call default proc return FALSE; // Get WndProc to call default proc
@@ -527,7 +527,7 @@ bool wxMDIParentFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
} }
else if (m_currentChild && (id < wxFIRST_MDI_CHILD || id > wxLAST_MDI_CHILD)) else if (m_currentChild && (id < wxFIRST_MDI_CHILD || id > wxLAST_MDI_CHILD))
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxMDIFrame::MSWOnCommand %d: calling child OnCommand\n", GetHWND()); wxDebugMsg("wxMDIFrame::MSWOnCommand %d: calling child OnCommand\n", GetHWND());
#endif #endif
return m_currentChild->MSWOnCommand(id, cmd, control); return m_currentChild->MSWOnCommand(id, cmd, control);
@@ -883,7 +883,7 @@ void wxMDIChildFrame::MSWOnSize(int x, int y, WXUINT id)
if (invalidHandle == (HWND) GetHWND()) if (invalidHandle == (HWND) GetHWND())
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxMDIChildFrame::OnSize %d: invalid, so returning.\n", GetHWND()); wxDebugMsg("wxMDIChildFrame::OnSize %d: invalid, so returning.\n", GetHWND());
#endif #endif
return; return;
@@ -923,7 +923,7 @@ void wxMDIChildFrame::MSWOnSize(int x, int y, WXUINT id)
bool wxMDIChildFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control) bool wxMDIChildFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxMDIChildFrame::MSWOnCommand %d\n", GetHWND()); wxDebugMsg("wxMDIChildFrame::MSWOnCommand %d\n", GetHWND());
#endif #endif
if ((cmd == 0) && GetHWND()) if ((cmd == 0) && GetHWND())
@@ -969,11 +969,11 @@ long wxMDIChildFrame::MSWOnMDIActivate(long activate, WXHWND WXUNUSED(one), WXHW
{ {
wxMDIParentFrame *parent = (wxMDIParentFrame *)GetParent(); wxMDIParentFrame *parent = (wxMDIParentFrame *)GetParent();
HMENU parent_menu = (HMENU) parent->GetWinMenu(); HMENU parent_menu = (HMENU) parent->GetWinMenu();
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("Parent menu is %d\n", parent_menu); wxDebugMsg("Parent menu is %d\n", parent_menu);
#endif #endif
HMENU child_menu = (HMENU) GetWinMenu(); HMENU child_menu = (HMENU) GetWinMenu();
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("Child menu is %d\n", child_menu); wxDebugMsg("Child menu is %d\n", child_menu);
#endif #endif
@@ -985,7 +985,7 @@ long wxMDIChildFrame::MSWOnMDIActivate(long activate, WXHWND WXUNUSED(one), WXHW
{ {
parent->m_parentFrameActive = FALSE; parent->m_parentFrameActive = FALSE;
HMENU subMenu = GetSubMenu((HMENU) parent->GetWindowMenu(), 0); HMENU subMenu = GetSubMenu((HMENU) parent->GetWindowMenu(), 0);
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("Window submenu is %d\n", subMenu); wxDebugMsg("Window submenu is %d\n", subMenu);
#endif #endif
// HMENU subMenu = 0; // HMENU subMenu = 0;
@@ -1018,7 +1018,7 @@ long wxMDIChildFrame::MSWOnMDIActivate(long activate, WXHWND WXUNUSED(one), WXHW
{ {
parent->m_parentFrameActive = TRUE; parent->m_parentFrameActive = TRUE;
HMENU subMenu = GetSubMenu((HMENU) parent->GetWindowMenu(), 0); HMENU subMenu = GetSubMenu((HMENU) parent->GetWindowMenu(), 0);
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("Window submenu is %d\n", subMenu); wxDebugMsg("Window submenu is %d\n", subMenu);
#endif #endif
// HMENU subMenu = 0; // HMENU subMenu = 0;
@@ -1039,7 +1039,7 @@ long wxMDIChildFrame::MSWOnMDIActivate(long activate, WXHWND WXUNUSED(one), WXHW
event.SetEventObject( this ); event.SetEventObject( this );
GetEventHandler()->ProcessEvent(event); GetEventHandler()->ProcessEvent(event);
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("Finished (de)activating\n"); wxDebugMsg("Finished (de)activating\n");
#endif #endif
return 0; return 0;
@@ -1058,7 +1058,7 @@ void wxMDIChildFrame::MSWDestroyWindow(void)
// destroyed. // destroyed.
HWND oldHandle = (HWND)GetHWND(); HWND oldHandle = (HWND)GetHWND();
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("*** About to DestroyWindow MDI child %d\n", oldHandle); wxDebugMsg("*** About to DestroyWindow MDI child %d\n", oldHandle);
#endif #endif
#ifdef __WIN32__ #ifdef __WIN32__
@@ -1066,7 +1066,7 @@ void wxMDIChildFrame::MSWDestroyWindow(void)
#else #else
SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDIDESTROY, (HWND)oldHandle, 0); SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDIDESTROY, (HWND)oldHandle, 0);
#endif #endif
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("*** Finished DestroyWindow MDI child %d\n", oldHandle); wxDebugMsg("*** Finished DestroyWindow MDI child %d\n", oldHandle);
#endif #endif
invalidHandle = 0; invalidHandle = 0;

View File

@@ -357,7 +357,7 @@ wxDataObject::~wxDataObject()
const char *wxDataObject::GetFormatName(wxDataFormat format) const char *wxDataObject::GetFormatName(wxDataFormat format)
{ {
#ifdef __DEBUG__ #ifdef __WXDEBUG__
static char s_szBuf[128]; static char s_szBuf[128];
switch ( format ) { switch ( format ) {
case CF_TEXT: return "CF_TEXT"; case CF_TEXT: return "CF_TEXT";

View File

@@ -64,7 +64,7 @@ bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount)
// Debug support // Debug support
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if defined(__DEBUG__) && defined(_MSC_VER) && (_MSC_VER > 1000) #if defined(__WXDEBUG__) && defined(_MSC_VER) && (_MSC_VER > 1000)
const char *GetIidName(REFIID riid) const char *GetIidName(REFIID riid)
{ {
// an association between symbolic name and numeric value of an IID // an association between symbolic name and numeric value of an IID
@@ -186,7 +186,7 @@ void wxLogRelease(const char *szInterface, ULONG cRef)
wxLogTrace("After %s::Release: m_cRef = %d", szInterface, cRef - 1); wxLogTrace("After %s::Release: m_cRef = %d", szInterface, cRef - 1);
} }
#endif //DEBUG #endif //WXDEBUG
#endif #endif
// USE_DRAG_AND_DROP // USE_DRAG_AND_DROP

View File

@@ -260,7 +260,7 @@ bool wxPen::RealizeResource(void)
#else #else
M_PENDATA->m_hPen = (WXHPEN) CreatePen(wx2msPenStyle(M_PENDATA->m_style), M_PENDATA->m_width, ms_colour); M_PENDATA->m_hPen = (WXHPEN) CreatePen(wx2msPenStyle(M_PENDATA->m_style), M_PENDATA->m_width, ms_colour);
#endif #endif
#ifdef DEBUG_CREATE #ifdef WXDEBUG_CREATE
if (M_PENDATA->m_hPen==0) if (M_PENDATA->m_hPen==0)
wxError("Cannot create pen","Internal error") ; wxError("Cannot create pen","Internal error") ;
#endif #endif

View File

@@ -80,9 +80,9 @@
#undef GetClassInfo #undef GetClassInfo
#endif #endif
#ifdef __DEBUG__ #ifdef __WXDEBUG__
static const char *GetMessageName(int message); static const char *GetMessageName(int message);
#endif //DEBUG #endif //WXDEBUG
#define WINDOW_MARGIN 3 // This defines sensitivity of Leave events #define WINDOW_MARGIN 3 // This defines sensitivity of Leave events
@@ -866,7 +866,7 @@ LRESULT APIENTRY _EXPORT wxWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA
wxWndHook = NULL; wxWndHook = NULL;
wnd->m_hWnd = (WXHWND) hWnd; wnd->m_hWnd = (WXHWND) hWnd;
} }
#if (DEBUG > 1) #if (WXDEBUG > 1)
wxDebugMsg("hWnd = %d, m_hWnd = %d, msg = %d\n", hWnd, m_hWnd, message); wxDebugMsg("hWnd = %d, m_hWnd = %d, msg = %d\n", hWnd, m_hWnd, message);
#endif #endif
// Stop right here if we don't have a valid handle // Stop right here if we don't have a valid handle
@@ -900,9 +900,9 @@ LRESULT APIENTRY _EXPORT wxWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA
// Main Windows 3 window proc // Main Windows 3 window proc
long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam) long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
{ {
#ifdef __DEBUG__ #ifdef __WXDEBUG__
wxLogTrace(wxTraceMessages, "Processing %s", GetMessageName(message)); wxLogTrace(wxTraceMessages, "Processing %s", GetMessageName(message));
#endif // DEBUG #endif // WXDEBUG
HWND hWnd = (HWND)m_hWnd; HWND hWnd = (HWND)m_hWnd;
@@ -1436,7 +1436,7 @@ void wxWindow::MSWDestroyWindow(void)
{ {
#if 0 #if 0
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWDestroyWindow %d\n", handle); wxDebugMsg("wxWindow::MSWDestroyWindow %d\n", handle);
#endif #endif
MSWDetachWindowMenu(); MSWDetachWindowMenu();
@@ -1541,7 +1541,7 @@ void wxWindow::MSWCreate(int id, wxWindow *parent, const char *wclass, wxWindow
wxWndHook = NULL; wxWndHook = NULL;
wxWinHandleList->Append((long)m_hWnd, this); wxWinHandleList->Append((long)m_hWnd, this);
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWCreate %d\n", m_hWnd); wxDebugMsg("wxWindow::MSWCreate %d\n", m_hWnd);
#endif #endif
} }
@@ -1552,7 +1552,7 @@ void wxWindow::MSWOnCreate(WXLPCREATESTRUCT WXUNUSED(cs))
bool wxWindow::MSWOnClose(void) bool wxWindow::MSWOnClose(void)
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnClose %d\n", handle); wxDebugMsg("wxWindow::MSWOnClose %d\n", handle);
#endif #endif
return FALSE; return FALSE;
@@ -1560,7 +1560,7 @@ bool wxWindow::MSWOnClose(void)
bool wxWindow::MSWOnDestroy(void) bool wxWindow::MSWOnDestroy(void)
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnDestroy %d\n", handle); wxDebugMsg("wxWindow::MSWOnDestroy %d\n", handle);
#endif #endif
// delete our drop target if we've got one // delete our drop target if we've got one
@@ -1621,7 +1621,7 @@ bool wxWindow::MSWOnNotify(WXWPARAM wParam, WXLPARAM lParam)
void wxWindow::MSWOnMenuHighlight(WXWORD WXUNUSED(item), WXWORD WXUNUSED(flags), WXHMENU WXUNUSED(sysmenu)) void wxWindow::MSWOnMenuHighlight(WXWORD WXUNUSED(item), WXWORD WXUNUSED(flags), WXHMENU WXUNUSED(sysmenu))
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnMenuHighlight %d\n", handle); wxDebugMsg("wxWindow::MSWOnMenuHighlight %d\n", handle);
#endif #endif
} }
@@ -1632,7 +1632,7 @@ void wxWindow::MSWOnInitMenuPopup(WXHMENU menu, int pos, bool isSystem)
bool wxWindow::MSWOnActivate(int state, bool WXUNUSED(minimized), WXHWND WXUNUSED(activate)) bool wxWindow::MSWOnActivate(int state, bool WXUNUSED(minimized), WXHWND WXUNUSED(activate))
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnActivate %d\n", handle); wxDebugMsg("wxWindow::MSWOnActivate %d\n", handle);
#endif #endif
@@ -1645,7 +1645,7 @@ bool wxWindow::MSWOnActivate(int state, bool WXUNUSED(minimized), WXHWND WXUNUSE
bool wxWindow::MSWOnSetFocus(WXHWND WXUNUSED(hwnd)) bool wxWindow::MSWOnSetFocus(WXHWND WXUNUSED(hwnd))
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnSetFocus %d\n", m_hWnd); wxDebugMsg("wxWindow::MSWOnSetFocus %d\n", m_hWnd);
#endif #endif
// Deal with caret // Deal with caret
@@ -1665,7 +1665,7 @@ bool wxWindow::MSWOnSetFocus(WXHWND WXUNUSED(hwnd))
bool wxWindow::MSWOnKillFocus(WXHWND WXUNUSED(hwnd)) bool wxWindow::MSWOnKillFocus(WXHWND WXUNUSED(hwnd))
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnKillFocus %d\n", m_hWnd); wxDebugMsg("wxWindow::MSWOnKillFocus %d\n", m_hWnd);
#endif #endif
// Deal with caret // Deal with caret
@@ -1683,7 +1683,7 @@ bool wxWindow::MSWOnKillFocus(WXHWND WXUNUSED(hwnd))
void wxWindow::MSWOnDropFiles(WXWPARAM wParam) void wxWindow::MSWOnDropFiles(WXWPARAM wParam)
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnDropFiles %d\n", m_hWnd); wxDebugMsg("wxWindow::MSWOnDropFiles %d\n", m_hWnd);
#endif #endif
@@ -1776,7 +1776,7 @@ bool wxWindow::MSWOnMeasureItem(int id, WXMEASUREITEMSTRUCT *itemStruct)
WXHBRUSH wxWindow::MSWOnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, WXHBRUSH wxWindow::MSWOnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam) WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnCtlColour %d\n", m_hWnd); wxDebugMsg("wxWindow::MSWOnCtlColour %d\n", m_hWnd);
#endif #endif
if (nCtlColor == CTLCOLOR_DLG) if (nCtlColor == CTLCOLOR_DLG)
@@ -1852,10 +1852,10 @@ long wxWindow::Default()
if (m_lastMsg == 0) if (m_lastMsg == 0)
return 0; return 0;
#ifdef __DEBUG__ #ifdef __WXDEBUG__
wxLogTrace(wxTraceMessages, "Forwarding %s to DefWindowProc.", wxLogTrace(wxTraceMessages, "Forwarding %s to DefWindowProc.",
GetMessageName(m_lastMsg)); GetMessageName(m_lastMsg));
#endif // DEBUG #endif // WXDEBUG
return this->MSWDefWindowProc(m_lastMsg, m_lastWParam, m_lastLParam); return this->MSWDefWindowProc(m_lastMsg, m_lastWParam, m_lastLParam);
} }
@@ -1930,7 +1930,7 @@ bool wxWindow::MSWProcessMessage(WXMSG* pMsg)
long wxWindow::MSWOnMDIActivate(long WXUNUSED(flag), WXHWND WXUNUSED(activate), WXHWND WXUNUSED(deactivate)) long wxWindow::MSWOnMDIActivate(long WXUNUSED(flag), WXHWND WXUNUSED(activate), WXHWND WXUNUSED(deactivate))
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnMDIActivate %d\n", m_hWnd); wxDebugMsg("wxWindow::MSWOnMDIActivate %d\n", m_hWnd);
#endif #endif
return 1; return 1;
@@ -1969,7 +1969,7 @@ void wxWindow::MSWOnSize(int w, int h, WXUINT WXUNUSED(flag))
if (m_inOnSize) if (m_inOnSize)
return; return;
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnSize %d\n", m_hWnd); wxDebugMsg("wxWindow::MSWOnSize %d\n", m_hWnd);
#endif #endif
if (!m_hWnd) if (!m_hWnd)
@@ -1993,7 +1993,7 @@ void wxWindow::MSWOnWindowPosChanging(void *WXUNUSED(lpPos))
// Deal with child commands from buttons etc. // Deal with child commands from buttons etc.
bool wxWindow::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND WXUNUSED(control)) bool wxWindow::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND WXUNUSED(control))
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxWindow::MSWOnCommand\n"); wxDebugMsg("wxWindow::MSWOnCommand\n");
#endif #endif
if (wxCurrentPopupMenu) if (wxCurrentPopupMenu)
@@ -2003,7 +2003,7 @@ bool wxWindow::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND WXUNUSED(control))
bool succ = popupMenu->MSWCommand(cmd, id); bool succ = popupMenu->MSWCommand(cmd, id);
return succ; return succ;
} }
#if DEBUG > 1 #if WXDEBUG > 1
char buf[80]; char buf[80];
sprintf(buf, "Looking for item %d...\n", id); sprintf(buf, "Looking for item %d...\n", id);
wxDebugMsg(buf); wxDebugMsg(buf);
@@ -2013,7 +2013,7 @@ bool wxWindow::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND WXUNUSED(control))
if (item) if (item)
{ {
bool value = item->MSWCommand(cmd, id); bool value = item->MSWCommand(cmd, id);
#if DEBUG > 1 #if WXDEBUG > 1
if (value) if (value)
wxDebugMsg("MSWCommand succeeded\n"); wxDebugMsg("MSWCommand succeeded\n");
else else
@@ -2023,7 +2023,7 @@ bool wxWindow::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND WXUNUSED(control))
} }
else else
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("Could not find item!\n"); wxDebugMsg("Could not find item!\n");
char buf[100]; char buf[100];
wxDebugMsg("Item ids for this panel:\n"); wxDebugMsg("Item ids for this panel:\n");
@@ -2642,7 +2642,7 @@ void wxGetCharSize(WXHWND wnd, int *x, int *y,wxFont *the_font)
HFONT was = 0; HFONT was = 0;
if (the_font) if (the_font)
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxGetCharSize: Selecting HFONT %X\n", fnt); wxDebugMsg("wxGetCharSize: Selecting HFONT %X\n", fnt);
#endif #endif
// the_font->UseResource(); // the_font->UseResource();
@@ -2653,7 +2653,7 @@ void wxGetCharSize(WXHWND wnd, int *x, int *y,wxFont *the_font)
GetTextMetrics(dc, &tm); GetTextMetrics(dc, &tm);
if (the_font && fnt && was) if (the_font && fnt && was)
{ {
#if DEBUG > 1 #if WXDEBUG > 1
wxDebugMsg("wxGetCharSize: Selecting old HFONT %X\n", was); wxDebugMsg("wxGetCharSize: Selecting old HFONT %X\n", was);
#endif #endif
SelectObject(dc,was) ; SelectObject(dc,was) ;
@@ -4518,7 +4518,7 @@ bool wxWindow::AcceptsFocus() const
return IsShown() && IsEnabled(); return IsShown() && IsEnabled();
} }
#ifdef __DEBUG__ #ifdef __WXDEBUG__
static const char *GetMessageName(int message) static const char *GetMessageName(int message)
{ {
switch ( message ) { switch ( message ) {
@@ -4659,4 +4659,4 @@ static const char *GetMessageName(int message)
return s_szBuf; return s_szBuf;
} }
} }
#endif //DEBUG #endif //WXDEBUG

View File

@@ -234,7 +234,7 @@ typedef struct internal_state {
uInt matches; /* number of string matches in current block */ uInt matches; /* number of string matches in current block */
int last_eob_len; /* bit length of EOB code for last block */ int last_eob_len; /* bit length of EOB code for last block */
#ifdef DEBUG #ifdef WXDEBUG
ulg bits_sent; /* bit length of the compressed data */ ulg bits_sent; /* bit length of the compressed data */
#endif #endif
@@ -281,7 +281,7 @@ void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
* used. * used.
*/ */
#ifndef DEBUG #ifndef WXDEBUG
/* Inline versions of _tr_tally for speed: */ /* Inline versions of _tr_tally for speed: */
#if defined(GEN_TREES_H) || !defined(STDC) #if defined(GEN_TREES_H) || !defined(STDC)

View File

@@ -188,7 +188,7 @@ extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */
#endif #endif
/* Diagnostic functions */ /* Diagnostic functions */
#ifdef DEBUG #ifdef WXDEBUG
# include <stdio.h> # include <stdio.h>
extern int z_verbose; extern int z_verbose;
extern void z_error OF((char *m)); extern void z_error OF((char *m));

View File

@@ -29,7 +29,7 @@
#define DBG_POINT(p) cerr << #p << ": " << p.x << ',' << p.y << endl #define DBG_POINT(p) cerr << #p << ": " << p.x << ',' << p.y << endl
#define TRACE(f) cerr << #f":" << endl; #define TRACE(f) cerr << #f":" << endl;
#ifdef DEBUG #ifdef WXDEBUG
static const char *_t[] = { "invalid", "text", "cmd", "icon", static const char *_t[] = { "invalid", "text", "cmd", "icon",
"linebreak"}; "linebreak"};
@@ -72,12 +72,12 @@ wxLayoutObjectText::Draw(wxDC &dc, wxPoint position, CoordType baseLine,
position.y += baseLine-m_BaseLine; position.y += baseLine-m_BaseLine;
if(draw) if(draw)
dc.DrawText(m_Text,position.x,position.y); dc.DrawText(m_Text,position.x,position.y);
# ifdef DEBUG # ifdef WXDEBUG
// dc.DrawRectangle(position.x, position.y, m_Width, m_Height); // dc.DrawRectangle(position.x, position.y, m_Width, m_Height);
# endif # endif
} }
#ifdef DEBUG #ifdef WXDEBUG
void void
wxLayoutObjectText::Debug(void) wxLayoutObjectText::Debug(void)
{ {
@@ -397,7 +397,7 @@ wxLayoutList::Draw(wxDC &dc, bool findObject, wxPoint const &findCoords)
return foundObject; return foundObject;
} }
#ifdef DEBUG #ifdef WXDEBUG
void void
wxLayoutList::Debug(void) wxLayoutList::Debug(void)
{ {
@@ -447,7 +447,7 @@ wxLayoutList::FindObjectCursor(wxPoint const &cpos, CoordType *offset)
CoordType width; CoordType width;
wxLayoutObjectList::iterator i; wxLayoutObjectList::iterator i;
#ifdef DEBUG #ifdef WXDEBUG
cerr << "Looking for object at " << cpos.x << ',' << cpos.y << cerr << "Looking for object at " << cpos.x << ',' << cpos.y <<
endl; endl;
#endif #endif
@@ -474,14 +474,14 @@ wxLayoutList::FindObjectCursor(wxPoint const &cpos, CoordType *offset)
if(offset) if(offset)
*offset = cpos.x-(cursor.x-width); // 0==cursor before *offset = cpos.x-(cursor.x-width); // 0==cursor before
// the object // the object
#ifdef DEBUG #ifdef WXDEBUG
cerr << " found object at " << cursor.x-width << ',' << cerr << " found object at " << cursor.x-width << ',' <<
cursor.y << ", type:" << _t[(*i)->GetType()] <<endl; cursor.y << ", type:" << _t[(*i)->GetType()] <<endl;
#endif #endif
return i; return i;
} }
} }
#ifdef DEBUG #ifdef WXDEBUG
cerr << " not found" << endl; cerr << " not found" << endl;
#endif #endif
return end(); // not found return end(); // not found
@@ -569,7 +569,7 @@ wxLayoutList::MoveCursor(int dx, int dy)
if(m_CursorPosition.x > lineLength) if(m_CursorPosition.x > lineLength)
m_CursorPosition.x = lineLength; m_CursorPosition.x = lineLength;
#ifdef DEBUG #ifdef WXDEBUG
i = FindCurrentObject(&offs); i = FindCurrentObject(&offs);
cerr << "Cursor: " cerr << "Cursor: "
<< m_CursorPosition.x << ',' << m_CursorPosition.x << ','
@@ -609,7 +609,7 @@ wxLayoutList::Delete(CoordType count)
i = FindCurrentObject(&offs); i = FindCurrentObject(&offs);
if(i == end()) if(i == end())
return; return;
#ifdef DEBUG #ifdef WXDEBUG
cerr << "trying to delete: " << _t[(*i)->GetType()] << endl; cerr << "trying to delete: " << _t[(*i)->GetType()] << endl;
#endif #endif
if((*i)->GetType() == WXLO_TYPE_LINEBREAK) if((*i)->GetType() == WXLO_TYPE_LINEBREAK)
@@ -678,7 +678,7 @@ wxLayoutList::Insert(wxLayoutObjectBase *obj)
if((*i)->GetType() == WXLO_TYPE_TEXT && offs != 0 && offs != (*i)->CountPositions()) if((*i)->GetType() == WXLO_TYPE_TEXT && offs != 0 && offs != (*i)->CountPositions())
{ {
wxLayoutObjectText *tobj = (wxLayoutObjectText *) *i; wxLayoutObjectText *tobj = (wxLayoutObjectText *) *i;
#ifdef DEBUG #ifdef WXDEBUG
cerr << "text: '" << tobj->GetText() << "'" << endl; cerr << "text: '" << tobj->GetText() << "'" << endl;
VAR(offs); VAR(offs);
#endif #endif

View File

@@ -16,8 +16,8 @@
#include <wx/wx.h> #include <wx/wx.h>
#ifndef DEBUG #ifndef WXDEBUG
# define DEBUG # define WXDEBUG
#endif #endif
@@ -52,7 +52,7 @@ public:
wxLayoutObjectBase() { m_UserData = NULL; } wxLayoutObjectBase() { m_UserData = NULL; }
virtual ~wxLayoutObjectBase() {} virtual ~wxLayoutObjectBase() {}
#ifdef DEBUG #ifdef WXDEBUG
virtual void Debug(void); virtual void Debug(void);
#endif #endif
@@ -75,7 +75,7 @@ public:
align text objects. align text objects.
*/ */
virtual wxPoint GetSize(CoordType *baseLine) const; virtual wxPoint GetSize(CoordType *baseLine) const;
#ifdef DEBUG #ifdef WXDEBUG
virtual void Debug(void); virtual void Debug(void);
#endif #endif
@@ -182,7 +182,7 @@ public:
wxLayoutObjectBase *Draw(wxDC &dc, bool findObject = false, wxLayoutObjectBase *Draw(wxDC &dc, bool findObject = false,
wxPoint const &coords = wxPoint(0,0)); wxPoint const &coords = wxPoint(0,0));
#ifdef DEBUG #ifdef WXDEBUG
void Debug(void); void Debug(void);
#endif #endif

View File

@@ -37,7 +37,7 @@ wxLayoutWindow::OnMouse(wxMouseEvent& event)
m_FindPos.y = event.GetY(); m_FindPos.y = event.GetY();
m_FoundObject = NULL; m_FoundObject = NULL;
#ifdef DEBUG #ifdef WXDEBUG
cerr << "OnMouse: " << m_FindPos.x << ',' << m_FindPos.y << endl; cerr << "OnMouse: " << m_FindPos.x << ',' << m_FindPos.y << endl;
#endif #endif
Refresh(); Refresh();
@@ -90,7 +90,7 @@ wxLayoutWindow::OnChar(wxKeyEvent& event)
case WXK_RETURN: case WXK_RETURN:
m_llist.LineBreak(); m_llist.LineBreak();
break; break;
#ifdef DEBUG #ifdef WXDEBUG
case WXK_F1: case WXK_F1:
m_llist.Debug(); m_llist.Debug();
break; break;