X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ccfc3219dbe96561abd2975ffe3eba2c7f31ef2c..209f3e1453dd576919bf1cc8f696218dae23c34b:/contrib/src/stc/stc.h.in diff --git a/contrib/src/stc/stc.h.in b/contrib/src/stc/stc.h.in index fe3f32e90f..323e0f3c3f 100644 --- a/contrib/src/stc/stc.h.in +++ b/contrib/src/stc/stc.h.in @@ -90,7 +90,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPySTCNameStr); - %%name(PreStyledTextCtrl) wxStyledTextCtrl(); + %%RenameCtor(PreStyledTextCtrl, wxStyledTextCtrl()); #else wxStyledTextCtrl(wxWindow *parent, wxWindowID id=wxID_ANY, @@ -102,10 +102,10 @@ public: #endif - void Create(wxWindow *parent, wxWindowID id=wxID_ANY, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxSTCNameStr); + bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxString& name = wxSTCNameStr); //---------------------------------------------------------------------- @@ -219,6 +219,48 @@ public: bool GetUseAntiAliasing(); + + // The following methods are nearly equivallent 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 + // what is used internally by Scintilla in unicode builds. + + // Add text to the document at current position. + void AddTextRaw(const char* text); + + // Insert string at a position. + void InsertTextRaw(int pos, const char* text); + + // Retrieve the text of the line containing the caret. + // Returns the index of the caret on the line. +#ifdef SWIG + wxCharBuffer GetCurLineRaw(int* OUTPUT); +#else + wxCharBuffer GetCurLineRaw(int* linePos=NULL); +#endif + + // Retrieve the contents of a line. + wxCharBuffer GetLineRaw(int line); + + // Retrieve the selected text. + wxCharBuffer GetSelectedTextRaw(); + + // Retrieve a range of text. + wxCharBuffer GetTextRangeRaw(int startPos, int endPos); + + // Replace the contents of the document with the argument text. + void SetTextRaw(const char* text); + + // Retrieve all the text in the document. + wxCharBuffer GetTextRaw(); + + // Append a string to the end of the document without changing the selection. + void AppendTextRaw(const char* text); + +#ifdef SWIG + %%pythoncode "_stc_utf8_methods.py" +#endif //----------------------------------------------------------------------