X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a0e9a5dfdeebc1d5e2d7e6e2146e63a26c8645a1..2724d84bbefd440b4e63997eb45ec9636bcd955d:/include/wx/stc/stc.h?ds=sidebyside diff --git a/include/wx/stc/stc.h b/include/wx/stc/stc.h index f4613a16fb..faa33fa65d 100644 --- a/include/wx/stc/stc.h +++ b/include/wx/stc/stc.h @@ -14,7 +14,7 @@ // Created: 13-Jan-2000 // RCS-ID: $Id$ // Copyright: (c) 2000 by Total Control Software -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /* @@ -38,6 +38,7 @@ #include "wx/control.h" #include "wx/dnd.h" #include "wx/stopwatch.h" +#include "wx/versioninfo.h" #include "wx/textentry.h" #if wxUSE_TEXTCTRL @@ -3055,19 +3056,19 @@ public: // Set the display mode of visual flags for wrapped lines. void SetWrapVisualFlags(int wrapVisualFlags); - // Retrive the display mode of visual flags for wrapped lines. + // Retrieve the display mode of visual flags for wrapped lines. int GetWrapVisualFlags() const; // Set the location of visual flags for wrapped lines. void SetWrapVisualFlagsLocation(int wrapVisualFlagsLocation); - // Retrive the location of visual flags for wrapped lines. + // Retrieve the location of visual flags for wrapped lines. int GetWrapVisualFlagsLocation() const; // Set the start indent for wrapped lines. void SetWrapStartIndent(int indent); - // Retrive the start indent for wrapped lines. + // Retrieve the start indent for wrapped lines. int GetWrapStartIndent() const; // Sets how wrapped sublines are placed. Default is fixed. @@ -3463,7 +3464,7 @@ public: // Delete forwards from the current position to the end of the line. void DelLineRight(); - // Get and Set the xOffset (ie, horizonal scroll position). + // Get and Set the xOffset (ie, horizontal scroll position). void SetXOffset(int newOffset); int GetXOffset() const; @@ -4041,7 +4042,7 @@ public: - // The following methods are nearly equivallent to their similarly named + // The following methods are nearly equivalent to their similarly named // cousins above. The difference is that these methods bypass wxString // and always use a char* even if used in a unicode build of wxWidgets. // In that case the character data will be utf-8 encoded since that is @@ -4240,6 +4241,8 @@ public: return wxTextAreaBase::HitTest(pt, col, row); } + static wxVersionInfo GetLibraryVersionInfo(); + protected: virtual wxString DoGetValue() const { return GetText(); } virtual wxWindow *GetEditableWindow() { return this; } @@ -4325,10 +4328,20 @@ public: 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; } @@ -4348,10 +4361,12 @@ 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; } #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; @@ -4386,11 +4401,10 @@ private: 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 };