From f9ee2e27420999ce929386bbd1d6e088391f179e Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 30 Mar 2005 18:39:54 +0000 Subject: [PATCH] rearrainge the #includes and etc. to avoid a name conflict with some CoreFoundation headers git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33191 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/stc/PlatWX.cpp | 7 +++++++ contrib/src/stc/ScintillaWX.cpp | 12 +++++++++++- contrib/src/stc/ScintillaWX.h | 4 ---- contrib/src/stc/scintilla/include/Platform.h | 5 ----- contrib/src/stc/stc.cpp | 12 +++++++++--- contrib/src/stc/stc.cpp.in | 12 ++++++++++-- src/stc/PlatWX.cpp | 7 +++++++ src/stc/ScintillaWX.cpp | 12 +++++++++++- src/stc/ScintillaWX.h | 4 ---- src/stc/scintilla/include/Platform.h | 5 ----- src/stc/stc.cpp | 12 +++++++++--- src/stc/stc.cpp.in | 12 ++++++++++-- 12 files changed, 74 insertions(+), 30 deletions(-) diff --git a/contrib/src/stc/PlatWX.cpp b/contrib/src/stc/PlatWX.cpp index 8408f88a72..af915be587 100644 --- a/contrib/src/stc/PlatWX.cpp +++ b/contrib/src/stc/PlatWX.cpp @@ -6,6 +6,9 @@ #include +#define Point macPoint // These names are also defined by some mac headers so +#define Style macStyle // change their names, and then undef before we need them + #include #include #include @@ -13,11 +16,15 @@ #include #include +#undef Point +#undef Style + #include "Platform.h" #include "PlatWX.h" #include "wx/stc/stc.h" + Point Point::FromLong(long lpoint) { return Point(lpoint & 0xFFFF, lpoint >> 16); } diff --git a/contrib/src/stc/ScintillaWX.cpp b/contrib/src/stc/ScintillaWX.cpp index 565bfabb2c..9dd7697117 100644 --- a/contrib/src/stc/ScintillaWX.cpp +++ b/contrib/src/stc/ScintillaWX.cpp @@ -14,12 +14,22 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// +#define Point macPoint // These names are also defined by some mac headers so +#define Style macStyle // change their names, and then undef before we need them + +#include +#include +#include +#include +#include + +#undef Point +#undef Style #include "ScintillaWX.h" #include "ExternalLexer.h" #include "wx/stc/stc.h" #include "PlatWX.h" -#include #ifdef __WXMSW__ // GetHwndOf() diff --git a/contrib/src/stc/ScintillaWX.h b/contrib/src/stc/ScintillaWX.h index 0746fd24b9..e703efe606 100644 --- a/contrib/src/stc/ScintillaWX.h +++ b/contrib/src/stc/ScintillaWX.h @@ -48,10 +48,6 @@ #include "Editor.h" #include "ScintillaBase.h" -#include -#include -#include -#include //---------------------------------------------------------------------- diff --git a/contrib/src/stc/scintilla/include/Platform.h b/contrib/src/stc/scintilla/include/Platform.h index f0c0b84d17..1e3bd69d75 100644 --- a/contrib/src/stc/scintilla/include/Platform.h +++ b/contrib/src/stc/scintilla/include/Platform.h @@ -44,11 +44,6 @@ #endif -#if PLAT_WX -#include // For the global memory operators, if needed. -#endif - - // Underlying the implementation of the platform classes are platform specific types. // Sometimes these need to be passed around by client code so they are defined here diff --git a/contrib/src/stc/stc.cpp b/contrib/src/stc/stc.cpp index 248ceb73e5..892f639501 100644 --- a/contrib/src/stc/stc.cpp +++ b/contrib/src/stc/stc.cpp @@ -17,8 +17,8 @@ #include -#include "wx/stc/stc.h" -#include "ScintillaWX.h" +#define Point macPoint // These names are also defined by some mac headers so +#define Style macStyle // change their names, and then undef before we need them #include #include @@ -26,6 +26,11 @@ #include #include +#undef Point +#undef Style + +#include "wx/stc/stc.h" +#include "ScintillaWX.h" //---------------------------------------------------------------------- @@ -178,9 +183,10 @@ void wxStyledTextCtrl::Create(wxWindow *parent, SetCodePage(wxSTC_CP_UTF8); #endif + SetBestFittingSize(size); + // Reduces flicker on GTK+/X11 SetBackgroundStyle(wxBG_STYLE_CUSTOM); - SetBestFittingSize(size); } diff --git a/contrib/src/stc/stc.cpp.in b/contrib/src/stc/stc.cpp.in index a21f681252..e07f6d5194 100644 --- a/contrib/src/stc/stc.cpp.in +++ b/contrib/src/stc/stc.cpp.in @@ -17,8 +17,8 @@ #include -#include "wx/stc/stc.h" -#include "ScintillaWX.h" +#define Point macPoint // These names are also defined by some mac headers so +#define Style macStyle // change their names, and then undef before we need them #include #include @@ -26,6 +26,11 @@ #include #include +#undef Point +#undef Style + +#include "wx/stc/stc.h" +#include "ScintillaWX.h" //---------------------------------------------------------------------- @@ -179,6 +184,9 @@ void wxStyledTextCtrl::Create(wxWindow *parent, #endif SetBestFittingSize(size); + + // Reduces flicker on GTK+/X11 + SetBackgroundStyle(wxBG_STYLE_CUSTOM); } diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index 8408f88a72..af915be587 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -6,6 +6,9 @@ #include +#define Point macPoint // These names are also defined by some mac headers so +#define Style macStyle // change their names, and then undef before we need them + #include #include #include @@ -13,11 +16,15 @@ #include #include +#undef Point +#undef Style + #include "Platform.h" #include "PlatWX.h" #include "wx/stc/stc.h" + Point Point::FromLong(long lpoint) { return Point(lpoint & 0xFFFF, lpoint >> 16); } diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index 565bfabb2c..9dd7697117 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -14,12 +14,22 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// +#define Point macPoint // These names are also defined by some mac headers so +#define Style macStyle // change their names, and then undef before we need them + +#include +#include +#include +#include +#include + +#undef Point +#undef Style #include "ScintillaWX.h" #include "ExternalLexer.h" #include "wx/stc/stc.h" #include "PlatWX.h" -#include #ifdef __WXMSW__ // GetHwndOf() diff --git a/src/stc/ScintillaWX.h b/src/stc/ScintillaWX.h index 0746fd24b9..e703efe606 100644 --- a/src/stc/ScintillaWX.h +++ b/src/stc/ScintillaWX.h @@ -48,10 +48,6 @@ #include "Editor.h" #include "ScintillaBase.h" -#include -#include -#include -#include //---------------------------------------------------------------------- diff --git a/src/stc/scintilla/include/Platform.h b/src/stc/scintilla/include/Platform.h index f0c0b84d17..1e3bd69d75 100644 --- a/src/stc/scintilla/include/Platform.h +++ b/src/stc/scintilla/include/Platform.h @@ -44,11 +44,6 @@ #endif -#if PLAT_WX -#include // For the global memory operators, if needed. -#endif - - // Underlying the implementation of the platform classes are platform specific types. // Sometimes these need to be passed around by client code so they are defined here diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index 248ceb73e5..892f639501 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -17,8 +17,8 @@ #include -#include "wx/stc/stc.h" -#include "ScintillaWX.h" +#define Point macPoint // These names are also defined by some mac headers so +#define Style macStyle // change their names, and then undef before we need them #include #include @@ -26,6 +26,11 @@ #include #include +#undef Point +#undef Style + +#include "wx/stc/stc.h" +#include "ScintillaWX.h" //---------------------------------------------------------------------- @@ -178,9 +183,10 @@ void wxStyledTextCtrl::Create(wxWindow *parent, SetCodePage(wxSTC_CP_UTF8); #endif + SetBestFittingSize(size); + // Reduces flicker on GTK+/X11 SetBackgroundStyle(wxBG_STYLE_CUSTOM); - SetBestFittingSize(size); } diff --git a/src/stc/stc.cpp.in b/src/stc/stc.cpp.in index a21f681252..e07f6d5194 100644 --- a/src/stc/stc.cpp.in +++ b/src/stc/stc.cpp.in @@ -17,8 +17,8 @@ #include -#include "wx/stc/stc.h" -#include "ScintillaWX.h" +#define Point macPoint // These names are also defined by some mac headers so +#define Style macStyle // change their names, and then undef before we need them #include #include @@ -26,6 +26,11 @@ #include #include +#undef Point +#undef Style + +#include "wx/stc/stc.h" +#include "ScintillaWX.h" //---------------------------------------------------------------------- @@ -179,6 +184,9 @@ void wxStyledTextCtrl::Create(wxWindow *parent, #endif SetBestFittingSize(size); + + // Reduces flicker on GTK+/X11 + SetBackgroundStyle(wxBG_STYLE_CUSTOM); } -- 2.45.2