Updated Scintilla to add GetTargetTextRaw (closes #17426).
This commit is contained in:
@@ -5020,6 +5020,9 @@ public:
|
|||||||
// Retrieve the selected text.
|
// Retrieve the selected text.
|
||||||
wxCharBuffer GetSelectedTextRaw();
|
wxCharBuffer GetSelectedTextRaw();
|
||||||
|
|
||||||
|
// Retrieve the target text.
|
||||||
|
wxCharBuffer GetTargetTextRaw();
|
||||||
|
|
||||||
// Retrieve a range of text.
|
// Retrieve a range of text.
|
||||||
wxCharBuffer GetTextRangeRaw(int startPos, int endPos);
|
wxCharBuffer GetTextRangeRaw(int startPos, int endPos);
|
||||||
|
|
||||||
|
@@ -6357,6 +6357,11 @@ public:
|
|||||||
*/
|
*/
|
||||||
wxCharBuffer GetSelectedTextRaw();
|
wxCharBuffer GetSelectedTextRaw();
|
||||||
|
|
||||||
|
/**
|
||||||
|
Retrieve the target text.
|
||||||
|
*/
|
||||||
|
wxCharBuffer GetTargetTextRaw();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Retrieve a range of text.
|
Retrieve a range of text.
|
||||||
*/
|
*/
|
||||||
|
@@ -5009,6 +5009,17 @@ wxCharBuffer wxStyledTextCtrl::GetSelectedTextRaw()
|
|||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxCharBuffer wxStyledTextCtrl::GetTargetTextRaw()
|
||||||
|
{
|
||||||
|
// Calculate the length needed first.
|
||||||
|
const int len = SendMsg(SCI_GETTARGETEND, 0, 0) - SendMsg(SCI_GETTARGETSTART, 0, 0);
|
||||||
|
|
||||||
|
// And then really get the data.
|
||||||
|
wxCharBuffer buf(len);
|
||||||
|
SendMsg(SCI_GETTARGETTEXT, 0, (sptr_t)buf.data());
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
|
||||||
wxCharBuffer wxStyledTextCtrl::GetTextRangeRaw(int startPos, int endPos)
|
wxCharBuffer wxStyledTextCtrl::GetTextRangeRaw(int startPos, int endPos)
|
||||||
{
|
{
|
||||||
if (endPos < startPos) {
|
if (endPos < startPos) {
|
||||||
|
@@ -715,6 +715,17 @@ wxCharBuffer wxStyledTextCtrl::GetSelectedTextRaw()
|
|||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxCharBuffer wxStyledTextCtrl::GetTargetTextRaw()
|
||||||
|
{
|
||||||
|
// Calculate the length needed first.
|
||||||
|
const int len = SendMsg(SCI_GETTARGETEND, 0, 0) - SendMsg(SCI_GETTARGETSTART, 0, 0);
|
||||||
|
|
||||||
|
// And then really get the data.
|
||||||
|
wxCharBuffer buf(len);
|
||||||
|
SendMsg(SCI_GETTARGETTEXT, 0, (sptr_t)buf.data());
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
|
||||||
wxCharBuffer wxStyledTextCtrl::GetTextRangeRaw(int startPos, int endPos)
|
wxCharBuffer wxStyledTextCtrl::GetTextRangeRaw(int startPos, int endPos)
|
||||||
{
|
{
|
||||||
if (endPos < startPos) {
|
if (endPos < startPos) {
|
||||||
|
@@ -273,6 +273,9 @@ public:
|
|||||||
// Retrieve the selected text.
|
// Retrieve the selected text.
|
||||||
wxCharBuffer GetSelectedTextRaw();
|
wxCharBuffer GetSelectedTextRaw();
|
||||||
|
|
||||||
|
// Retrieve the target text.
|
||||||
|
wxCharBuffer GetTargetTextRaw();
|
||||||
|
|
||||||
// Retrieve a range of text.
|
// Retrieve a range of text.
|
||||||
wxCharBuffer GetTextRangeRaw(int startPos, int endPos);
|
wxCharBuffer GetTextRangeRaw(int startPos, int endPos);
|
||||||
|
|
||||||
|
@@ -342,6 +342,11 @@ public:
|
|||||||
*/
|
*/
|
||||||
wxCharBuffer GetSelectedTextRaw();
|
wxCharBuffer GetSelectedTextRaw();
|
||||||
|
|
||||||
|
/**
|
||||||
|
Retrieve the target text.
|
||||||
|
*/
|
||||||
|
wxCharBuffer GetTargetTextRaw();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Retrieve a range of text.
|
Retrieve a range of text.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user