X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/65ec6247df6af7b6489257b1ac04ca2242dc14ec..e6056257ab676ea10a51ef96e19b1f1092f95b40:/src/stc/stc.h.in?ds=sidebyside diff --git a/src/stc/stc.h.in b/src/stc/stc.h.in index a742614327..13ca81ae90 100644 --- a/src/stc/stc.h.in +++ b/src/stc/stc.h.in @@ -22,6 +22,7 @@ #include +#include //---------------------------------------------------------------------- // BEGIN generated section. The following code is automatically generated @@ -57,6 +58,8 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const char* name = "styledtext"); + %%pragma(python) addtomethod = "__init__:self._setOORInfo(self)" + #else wxStyledTextCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, @@ -173,6 +176,7 @@ private: void NotifyChange(); void NotifyParent(SCNotification* scn); + private: DECLARE_EVENT_TABLE() DECLARE_CLASS(wxStyledTextCtrl) @@ -180,6 +184,7 @@ private: ScintillaWX* m_swx; wxStopWatch m_stopWatch; + bool m_lastKeyDownConsumed; friend class ScintillaWX; friend class Platform; @@ -193,23 +198,26 @@ public: wxStyledTextEvent(wxEventType commandType=0, int id=0); ~wxStyledTextEvent() {} - void SetPosition(int pos) { m_position = pos; } - void SetKey(int k) { m_key = k; } - void SetModifiers(int m) { m_modifiers = m; } - void SetModificationType(int t) { m_modificationType = t; } - void SetText(const char* t) { m_text = t; } - void SetLength(int len) { m_length = len; } - void SetLinesAdded(int num) { m_linesAdded = num; } - void SetLine(int val) { m_line = val; } - void SetFoldLevelNow(int val) { m_foldLevelNow = val; } - void SetFoldLevelPrev(int val) { m_foldLevelPrev = val; } - void SetMargin(int val) { m_margin = val; } - void SetMessage(int val) { m_message = val; } - void SetWParam(int val) { m_wParam = val; } - void SetLParam(int val) { m_lParam = val; } - void SetListType(int val) { m_listType = val; } - void SetX(int val) { m_x = val; } - void SetY(int val) { m_y = val; } + void SetPosition(int pos) { m_position = pos; } + void SetKey(int k) { m_key = k; } + void SetModifiers(int m) { m_modifiers = m; } + void SetModificationType(int t) { m_modificationType = t; } + void SetText(const char* t) { m_text = t; } + void SetLength(int len) { m_length = len; } + void SetLinesAdded(int num) { m_linesAdded = num; } + void SetLine(int val) { m_line = val; } + void SetFoldLevelNow(int val) { m_foldLevelNow = val; } + void SetFoldLevelPrev(int val) { m_foldLevelPrev = val; } + void SetMargin(int val) { m_margin = val; } + void SetMessage(int val) { m_message = val; } + void SetWParam(int val) { m_wParam = val; } + void SetLParam(int val) { m_lParam = val; } + void SetListType(int val) { m_listType = val; } + void SetX(int val) { m_x = val; } + void SetY(int val) { m_y = val; } + void SetDragText(const wxString& val) { m_dragText = val; } + void SetDragAllowMove(bool val) { m_dragAllowMove = val; } + void SetDragResult(wxDragResult val) { m_dragResult = val; } int GetPosition() const { return m_position; } int GetKey() const { return m_key; } @@ -228,6 +236,9 @@ public: int GetListType() const { return m_listType; } int GetX() const { return m_x; } int GetY() const { return m_y; } + wxString GetDragText() { return m_dragText; } + bool GetDragAllowMove() { return m_dragAllowMove; } + wxDragResult GetDragResult() { return m_dragResult; } bool GetShift() const; bool GetControl() const; @@ -260,6 +271,11 @@ private: int m_listType; int m_x; int m_y; + + wxString m_dragText; // wxEVT_STC_START_DRAG, wxEVT_STC_DO_DROP + bool m_dragAllowMove; // wxEVT_STC_START_DRAG + + wxDragResult m_dragResult; // wxEVT_STC_DRAG_OVER,wxEVT_STC_DO_DROP #endif }; @@ -284,6 +300,9 @@ BEGIN_DECLARE_EVENT_TYPES() DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_URIDROPPED, 1666) DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DWELLSTART, 1667) DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DWELLEND, 1668) + DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_START_DRAG, 1669) + DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DRAG_OVER, 1670) + DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DO_DROP, 1671) END_DECLARE_EVENT_TYPES() #else enum { @@ -306,6 +325,9 @@ END_DECLARE_EVENT_TYPES() wxEVT_STC_URIDROPPED, wxEVT_STC_DWELLSTART, wxEVT_STC_DWELLEND, + wxEVT_STC_START_DRAG, + wxEVT_STC_DRAG_OVER, + wxEVT_STC_DO_DROP, }; #endif @@ -333,7 +355,9 @@ typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&); #define EVT_STC_URIDROPPED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_URIDROPPED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), #define EVT_STC_DWELLSTART(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLSTART, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), #define EVT_STC_DWELLEND(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLEND, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), - +#define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), +#define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), +#define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), #endif