X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/33e659d77a094c09076f4d8e679fce88803eb96b..404b319a85dadd7decf7a5a5331020520031a41c:/src/stc/stc.h.in diff --git a/src/stc/stc.h.in b/src/stc/stc.h.in index 659ae4dc56..1c980ab3cc 100644 --- a/src/stc/stc.h.in +++ b/src/stc/stc.h.in @@ -237,6 +237,9 @@ public: // Returns the current UseAntiAliasing setting. bool GetUseAntiAliasing(); + // Clear annotations from the given line. + void AnnotationClearLine(int line); + // The following methods are nearly equivalent to their similarly named @@ -285,7 +288,11 @@ public: // implement wxTextEntryBase pure virtual methods // ---------------------------------------------- - virtual void WriteText(const wxString& text) { AddText(text); } + virtual void WriteText(const wxString& text) + { + ReplaceSelection(text); + } + virtual void Remove(long from, long to) { Replace(from, to, ""); @@ -363,8 +370,18 @@ public: // implement wxTextAreaBase pure virtual methods // --------------------------------------------- - virtual int GetLineLength(long n) const { return GetLine(n).length(); } - virtual wxString GetLineText(long n) const { return GetLine(n); } + virtual int GetLineLength(long lineNo) const { return static_cast(GetLineText(lineNo).length()); } + virtual wxString GetLineText(long lineNo) const + { + wxString text = GetLine(static_cast(lineNo)); + size_t lastNewLine = text.find_last_not_of(wxS("\r\n")); + + if ( lastNewLine != wxString::npos ) + text.erase(lastNewLine + 1); // remove trailing cr+lf + else + text.clear(); + return text; + } virtual int GetNumberOfLines() const { return GetLineCount(); } virtual bool IsModified() const { return GetModify(); } @@ -445,6 +462,7 @@ public: static wxVersionInfo GetLibraryVersionInfo(); protected: + virtual void DoSetValue(const wxString& value, int flags); virtual wxString DoGetValue() const { return GetText(); } virtual wxWindow *GetEditableWindow() { return this; }