X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f3c2c221081e2a3d65712b36429b4bc7bfc10b91..e6056257ab676ea10a51ef96e19b1f1092f95b40:/src/stc/stc.cpp diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index bd6184cf6a..10e29c82ef 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -32,6 +32,7 @@ int wxForceScintillaLexers(void) extern LexerModule lmAVE; extern LexerModule lmConf; extern LexerModule lmCPP; + extern LexerModule lmNncrontab; extern LexerModule lmEiffel; extern LexerModule lmHTML; extern LexerModule lmLISP; @@ -48,6 +49,7 @@ int wxForceScintillaLexers(void) && &lmAVE && &lmConf && &lmCPP + && &lmNncrontab && &lmEiffel && &lmHTML && &lmLISP @@ -91,8 +93,9 @@ DEFINE_EVENT_TYPE( wxEVT_STC_USERLISTSELECTION ) DEFINE_EVENT_TYPE( wxEVT_STC_URIDROPPED ) DEFINE_EVENT_TYPE( wxEVT_STC_DWELLSTART ) DEFINE_EVENT_TYPE( wxEVT_STC_DWELLEND ) - - +DEFINE_EVENT_TYPE( wxEVT_STC_START_DRAG ) +DEFINE_EVENT_TYPE( wxEVT_STC_DRAG_OVER ) +DEFINE_EVENT_TYPE( wxEVT_STC_DO_DROP ) BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl) @@ -1202,6 +1205,7 @@ int wxStyledTextCtrl::GetTargetEnd() { } // Replace the target text with the argument text. +// Text is counted so it can contain nulls. // Returns the length of the replacement text. int wxStyledTextCtrl::ReplaceTarget(const wxString& text) { @@ -1210,6 +1214,7 @@ int wxStyledTextCtrl::GetTargetEnd() { } // Replace the target text with the argument text after \d processing. +// Text is counted so it can contain nulls. // Looks for \d where d is between 1 and 9 and replaces these with the strings // matched in the last search operation which were surrounded by \( and \). // Returns the length of the replacement text including any change @@ -1221,7 +1226,7 @@ int wxStyledTextCtrl::GetTargetEnd() { } // Search for a counted string in the target and set the target to the found -// range. +// range. Text is counted so it can contain nulls. // Returns length of range or -1 for failure in which case target is not moved. int wxStyledTextCtrl::SearchInTarget(const wxString& text) { @@ -1910,6 +1915,7 @@ void wxStyledTextCtrl::OnListBox(wxCommandEvent& evt) { void wxStyledTextCtrl::NotifyChange() { wxStyledTextEvent evt(wxEVT_STC_CHANGE, GetId()); + evt.SetEventObject(this); GetEventHandler()->ProcessEvent(evt); } @@ -1917,6 +1923,7 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) { SCNotification& scn = *_scn; wxStyledTextEvent evt(0, GetId()); + evt.SetEventObject(this); evt.SetPosition(scn.position); evt.SetKey(scn.ch); evt.SetModifiers(scn.modifiers); @@ -2022,7 +2029,6 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) { } - //---------------------------------------------------------------------- //---------------------------------------------------------------------- //---------------------------------------------------------------------- @@ -2046,6 +2052,8 @@ wxStyledTextEvent::wxStyledTextEvent(wxEventType commandType, int id) m_listType = 0; m_x = 0; m_y = 0; + m_dragAllowMove = FALSE; + m_dragResult = wxDragNone; } bool wxStyledTextEvent::GetShift() const { return (m_modifiers & SCI_SHIFT) != 0; } @@ -2077,8 +2085,14 @@ void wxStyledTextEvent::CopyObject(wxObject& obj) const { o->m_x = m_x; o->m_y = m_y; + o->m_dragText = m_dragText; + o->m_dragAllowMove =m_dragAllowMove; + o->m_dragResult = m_dragResult; } //---------------------------------------------------------------------- //---------------------------------------------------------------------- + + +