+// Find some text in the document.
+int wxStyledTextCtrl::FindText(int minPos, int maxPos,
+ const wxString& text,
+ bool caseSensitive, bool wholeWord) {
+ TextToFind ft;
+ int flags = 0;
+
+ flags |= caseSensitive ? SCFIND_MATCHCASE : 0;
+ flags |= wholeWord ? SCFIND_WHOLEWORD : 0;
+ ft.chrg.cpMin = minPos;
+ ft.chrg.cpMax = maxPos;
+ ft.lpstrText = (char*)text.c_str();
+
+ return SendMsg(2150, flags, (long)&ft);
+}
+
+// On Windows will draw the document into a display context such as a printer.
+ int wxStyledTextCtrl::FormatRange(bool doDraw,
+ int startPos,
+ int endPos,
+ wxDC* draw,
+ wxDC* target, // Why does it use two? Can they be the same?
+ wxRect renderRect,
+ 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();
+ fr.rc.left = renderRect.GetLeft();
+ fr.rc.right = renderRect.GetRight();
+ fr.rc.bottom = renderRect.GetBottom();
+ fr.rcPage.top = pageRect.GetTop();
+ fr.rcPage.left = pageRect.GetLeft();
+ fr.rcPage.right = pageRect.GetRight();
+ fr.rcPage.bottom = pageRect.GetBottom();
+ fr.chrg.cpMin = startPos;
+ fr.chrg.cpMax = endPos;
+
+ return SendMsg(2151, doDraw, (long)&fr);
+}
+
+// Retrieve the line at the top of the display.
+int wxStyledTextCtrl::GetFirstVisibleLine() {
+ return SendMsg(2152, 0, 0);