Remove references to never generated wxSTC events

EVT_STC_KEY and EVT_STC_URIDROPPED events are never generated so there is no need to reference them in the code and documentation. For backwards compatibility reasons their declarations are not entirely removed but marked as deprecated.

Closes #17688.
This commit is contained in:
New Pagodi
2017-02-16 18:18:13 +01:00
committed by Artur Wieczorek
parent 889b406b0e
commit e68cafaf94
7 changed files with 31 additions and 32 deletions

View File

@@ -124,6 +124,7 @@ All (GUI):
- Refactor code in wxQuantize() for MSVC to avoid crash.
- Fix drawing rotated and/or underlined text on wxPostScriptDC.
- Support multiline strings in wxPostScriptDC::DrawText(), DrawRotatedText().
- Deprecate wxEVT_STC_KEY and wxEVT_STC_URIDROPPED events (NewPagodi).
wxGTK:

View File

@@ -5543,7 +5543,8 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_CHARADDED, wxStyledTextEven
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_SAVEPOINTREACHED, wxStyledTextEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_SAVEPOINTLEFT, wxStyledTextEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_ROMODIFYATTEMPT, wxStyledTextEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_KEY, wxStyledTextEvent );
wxDEPRECATED_MSG( "Don't handle wxEVT_STC_KEY. It's never generated." ) \
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_KEY, wxStyledTextEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_DOUBLECLICK, wxStyledTextEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_UPDATEUI, wxStyledTextEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_MODIFIED, wxStyledTextEvent );
@@ -5552,7 +5553,8 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_MARGINCLICK, wxStyledTextEv
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_NEEDSHOWN, wxStyledTextEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_PAINTED, wxStyledTextEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_USERLISTSELECTION, wxStyledTextEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_URIDROPPED, wxStyledTextEvent );
wxDEPRECATED_MSG( "Don't handle wxEVT_STC_URIDROPPED. It's never generated." ) \
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_URIDROPPED, wxStyledTextEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_DWELLSTART, wxStyledTextEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_DWELLEND, wxStyledTextEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_START_DRAG, wxStyledTextEvent );
@@ -5581,7 +5583,7 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_MARGIN_RIGHT_CLICK, wxStyle
wxEVT_STC_SAVEPOINTREACHED,
wxEVT_STC_SAVEPOINTLEFT,
wxEVT_STC_ROMODIFYATTEMPT,
wxEVT_STC_KEY,
wxEVT_STC_KEY, // deprecated
wxEVT_STC_DOUBLECLICK,
wxEVT_STC_UPDATEUI,
wxEVT_STC_MODIFIED,
@@ -5590,7 +5592,7 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_MARGIN_RIGHT_CLICK, wxStyle
wxEVT_STC_NEEDSHOWN,
wxEVT_STC_PAINTED,
wxEVT_STC_USERLISTSELECTION,
wxEVT_STC_URIDROPPED,
wxEVT_STC_URIDROPPED, // deprecated
wxEVT_STC_DWELLSTART,
wxEVT_STC_DWELLEND,
wxEVT_STC_START_DRAG,

View File

@@ -2780,8 +2780,6 @@
TOWRITE
@event{EVT_STC_ROMODIFYATTEMPT(id, fn)}
TOWRITE
@event{EVT_STC_KEY(id, fn)}
TOWRITE
@event{EVT_STC_DOUBLECLICK(id, fn)}
TOWRITE
@event{EVT_STC_UPDATEUI(id, fn)}
@@ -2798,8 +2796,6 @@
TOWRITE
@event{EVT_STC_USERLISTSELECTION(id, fn)}
TOWRITE
@event{EVT_STC_URIDROPPED(id, fn)}
TOWRITE
@event{EVT_STC_DWELLSTART(id, fn)}
TOWRITE
@event{EVT_STC_DWELLEND(id, fn)}
@@ -2848,6 +2844,16 @@
@endEventTable
Most of the scintilla notifications are mapped to a similarly named
wxStyledTextEvent. However a few of the notifications would only offer
information available in other wxWidgets event types, and in those cases a
corresponding wxStyledTextEvent is not defined. Currently, the
@c wxEVT_KEY_DOWN event is used instead of the SCN_KEY notification. The
regular wxWidgets drag and drop functionality can be used instead of the
SCN_URIDROPPED notification. The @c wxEVT_SET_FOCUS event is used instead
of the SCN_FOCUSIN notification. And the @c wxEVT_KILL_FOCUS event is used
instead of the SCN_FOCUSOUT notification.
@library{wxstc}
@category{stc}

