+// Display the background of the line containing the caret in a different colour.
+void wxStyledTextCtrl::SetCaretLineVisible(bool show)
+{
+ SendMsg(2096, show, 0);
+}
+
+// Get the colour of the background of the line containing the caret.
+wxColour wxStyledTextCtrl::GetCaretLineBackground() const
+{
+ long c = SendMsg(2097, 0, 0);
+ return wxColourFromLong(c);
+}
+
+// Set the colour of the background of the line containing the caret.
+void wxStyledTextCtrl::SetCaretLineBackground(const wxColour& back)
+{
+ SendMsg(2098, wxColourAsLong(back), 0);
+}
+
+// Set a style to be changeable or not (read only).
+// Experimental feature, currently buggy.
+void wxStyledTextCtrl::StyleSetChangeable(int style, bool changeable)
+{
+ SendMsg(2099, style, changeable);
+}
+
+// Display a auto-completion list.
+// The lenEntered parameter indicates how many characters before
+// the caret should be used to provide context.
+void wxStyledTextCtrl::AutoCompShow(int lenEntered, const wxString& itemList)
+{
+ SendMsg(2100, lenEntered, (sptr_t)(const char*)wx2stc(itemList));
+}
+
+// Remove the auto-completion list from the screen.
+void wxStyledTextCtrl::AutoCompCancel()
+{
+ SendMsg(2101, 0, 0);
+}
+
+// Is there an auto-completion list visible?
+bool wxStyledTextCtrl::AutoCompActive()
+{
+ return SendMsg(2102, 0, 0) != 0;
+}
+
+// Retrieve the position of the caret when the auto-completion list was displayed.
+int wxStyledTextCtrl::AutoCompPosStart()
+{
+ return SendMsg(2103, 0, 0);
+}
+
+// User has selected an item so remove the list and insert the selection.
+void wxStyledTextCtrl::AutoCompComplete()
+{
+ SendMsg(2104, 0, 0);
+}
+
+// Define a set of character that when typed cancel the auto-completion list.
+void wxStyledTextCtrl::AutoCompStops(const wxString& characterSet)
+{
+ SendMsg(2105, 0, (sptr_t)(const char*)wx2stc(characterSet));
+}
+
+// Change the separator character in the string setting up an auto-completion list.
+// Default is space but can be changed if items contain space.
+void wxStyledTextCtrl::AutoCompSetSeparator(int separatorCharacter)
+{
+ SendMsg(2106, separatorCharacter, 0);
+}
+
+// Retrieve the auto-completion list separator character.
+int wxStyledTextCtrl::AutoCompGetSeparator() const
+{
+ return SendMsg(2107, 0, 0);
+}
+
+// Select the item in the auto-completion list that starts with a string.
+void wxStyledTextCtrl::AutoCompSelect(const wxString& text)
+{
+ SendMsg(2108, 0, (sptr_t)(const char*)wx2stc(text));
+}
+
+// Should the auto-completion list be cancelled if the user backspaces to a
+// position before where the box was created.
+void wxStyledTextCtrl::AutoCompSetCancelAtStart(bool cancel)
+{
+ SendMsg(2110, cancel, 0);
+}
+
+// Retrieve whether auto-completion cancelled by backspacing before start.
+bool wxStyledTextCtrl::AutoCompGetCancelAtStart() const
+{
+ return SendMsg(2111, 0, 0) != 0;
+}
+
+// Define a set of characters that when typed will cause the autocompletion to
+// choose the selected item.
+void wxStyledTextCtrl::AutoCompSetFillUps(const wxString& characterSet)
+{
+ SendMsg(2112, 0, (sptr_t)(const char*)wx2stc(characterSet));
+}
+
+// Should a single item auto-completion list automatically choose the item.
+void wxStyledTextCtrl::AutoCompSetChooseSingle(bool chooseSingle)
+{
+ SendMsg(2113, chooseSingle, 0);
+}
+
+// Retrieve whether a single item auto-completion list automatically choose the item.
+bool wxStyledTextCtrl::AutoCompGetChooseSingle() const
+{
+ return SendMsg(2114, 0, 0) != 0;
+}
+
+// Set whether case is significant when performing auto-completion searches.
+void wxStyledTextCtrl::AutoCompSetIgnoreCase(bool ignoreCase)
+{
+ SendMsg(2115, ignoreCase, 0);
+}
+
+// Retrieve state of ignore case flag.
+bool wxStyledTextCtrl::AutoCompGetIgnoreCase() const
+{
+ return SendMsg(2116, 0, 0) != 0;
+}
+
+// Display a list of strings and send notification when user chooses one.
+void wxStyledTextCtrl::UserListShow(int listType, const wxString& itemList)
+{
+ SendMsg(2117, listType, (sptr_t)(const char*)wx2stc(itemList));
+}
+
+// Set whether or not autocompletion is hidden automatically when nothing matches.
+void wxStyledTextCtrl::AutoCompSetAutoHide(bool autoHide)
+{
+ SendMsg(2118, autoHide, 0);
+}
+
+// Retrieve whether or not autocompletion is hidden automatically when nothing matches.
+bool wxStyledTextCtrl::AutoCompGetAutoHide() const
+{
+ return SendMsg(2119, 0, 0) != 0;
+}
+
+// Set whether or not autocompletion deletes any word characters
+// after the inserted text upon completion.
+void wxStyledTextCtrl::AutoCompSetDropRestOfWord(bool dropRestOfWord)
+{
+ SendMsg(2270, dropRestOfWord, 0);
+}
+
+// Retrieve whether or not autocompletion deletes any word characters
+// after the inserted text upon completion.
+bool wxStyledTextCtrl::AutoCompGetDropRestOfWord() const
+{
+ return SendMsg(2271, 0, 0) != 0;
+}
+
+// Register an image for use in autocompletion lists.
+void wxStyledTextCtrl::RegisterImage(int type, const wxBitmap& bmp) {
+ // convert bmp to a xpm in a string
+ wxMemoryOutputStream strm;
+ wxImage img = bmp.ConvertToImage();
+ if (img.HasAlpha())
+ img.ConvertAlphaToMask();
+ img.SaveFile(strm, wxBITMAP_TYPE_XPM);
+ size_t len = strm.GetSize();
+ char* buff = new char[len+1];
+ strm.CopyTo(buff, len);
+ buff[len] = 0;
+ SendMsg(2405, type, (sptr_t)buff);
+ delete [] buff;
+
+}
+
+// Clear all the registered images.
+void wxStyledTextCtrl::ClearRegisteredImages()
+{
+ SendMsg(2408, 0, 0);
+}
+
+// Retrieve the auto-completion list type-separator character.
+int wxStyledTextCtrl::AutoCompGetTypeSeparator() const
+{
+ return SendMsg(2285, 0, 0);
+}
+
+// Change the type-separator character in the string setting up an auto-completion list.
+// Default is '?' but can be changed if items contain '?'.
+void wxStyledTextCtrl::AutoCompSetTypeSeparator(int separatorCharacter)
+{
+ SendMsg(2286, separatorCharacter, 0);
+}
+
+// Set the maximum width, in characters, of auto-completion and user lists.
+// Set to 0 to autosize to fit longest item, which is the default.
+void wxStyledTextCtrl::AutoCompSetMaxWidth(int characterCount)
+{
+ SendMsg(2208, characterCount, 0);
+}
+
+// Get the maximum width, in characters, of auto-completion and user lists.
+int wxStyledTextCtrl::AutoCompGetMaxWidth() const
+{
+ return SendMsg(2209, 0, 0);
+}
+
+// Set the maximum height, in rows, of auto-completion and user lists.
+// The default is 5 rows.
+void wxStyledTextCtrl::AutoCompSetMaxHeight(int rowCount)
+{
+ SendMsg(2210, rowCount, 0);
+}
+
+// Set the maximum height, in rows, of auto-completion and user lists.
+int wxStyledTextCtrl::AutoCompGetMaxHeight() const
+{
+ return SendMsg(2211, 0, 0);
+}
+
+// Set the number of spaces used for one level of indentation.
+void wxStyledTextCtrl::SetIndent(int indentSize)
+{
+ SendMsg(2122, indentSize, 0);
+}
+
+// Retrieve indentation size.
+int wxStyledTextCtrl::GetIndent() const
+{
+ return SendMsg(2123, 0, 0);
+}
+
+// Indentation will only use space characters if useTabs is false, otherwise
+// it will use a combination of tabs and spaces.
+void wxStyledTextCtrl::SetUseTabs(bool useTabs)
+{
+ SendMsg(2124, useTabs, 0);
+}
+
+// Retrieve whether tabs will be used in indentation.
+bool wxStyledTextCtrl::GetUseTabs() const
+{
+ return SendMsg(2125, 0, 0) != 0;
+}
+
+// Change the indentation of a line to a number of columns.
+void wxStyledTextCtrl::SetLineIndentation(int line, int indentSize)
+{
+ SendMsg(2126, line, indentSize);
+}
+
+// Retrieve the number of columns that a line is indented.
+int wxStyledTextCtrl::GetLineIndentation(int line) const
+{
+ return SendMsg(2127, line, 0);
+}
+
+// Retrieve the position before the first non indentation character on a line.
+int wxStyledTextCtrl::GetLineIndentPosition(int line) const
+{
+ return SendMsg(2128, line, 0);
+}
+
+// Retrieve the column number of a position, taking tab width into account.
+int wxStyledTextCtrl::GetColumn(int pos) const
+{
+ return SendMsg(2129, pos, 0);
+}
+
+// Count characters between two positions.
+int wxStyledTextCtrl::CountCharacters(int startPos, int endPos)
+{
+ return SendMsg(2633, startPos, endPos);
+}
+
+// Show or hide the horizontal scroll bar.
+void wxStyledTextCtrl::SetUseHorizontalScrollBar(bool show)
+{
+ SendMsg(2130, show, 0);
+}
+
+// Is the horizontal scroll bar visible?
+bool wxStyledTextCtrl::GetUseHorizontalScrollBar() const
+{
+ return SendMsg(2131, 0, 0) != 0;
+}
+
+// Show or hide indentation guides.
+void wxStyledTextCtrl::SetIndentationGuides(int indentView)
+{
+ SendMsg(2132, indentView, 0);
+}
+
+// Are the indentation guides visible?
+int wxStyledTextCtrl::GetIndentationGuides() const
+{
+ return SendMsg(2133, 0, 0);
+}
+
+// Set the highlighted indentation guide column.
+// 0 = no highlighted guide.
+void wxStyledTextCtrl::SetHighlightGuide(int column)
+{
+ SendMsg(2134, column, 0);
+}
+
+// Get the highlighted indentation guide column.
+int wxStyledTextCtrl::GetHighlightGuide() const
+{
+ return SendMsg(2135, 0, 0);
+}
+
+// Get the position after the last visible characters on a line.
+int wxStyledTextCtrl::GetLineEndPosition(int line) const
+{
+ return SendMsg(2136, line, 0);
+}
+
+// Get the code page used to interpret the bytes of the document as characters.
+int wxStyledTextCtrl::GetCodePage() const
+{
+ return SendMsg(2137, 0, 0);
+}
+
+// Get the foreground colour of the caret.
+wxColour wxStyledTextCtrl::GetCaretForeground() const
+{
+ long c = SendMsg(2138, 0, 0);
+ return wxColourFromLong(c);
+}
+
+// In read-only mode?
+bool wxStyledTextCtrl::GetReadOnly() const
+{
+ return SendMsg(2140, 0, 0) != 0;
+}
+
+// Sets the position of the caret.
+void wxStyledTextCtrl::SetCurrentPos(int pos)
+{
+ SendMsg(2141, pos, 0);
+}
+
+// Sets the position that starts the selection - this becomes the anchor.
+void wxStyledTextCtrl::SetSelectionStart(int pos)
+{
+ SendMsg(2142, pos, 0);
+}
+
+// Returns the position at the start of the selection.
+int wxStyledTextCtrl::GetSelectionStart() const
+{
+ return SendMsg(2143, 0, 0);
+}
+
+// Sets the position that ends the selection - this becomes the currentPosition.
+void wxStyledTextCtrl::SetSelectionEnd(int pos)
+{
+ SendMsg(2144, pos, 0);
+}
+
+// Returns the position at the end of the selection.
+int wxStyledTextCtrl::GetSelectionEnd() const
+{
+ return SendMsg(2145, 0, 0);
+}
+
+// Set caret to a position, while removing any existing selection.
+void wxStyledTextCtrl::SetEmptySelection(int pos)
+{
+ SendMsg(2556, pos, 0);
+}
+
+// Sets the print magnification added to the point size of each style for printing.
+void wxStyledTextCtrl::SetPrintMagnification(int magnification)
+{
+ SendMsg(2146, magnification, 0);
+}
+
+// Returns the print magnification.
+int wxStyledTextCtrl::GetPrintMagnification() const
+{
+ return SendMsg(2147, 0, 0);
+}
+
+// Modify colours when printing for clearer printed text.
+void wxStyledTextCtrl::SetPrintColourMode(int mode)
+{
+ SendMsg(2148, mode, 0);
+}
+
+// Returns the print colour mode.
+int wxStyledTextCtrl::GetPrintColourMode() const
+{
+ return SendMsg(2149, 0, 0);
+}
+
+// Find some text in the document.
+int wxStyledTextCtrl::FindText(int minPos, int maxPos,
+ const wxString& text,
+ int flags) {
+ TextToFind ft;
+ ft.chrg.cpMin = minPos;
+ ft.chrg.cpMax = maxPos;
+ const wxWX2MBbuf buf = wx2stc(text);
+ ft.lpstrText = (char*)(const char*)buf;
+
+ return SendMsg(2150, flags, (sptr_t)&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,
+ 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, (sptr_t)&fr);
+}
+
+// Retrieve the display line at the top of the display.
+int wxStyledTextCtrl::GetFirstVisibleLine() const
+{
+ return SendMsg(2152, 0, 0);
+}
+
+// Retrieve the contents of a line.
+wxString wxStyledTextCtrl::GetLine(int line) const {
+ int len = LineLength(line);
+ if (!len) return wxEmptyString;
+
+ wxMemoryBuffer mbuf(len+1);
+ char* buf = (char*)mbuf.GetWriteBuf(len+1);
+ SendMsg(2153, line, (sptr_t)buf);
+ mbuf.UngetWriteBuf(len);
+ mbuf.AppendByte(0);
+ return stc2wx(buf);
+}
+
+// Returns the number of lines in the document. There is always at least one.
+int wxStyledTextCtrl::GetLineCount() const
+{
+ return SendMsg(2154, 0, 0);
+}
+
+// Sets the size in pixels of the left margin.
+void wxStyledTextCtrl::SetMarginLeft(int pixelWidth)
+{
+ SendMsg(2155, 0, pixelWidth);
+}
+
+// Returns the size in pixels of the left margin.
+int wxStyledTextCtrl::GetMarginLeft() const
+{
+ return SendMsg(2156, 0, 0);
+}
+
+// Sets the size in pixels of the right margin.
+void wxStyledTextCtrl::SetMarginRight(int pixelWidth)
+{
+ SendMsg(2157, 0, pixelWidth);
+}
+
+// Returns the size in pixels of the right margin.
+int wxStyledTextCtrl::GetMarginRight() const
+{
+ return SendMsg(2158, 0, 0);
+}
+
+// Is the document different from when it was last saved?
+bool wxStyledTextCtrl::GetModify() const
+{
+ return SendMsg(2159, 0, 0) != 0;
+}
+
+// Retrieve the selected text.
+wxString wxStyledTextCtrl::GetSelectedText() {
+ const int len = SendMsg(SCI_GETSELTEXT, 0, (sptr_t)0);
+ if (!len) return wxEmptyString;
+
+ wxMemoryBuffer mbuf(len+2);
+ char* buf = (char*)mbuf.GetWriteBuf(len+1);
+ SendMsg(2161, 0, (sptr_t)buf);
+ mbuf.UngetWriteBuf(len);
+ mbuf.AppendByte(0);
+ return stc2wx(buf);
+}
+
+// Retrieve a range of text.
+wxString wxStyledTextCtrl::GetTextRange(int startPos, int endPos) {
+ if (endPos < startPos) {
+ int temp = startPos;
+ startPos = endPos;
+ endPos = temp;
+ }
+ int len = endPos - startPos;
+ if (!len) return wxEmptyString;
+ wxMemoryBuffer mbuf(len+1);
+ char* buf = (char*)mbuf.GetWriteBuf(len);
+ TextRange tr;
+ tr.lpstrText = buf;
+ tr.chrg.cpMin = startPos;
+ tr.chrg.cpMax = endPos;
+ SendMsg(2162, 0, (sptr_t)&tr);
+ mbuf.UngetWriteBuf(len);
+ mbuf.AppendByte(0);
+ return stc2wx(buf);
+}
+
+// Draw the selection in normal style or with selection highlighted.
+void wxStyledTextCtrl::HideSelection(bool normal)
+{
+ SendMsg(2163, normal, 0);
+}
+
+// Retrieve the line containing a position.
+int wxStyledTextCtrl::LineFromPosition(int pos) const
+{
+ return SendMsg(2166, pos, 0);
+}
+
+// Retrieve the position at the start of a line.
+int wxStyledTextCtrl::PositionFromLine(int line) const
+{
+ return SendMsg(2167, line, 0);
+}
+
+// Scroll horizontally and vertically.
+void wxStyledTextCtrl::LineScroll(int columns, int lines)
+{
+ SendMsg(2168, columns, lines);
+}
+
+// Ensure the caret is visible.
+void wxStyledTextCtrl::EnsureCaretVisible()
+{
+ SendMsg(2169, 0, 0);
+}
+
+// Replace the selected text with the argument text.
+void wxStyledTextCtrl::ReplaceSelection(const wxString& text)
+{
+ SendMsg(2170, 0, (sptr_t)(const char*)wx2stc(text));
+}
+
+// Set to read only or read write.
+void wxStyledTextCtrl::SetReadOnly(bool readOnly)
+{
+ SendMsg(2171, readOnly, 0);
+}
+
+// Will a paste succeed?
+bool wxStyledTextCtrl::CanPaste() const
+{
+ return SendMsg(2173, 0, 0) != 0;
+}
+
+// Are there any undoable actions in the undo history?
+bool wxStyledTextCtrl::CanUndo() const
+{
+ return SendMsg(2174, 0, 0) != 0;
+}
+
+// Delete the undo history.
+void wxStyledTextCtrl::EmptyUndoBuffer()
+{
+ SendMsg(2175, 0, 0);
+}
+
+// Undo one action in the undo history.
+void wxStyledTextCtrl::Undo()
+{
+ SendMsg(2176, 0, 0);
+}
+
+// Cut the selection to the clipboard.
+void wxStyledTextCtrl::Cut()
+{
+ SendMsg(2177, 0, 0);
+}
+
+// Copy the selection to the clipboard.
+void wxStyledTextCtrl::Copy()
+{
+ SendMsg(2178, 0, 0);
+}
+
+// Paste the contents of the clipboard into the document replacing the selection.
+void wxStyledTextCtrl::Paste()
+{
+ SendMsg(2179, 0, 0);
+}
+
+// Clear the selection.
+void wxStyledTextCtrl::Clear()
+{
+ SendMsg(2180, 0, 0);
+}
+
+// Replace the contents of the document with the argument text.
+void wxStyledTextCtrl::SetText(const wxString& text)
+{
+ SendMsg(2181, 0, (sptr_t)(const char*)wx2stc(text));
+}
+
+// Retrieve all the text in the document.
+wxString wxStyledTextCtrl::GetText() const {
+ int len = GetTextLength();
+ wxMemoryBuffer mbuf(len+1); // leave room for the null...
+ char* buf = (char*)mbuf.GetWriteBuf(len+1);
+ SendMsg(2182, len+1, (sptr_t)buf);
+ mbuf.UngetWriteBuf(len);
+ mbuf.AppendByte(0);
+ return stc2wx(buf);
+}
+
+// Retrieve the number of characters in the document.
+int wxStyledTextCtrl::GetTextLength() const
+{
+ return SendMsg(2183, 0, 0);
+}
+
+// Set to overtype (true) or insert mode.
+void wxStyledTextCtrl::SetOvertype(bool overtype)
+{
+ SendMsg(2186, overtype, 0);
+}
+
+// Returns true if overtype mode is active otherwise false is returned.
+bool wxStyledTextCtrl::GetOvertype() const
+{
+ return SendMsg(2187, 0, 0) != 0;
+}
+
+// Set the width of the insert mode caret.
+void wxStyledTextCtrl::SetCaretWidth(int pixelWidth)
+{
+ SendMsg(2188, pixelWidth, 0);
+}
+
+// Returns the width of the insert mode caret.
+int wxStyledTextCtrl::GetCaretWidth() const
+{
+ return SendMsg(2189, 0, 0);
+}
+
+// Sets the position that starts the target which is used for updating the
+// document without affecting the scroll position.
+void wxStyledTextCtrl::SetTargetStart(int pos)
+{
+ SendMsg(2190, pos, 0);
+}
+
+// Get the position that starts the target.
+int wxStyledTextCtrl::GetTargetStart() const
+{
+ return SendMsg(2191, 0, 0);
+}
+
+// Sets the position that ends the target which is used for updating the
+// document without affecting the scroll position.
+void wxStyledTextCtrl::SetTargetEnd(int pos)
+{
+ SendMsg(2192, pos, 0);
+}
+
+// Get the position that ends the target.
+int wxStyledTextCtrl::GetTargetEnd() const
+{
+ return SendMsg(2193, 0, 0);
+}
+
+// Replace the target text with the argument text.
+// Text is counted so it can contain NULs.
+// Returns the length of the replacement text.
+
+ int wxStyledTextCtrl::ReplaceTarget(const wxString& text) {
+ const wxWX2MBbuf buf = wx2stc(text);
+ return SendMsg(2194, wx2stclen(text, buf), (sptr_t)(const char*)buf);
+}
+
+// Replace the target text with the argument text after \d processing.
+// Text is counted so it can contain NULs.
+// Looks for \d where d is between 1 and 9 and replaces these with the strings
+// matched in the last search operation which were surrounded by \( and \).
+// Returns the length of the replacement text including any change
+// caused by processing the \d patterns.
+
+ int wxStyledTextCtrl::ReplaceTargetRE(const wxString& text) {
+ const wxWX2MBbuf buf = wx2stc(text);
+ return SendMsg(2195, wx2stclen(text, buf), (sptr_t)(const char*)buf);
+}
+
+// Search for a counted string in the target and set the target to the found
+// range. Text is counted so it can contain NULs.
+// Returns length of range or -1 for failure in which case target is not moved.
+
+ int wxStyledTextCtrl::SearchInTarget(const wxString& text) {
+ const wxWX2MBbuf buf = wx2stc(text);
+ return SendMsg(2197, wx2stclen(text, buf), (sptr_t)(const char*)buf);
+}
+
+// Set the search flags used by SearchInTarget.
+void wxStyledTextCtrl::SetSearchFlags(int flags)
+{
+ SendMsg(2198, flags, 0);
+}
+
+// Get the search flags used by SearchInTarget.
+int wxStyledTextCtrl::GetSearchFlags() const
+{
+ return SendMsg(2199, 0, 0);
+}
+
+// Show a call tip containing a definition near position pos.
+void wxStyledTextCtrl::CallTipShow(int pos, const wxString& definition)
+{
+ SendMsg(2200, pos, (sptr_t)(const char*)wx2stc(definition));
+}
+
+// Remove the call tip from the screen.
+void wxStyledTextCtrl::CallTipCancel()
+{
+ SendMsg(2201, 0, 0);
+}
+
+// Is there an active call tip?
+bool wxStyledTextCtrl::CallTipActive()
+{
+ return SendMsg(2202, 0, 0) != 0;
+}
+
+// Retrieve the position where the caret was before displaying the call tip.
+int wxStyledTextCtrl::CallTipPosAtStart()
+{
+ return SendMsg(2203, 0, 0);
+}
+
+// Highlight a segment of the definition.
+void wxStyledTextCtrl::CallTipSetHighlight(int start, int end)
+{
+ SendMsg(2204, start, end);
+}
+
+// Set the background colour for the call tip.
+void wxStyledTextCtrl::CallTipSetBackground(const wxColour& back)
+{
+ SendMsg(2205, wxColourAsLong(back), 0);
+}
+
+// Set the foreground colour for the call tip.
+void wxStyledTextCtrl::CallTipSetForeground(const wxColour& fore)
+{
+ SendMsg(2206, wxColourAsLong(fore), 0);
+}
+
+// Set the foreground colour for the highlighted part of the call tip.
+void wxStyledTextCtrl::CallTipSetForegroundHighlight(const wxColour& fore)
+{
+ SendMsg(2207, wxColourAsLong(fore), 0);
+}
+
+// Enable use of STYLE_CALLTIP and set call tip tab size in pixels.
+void wxStyledTextCtrl::CallTipUseStyle(int tabSize)
+{
+ SendMsg(2212, tabSize, 0);
+}
+
+// Set position of calltip, above or below text.
+void wxStyledTextCtrl::CallTipSetPosition(bool above)
+{
+ SendMsg(2213, above, 0);
+}
+
+// Find the display line of a document line taking hidden lines into account.
+int wxStyledTextCtrl::VisibleFromDocLine(int line)
+{
+ return SendMsg(2220, line, 0);
+}
+
+// Find the document line of a display line taking hidden lines into account.
+int wxStyledTextCtrl::DocLineFromVisible(int lineDisplay)
+{
+ return SendMsg(2221, lineDisplay, 0);
+}
+
+// The number of display lines needed to wrap a document line
+int wxStyledTextCtrl::WrapCount(int line)
+{
+ return SendMsg(2235, line, 0);
+}
+
+// Set the fold level of a line.
+// This encodes an integer level along with flags indicating whether the
+// line is a header and whether it is effectively white space.
+void wxStyledTextCtrl::SetFoldLevel(int line, int level)
+{
+ SendMsg(2222, line, level);
+}
+
+// Retrieve the fold level of a line.
+int wxStyledTextCtrl::GetFoldLevel(int line) const
+{
+ return SendMsg(2223, line, 0);
+}
+
+// Find the last child line of a header line.
+int wxStyledTextCtrl::GetLastChild(int line, int level) const
+{
+ return SendMsg(2224, line, level);
+}
+
+// Find the parent line of a child line.
+int wxStyledTextCtrl::GetFoldParent(int line) const
+{
+ return SendMsg(2225, line, 0);
+}
+
+// Make a range of lines visible.
+void wxStyledTextCtrl::ShowLines(int lineStart, int lineEnd)
+{
+ SendMsg(2226, lineStart, lineEnd);
+}
+
+// Make a range of lines invisible.
+void wxStyledTextCtrl::HideLines(int lineStart, int lineEnd)
+{
+ SendMsg(2227, lineStart, lineEnd);
+}
+
+// Is a line visible?
+bool wxStyledTextCtrl::GetLineVisible(int line) const
+{
+ return SendMsg(2228, line, 0) != 0;
+}
+
+// Are all lines visible?
+bool wxStyledTextCtrl::GetAllLinesVisible() const
+{
+ return SendMsg(2236, 0, 0) != 0;
+}
+
+// Show the children of a header line.
+void wxStyledTextCtrl::SetFoldExpanded(int line, bool expanded)
+{
+ SendMsg(2229, line, expanded);
+}
+
+// Is a header line expanded?
+bool wxStyledTextCtrl::GetFoldExpanded(int line) const
+{
+ return SendMsg(2230, line, 0) != 0;
+}
+
+// Switch a header line between expanded and contracted.
+void wxStyledTextCtrl::ToggleFold(int line)
+{
+ SendMsg(2231, line, 0);
+}
+
+// Ensure a particular line is visible by expanding any header line hiding it.
+void wxStyledTextCtrl::EnsureVisible(int line)
+{
+ SendMsg(2232, line, 0);
+}
+
+// Set some style options for folding.
+void wxStyledTextCtrl::SetFoldFlags(int flags)
+{
+ SendMsg(2233, flags, 0);
+}
+
+// Ensure a particular line is visible by expanding any header line hiding it.
+// Use the currently set visibility policy to determine which range to display.
+void wxStyledTextCtrl::EnsureVisibleEnforcePolicy(int line)
+{
+ SendMsg(2234, line, 0);
+}
+
+// Sets whether a tab pressed when caret is within indentation indents.
+void wxStyledTextCtrl::SetTabIndents(bool tabIndents)
+{
+ SendMsg(2260, tabIndents, 0);
+}
+
+// Does a tab pressed when caret is within indentation indent?
+bool wxStyledTextCtrl::GetTabIndents() const
+{
+ return SendMsg(2261, 0, 0) != 0;
+}
+
+// Sets whether a backspace pressed when caret is within indentation unindents.
+void wxStyledTextCtrl::SetBackSpaceUnIndents(bool bsUnIndents)
+{
+ SendMsg(2262, bsUnIndents, 0);
+}
+
+// Does a backspace pressed when caret is within indentation unindent?
+bool wxStyledTextCtrl::GetBackSpaceUnIndents() const
+{
+ return SendMsg(2263, 0, 0) != 0;
+}
+
+// Sets the time the mouse must sit still to generate a mouse dwell event.
+void wxStyledTextCtrl::SetMouseDwellTime(int periodMilliseconds)
+{
+ SendMsg(2264, periodMilliseconds, 0);
+}
+
+// Retrieve the time the mouse must sit still to generate a mouse dwell event.
+int wxStyledTextCtrl::GetMouseDwellTime() const
+{
+ return SendMsg(2265, 0, 0);
+}
+
+// Get position of start of word.
+int wxStyledTextCtrl::WordStartPosition(int pos, bool onlyWordCharacters)
+{
+ return SendMsg(2266, pos, onlyWordCharacters);
+}
+
+// Get position of end of word.
+int wxStyledTextCtrl::WordEndPosition(int pos, bool onlyWordCharacters)
+{
+ return SendMsg(2267, pos, onlyWordCharacters);
+}
+
+// Sets whether text is word wrapped.
+void wxStyledTextCtrl::SetWrapMode(int mode)
+{
+ SendMsg(2268, mode, 0);
+}
+
+// Retrieve whether text is word wrapped.
+int wxStyledTextCtrl::GetWrapMode() const
+{
+ return SendMsg(2269, 0, 0);
+}
+
+// Set the display mode of visual flags for wrapped lines.
+void wxStyledTextCtrl::SetWrapVisualFlags(int wrapVisualFlags)
+{
+ SendMsg(2460, wrapVisualFlags, 0);
+}
+
+// Retrive the display mode of visual flags for wrapped lines.
+int wxStyledTextCtrl::GetWrapVisualFlags() const
+{
+ return SendMsg(2461, 0, 0);
+}
+
+// Set the location of visual flags for wrapped lines.
+void wxStyledTextCtrl::SetWrapVisualFlagsLocation(int wrapVisualFlagsLocation)
+{
+ SendMsg(2462, wrapVisualFlagsLocation, 0);
+}
+
+// Retrive the location of visual flags for wrapped lines.
+int wxStyledTextCtrl::GetWrapVisualFlagsLocation() const
+{
+ return SendMsg(2463, 0, 0);
+}
+
+// Set the start indent for wrapped lines.
+void wxStyledTextCtrl::SetWrapStartIndent(int indent)
+{
+ SendMsg(2464, indent, 0);
+}
+
+// Retrive the start indent for wrapped lines.
+int wxStyledTextCtrl::GetWrapStartIndent() const
+{
+ return SendMsg(2465, 0, 0);
+}
+
+// Sets how wrapped sublines are placed. Default is fixed.
+void wxStyledTextCtrl::SetWrapIndentMode(int mode)
+{
+ SendMsg(2472, mode, 0);
+}
+
+// Retrieve how wrapped sublines are placed. Default is fixed.
+int wxStyledTextCtrl::GetWrapIndentMode() const
+{
+ return SendMsg(2473, 0, 0);
+}
+
+// Sets the degree of caching of layout information.
+void wxStyledTextCtrl::SetLayoutCache(int mode)
+{
+ SendMsg(2272, mode, 0);
+}
+
+// Retrieve the degree of caching of layout information.
+int wxStyledTextCtrl::GetLayoutCache() const
+{
+ return SendMsg(2273, 0, 0);
+}
+
+// Sets the document width assumed for scrolling.
+void wxStyledTextCtrl::SetScrollWidth(int pixelWidth)
+{
+ SendMsg(2274, pixelWidth, 0);
+}
+
+// Retrieve the document width assumed for scrolling.
+int wxStyledTextCtrl::GetScrollWidth() const
+{
+ return SendMsg(2275, 0, 0);
+}
+
+// Sets whether the maximum width line displayed is used to set scroll width.
+void wxStyledTextCtrl::SetScrollWidthTracking(bool tracking)
+{
+ SendMsg(2516, tracking, 0);
+}
+
+// Retrieve whether the scroll width tracks wide lines.
+bool wxStyledTextCtrl::GetScrollWidthTracking() const
+{
+ return SendMsg(2517, 0, 0) != 0;
+}
+
+// Measure the pixel width of some text in a particular style.
+// NUL terminated text argument.
+// Does not handle tab or control characters.
+int wxStyledTextCtrl::TextWidth(int style, const wxString& text)
+{
+ return SendMsg(2276, style, (sptr_t)(const char*)wx2stc(text));
+}
+
+// Sets the scroll range so that maximum scroll position has
+// the last line at the bottom of the view (default).
+// Setting this to false allows scrolling one page below the last line.
+void wxStyledTextCtrl::SetEndAtLastLine(bool endAtLastLine)
+{
+ SendMsg(2277, endAtLastLine, 0);
+}
+
+// Retrieve whether the maximum scroll position has the last
+// line at the bottom of the view.
+bool wxStyledTextCtrl::GetEndAtLastLine() const
+{
+ return SendMsg(2278, 0, 0) != 0;
+}
+
+// Retrieve the height of a particular line of text in pixels.
+int wxStyledTextCtrl::TextHeight(int line)
+{
+ return SendMsg(2279, line, 0);
+}
+
+// Show or hide the vertical scroll bar.
+void wxStyledTextCtrl::SetUseVerticalScrollBar(bool show)
+{
+ SendMsg(2280, show, 0);
+}
+
+// Is the vertical scroll bar visible?
+bool wxStyledTextCtrl::GetUseVerticalScrollBar() const
+{
+ return SendMsg(2281, 0, 0) != 0;
+}
+
+// Append a string to the end of the document without changing the selection.
+void wxStyledTextCtrl::AppendText(const wxString& text) {
+ const wxWX2MBbuf buf = wx2stc(text);
+ SendMsg(2282, wx2stclen(text, buf), (sptr_t)(const char*)buf);
+}
+
+// Is drawing done in two phases with backgrounds drawn before foregrounds?
+bool wxStyledTextCtrl::GetTwoPhaseDraw() const
+{
+ return SendMsg(2283, 0, 0) != 0;
+}
+
+// In twoPhaseDraw mode, drawing is performed in two phases, first the background
+// and then the foreground. This avoids chopping off characters that overlap the next run.
+void wxStyledTextCtrl::SetTwoPhaseDraw(bool twoPhase)
+{
+ SendMsg(2284, twoPhase, 0);
+}
+
+// Scroll so that a display line is at the top of the display.
+void wxStyledTextCtrl::SetFirstVisibleLine(int lineDisplay)
+{
+ SendMsg(2613, lineDisplay, 0);
+}
+
+// Change the effect of pasting when there are multiple selections.
+void wxStyledTextCtrl::SetMultiPaste(int multiPaste)
+{
+ SendMsg(2614, multiPaste, 0);
+}
+
+// Retrieve the effect of pasting when there are multiple selections..
+int wxStyledTextCtrl::GetMultiPaste() const
+{
+ return SendMsg(2615, 0, 0);
+}
+
+// Retrieve the value of a tag from a regular expression search.
+wxString wxStyledTextCtrl::GetTag(int tagNumber) const {
+ int msg = 2616;
+ int len = SendMsg(msg, tagNumber, (sptr_t)NULL);
+ if (!len) return wxEmptyString;
+
+ wxMemoryBuffer mbuf(len+1);
+ char* buf = (char*)mbuf.GetWriteBuf(len+1);
+ SendMsg(msg, tagNumber, (sptr_t)buf);
+ mbuf.UngetWriteBuf(len);
+ mbuf.AppendByte(0);
+ return stc2wx(buf);
+}
+
+// Make the target range start and end be the same as the selection range start and end.
+void wxStyledTextCtrl::TargetFromSelection()
+{
+ SendMsg(2287, 0, 0);
+}
+
+// Join the lines in the target.
+void wxStyledTextCtrl::LinesJoin()
+{
+ SendMsg(2288, 0, 0);
+}
+
+// Split the lines in the target into lines that are less wide than pixelWidth
+// where possible.
+void wxStyledTextCtrl::LinesSplit(int pixelWidth)
+{
+ SendMsg(2289, pixelWidth, 0);
+}
+
+// Set the colours used as a chequerboard pattern in the fold margin
+void wxStyledTextCtrl::SetFoldMarginColour(bool useSetting, const wxColour& back)
+{
+ SendMsg(2290, useSetting, wxColourAsLong(back));
+}
+void wxStyledTextCtrl::SetFoldMarginHiColour(bool useSetting, const wxColour& fore)
+{
+ SendMsg(2291, useSetting, wxColourAsLong(fore));
+}
+
+// Move caret down one line.
+void wxStyledTextCtrl::LineDown()
+{
+ SendMsg(2300, 0, 0);
+}
+
+// Move caret down one line extending selection to new caret position.
+void wxStyledTextCtrl::LineDownExtend()
+{
+ SendMsg(2301, 0, 0);
+}
+
+// Move caret up one line.
+void wxStyledTextCtrl::LineUp()
+{
+ SendMsg(2302, 0, 0);
+}
+
+// Move caret up one line extending selection to new caret position.
+void wxStyledTextCtrl::LineUpExtend()
+{
+ SendMsg(2303, 0, 0);
+}
+
+// Move caret left one character.
+void wxStyledTextCtrl::CharLeft()
+{
+ SendMsg(2304, 0, 0);
+}
+
+// Move caret left one character extending selection to new caret position.
+void wxStyledTextCtrl::CharLeftExtend()
+{
+ SendMsg(2305, 0, 0);
+}
+
+// Move caret right one character.
+void wxStyledTextCtrl::CharRight()
+{
+ SendMsg(2306, 0, 0);
+}
+
+// Move caret right one character extending selection to new caret position.
+void wxStyledTextCtrl::CharRightExtend()
+{
+ SendMsg(2307, 0, 0);
+}
+
+// Move caret left one word.
+void wxStyledTextCtrl::WordLeft()
+{
+ SendMsg(2308, 0, 0);
+}
+
+// Move caret left one word extending selection to new caret position.
+void wxStyledTextCtrl::WordLeftExtend()
+{
+ SendMsg(2309, 0, 0);
+}
+
+// Move caret right one word.
+void wxStyledTextCtrl::WordRight()
+{
+ SendMsg(2310, 0, 0);
+}
+
+// Move caret right one word extending selection to new caret position.
+void wxStyledTextCtrl::WordRightExtend()
+{
+ SendMsg(2311, 0, 0);
+}
+
+// Move caret to first position on line.
+void wxStyledTextCtrl::Home()
+{
+ SendMsg(2312, 0, 0);
+}
+
+// Move caret to first position on line extending selection to new caret position.
+void wxStyledTextCtrl::HomeExtend()
+{
+ SendMsg(2313, 0, 0);
+}
+
+// Move caret to last position on line.
+void wxStyledTextCtrl::LineEnd()
+{
+ SendMsg(2314, 0, 0);
+}
+
+// Move caret to last position on line extending selection to new caret position.
+void wxStyledTextCtrl::LineEndExtend()
+{
+ SendMsg(2315, 0, 0);