X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7ba1412f1965a8756caf9e5ab1e4b4a0f1245fa3..bfdc04a9bb95e6865570d59192718052b6229221:/contrib/src/stc/stc.h.in?ds=inline diff --git a/contrib/src/stc/stc.h.in b/contrib/src/stc/stc.h.in index 1a5648a2ec..9ea0102760 100644 --- a/contrib/src/stc/stc.h.in +++ b/contrib/src/stc/stc.h.in @@ -35,6 +35,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? @@ -52,6 +61,7 @@ //----------------------------------------- // Commands that can be bound to keystrokes + %(CMDS)s @@ -70,7 +80,11 @@ class WXDLLIMPEXP_STC wxStyledTextEvent; //---------------------------------------------------------------------- +#ifndef SWIG +class WXDLLIMPEXP_STC wxStyledTextCtrl : public wxControl { +#else class wxStyledTextCtrl : public wxControl { +#endif public: #ifdef SWIG @@ -186,6 +200,15 @@ 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 + + //---------------------------------------------------------------------- @@ -219,7 +242,7 @@ private: void NotifyParent(SCNotification* scn); DECLARE_EVENT_TABLE() - DECLARE_CLASS(wxStyledTextCtrl) + DECLARE_DYNAMIC_CLASS(wxStyledTextCtrl) protected: @@ -237,16 +260,11 @@ protected: //---------------------------------------------------------------------- -// SWIG can't handle "#if" type of conditionals, only "#ifdef" -#ifdef SWIG -#define STC_USE_DND 1 +#ifndef SWIG +class WXDLLIMPEXP_STC wxStyledTextEvent : public wxCommandEvent { #else -#if wxUSE_DRAG_AND_DROP -#define STC_USE_DND 1 -#endif -#endif - class wxStyledTextEvent : public wxCommandEvent { +#endif public: wxStyledTextEvent(wxEventType commandType=0, int id=0); #ifndef SWIG