style | wxVSCROLL | wxHSCROLL | wxWANTS_CHARS | wxCLIP_CHILDREN,
wxDefaultValidator, name)
{
+ wxForceScintillaLexers();
m_swx = new ScintillaWX(this);
m_stopWatch.Start();
m_lastKeyDownConsumed = FALSE;
// Retrieve a buffer of cells.
wxString wxStyledTextCtrl::GetStyledText(int startPos, int endPos) {
wxString text;
+ if (endPos < startPos) {
+ int temp = startPos;
+ startPos = endPos;
+ endPos = temp;
+ }
int len = endPos - startPos;
if (!len) return "";
TextRange tr;
wxRect pageRect) {
RangeToFormat fr;
+ if (endPos < startPos) {
+ int temp = startPos;
+ startPos = endPos;
+ endPos = temp;
+ }
fr.hdc = draw;
fr.hdcTarget = target;
fr.rc.top = renderRect.GetTop();
// Retrieve a range of text.
wxString wxStyledTextCtrl::GetTextRange(int startPos, int endPos) {
wxString text;
+ if (endPos < startPos) {
+ int temp = startPos;
+ startPos = endPos;
+ endPos = temp;
+ }
int len = endPos - startPos;
if (!len) return "";
char* buff = text.GetWriteBuf(len);