From 92bbd64f7fc6d489fa7af1193feef7f3308da549 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 27 May 2002 22:06:55 +0000 Subject: [PATCH] Patch 559673 and 561053 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15694 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/include/wx/stc/stc.h | 15 +++++++++++++++ contrib/src/stc/stc.cpp | 4 ++++ contrib/src/stc/stc.cpp.in | 4 ++++ contrib/src/stc/stc.h.in | 15 +++++++++++++++ include/wx/stc/stc.h | 15 +++++++++++++++ src/stc/stc.cpp | 4 ++++ src/stc/stc.cpp.in | 4 ++++ src/stc/stc.h.in | 15 +++++++++++++++ wxPython/contrib/stc/msw/stc_.cpp | 1 + wxPython/contrib/stc/msw/stc_.py | 1 + 10 files changed, 78 insertions(+) diff --git a/contrib/include/wx/stc/stc.h b/contrib/include/wx/stc/stc.h index 4512d0a592..f7d4e70eef 100644 --- a/contrib/include/wx/stc/stc.h +++ b/contrib/include/wx/stc/stc.h @@ -1860,6 +1860,15 @@ private: //---------------------------------------------------------------------- +// SWIG can't handle "#if" type of conditionals, onlu "#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); @@ -1887,7 +1896,9 @@ public: void SetY(int val) { m_y = val; } void SetDragText(const wxString& val) { m_dragText = val; } void SetDragAllowMove(bool val) { m_dragAllowMove = val; } +#ifdef STC_USE_DND void SetDragResult(wxDragResult val) { m_dragResult = val; } +#endif int GetPosition() const { return m_position; } int GetKey() const { return m_key; } @@ -1908,7 +1919,9 @@ public: int GetY() const { return m_y; } wxString GetDragText() { return m_dragText; } bool GetDragAllowMove() { return m_dragAllowMove; } +#ifdef STC_USE_DND wxDragResult GetDragResult() { return m_dragResult; } +#endif bool GetShift() const; bool GetControl() const; @@ -1945,8 +1958,10 @@ private: wxString m_dragText; // wxEVT_STC_START_DRAG, wxEVT_STC_DO_DROP bool m_dragAllowMove; // wxEVT_STC_START_DRAG +#if wxUSE_DRAG_AND_DROP wxDragResult m_dragResult; // wxEVT_STC_DRAG_OVER,wxEVT_STC_DO_DROP #endif +#endif }; #ifndef SWIG diff --git a/contrib/src/stc/stc.cpp b/contrib/src/stc/stc.cpp index a569f44b7b..6e22325317 100644 --- a/contrib/src/stc/stc.cpp +++ b/contrib/src/stc/stc.cpp @@ -2134,7 +2134,9 @@ wxStyledTextEvent::wxStyledTextEvent(wxEventType commandType, int id) m_x = 0; m_y = 0; m_dragAllowMove = FALSE; +#if wxUSE_DRAG_AND_DROP m_dragResult = wxDragNone; +#endif } bool wxStyledTextEvent::GetShift() const { return (m_modifiers & SCI_SHIFT) != 0; } @@ -2168,7 +2170,9 @@ wxStyledTextEvent::wxStyledTextEvent(const wxStyledTextEvent& event): m_dragText = event.m_dragText; m_dragAllowMove =event.m_dragAllowMove; +#if wxUSE_DRAG_AND_DROP m_dragResult = event.m_dragResult; +#endif } //---------------------------------------------------------------------- diff --git a/contrib/src/stc/stc.cpp.in b/contrib/src/stc/stc.cpp.in index a026879d34..4b00760485 100644 --- a/contrib/src/stc/stc.cpp.in +++ b/contrib/src/stc/stc.cpp.in @@ -584,7 +584,9 @@ wxStyledTextEvent::wxStyledTextEvent(wxEventType commandType, int id) m_x = 0; m_y = 0; m_dragAllowMove = FALSE; +#if wxUSE_DRAG_AND_DROP m_dragResult = wxDragNone; +#endif } bool wxStyledTextEvent::GetShift() const { return (m_modifiers & SCI_SHIFT) != 0; } @@ -618,7 +620,9 @@ wxStyledTextEvent::wxStyledTextEvent(const wxStyledTextEvent& event): m_dragText = event.m_dragText; m_dragAllowMove =event.m_dragAllowMove; +#if wxUSE_DRAG_AND_DROP m_dragResult = event.m_dragResult; +#endif } //---------------------------------------------------------------------- diff --git a/contrib/src/stc/stc.h.in b/contrib/src/stc/stc.h.in index 1243324bb9..56c23d87d5 100644 --- a/contrib/src/stc/stc.h.in +++ b/contrib/src/stc/stc.h.in @@ -210,6 +210,15 @@ private: //---------------------------------------------------------------------- +// SWIG can't handle "#if" type of conditionals, onlu "#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); @@ -237,7 +246,9 @@ public: void SetY(int val) { m_y = val; } void SetDragText(const wxString& val) { m_dragText = val; } void SetDragAllowMove(bool val) { m_dragAllowMove = val; } +#ifdef STC_USE_DND void SetDragResult(wxDragResult val) { m_dragResult = val; } +#endif int GetPosition() const { return m_position; } int GetKey() const { return m_key; } @@ -258,7 +269,9 @@ public: int GetY() const { return m_y; } wxString GetDragText() { return m_dragText; } bool GetDragAllowMove() { return m_dragAllowMove; } +#ifdef STC_USE_DND wxDragResult GetDragResult() { return m_dragResult; } +#endif bool GetShift() const; bool GetControl() const; @@ -295,8 +308,10 @@ private: wxString m_dragText; // wxEVT_STC_START_DRAG, wxEVT_STC_DO_DROP bool m_dragAllowMove; // wxEVT_STC_START_DRAG +#if wxUSE_DRAG_AND_DROP wxDragResult m_dragResult; // wxEVT_STC_DRAG_OVER,wxEVT_STC_DO_DROP #endif +#endif }; #ifndef SWIG diff --git a/include/wx/stc/stc.h b/include/wx/stc/stc.h index 4512d0a592..f7d4e70eef 100644 --- a/include/wx/stc/stc.h +++ b/include/wx/stc/stc.h @@ -1860,6 +1860,15 @@ private: //---------------------------------------------------------------------- +// SWIG can't handle "#if" type of conditionals, onlu "#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); @@ -1887,7 +1896,9 @@ public: void SetY(int val) { m_y = val; } void SetDragText(const wxString& val) { m_dragText = val; } void SetDragAllowMove(bool val) { m_dragAllowMove = val; } +#ifdef STC_USE_DND void SetDragResult(wxDragResult val) { m_dragResult = val; } +#endif int GetPosition() const { return m_position; } int GetKey() const { return m_key; } @@ -1908,7 +1919,9 @@ public: int GetY() const { return m_y; } wxString GetDragText() { return m_dragText; } bool GetDragAllowMove() { return m_dragAllowMove; } +#ifdef STC_USE_DND wxDragResult GetDragResult() { return m_dragResult; } +#endif bool GetShift() const; bool GetControl() const; @@ -1945,8 +1958,10 @@ private: wxString m_dragText; // wxEVT_STC_START_DRAG, wxEVT_STC_DO_DROP bool m_dragAllowMove; // wxEVT_STC_START_DRAG +#if wxUSE_DRAG_AND_DROP wxDragResult m_dragResult; // wxEVT_STC_DRAG_OVER,wxEVT_STC_DO_DROP #endif +#endif }; #ifndef SWIG diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index a569f44b7b..6e22325317 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -2134,7 +2134,9 @@ wxStyledTextEvent::wxStyledTextEvent(wxEventType commandType, int id) m_x = 0; m_y = 0; m_dragAllowMove = FALSE; +#if wxUSE_DRAG_AND_DROP m_dragResult = wxDragNone; +#endif } bool wxStyledTextEvent::GetShift() const { return (m_modifiers & SCI_SHIFT) != 0; } @@ -2168,7 +2170,9 @@ wxStyledTextEvent::wxStyledTextEvent(const wxStyledTextEvent& event): m_dragText = event.m_dragText; m_dragAllowMove =event.m_dragAllowMove; +#if wxUSE_DRAG_AND_DROP m_dragResult = event.m_dragResult; +#endif } //---------------------------------------------------------------------- diff --git a/src/stc/stc.cpp.in b/src/stc/stc.cpp.in index a026879d34..4b00760485 100644 --- a/src/stc/stc.cpp.in +++ b/src/stc/stc.cpp.in @@ -584,7 +584,9 @@ wxStyledTextEvent::wxStyledTextEvent(wxEventType commandType, int id) m_x = 0; m_y = 0; m_dragAllowMove = FALSE; +#if wxUSE_DRAG_AND_DROP m_dragResult = wxDragNone; +#endif } bool wxStyledTextEvent::GetShift() const { return (m_modifiers & SCI_SHIFT) != 0; } @@ -618,7 +620,9 @@ wxStyledTextEvent::wxStyledTextEvent(const wxStyledTextEvent& event): m_dragText = event.m_dragText; m_dragAllowMove =event.m_dragAllowMove; +#if wxUSE_DRAG_AND_DROP m_dragResult = event.m_dragResult; +#endif } //---------------------------------------------------------------------- diff --git a/src/stc/stc.h.in b/src/stc/stc.h.in index 1243324bb9..56c23d87d5 100644 --- a/src/stc/stc.h.in +++ b/src/stc/stc.h.in @@ -210,6 +210,15 @@ private: //---------------------------------------------------------------------- +// SWIG can't handle "#if" type of conditionals, onlu "#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); @@ -237,7 +246,9 @@ public: void SetY(int val) { m_y = val; } void SetDragText(const wxString& val) { m_dragText = val; } void SetDragAllowMove(bool val) { m_dragAllowMove = val; } +#ifdef STC_USE_DND void SetDragResult(wxDragResult val) { m_dragResult = val; } +#endif int GetPosition() const { return m_position; } int GetKey() const { return m_key; } @@ -258,7 +269,9 @@ public: int GetY() const { return m_y; } wxString GetDragText() { return m_dragText; } bool GetDragAllowMove() { return m_dragAllowMove; } +#ifdef STC_USE_DND wxDragResult GetDragResult() { return m_dragResult; } +#endif bool GetShift() const; bool GetControl() const; @@ -295,8 +308,10 @@ private: wxString m_dragText; // wxEVT_STC_START_DRAG, wxEVT_STC_DO_DROP bool m_dragAllowMove; // wxEVT_STC_START_DRAG +#if wxUSE_DRAG_AND_DROP wxDragResult m_dragResult; // wxEVT_STC_DRAG_OVER,wxEVT_STC_DO_DROP #endif +#endif }; #ifndef SWIG diff --git a/wxPython/contrib/stc/msw/stc_.cpp b/wxPython/contrib/stc/msw/stc_.cpp index e08469d4d7..e14809ab63 100644 --- a/wxPython/contrib/stc/msw/stc_.cpp +++ b/wxPython/contrib/stc/msw/stc_.cpp @@ -11579,6 +11579,7 @@ SWIGEXPORT(void) initstc_c() { PyDict_SetItemString(d,"wxSTC_MATLAB_OPERATOR", PyInt_FromLong((long) 6)); PyDict_SetItemString(d,"wxSTC_MATLAB_IDENTIFIER", PyInt_FromLong((long) 7)); PyDict_SetItemString(d,"wxSTCNameStr", PyString_FromString("wxSTCNameStr")); + PyDict_SetItemString(d,"STC_USE_DND", PyInt_FromLong((long) 1)); PyDict_SetItemString(d,"wxEVT_STC_CHANGE", PyInt_FromLong((long) wxEVT_STC_CHANGE)); PyDict_SetItemString(d,"wxEVT_STC_STYLENEEDED", PyInt_FromLong((long) wxEVT_STC_STYLENEEDED)); PyDict_SetItemString(d,"wxEVT_STC_CHARADDED", PyInt_FromLong((long) wxEVT_STC_CHARADDED)); diff --git a/wxPython/contrib/stc/msw/stc_.py b/wxPython/contrib/stc/msw/stc_.py index 3e189c0e64..99cf32034f 100644 --- a/wxPython/contrib/stc/msw/stc_.py +++ b/wxPython/contrib/stc/msw/stc_.py @@ -1705,6 +1705,7 @@ wxSTC_MATLAB_STRING = stc_c.wxSTC_MATLAB_STRING wxSTC_MATLAB_OPERATOR = stc_c.wxSTC_MATLAB_OPERATOR wxSTC_MATLAB_IDENTIFIER = stc_c.wxSTC_MATLAB_IDENTIFIER wxSTCNameStr = stc_c.wxSTCNameStr +STC_USE_DND = stc_c.STC_USE_DND wxEVT_STC_CHANGE = stc_c.wxEVT_STC_CHANGE wxEVT_STC_STYLENEEDED = stc_c.wxEVT_STC_STYLENEEDED wxEVT_STC_CHARADDED = stc_c.wxEVT_STC_CHARADDED -- 2.47.2