X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7ba1412f1965a8756caf9e5ab1e4b4a0f1245fa3..b77b87881bae2e6306366d79e7fe160334b3d4a2:/src/stc/stc.h.in diff --git a/src/stc/stc.h.in b/src/stc/stc.h.in index 1a5648a2ec..514357984a 100644 --- a/src/stc/stc.h.in +++ b/src/stc/stc.h.in @@ -24,7 +24,7 @@ #include #include -#ifndef SWIG + #ifdef WXMAKINGDLL_STC #define WXDLLIMPEXP_STC WXEXPORT #elif defined(WXUSINGDLL) @@ -32,9 +32,17 @@ #else // not making nor using DLL #define WXDLLIMPEXP_STC #endif -#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 +60,7 @@ //----------------------------------------- // Commands that can be bound to keystrokes + %(CMDS)s @@ -70,27 +79,34 @@ class WXDLLIMPEXP_STC wxStyledTextEvent; //---------------------------------------------------------------------- -class wxStyledTextCtrl : public wxControl { +class WXDLLIMPEXP_STC wxStyledTextCtrl : public wxControl { public: #ifdef SWIG + %%addtofunc wxStyledTextCtrl "self._setOORInfo(self)" + %%addtofunc wxStyledTextCtrl() "" + wxStyledTextCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPySTCNameStr); - %%pragma(python) addtomethod = "__init__:self._setOORInfo(self)" - + %%name(PreStyledTextCtrl) wxStyledTextCtrl(); + #else wxStyledTextCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxSTCNameStr); + wxStyledTextCtrl() { m_swx = NULL; } + ~wxStyledTextCtrl(); + #endif + void Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxString& name = wxSTCNameStr); -#ifndef SWIG - ~wxStyledTextCtrl(); -#endif //---------------------------------------------------------------------- // BEGIN generated section. The following code is automatically generated @@ -186,6 +202,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 +244,7 @@ private: void NotifyParent(SCNotification* scn); DECLARE_EVENT_TABLE() - DECLARE_CLASS(wxStyledTextCtrl) + DECLARE_DYNAMIC_CLASS(wxStyledTextCtrl) protected: @@ -237,16 +262,7 @@ 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 { +class WXDLLIMPEXP_STC wxStyledTextEvent : public wxCommandEvent { public: wxStyledTextEvent(wxEventType commandType=0, int id=0); #ifndef SWIG