Add several "Raw" functions for setting/getting text from the document
buffer. They behave similarly to the same methods without the "Raw" in the name, except they don't use wxStrings. This can save some conversions to/from unicode and utf-8 in a Unicode build. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2305,7 +2305,7 @@ public:
|
||||
bool GetUseVerticalScrollBar();
|
||||
|
||||
// Append a string to the end of the document without changing the selection.
|
||||
void AppendText(int length, const wxString& text);
|
||||
void AppendText(const wxString& text);
|
||||
|
||||
// Is drawing done in two phases with backgrounds drawn before foregrounds?
|
||||
bool GetTwoPhaseDraw();
|
||||
@@ -2908,6 +2908,46 @@ 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);
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user