#include "wx/control.h"
#include "wx/dnd.h"
#include "wx/stopwatch.h"
+#include "wx/versioninfo.h"
#include "wx/textentry.h"
#if wxUSE_TEXTCTRL
return wxTextAreaBase::HitTest(pt, col, row);
}
+ static wxVersionInfo GetLibraryVersionInfo();
+
protected:
virtual wxString DoGetValue() const { return GetText(); }
virtual wxWindow *GetEditableWindow() { return this; }
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; }
#ifdef STC_USE_DND
+ void SetDragText(const wxString& val) { m_dragText = val; }
+ void SetDragFlags(int flags) { m_dragFlags = flags; }
void SetDragResult(wxDragResult val) { m_dragResult = val; }
+
+ // This method is kept mainly for backwards compatibility, use
+ // SetDragFlags() in the new code.
+ void SetDragAllowMove(bool allow)
+ {
+ if ( allow )
+ m_dragFlags |= wxDrag_AllowMove;
+ else
+ m_dragFlags &= ~(wxDrag_AllowMove | wxDrag_DefaultMove);
+ }
#endif
int GetPosition() const { return m_position; }
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; }
#ifdef STC_USE_DND
+ wxString GetDragText() { return m_dragText; }
+ int GetDragFlags() { return m_dragFlags; }
wxDragResult GetDragResult() { return m_dragResult; }
+
+ bool GetDragAllowMove() { return (GetDragFlags() & wxDrag_AllowMove) != 0; }
#endif
bool GetShift() const;
int m_x;
int m_y;
- wxString m_dragText; // wxEVT_STC_START_DRAG, wxEVT_STC_DO_DROP
- bool m_dragAllowMove; // wxEVT_STC_START_DRAG
-
#if wxUSE_DRAG_AND_DROP
- wxDragResult m_dragResult; // wxEVT_STC_DRAG_OVER,wxEVT_STC_DO_DROP
+ wxString m_dragText; // wxEVT_STC_START_DRAG, wxEVT_STC_DO_DROP
+ int m_dragFlags; // wxEVT_STC_START_DRAG
+ wxDragResult m_dragResult; // wxEVT_STC_DRAG_OVER,wxEVT_STC_DO_DROP
#endif
#endif
};