From 31f9c02b94226a312f63cefac2051c9fac959f33 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 24 Sep 2003 22:37:43 +0000 Subject: [PATCH] Fixed typos and SWIG #ifdef stuff git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@23905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/include/wx/stc/stc.h | 21 +++++++++++---------- contrib/src/stc/stc.cpp | 5 ++--- contrib/src/stc/stc.cpp.in | 4 ++-- contrib/src/stc/stc.h.in | 21 +++++++++++---------- 4 files changed, 26 insertions(+), 25 deletions(-) diff --git a/contrib/include/wx/stc/stc.h b/contrib/include/wx/stc/stc.h index e4c9b36b9a..cea656ce72 100644 --- a/contrib/include/wx/stc/stc.h +++ b/contrib/include/wx/stc/stc.h @@ -48,6 +48,15 @@ #endif // SWIG +// SWIG can't handle "#if" type of conditionals, only "#ifdef" +#ifdef SWIG +#define STC_USE_DND 1 +#else +#if wxUSE_DRAG_AND_DROP +#define STC_USE_DND 1 +#endif +#endif + //---------------------------------------------------------------------- // Should a wxPopupWindow be used for the call tips and autocomplete windows? @@ -2283,7 +2292,8 @@ public: // Load the contents of filename into the editor bool LoadFile(const wxString& filename); -#ifdef wxUSE_DRAG_DROP + +#ifdef STC_USE_DND // Allow for simulating a DnD DragOver wxDragResult DoDragOver(wxCoord x, wxCoord y, wxDragResult def); @@ -2341,15 +2351,6 @@ protected: //---------------------------------------------------------------------- -// SWIG can't handle "#if" type of conditionals, only "#ifdef" -#ifdef SWIG -#define STC_USE_DND 1 -#else -#if wxUSE_DRAG_AND_DROP -#define STC_USE_DND 1 -#endif -#endif - class wxStyledTextEvent : public wxCommandEvent { public: wxStyledTextEvent(wxEventType commandType=0, int id=0); diff --git a/contrib/src/stc/stc.cpp b/contrib/src/stc/stc.cpp index a67fb5a115..68ce31cba3 100644 --- a/contrib/src/stc/stc.cpp +++ b/contrib/src/stc/stc.cpp @@ -2162,18 +2162,17 @@ bool wxStyledTextCtrl::LoadFile(const wxString& filename) return success; } -#if wx_USE_DRAG_DROP +#if wxUSE_DRAG_AND_DROP wxDragResult wxStyledTextCtrl::DoDragOver(wxCoord x, wxCoord y, wxDragResult def) { return m_swx->DoDragOver(x, y, def); } - + bool wxStyledTextCtrl::DoDropText(long x, long y, const wxString& data) { return m_swx->DoDropText(x, y, data); } #endif - //---------------------------------------------------------------------- // Event handlers diff --git a/contrib/src/stc/stc.cpp.in b/contrib/src/stc/stc.cpp.in index 55e16c352f..b9fe7c99c1 100644 --- a/contrib/src/stc/stc.cpp.in +++ b/contrib/src/stc/stc.cpp.in @@ -367,11 +367,11 @@ bool wxStyledTextCtrl::LoadFile(const wxString& filename) return success; } -#if wx_USE_DRAG_DROP +#if wxUSE_DRAG_AND_DROP wxDragResult wxStyledTextCtrl::DoDragOver(wxCoord x, wxCoord y, wxDragResult def) { return m_swx->DoDragOver(x, y, def); } - + bool wxStyledTextCtrl::DoDropText(long x, long y, const wxString& data) { return m_swx->DoDropText(x, y, data); diff --git a/contrib/src/stc/stc.h.in b/contrib/src/stc/stc.h.in index 0ccc6852da..666d3d3bd2 100644 --- a/contrib/src/stc/stc.h.in +++ b/contrib/src/stc/stc.h.in @@ -48,6 +48,15 @@ #endif // SWIG +// SWIG can't handle "#if" type of conditionals, only "#ifdef" +#ifdef SWIG +#define STC_USE_DND 1 +#else +#if wxUSE_DRAG_AND_DROP +#define STC_USE_DND 1 +#endif +#endif + //---------------------------------------------------------------------- // Should a wxPopupWindow be used for the call tips and autocomplete windows? @@ -200,12 +209,13 @@ public: // Load the contents of filename into the editor bool LoadFile(const wxString& filename); +#ifdef STC_USE_DND // Allow for simulating a DnD DragOver wxDragResult DoDragOver(wxCoord x, wxCoord y, wxDragResult def); // Allow for simulating a DnD DropText bool DoDropText(long x, long y, const wxString& data); - +#endif //---------------------------------------------------------------------- @@ -257,15 +267,6 @@ protected: //---------------------------------------------------------------------- -// SWIG can't handle "#if" type of conditionals, only "#ifdef" -#ifdef SWIG -#define STC_USE_DND 1 -#else -#if wxUSE_DRAG_AND_DROP -#define STC_USE_DND 1 -#endif -#endif - class wxStyledTextEvent : public wxCommandEvent { public: wxStyledTextEvent(wxEventType commandType=0, int id=0);