+// 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);
+}
+
+// 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);
+}
+
+// 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);
+}