View File

@@ -5476,10 +5476,6 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) {
evt.SetEventType(wxEVT_STC_ROMODIFYATTEMPT);
break;
case SCN_KEY:
evt.SetEventType(wxEVT_STC_KEY);
break;
case SCN_DOUBLECLICK:
evt.SetEventType(wxEVT_STC_DOUBLECLICK);
evt.SetLine(scn.line);
@@ -5532,11 +5528,6 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) {
evt.SetListCompletionMethod(scn.listCompletionMethod);
break;
case SCN_URIDROPPED:
evt.SetEventType(wxEVT_STC_URIDROPPED);
SetEventText(evt, scn.text, strlen(scn.text));
break;
case SCN_DWELLSTART:
evt.SetEventType(wxEVT_STC_DWELLSTART);
evt.SetX(scn.x);

View File

@@ -1048,10 +1048,6 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) {
evt.SetEventType(wxEVT_STC_ROMODIFYATTEMPT);
break;
case SCN_KEY:
evt.SetEventType(wxEVT_STC_KEY);
break;
case SCN_DOUBLECLICK:
evt.SetEventType(wxEVT_STC_DOUBLECLICK);
evt.SetLine(scn.line);
@@ -1104,11 +1100,6 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) {
evt.SetListCompletionMethod(scn.listCompletionMethod);
break;
case SCN_URIDROPPED:
evt.SetEventType(wxEVT_STC_URIDROPPED);
SetEventText(evt, scn.text, strlen(scn.text));
break;
case SCN_DWELLSTART:
evt.SetEventType(wxEVT_STC_DWELLSTART);
evt.SetX(scn.x);

View File

@@ -665,7 +665,8 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_CHARADDED, wxStyledTextEven
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_SAVEPOINTREACHED, wxStyledTextEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_SAVEPOINTLEFT, wxStyledTextEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_ROMODIFYATTEMPT, wxStyledTextEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_KEY, wxStyledTextEvent );
wxDEPRECATED_MSG( "Don't handle wxEVT_STC_KEY. It's never generated." ) \
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_KEY, wxStyledTextEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_DOUBLECLICK, wxStyledTextEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_UPDATEUI, wxStyledTextEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_MODIFIED, wxStyledTextEvent );
@@ -674,7 +675,8 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_MARGINCLICK, wxStyledTextEv
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_NEEDSHOWN, wxStyledTextEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_PAINTED, wxStyledTextEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_USERLISTSELECTION, wxStyledTextEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_URIDROPPED, wxStyledTextEvent );
wxDEPRECATED_MSG( "Don't handle wxEVT_STC_URIDROPPED. It's never generated." ) \
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_URIDROPPED, wxStyledTextEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_DWELLSTART, wxStyledTextEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_DWELLEND, wxStyledTextEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_START_DRAG, wxStyledTextEvent );

View File

@@ -58,8 +58,6 @@
TOWRITE
@event{EVT_STC_ROMODIFYATTEMPT(id, fn)}
TOWRITE
@event{EVT_STC_KEY(id, fn)}
TOWRITE
@event{EVT_STC_DOUBLECLICK(id, fn)}
TOWRITE
@event{EVT_STC_UPDATEUI(id, fn)}
@@ -76,8 +74,6 @@
TOWRITE
@event{EVT_STC_USERLISTSELECTION(id, fn)}
TOWRITE
@event{EVT_STC_URIDROPPED(id, fn)}
TOWRITE
@event{EVT_STC_DWELLSTART(id, fn)}
TOWRITE
@event{EVT_STC_DWELLEND(id, fn)}
@@ -126,6 +122,16 @@
@endEventTable
Most of the scintilla notifications are mapped to a similarly named
wxStyledTextEvent. However a few of the notifications would only offer
information available in other wxWidgets event types, and in those cases a
corresponding wxStyledTextEvent is not defined. Currently, the
@c wxEVT_KEY_DOWN event is used instead of the SCN_KEY notification. The
regular wxWidgets drag and drop functionality can be used instead of the
SCN_URIDROPPED notification. The @c wxEVT_SET_FOCUS event is used instead
of the SCN_FOCUSIN notification. And the @c wxEVT_KILL_FOCUS event is used
instead of the SCN_FOCUSOUT notification.
@library{wxstc}
@category{stc}