From 2278bb0dfa4aaa252930b7fd5e609f379f1113a6 Mon Sep 17 00:00:00 2001 From: New Pagodi Date: Tue, 28 Feb 2017 22:49:43 +0100 Subject: [PATCH] Update wxSTC documentation stuff 1. All stuff to generate documentation is moved from 'gen_iface.py' to a separate module 'gen_docs.py'. It contains several new structures to support maintenance of the documentation: categoriesList - A list of the categories and an optional description. docsMap - A dictionary that assigns each method to one of the categories. docOverrides - A dictionary that can be used to replace the docstring from the iface file. docSubstitutions - A dictionary that can be used to replace a few words from the docstring in the iface file. extendedDocs - A dictionary that can be used to add extended documentation. sinceAnnotations - A dictionary that can be used to add '@since' annotations. 2. Documentation is reformatted and updated: - Added a table of contents. - Broke the methods into sections. - Added docs for previously undocumented methods. - Altered docs that were unhelpful or misleading. - Added '@since 3.1.0' notes and '@since 3.1.1' notes. - Altered docs which contained references to Scintilla macros or other problematic text. Closes #17680. --- include/wx/stc/stc.h | 70 +- interface/wx/stc/stc.h | 4660 ++++++++++++++++++++-------------- src/stc/gen_docs.py | 1401 ++++++++++ src/stc/gen_iface.py | 610 ++--- src/stc/scintilla/README.txt | 6 +- src/stc/stc.cpp | 70 +- src/stc/stc.interface.h.in | 6 +- 7 files changed, 4493 insertions(+), 2330 deletions(-) create mode 100644 src/stc/gen_docs.py diff --git a/include/wx/stc/stc.h b/include/wx/stc/stc.h index f5c97c5ef4..1b734629bd 100644 --- a/include/wx/stc/stc.h +++ b/include/wx/stc/stc.h @@ -2870,7 +2870,7 @@ public: // Insert string at a position. void InsertText(int pos, const wxString& text); - // Change the text that is being inserted in response to SC_MOD_INSERTCHECK + // Change the text that is being inserted in response to wxSTC_MOD_INSERTCHECK void ChangeInsertion(int length, const wxString& text); // Delete all text in the document. @@ -2927,14 +2927,14 @@ public: bool GetUndoCollection() const; // Are white space characters currently visible? - // Returns one of SCWS_* constants. + // Returns one of wxSTC_WS_* constants. int GetViewWhiteSpace() const; // Make white space characters invisible, always visible or visible outside indentation. void SetViewWhiteSpace(int viewWS); // Retrieve the current tab draw mode. - // Returns one of SCTD_* constants. + // Returns one of wxSTC_TD_* constants. int GetTabDrawMode() const; // Set how tabs are drawn when visible. @@ -2944,7 +2944,7 @@ public: int PositionFromPoint(wxPoint pt) const; // Find the position from a point within the window but return - // INVALID_POSITION if not close to text. + // wxSTC_INVALID_POSITION if not close to text. int PositionFromPointClose(int x, int y); // Set caret to start of a line and ensure it is visible. @@ -2958,8 +2958,6 @@ public: void SetAnchor(int anchor); // Retrieve the text of the line containing the caret. - // Returns the index of the caret on the line. - // Result is NUL-terminated. #ifdef SWIG wxString GetCurLine(int* OUTPUT); #else @@ -2972,7 +2970,7 @@ public: // Convert all line endings in the document to one mode. void ConvertEOLs(int eolMode); - // Retrieve the current end of line mode - one of CRLF, CR, or LF. + // Retrieve the current end of line mode - one of wxSTC_EOL_CRLF, wxSTC_EOL_CR, or wxSTC_EOL_LF. int GetEOLMode() const; // Set the current end of line mode. @@ -3093,7 +3091,7 @@ public: // Retrieve the cursor shown in a margin. int GetMarginCursor(int margin) const; - // Set the background colour of a margin. Only visible for SC_MARGIN_COLOUR. + // Set the background colour of a margin. Only visible for wxSTC_MARGIN_COLOUR. void SetMarginBackground(int margin, const wxColour& back); // Retrieve the background colour of a margin @@ -3191,7 +3189,6 @@ public: int StyleGetWeight(int style) const; // Set the character set of the font in a style. - // Converts the Scintilla character set values to a wxFontEncoding. void StyleSetCharacterSet(int style, int characterSet); // Set a style to be a hotspot or not. @@ -3677,7 +3674,7 @@ public: // 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 \). + // 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 ReplaceTargetRE(const wxString& text); @@ -3720,7 +3717,7 @@ public: // Set the foreground colour for the highlighted part of the call tip. void CallTipSetForegroundHighlight(const wxColour& fore); - // Enable use of STYLE_CALLTIP and set call tip tab size in pixels. + // Enable use of wxSTC_STYLE_CALLTIP and set call tip tab size in pixels. void CallTipUseStyle(int tabSize); // Set position of calltip, above or below text. @@ -3861,10 +3858,10 @@ public: // Retrive the start indent for wrapped lines. int GetWrapStartIndent() const; - // Sets how wrapped sublines are placed. Default is fixed. + // Sets how wrapped sublines are placed. Default is wxSTC_WRAPINDENT_FIXED. void SetWrapIndentMode(int wrapIndentMode); - // Retrieve how wrapped sublines are placed. Default is fixed. + // Retrieve how wrapped sublines are placed. Default is wxSTC_WRAPINDENT_FIXED. int GetWrapIndentMode() const; // Sets the degree of caching of layout information. @@ -3886,7 +3883,6 @@ public: bool GetScrollWidthTracking() const; // Measure the pixel width of some text in a particular style. - // NUL terminated text argument. // Does not handle tab or control characters. int TextWidth(int style, const wxString& text); @@ -3937,7 +3933,6 @@ public: int GetMultiPaste() const; // Retrieve the value of a tag from a regular expression search. - // Result is NUL-terminated. wxString GetTag(int tagNumber) const; // Join the lines in the target. @@ -4156,7 +4151,7 @@ public: // Use specified indicator to highlight non matching brace instead of changing its style. void BraceBadLightIndicator(bool useSetting, int indicator); - // Find the position of a matching brace or INVALID_POSITION if no match. + // Find the position of a matching brace or wxSTC_INVALID_POSITION if no match. // The maxReStyle must be 0 for now. It may be defined in a future release. int BraceMatch(int pos, int maxReStyle=0); @@ -4185,8 +4180,8 @@ public: // Retrieve the edge highlight mode. int GetEdgeMode() const; - // The edge may be displayed by a line (EDGE_LINE/EDGE_MULTILINE) or by highlighting text that - // goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). + // The edge may be displayed by a line (wxSTC_EDGE_LINE/wxSTC_EDGE_MULTILINE) or by highlighting text that + // goes beyond it (wxSTC_EDGE_BACKGROUND) or not displayed at all (wxSTC_EDGE_NONE). void SetEdgeMode(int edgeMode); // Retrieve the colour used in edge indication. @@ -4266,7 +4261,7 @@ public: // Get whether mouse wheel can be active outside the window. bool GetMouseWheelCaptures() const; - // Sets the cursor to one of the SC_CURSOR* values. + // Sets the cursor to one of the wxSTC_CURSOR* values. void SetSTCCursor(int cursorType); // Get cursor type. @@ -4303,8 +4298,10 @@ public: // Delete forwards from the current position to the end of the line. void DelLineRight(); - // Get and Set the xOffset (ie, horizontal scroll position). + // Set the xOffset (ie, horizontal scroll position). void SetXOffset(int xOffset); + + // Get the xOffset (ie, horizontal scroll position). int GetXOffset() const; // Set the last x chosen value to be the caret x position. @@ -4318,7 +4315,7 @@ public: // The exclusion zone is given in lines. void SetYCaretPolicy(int caretPolicy, int caretSlop); - // Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE). + // Set printing to line wrapped (wxSTC_WRAP_WORD) or not line wrapped (wxSTC_WRAP_NONE). void SetPrintWrapMode(int wrapMode); // Is printing line wrapped? @@ -4378,17 +4375,17 @@ public: // Copy argument text to the clipboard. void CopyText(int length, const wxString& text); - // Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or - // by lines (SC_SEL_LINES). + // Set the selection mode to stream (wxSTC_SEL_STREAM) or rectangular (wxSTC_SEL_RECTANGLE/wxSTC_SEL_THIN) or + // by lines (wxSTC_SEL_LINES). void SetSelectionMode(int selectionMode); // Get the mode of the current selection. int GetSelectionMode() const; - // Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line). + // Retrieve the position of the start of the selection at the given line (wxSTC_INVALID_POSITION if no selection on this line). int GetLineSelStartPosition(int line); - // Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line). + // Retrieve the position of the end of the selection at the given line (wxSTC_INVALID_POSITION if no selection on this line). int GetLineSelEndPosition(int line); // Move caret down one line, extending rectangular selection to new caret position. @@ -4680,7 +4677,7 @@ public: int CharPositionFromPoint(int x, int y); // Find the position of a character from a point within the window. - // Return INVALID_POSITION if not close to text. + // Return wxSTC_INVALID_POSITION if not close to text. int CharPositionFromPointClose(int x, int y); // Set whether switching to rectangular mode while selecting with the mouse is allowed. @@ -4803,7 +4800,7 @@ public: // On GTK+, allow selecting the modifier key to use for mouse-based // rectangular selection. Often the window manager requires Alt+Mouse Drag // for moving windows. - // Valid values are SCMOD_CTRL(default), SCMOD_ALT, or SCMOD_SUPER. + // Valid values are wxSTC_KEYMOD_CTRL (default), wxSTC_KEYMOD_ALT, or wxSTC_KEYMOD_SUPER. void SetRectangularSelectionModifier(int modifier); // Get the modifier key used for rectangular selection. @@ -4924,7 +4921,6 @@ public: void SetRepresentation(const wxString& encodedCharacter, const wxString& representation); // Set the way a character is drawn. - // Result is NUL-terminated. wxString GetRepresentation(const wxString& encodedCharacter) const; // Remove a character representation. @@ -4957,15 +4953,15 @@ public: // Load a lexer library (dll / so). void LoadLexerLibrary(const wxString& path); - // Retrieve a 'property' value previously set with SetProperty. + // Retrieve a "property" value previously set with SetProperty. wxString GetProperty(const wxString& key); - // Retrieve a 'property' value previously set with SetProperty, - // with '$()' variable replacement on returned buffer. + // Retrieve a "property" value previously set with SetProperty, + // with "$()" variable replacement on returned buffer. wxString GetPropertyExpanded(const wxString& key); - // Retrieve a 'property' value previously set with SetProperty, - // interpreted as an int AFTER any '$()' variable replacement. + // Retrieve a "property" value previously set with SetProperty, + // interpreted as an int AFTER any "$()" variable replacement. int GetPropertyInt(const wxString &key, int defaultValue=0) const; // Retrieve the number of bits the current lexer needs for styling. @@ -4977,19 +4973,16 @@ public: // For private communication between an application and a known lexer. void* PrivateLexerCall(int operation, void* pointer); - // Retrieve a '\n' separated list of properties understood by the current lexer. - // Result is NUL-terminated. + // Retrieve a '\\n' separated list of properties understood by the current lexer. wxString PropertyNames() const; // Retrieve the type of a property. int PropertyType(const wxString& name); // Describe a property. - // Result is NUL-terminated. wxString DescribeProperty(const wxString& name) const; - // Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer. - // Result is NUL-terminated. + // Retrieve a '\\n' separated list of descriptions of the keyword sets understood by the current lexer. wxString DescribeKeyWordSets() const; // Bit set of LineEndType enumertion for which line ends beyond the standard @@ -5022,7 +5015,6 @@ public: int DistanceToSecondaryStyles() const; // Get the set of base styles that can be extended with sub styles - // Result is NUL-terminated. wxString GetSubStyleBases() const; //}}} diff --git a/interface/wx/stc/stc.h b/interface/wx/stc/stc.h index 82eff8b026..d059b6b4fe 100644 --- a/interface/wx/stc/stc.h +++ b/interface/wx/stc/stc.h @@ -2772,7 +2772,49 @@ Links for quick access to the various categories of wxStyledTextCtrl functions: - @ref_member_group{ctor, Constructors and related methods} - - @ref_member_group{scintilla_functions, Scintilla methods} + - @ref_member_group{TextRetrievalAndModification, Text retrieval and modification} + - @ref_member_group{Searching, Searching and replacing} + - @ref_member_group{Overtype, Overtype} + - @ref_member_group{CutCopyAndPaste, Cut copy and paste} + - @ref_member_group{ErrorHandling, Error handling} + - @ref_member_group{UndoAndRedo, Undo and Redo} + - @ref_member_group{SelectionAndInformation, Selection and information} + - @ref_member_group{MultipleSelectionAndVirtualSpace, Multiple Selection and Virtual Space} + - @ref_member_group{ScrollingAndAutomaticScrolling, Scrolling and automatic scrolling} + - @ref_member_group{WhiteSpace, White space} + - @ref_member_group{Cursor, Cursor} + - @ref_member_group{MouseCapture, Mouse capture} + - @ref_member_group{LineEndings, Line endings} + - @ref_member_group{Words, Words} + - @ref_member_group{Styling, Styling} + - @ref_member_group{StyleDefinition, Style definition} + - @ref_member_group{CaretAndSelectionStyles, Caret selection and hotspot styles} + - @ref_member_group{CharacterRepresentations, Character representations} + - @ref_member_group{Margins, Margins} + - @ref_member_group{Annotations, Annotations} + - @ref_member_group{OtherSettings, Other settings} + - @ref_member_group{BraceHighlighting, Brace highlighting} + - @ref_member_group{TabsAndIndentationGuides, Tabs and Indentation Guides} + - @ref_member_group{Markers, Markers} + - @ref_member_group{Indicators, Indicators} + - @ref_member_group{Autocompletion, Autocompletion} + - @ref_member_group{UserLists, User lists} + - @ref_member_group{CallTips, Call tips} + - @ref_member_group{KeyboardCommands, Keyboard commands} + - @ref_member_group{KeyBindings, Key bindings} + - @ref_member_group{PopupEditMenu, Popup edit menu} + - @ref_member_group{MacroRecording, Macro recording} + - @ref_member_group{Printing, Printing} + - @ref_member_group{DirectAccess, Direct access} + - @ref_member_group{MultipleViews, Multiple views} + - @ref_member_group{BackgroundLoadSave, Background loading and saving} + - @ref_member_group{Folding, Folding} + - @ref_member_group{LineWrapping, Line wrapping} + - @ref_member_group{Zooming, Zooming} + - @ref_member_group{LongLines, Long lines} + - @ref_member_group{Lexer, Lexer} + - @ref_member_group{Notifications, Event related items} + - @ref_member_group{DeprecatedMessages, Deprecated items} - @ref_member_group{additional_methods, Additional wxStyledTextCtrl methods} - @ref_member_group{raw_variants , Raw variants} - @ref_member_group{text_entry, Text entry methods} @@ -2903,12 +2945,15 @@ public: // Scintilla methods (generated by gen_iface.py) // ---------------------------------------------- - ///@member_group_name{scintilla_functions, Scintilla methods} - //@{ // **** Generated methods {{{ + /** + @member_group_name{TextRetrievalAndModification, Text retrieval and modification} + */ + //@{ + /** Add text to the document at current position. */ @@ -2925,7 +2970,9 @@ public: void InsertText(int pos, const wxString& text); /** - Change the text that is being inserted in response to SC_MOD_INSERTCHECK + Change the text that is being inserted in response to wxSTC_MOD_INSERTCHECK + + @since 3.1.0 */ void ChangeInsertion(int length, const wxString& text); @@ -2944,47 +2991,16 @@ public: */ void ClearDocumentStyle(); - /** - Returns the number of bytes in the document. - */ - int GetLength() const; - /** Returns the character byte at the position. */ int GetCharAt(int pos) const; - /** - Returns the position of the caret. - */ - int GetCurrentPos() const; - - /** - Returns the position of the opposite end of the selection to the caret. - */ - int GetAnchor() const; - /** Returns the style byte at the position. */ int GetStyleAt(int pos) const; - /** - Redoes the next action on the undo history. - */ - void Redo(); - - /** - Choose between collecting actions into the undo - history and discarding them. - */ - void SetUndoCollection(bool collectUndo); - - /** - Select all the text in the document. - */ - void SelectAll(); - /** Remember the current position in the undo history as the position at which the document was saved. @@ -2996,47 +3012,374 @@ public: */ wxMemoryBuffer GetStyledText(int startPos, int endPos); + /** + In read-only mode? + */ + bool GetReadOnly() const; + + /** + Retrieve the contents of a line. + */ + wxString GetLine(int line) const; + + /** + Retrieve a range of text. + */ + wxString GetTextRange(int startPos, int endPos); + + /** + Replace the selected text with the argument text. + */ + void ReplaceSelection(const wxString& text); + + /** + Set to read only or read write. + */ + void SetReadOnly(bool readOnly); + + /** + Replace the contents of the document with the argument text. + */ + void SetText(const wxString& text); + + /** + Retrieve all the text in the document. + */ + wxString GetText() const; + + /** + Append a string to the end of the document without changing the selection. + */ + void AppendText(const wxString& text); + + /** + Enlarge the document to a particular size of text bytes. + */ + void Allocate(int bytes); + + /** + Release all extended (>255) style numbers + + @since 3.1.0 + */ + void ReleaseAllExtendedStyles(); + + /** + Allocate some extended (>255) style numbers and return the start of the range + + @since 3.1.0 + */ + int AllocateExtendedStyles(int numberStyles); + + //@} + + /** + @member_group_name{Searching, Searching and replacing} + */ + //@{ + + /** + Find some text in the document. + + The fourth argument should be a bit list containing one or more of the + @link wxStyledTextCtrl::wxSTC_FIND_WHOLEWORD wxSTC_FIND_* @endlink constants. + */ + int FindText(int minPos, int maxPos, const wxString& text, int flags=0); + + /** + Sets the position that starts the target which is used for updating the + document without affecting the scroll position. + */ + void SetTargetStart(int start); + + /** + Get the position that starts the target. + */ + int GetTargetStart() const; + + /** + Sets the position that ends the target which is used for updating the + document without affecting the scroll position. + */ + void SetTargetEnd(int end); + + /** + Get the position that ends the target. + */ + int GetTargetEnd() const; + + /** + Sets both the start and end of the target in one call. + + @since 3.1.0 + */ + void SetTargetRange(int start, int end); + + /** + Retrieve the text in the target. + + @since 3.1.0 + */ + wxString GetTargetText() const; + + /** + Make the target range start and end be the same as the selection range start and end. + */ + void TargetFromSelection(); + + /** + Sets the target to the whole document. + + @since 3.1.1 + */ + void TargetWholeDocument(); + + /** + Replace the target text with the argument text. + Text is counted so it can contain NULs. + Returns the length of the replacement text. + */ + int ReplaceTarget(const wxString& text); + + /** + 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 ReplaceTargetRE(const wxString& text); + + /** + 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 SearchInTarget(const wxString& text); + + /** + Set the search flags used by SearchInTarget. + + The input should be a bit list containing one or more of the + @link wxStyledTextCtrl::wxSTC_FIND_WHOLEWORD wxSTC_FIND_* @endlink constants. + */ + void SetSearchFlags(int searchFlags); + + /** + Get the search flags used by SearchInTarget. + + The return value will be a bit list containing one or more of the + @link wxStyledTextCtrl::wxSTC_FIND_WHOLEWORD wxSTC_FIND_* @endlink constants. + */ + int GetSearchFlags() const; + + /** + Retrieve the value of a tag from a regular expression search. + */ + wxString GetTag(int tagNumber) const; + + /** + Sets the current caret position to be the search anchor. + */ + void SearchAnchor(); + + /** + Find some text starting at the search anchor. + Does not ensure the selection is visible. + */ + int SearchNext(int searchFlags, const wxString& text); + + /** + Find some text starting at the search anchor and moving backwards. + Does not ensure the selection is visible. + */ + int SearchPrev(int searchFlags, const wxString& text); + + //@} + + /** + @member_group_name{Overtype, Overtype} + */ + //@{ + + /** + Set to overtype (true) or insert mode. + */ + void SetOvertype(bool overType); + + /** + Returns true if overtype mode is active otherwise false is returned. + */ + bool GetOvertype() const; + + //@} + + /** + @member_group_name{CutCopyAndPaste, Cut copy and paste} + */ + //@{ + + /** + Will a paste succeed? + */ + bool CanPaste() const; + + /** + Cut the selection to the clipboard. + */ + void Cut(); + + /** + Copy the selection to the clipboard. + */ + void Copy(); + + /** + Paste the contents of the clipboard into the document replacing the selection. + */ + void Paste(); + + /** + Clear the selection. + */ + void Clear(); + + /** + Copy a range of text to the clipboard. Positions are clipped into the document. + */ + void CopyRange(int start, int end); + + /** + Copy argument text to the clipboard. + */ + void CopyText(int length, const wxString& text); + + /** + Enable/Disable convert-on-paste for line endings + */ + void SetPasteConvertEndings(bool convert); + + /** + Get convert-on-paste setting + */ + bool GetPasteConvertEndings() const; + + /** + Copy the selection, if selection empty copy the line with the caret + */ + void CopyAllowLine(); + + //@} + + /** + @member_group_name{ErrorHandling, Error handling} + */ + //@{ + + /** + Change error status - 0 = OK. + + The input should be one of the + @link wxStyledTextCtrl::wxSTC_STATUS_OK wxSTC_STATUS_* @endlink constants. + */ + void SetStatus(int status); + + /** + Get error status. + + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_STATUS_OK wxSTC_STATUS_* @endlink constants. + */ + int GetStatus() const; + + //@} + + /** + @member_group_name{UndoAndRedo, Undo and Redo} + */ + //@{ + + /** + Redoes the next action on the undo history. + */ + void Redo(); + + /** + Choose between collecting actions into the undo + history and discarding them. + */ + void SetUndoCollection(bool collectUndo); + /** Are there any redoable actions in the undo history? */ bool CanRedo() const; - /** - Retrieve the line number at which a particular marker is located. - */ - int MarkerLineFromHandle(int markerHandle); - - /** - Delete a marker. - */ - void MarkerDeleteHandle(int markerHandle); - /** Is undo history being collected? */ bool GetUndoCollection() const; /** - Are white space characters currently visible? - Returns one of SCWS_* constants. + Start a sequence of actions that is undone and redone as a unit. + May be nested. */ - int GetViewWhiteSpace() const; + void BeginUndoAction(); /** - Make white space characters invisible, always visible or visible outside indentation. + End a sequence of actions that is undone and redone as a unit. */ - void SetViewWhiteSpace(int viewWS); + void EndUndoAction(); /** - Retrieve the current tab draw mode. - Returns one of SCTD_* constants. + Are there any undoable actions in the undo history? */ - int GetTabDrawMode() const; + bool CanUndo() const; /** - Set how tabs are drawn when visible. + Delete the undo history. */ - void SetTabDrawMode(int tabDrawMode); + void EmptyUndoBuffer(); + + /** + Undo one action in the undo history. + */ + void Undo(); + + /** + Add a container action to the undo stack + + The flags argument can be either 0 or wxSTC_UNDO_MAY_COALESCE. + */ + void AddUndoAction(int token, int flags); + + //@} + + /** + @member_group_name{SelectionAndInformation, Selection and information} + */ + //@{ + + /** + Returns the number of bytes in the document. + */ + int GetLength() const; + + /** + Returns the position of the caret. + */ + int GetCurrentPos() const; + + /** + Returns the position of the opposite end of the selection to the caret. + */ + int GetAnchor() const; + + /** + Select all the text in the document. + */ + void SelectAll(); /** Find the position from a point within the window. @@ -3045,7 +3388,7 @@ public: /** Find the position from a point within the window but return - INVALID_POSITION if not close to text. + wxSTC_INVALID_POSITION if not close to text. */ int PositionFromPointClose(int x, int y); @@ -3067,15 +3410,771 @@ public: /** Retrieve the text of the line containing the caret. - Returns the index of the caret on the line. - Result is NUL-terminated. + + linePos can optionally be passed in to receive the index of the + caret on the line. */ wxString GetCurLine(int* linePos=NULL); /** - Retrieve the position of the last correctly styled character. + Retrieve the column number of a position, taking tab width into account. */ - int GetEndStyled() const; + int GetColumn(int pos) const; + + /** + Count characters between two positions. + */ + int CountCharacters(int start, int end); + + /** + Get the position after the last visible characters on a line. + */ + int GetLineEndPosition(int line) const; + + /** + Sets the position of the caret. + */ + void SetCurrentPos(int caret); + + /** + Sets the position that starts the selection - this becomes the anchor. + */ + void SetSelectionStart(int anchor); + + /** + Returns the position at the start of the selection. + */ + int GetSelectionStart() const; + + /** + Sets the position that ends the selection - this becomes the caret. + */ + void SetSelectionEnd(int caret); + + /** + Returns the position at the end of the selection. + */ + int GetSelectionEnd() const; + + /** + Set caret to a position, while removing any existing selection. + */ + void SetEmptySelection(int caret); + + /** + Returns the number of lines in the document. There is always at least one. + */ + int GetLineCount() const; + + /** + Is the document different from when it was last saved? + */ + bool GetModify() const; + + /** + Retrieve the selected text. + */ + wxString GetSelectedText(); + + /** + Draw the selection in normal style or with selection highlighted. + */ + void HideSelection(bool hide); + + /** + Retrieve the point in the window where a position is displayed. + */ + wxPoint PointFromPosition(int pos); + + /** + Retrieve the line containing a position. + */ + int LineFromPosition(int pos) const; + + /** + Retrieve the position at the start of a line. + */ + int PositionFromLine(int line) const; + + /** + Retrieve the number of characters in the document. + */ + int GetTextLength() const; + + /** + Measure the pixel width of some text in a particular style. + Does not handle tab or control characters. + */ + int TextWidth(int style, const wxString& text); + + /** + Retrieve the height of a particular line of text in pixels. + */ + int TextHeight(int line); + + /** + Move the caret inside current view if it's not there already. + */ + void MoveCaretInsideView(); + + /** + How many characters are on a line, including end of line characters? + */ + int LineLength(int line) const; + + /** + Retrieves the number of lines completely visible. + */ + int LinesOnScreen() const; + + /** + Is the selection rectangular? The alternative is the more common stream selection. + */ + bool SelectionIsRectangle() const; + + /** + Set the last x chosen value to be the caret x position. + */ + void ChooseCaretX(); + + /** + Given a valid document position, return the previous position taking code + page into account. Returns 0 if passed 0. + */ + int PositionBefore(int pos); + + /** + Given a valid document position, return the next position taking code + page into account. Maximum value returned is the last position in the document. + */ + int PositionAfter(int pos); + + /** + Given a valid document position, return a position that differs in a number + of characters. Returned value is always between 0 and last position in document. + + @since 3.1.0 + */ + int PositionRelative(int pos, int relative); + + /** + Set the selection mode to stream (wxSTC_SEL_STREAM) or rectangular (wxSTC_SEL_RECTANGLE/wxSTC_SEL_THIN) or + by lines (wxSTC_SEL_LINES). + */ + void SetSelectionMode(int selectionMode); + + /** + Get the mode of the current selection. + + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_SEL_STREAM wxSTC_SEL_* @endlink constants. + */ + int GetSelectionMode() const; + + /** + Retrieve the position of the start of the selection at the given line (wxSTC_INVALID_POSITION if no selection on this line). + */ + int GetLineSelStartPosition(int line); + + /** + Retrieve the position of the end of the selection at the given line (wxSTC_INVALID_POSITION if no selection on this line). + */ + int GetLineSelEndPosition(int line); + + /** + Find the position of a column on a line taking into account tabs and + multi-byte characters. If beyond end of line, return line end position. + */ + int FindColumn(int line, int column); + + /** + Find the position of a character from a point within the window. + */ + int CharPositionFromPoint(int x, int y); + + /** + Find the position of a character from a point within the window. + Return wxSTC_INVALID_POSITION if not close to text. + */ + int CharPositionFromPointClose(int x, int y); + + /** + Set whether switching to rectangular mode while selecting with the mouse is allowed. + + @since 3.1.0 + */ + void SetMouseSelectionRectangularSwitch(bool mouseSelectionRectangularSwitch); + + /** + Whether switching to rectangular mode while selecting with the mouse is allowed. + + @since 3.1.0 + */ + bool GetMouseSelectionRectangularSwitch() const; + + /** + Move the selected lines up one line, shifting the line above after the selection + */ + void MoveSelectedLinesUp(); + + /** + Move the selected lines down one line, shifting the line below before the selection + */ + void MoveSelectedLinesDown(); + + //@} + + /** + @member_group_name{MultipleSelectionAndVirtualSpace, Multiple Selection and Virtual Space} + */ + //@{ + + /** + Change the effect of pasting when there are multiple selections. + + The input should be one of the + @link wxStyledTextCtrl::wxSTC_MULTIPASTE_ONCE wxSTC_MULTIPASTE_* @endlink constants. + */ + void SetMultiPaste(int multiPaste); + + /** + Retrieve the effect of pasting when there are multiple selections. + + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_MULTIPASTE_ONCE wxSTC_MULTIPASTE_* @endlink constants. + */ + int GetMultiPaste() const; + + /** + Set whether multiple selections can be made + */ + void SetMultipleSelection(bool multipleSelection); + + /** + Whether multiple selections can be made + */ + bool GetMultipleSelection() const; + + /** + Set whether typing can be performed into multiple selections + */ + void SetAdditionalSelectionTyping(bool additionalSelectionTyping); + + /** + Whether typing can be performed into multiple selections + */ + bool GetAdditionalSelectionTyping() const; + + /** + Set whether additional carets will blink + */ + void SetAdditionalCaretsBlink(bool additionalCaretsBlink); + + /** + Whether additional carets will blink + */ + bool GetAdditionalCaretsBlink() const; + + /** + Set whether additional carets are visible + */ + void SetAdditionalCaretsVisible(bool additionalCaretsVisible); + + /** + Whether additional carets are visible + */ + bool GetAdditionalCaretsVisible() const; + + /** + How many selections are there? + */ + int GetSelections() const; + + /** + Is every selected range empty? + + @since 3.1.0 + */ + bool GetSelectionEmpty() const; + + /** + Clear selections to a single empty stream selection + */ + void ClearSelections(); + + /** + Add a selection + */ + int AddSelection(int caret, int anchor); + + /** + Drop one selection + + @since 3.1.0 + */ + void DropSelectionN(int selection); + + /** + Set the main selection + */ + void SetMainSelection(int selection); + + /** + Which selection is the main selection + */ + int GetMainSelection() const; + + /** + Set the caret position of the nth selection. + */ + void SetSelectionNCaret(int selection, int caret); + + /** + Return the caret position of the nth selection. + */ + int GetSelectionNCaret(int selection) const; + + /** + Set the anchor position of the nth selection. + */ + void SetSelectionNAnchor(int selection, int anchor); + + /** + Return the anchor position of the nth selection. + */ + int GetSelectionNAnchor(int selection) const; + + /** + Set the virtual space of the caret of the nth selection. + */ + void SetSelectionNCaretVirtualSpace(int selection, int space); + + /** + Return the virtual space of the caret of the nth selection. + */ + int GetSelectionNCaretVirtualSpace(int selection) const; + + /** + Set the virtual space of the anchor of the nth selection. + */ + void SetSelectionNAnchorVirtualSpace(int selection, int space); + + /** + Return the virtual space of the anchor of the nth selection. + */ + int GetSelectionNAnchorVirtualSpace(int selection) const; + + /** + Sets the position that starts the selection - this becomes the anchor. + */ + void SetSelectionNStart(int selection, int anchor); + + /** + Returns the position at the start of the selection. + */ + int GetSelectionNStart(int selection) const; + + /** + Sets the position that ends the selection - this becomes the currentPosition. + */ + void SetSelectionNEnd(int selection, int caret); + + /** + Returns the position at the end of the selection. + */ + int GetSelectionNEnd(int selection) const; + + /** + Set the caret position of the rectangular selection. + */ + void SetRectangularSelectionCaret(int caret); + + /** + Return the caret position of the rectangular selection. + */ + int GetRectangularSelectionCaret() const; + + /** + Set the anchor position of the rectangular selection. + */ + void SetRectangularSelectionAnchor(int anchor); + + /** + Return the anchor position of the rectangular selection. + */ + int GetRectangularSelectionAnchor() const; + + /** + Set the virtual space of the caret of the rectangular selection. + */ + void SetRectangularSelectionCaretVirtualSpace(int space); + + /** + Return the virtual space of the caret of the rectangular selection. + */ + int GetRectangularSelectionCaretVirtualSpace() const; + + /** + Set the virtual space of the anchor of the rectangular selection. + */ + void SetRectangularSelectionAnchorVirtualSpace(int space); + + /** + Return the virtual space of the anchor of the rectangular selection. + */ + int GetRectangularSelectionAnchorVirtualSpace() const; + + /** + Set options for virtual space behaviour. + + The input should be one of the + @link wxStyledTextCtrl::wxSTC_VS_NONE wxSTC_VS_* @endlink constants. + */ + void SetVirtualSpaceOptions(int virtualSpaceOptions); + + /** + Return options for virtual space behaviour. + + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_VS_NONE wxSTC_VS_* @endlink constants. + */ + int GetVirtualSpaceOptions() const; + + /** + On GTK+, allow selecting the modifier key to use for mouse-based + rectangular selection. Often the window manager requires Alt+Mouse Drag + for moving windows. + Valid values are wxSTC_KEYMOD_CTRL (default), wxSTC_KEYMOD_ALT, or wxSTC_KEYMOD_SUPER. + */ + void SetRectangularSelectionModifier(int modifier); + + /** + Get the modifier key used for rectangular selection. + + The return value will be a bit list containing one or more of the + @link wxStyledTextCtrl::wxSTC_KEYMOD_NORM wxSTC_KEYMOD_* @endlink constants. + */ + int GetRectangularSelectionModifier() const; + + /** + Set the foreground colour of additional selections. + Must have previously called SetSelFore with non-zero first argument for this to have an effect. + */ + void SetAdditionalSelForeground(const wxColour& fore); + + /** + Set the background colour of additional selections. + Must have previously called SetSelBack with non-zero first argument for this to have an effect. + */ + void SetAdditionalSelBackground(const wxColour& back); + + /** + Set the alpha of the selection. + */ + void SetAdditionalSelAlpha(int alpha); + + /** + Get the alpha of the selection. + */ + int GetAdditionalSelAlpha() const; + + /** + Set the foreground colour of additional carets. + */ + void SetAdditionalCaretForeground(const wxColour& fore); + + /** + Get the foreground colour of additional carets. + */ + wxColour GetAdditionalCaretForeground() const; + + /** + Set the main selection to the next selection. + */ + void RotateSelection(); + + /** + Swap that caret and anchor of the main selection. + */ + void SwapMainAnchorCaret(); + + /** + Add the next occurrence of the main selection to the set of selections as main. + If the current selection is empty then select word around caret. + + @since 3.1.1 + */ + void MultipleSelectAddNext(); + + /** + Add each occurrence of the main selection in the target to the set of selections. + If the current selection is empty then select word around caret. + + @since 3.1.1 + */ + void MultipleSelectAddEach(); + + //@} + + /** + @member_group_name{ScrollingAndAutomaticScrolling, Scrolling and automatic scrolling} + */ + //@{ + + /** + Show or hide the horizontal scroll bar. + */ + void SetUseHorizontalScrollBar(bool visible); + + /** + Is the horizontal scroll bar visible? + */ + bool GetUseHorizontalScrollBar() const; + + /** + Retrieve the display line at the top of the display. + */ + int GetFirstVisibleLine() const; + + /** + Scroll horizontally and vertically. + */ + void LineScroll(int columns, int lines); + + /** + Ensure the caret is visible. + */ + void EnsureCaretVisible(); + + /** + Scroll the argument positions and the range between them into view giving + priority to the primary position then the secondary position. + This may be used to make a search match visible. + + @since 3.1.0 + */ + void ScrollRange(int secondary, int primary); + + /** + Sets the document width assumed for scrolling. + */ + void SetScrollWidth(int pixelWidth); + + /** + Retrieve the document width assumed for scrolling. + */ + int GetScrollWidth() const; + + /** + Sets whether the maximum width line displayed is used to set scroll width. + */ + void SetScrollWidthTracking(bool tracking); + + /** + Retrieve whether the scroll width tracks wide lines. + */ + bool GetScrollWidthTracking() const; + + /** + 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 SetEndAtLastLine(bool endAtLastLine); + + /** + Retrieve whether the maximum scroll position has the last + line at the bottom of the view. + */ + bool GetEndAtLastLine() const; + + /** + Show or hide the vertical scroll bar. + */ + void SetUseVerticalScrollBar(bool visible); + + /** + Is the vertical scroll bar visible? + */ + bool GetUseVerticalScrollBar() const; + + /** + Scroll so that a display line is at the top of the display. + */ + void SetFirstVisibleLine(int displayLine); + + /** + Set the way the display area is determined when a particular line + is to be moved to by Find, FindNext, GotoLine, etc. + + The first argument should be a bit list containing one or more of the + @link wxStyledTextCtrl::wxSTC_VISIBLE_SLOP wxSTC_VISIBLE_* @endlink constants. + */ + void SetVisiblePolicy(int visiblePolicy, int visibleSlop); + + /** + Set the xOffset (ie, horizontal scroll position). + */ + void SetXOffset(int xOffset); + + /** + Get the xOffset (ie, horizontal scroll position). + */ + int GetXOffset() const; + + /** + Set the way the caret is kept visible when going sideways. + The exclusion zone is given in pixels. + + The first argument should be a bit list containing one or more of the + @link wxStyledTextCtrl::wxSTC_CARET_SLOP wxSTC_CARET_* @endlink constants. + */ + void SetXCaretPolicy(int caretPolicy, int caretSlop); + + /** + Set the way the line the caret is on is kept visible. + The exclusion zone is given in lines. + + The first argument should be a bit list containing one or more of the + @link wxStyledTextCtrl::wxSTC_CARET_SLOP wxSTC_CARET_* @endlink constants. + */ + void SetYCaretPolicy(int caretPolicy, int caretSlop); + + //@} + + /** + @member_group_name{WhiteSpace, White space} + */ + //@{ + + /** + Are white space characters currently visible? + Returns one of wxSTC_WS_* constants. + */ + int GetViewWhiteSpace() const; + + /** + Make white space characters invisible, always visible or visible outside indentation. + + The input should be one of the + @link wxStyledTextCtrl::wxSTC_WS_INVISIBLE wxSTC_WS_* @endlink constants. + */ + void SetViewWhiteSpace(int viewWS); + + /** + Retrieve the current tab draw mode. + Returns one of wxSTC_TD_* constants. + + @since 3.1.1 + */ + int GetTabDrawMode() const; + + /** + Set how tabs are drawn when visible. + + The input should be one of the + @link wxStyledTextCtrl::wxSTC_TD_LONGARROW wxSTC_TD_* @endlink constants. + @since 3.1.1 + */ + void SetTabDrawMode(int tabDrawMode); + + /** + Set the foreground colour of all whitespace and whether to use this setting. + */ + void SetWhitespaceForeground(bool useSetting, const wxColour& fore); + + /** + Set the background colour of all whitespace and whether to use this setting. + */ + void SetWhitespaceBackground(bool useSetting, const wxColour& back); + + /** + Set the size of the dots used to mark space characters. + */ + void SetWhitespaceSize(int size); + + /** + Get the size of the dots used to mark space characters. + */ + int GetWhitespaceSize() const; + + /** + Set extra ascent for each line + */ + void SetExtraAscent(int extraAscent); + + /** + Get extra ascent for each line + */ + int GetExtraAscent() const; + + /** + Set extra descent for each line + */ + void SetExtraDescent(int extraDescent); + + /** + Get extra descent for each line + */ + int GetExtraDescent() const; + + //@} + + /** + @member_group_name{Cursor, Cursor} + */ + //@{ + + /** + Sets the cursor to one of the wxSTC_CURSOR* values. + */ + void SetSTCCursor(int cursorType); + + /** + Get cursor type. + + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_CURSORNORMAL wxSTC_CURSOR* @endlink constants. + */ + int GetSTCCursor() const; + + //@} + + /** + @member_group_name{MouseCapture, Mouse capture} + */ + //@{ + + /** + Set whether the mouse is captured when its button is pressed. + */ + void SetMouseDownCaptures(bool captures); + + /** + Get whether mouse gets captured. + */ + bool GetMouseDownCaptures() const; + + /** + Set whether the mouse wheel can be active outside the window. + + @since 3.1.1 + */ + void SetMouseWheelCaptures(bool captures); + + /** + Get whether mouse wheel can be active outside the window. + + @since 3.1.1 + */ + bool GetMouseWheelCaptures() const; + + //@} + + /** + @member_group_name{LineEndings, Line endings} + */ + //@{ /** Convert all line endings in the document to one mode. @@ -3083,15 +4182,139 @@ public: void ConvertEOLs(int eolMode); /** - Retrieve the current end of line mode - one of CRLF, CR, or LF. + Retrieve the current end of line mode - one of wxSTC_EOL_CRLF, wxSTC_EOL_CR, or wxSTC_EOL_LF. */ int GetEOLMode() const; /** Set the current end of line mode. + + The input should be one of the + @link wxStyledTextCtrl::wxSTC_EOL_CRLF wxSTC_EOL_* @endlink constants. */ void SetEOLMode(int eolMode); + /** + Are the end of line characters visible? + */ + bool GetViewEOL() const; + + /** + Make the end of line characters visible or invisible. + */ + void SetViewEOL(bool visible); + + /** + Set the line end types that the application wants to use. May not be used if incompatible with lexer or encoding. + + The input should be one of the + @link wxStyledTextCtrl::wxSTC_LINE_END_TYPE_DEFAULT wxSTC_LINE_END_TYPE_* @endlink constants. + @since 3.1.0 + */ + void SetLineEndTypesAllowed(int lineEndBitSet); + + /** + Get the line end types currently allowed. + + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_LINE_END_TYPE_DEFAULT wxSTC_LINE_END_TYPE_* @endlink constants. + @since 3.1.0 + */ + int GetLineEndTypesAllowed() const; + + /** + Get the line end types currently recognised. May be a subset of the allowed types due to lexer limitation. + + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_LINE_END_TYPE_DEFAULT wxSTC_LINE_END_TYPE_* @endlink constants. + @since 3.1.0 + */ + int GetLineEndTypesActive() const; + + /** + Bit set of LineEndType enumertion for which line ends beyond the standard + LF, CR, and CRLF are supported by the lexer. + + The return value will be a bit list containing one or more of the + @link wxStyledTextCtrl::wxSTC_LINE_END_TYPE_DEFAULT wxSTC_LINE_END_TYPE_* @endlink constants. + @since 3.1.0 + */ + int GetLineEndTypesSupported() const; + + //@} + + /** + @member_group_name{Words, Words} + */ + //@{ + + /** + Set the set of characters making up words for when moving or selecting by word. + First sets defaults like SetCharsDefault. + */ + void SetWordChars(const wxString& characters); + + /** + Get the set of characters making up words for when moving or selecting by word. + */ + wxString GetWordChars() const; + + /** + Get position of start of word. + */ + int WordStartPosition(int pos, bool onlyWordCharacters); + + /** + Get position of end of word. + */ + int WordEndPosition(int pos, bool onlyWordCharacters); + + /** + Is the range start..end considered a word? + + @since 3.1.1 + */ + bool IsRangeWord(int start, int end); + + /** + Set the set of characters making up whitespace for when moving or selecting by word. + Should be called after SetWordChars. + */ + void SetWhitespaceChars(const wxString& characters); + + /** + Get the set of characters making up whitespace for when moving or selecting by word. + */ + wxString GetWhitespaceChars() const; + + /** + Set the set of characters making up punctuation characters + Should be called after SetWordChars. + */ + void SetPunctuationChars(const wxString& characters); + + /** + Get the set of characters making up punctuation characters + */ + wxString GetPunctuationChars() const; + + /** + Reset the set of characters for whitespace and word characters to the defaults. + */ + void SetCharsDefault(); + + //@} + + /** + @member_group_name{Styling, Styling} + */ + //@{ + + /** + Retrieve the position of the last correctly styled character. + */ + int GetEndStyled() const; + /** Set the current styling position to start. The unused parameter is no longer used and should be set to 0. @@ -3105,199 +4328,49 @@ public: void SetStyling(int length, int style); /** - Is drawing done first into a buffer or direct to the screen? + Set the styles for a segment of the document. */ - bool GetBufferedDraw() const; + void SetStyleBytes(int length, char* styleBytes); /** - If drawing is buffered then each line of text is drawn into a bitmap buffer - before drawing it to the screen to avoid flicker. + Used to hold extra styling information for each line. */ - void SetBufferedDraw(bool buffered); + void SetLineState(int line, int state); /** - Change the visible size of a tab to be a multiple of the width of a space character. + Retrieve the extra styling information for a line. */ - void SetTabWidth(int tabWidth); + int GetLineState(int line) const; /** - Retrieve the visible size of a tab. + Retrieve the last line number that has line state. */ - int GetTabWidth() const; + int GetMaxLineState() const; /** - Clear explicit tabstops on a line. + Sets limits to idle styling. + + The input should be one of the + @link wxStyledTextCtrl::wxSTC_IDLESTYLING_NONE wxSTC_IDLESTYLING_* @endlink constants. + @since 3.1.1 */ - void ClearTabStops(int line); + void SetIdleStyling(int idleStyling); /** - Add an explicit tab stop for a line. + Retrieve the limits to idle styling. + + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_IDLESTYLING_NONE wxSTC_IDLESTYLING_* @endlink constants. + @since 3.1.1 */ - void AddTabStop(int line, int x); + int GetIdleStyling() const; + + //@} /** - Find the next explicit tab stop position on a line after a position. + @member_group_name{StyleDefinition, Style definition} */ - int GetNextTabStop(int line, int x); - - /** - Set the code page used to interpret the bytes of the document as characters. - */ - void SetCodePage(int codePage); - - /** - Is the IME displayed in a window or inline? - */ - int GetIMEInteraction() const; - - /** - Choose to display the the IME in a winow or inline. - */ - void SetIMEInteraction(int imeInteraction); - - /** - Set the symbol used for a particular marker number, - and optionally the fore and background colours. - */ - void MarkerDefine(int markerNumber, int markerSymbol, - const wxColour& foreground = wxNullColour, - const wxColour& background = wxNullColour); - - /** - Set the foreground colour used for a particular marker number. - */ - void MarkerSetForeground(int markerNumber, const wxColour& fore); - - /** - Set the background colour used for a particular marker number. - */ - void MarkerSetBackground(int markerNumber, const wxColour& back); - - /** - Set the background colour used for a particular marker number when its folding block is selected. - */ - void MarkerSetBackgroundSelected(int markerNumber, const wxColour& back); - - /** - Enable/disable highlight for current folding bloc (smallest one that contains the caret) - */ - void MarkerEnableHighlight(bool enabled); - - /** - Add a marker to a line, returning an ID which can be used to find or delete the marker. - */ - int MarkerAdd(int line, int markerNumber); - - /** - Delete a marker from a line. - */ - void MarkerDelete(int line, int markerNumber); - - /** - Delete all markers with a particular number from all lines. - */ - void MarkerDeleteAll(int markerNumber); - - /** - Get a bit mask of all the markers set on a line. - */ - int MarkerGet(int line); - - /** - Find the next line at or after lineStart that includes a marker in mask. - Return -1 when no more lines. - */ - int MarkerNext(int lineStart, int markerMask); - - /** - Find the previous line before lineStart that includes a marker in mask. - */ - int MarkerPrevious(int lineStart, int markerMask); - - /** - Define a marker from a bitmap - */ - void MarkerDefineBitmap(int markerNumber, const wxBitmap& bmp); - - /** - Add a set of markers to a line. - */ - void MarkerAddSet(int line, int markerSet); - - /** - Set the alpha used for a marker that is drawn in the text area, not the margin. - */ - void MarkerSetAlpha(int markerNumber, int alpha); - - /** - Set a margin to be either numeric or symbolic. - */ - void SetMarginType(int margin, int marginType); - - /** - Retrieve the type of a margin. - */ - int GetMarginType(int margin) const; - - /** - Set the width of a margin to a width expressed in pixels. - */ - void SetMarginWidth(int margin, int pixelWidth); - - /** - Retrieve the width of a margin in pixels. - */ - int GetMarginWidth(int margin) const; - - /** - Set a mask that determines which markers are displayed in a margin. - */ - void SetMarginMask(int margin, int mask); - - /** - Retrieve the marker mask of a margin. - */ - int GetMarginMask(int margin) const; - - /** - Make a margin sensitive or insensitive to mouse clicks. - */ - void SetMarginSensitive(int margin, bool sensitive); - - /** - Retrieve the mouse click sensitivity of a margin. - */ - bool GetMarginSensitive(int margin) const; - - /** - Set the cursor shown when the mouse is inside a margin. - */ - void SetMarginCursor(int margin, int cursor); - - /** - Retrieve the cursor shown in a margin. - */ - int GetMarginCursor(int margin) const; - - /** - Set the background colour of a margin. Only visible for SC_MARGIN_COLOUR. - */ - void SetMarginBackground(int margin, const wxColour& back); - - /** - Retrieve the background colour of a margin - */ - wxColour GetMarginBackground(int margin) const; - - /** - Allocate a non-standard number of margins. - */ - void SetMarginCount(int margins); - - /** - How many margins are there?. - */ - int GetMarginCount() const; + //@{ /** Clear all the styles and make equivalent to the global default style. @@ -3391,6 +4464,9 @@ public: /** Get is a style mixed case, or to force upper or lower case. + + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_CASE_MIXED wxSTC_CASE_* @endlink constants. */ int StyleGetCase(int style) const; @@ -3417,6 +4493,9 @@ public: /** Set a style to be mixed case, or to force upper or lower case. + + The second argument should be one of the + @link wxStyledTextCtrl::wxSTC_CASE_MIXED wxSTC_CASE_* @endlink constants. */ void StyleSetCase(int style, int caseVisible); @@ -3432,16 +4511,23 @@ public: /** Set the weight of characters of a style. + + The second argument can be an integer or one of the + @link wxStyledTextCtrl::wxSTC_WEIGHT_NORMAL wxSTC_WEIGHT_* @endlink constants. */ void StyleSetWeight(int style, int weight); /** Get the weight of characters of a style. + + The return value will be an integer that is possibly one of the + @link wxStyledTextCtrl::wxSTC_WEIGHT_NORMAL wxSTC_WEIGHT_* @endlink constants. */ int StyleGetWeight(int style) const; /** Set the character set of the font in a style. + Converts the Scintilla character set values to a wxFontEncoding. */ void StyleSetCharacterSet(int style, int characterSet); @@ -3451,6 +4537,24 @@ public: */ void StyleSetHotSpot(int style, bool hotspot); + /** + Set a style to be visible or not. + */ + void StyleSetVisible(int style, bool visible); + + /** + Set a style to be changeable or not (read only). + Experimental feature, currently buggy. + */ + void StyleSetChangeable(int style, bool changeable); + + //@} + + /** + @member_group_name{CaretAndSelectionStyles, Caret selection and hotspot styles} + */ + //@{ + /** Set the foreground colour of the main and additional selections and whether to use this setting. */ @@ -3486,31 +4590,6 @@ public: */ void SetCaretForeground(const wxColour& fore); - /** - When key+modifier combination keyDefinition is pressed perform sciCommand. - */ - void CmdKeyAssign(int key, int modifiers, int cmd); - - /** - When key+modifier combination keyDefinition is pressed do nothing. - */ - void CmdKeyClear(int key, int modifiers); - - /** - Drop all key mappings. - */ - void CmdKeyClearAll(); - - /** - Set the styles for a segment of the document. - */ - void SetStyleBytes(int length, char* styleBytes); - - /** - Set a style to be visible or not. - */ - void StyleSetVisible(int style, bool visible); - /** Get the time in milliseconds that the caret is on and off. */ @@ -3522,34 +4601,852 @@ public: void SetCaretPeriod(int periodMilliseconds); /** - Set the set of characters making up words for when moving or selecting by word. - First sets defaults like SetCharsDefault. + Is the background of the line containing the caret in a different colour? */ - void SetWordChars(const wxString& characters); + bool GetCaretLineVisible() const; /** - Get the set of characters making up words for when moving or selecting by word. + Display the background of the line containing the caret in a different colour. */ - wxString GetWordChars() const; + void SetCaretLineVisible(bool show); /** - Start a sequence of actions that is undone and redone as a unit. - May be nested. + Get the colour of the background of the line containing the caret. */ - void BeginUndoAction(); + wxColour GetCaretLineBackground() const; /** - End a sequence of actions that is undone and redone as a unit. + Set the colour of the background of the line containing the caret. */ - void EndUndoAction(); + void SetCaretLineBackground(const wxColour& back); + + /** + Get the foreground colour of the caret. + */ + wxColour GetCaretForeground() const; + + /** + Set the width of the insert mode caret. + */ + void SetCaretWidth(int pixelWidth); + + /** + Returns the width of the insert mode caret. + */ + int GetCaretWidth() const; + + /** + Set a fore colour for active hotspots. + */ + void SetHotspotActiveForeground(bool useSetting, const wxColour& fore); + + /** + Get the fore colour for active hotspots. + */ + wxColour GetHotspotActiveForeground() const; + + /** + Set a back colour for active hotspots. + */ + void SetHotspotActiveBackground(bool useSetting, const wxColour& back); + + /** + Get the back colour for active hotspots. + */ + wxColour GetHotspotActiveBackground() const; + + /** + Enable / Disable underlining active hotspots. + */ + void SetHotspotActiveUnderline(bool underline); + + /** + Get whether underlining for active hotspots. + */ + bool GetHotspotActiveUnderline() const; + + /** + Limit hotspots to single line so hotspots on two lines don't merge. + */ + void SetHotspotSingleLine(bool singleLine); + + /** + Get the HotspotSingleLine property + */ + bool GetHotspotSingleLine() const; + + /** + Can the caret preferred x position only be changed by explicit movement commands? + + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_CARETSTICKY_OFF wxSTC_CARETSTICKY_* @endlink constants. + */ + int GetCaretSticky() const; + + /** + Stop the caret preferred x position changing when the user types. + + The input should be one of the + @link wxStyledTextCtrl::wxSTC_CARETSTICKY_OFF wxSTC_CARETSTICKY_* @endlink constants. + */ + void SetCaretSticky(int useCaretStickyBehaviour); + + /** + Switch between sticky and non-sticky: meant to be bound to a key. + */ + void ToggleCaretSticky(); + + /** + Set background alpha of the caret line. + */ + void SetCaretLineBackAlpha(int alpha); + + /** + Get the background alpha of the caret line. + */ + int GetCaretLineBackAlpha() const; + + /** + Set the style of the caret to be drawn. + + The input should be one of the + @link wxStyledTextCtrl::wxSTC_CARETSTYLE_INVISIBLE wxSTC_CARETSTYLE_* @endlink constants. + */ + void SetCaretStyle(int caretStyle); + + /** + Returns the current style of the caret. + + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_CARETSTYLE_INVISIBLE wxSTC_CARETSTYLE_* @endlink constants. + */ + int GetCaretStyle() const; + + /** + Is the caret line always visible? + + @since 3.1.0 + */ + bool GetCaretLineVisibleAlways() const; + + /** + Sets the caret line to always visible. + + @since 3.1.0 + */ + void SetCaretLineVisibleAlways(bool alwaysVisible); + + //@} + + /** + @member_group_name{CharacterRepresentations, Character representations} + */ + //@{ + + /** + Change the way control characters are displayed: + If symbol is < 32, keep the drawn way, else, use the given character. + */ + void SetControlCharSymbol(int symbol); + + /** + Get the way control characters are displayed. + */ + int GetControlCharSymbol() const; + + /** + Set the way a character is drawn. + + @since 3.1.0 + */ + void SetRepresentation(const wxString& encodedCharacter, const wxString& representation); + + /** + Set the way a character is drawn. + + @since 3.1.0 + */ + wxString GetRepresentation(const wxString& encodedCharacter) const; + + /** + Remove a character representation. + + @since 3.1.0 + */ + void ClearRepresentation(const wxString& encodedCharacter); + + //@} + + /** + @member_group_name{Margins, Margins} + */ + //@{ + + /** + Set a margin to be either numeric or symbolic. + + The second argument should be one of the + @link wxStyledTextCtrl::wxSTC_MARGIN_SYMBOL wxSTC_MARGIN_* @endlink constants. + */ + void SetMarginType(int margin, int marginType); + + /** + Retrieve the type of a margin. + + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_MARGIN_SYMBOL wxSTC_MARGIN_* @endlink constants. + */ + int GetMarginType(int margin) const; + + /** + Set the width of a margin to a width expressed in pixels. + */ + void SetMarginWidth(int margin, int pixelWidth); + + /** + Retrieve the width of a margin in pixels. + */ + int GetMarginWidth(int margin) const; + + /** + Set a mask that determines which markers are displayed in a margin. + */ + void SetMarginMask(int margin, int mask); + + /** + Retrieve the marker mask of a margin. + */ + int GetMarginMask(int margin) const; + + /** + Make a margin sensitive or insensitive to mouse clicks. + */ + void SetMarginSensitive(int margin, bool sensitive); + + /** + Retrieve the mouse click sensitivity of a margin. + */ + bool GetMarginSensitive(int margin) const; + + /** + Set the cursor shown when the mouse is inside a margin. + + The second argument should be one of the + @link wxStyledTextCtrl::wxSTC_CURSORNORMAL wxSTC_CURSOR* @endlink constants. + */ + void SetMarginCursor(int margin, int cursor); + + /** + Retrieve the cursor shown in a margin. + + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_CURSORNORMAL wxSTC_CURSOR* @endlink constants. + */ + int GetMarginCursor(int margin) const; + + /** + Set the background colour of a margin. Only visible for wxSTC_MARGIN_COLOUR. + + @since 3.1.1 + */ + void SetMarginBackground(int margin, const wxColour& back); + + /** + Retrieve the background colour of a margin + + @since 3.1.1 + */ + wxColour GetMarginBackground(int margin) const; + + /** + Allocate a non-standard number of margins. + + @since 3.1.1 + */ + void SetMarginCount(int margins); + + /** + How many margins are there?. + + @since 3.1.1 + */ + int GetMarginCount() const; + + /** + Sets the size in pixels of the left margin. + */ + void SetMarginLeft(int pixelWidth); + + /** + Returns the size in pixels of the left margin. + */ + int GetMarginLeft() const; + + /** + Sets the size in pixels of the right margin. + */ + void SetMarginRight(int pixelWidth); + + /** + Returns the size in pixels of the right margin. + */ + int GetMarginRight() const; + + /** + Set one of the colours used as a chequerboard pattern in the fold margin + */ + void SetFoldMarginColour(bool useSetting, const wxColour& back); + + /** + Set the other colour used as a chequerboard pattern in the fold margin + */ + void SetFoldMarginHiColour(bool useSetting, const wxColour& fore); + + /** + Set the text in the text margin for a line + */ + void MarginSetText(int line, const wxString& text); + + /** + Get the text in the text margin for a line + */ + wxString MarginGetText(int line) const; + + /** + Set the style number for the text margin for a line + */ + void MarginSetStyle(int line, int style); + + /** + Get the style number for the text margin for a line + */ + int MarginGetStyle(int line) const; + + /** + Set the style in the text margin for a line + */ + void MarginSetStyles(int line, const wxString& styles); + + /** + Get the styles in the text margin for a line + */ + wxString MarginGetStyles(int line) const; + + /** + Clear the margin text on all lines + */ + void MarginTextClearAll(); + + /** + Get the start of the range of style numbers used for margin text + */ + void MarginSetStyleOffset(int style); + + /** + Get the start of the range of style numbers used for margin text + */ + int MarginGetStyleOffset() const; + + /** + Set the margin options. + + The input should be one of the + @link wxStyledTextCtrl::wxSTC_MARGINOPTION_NONE wxSTC_MARGINOPTION_* @endlink constants. + */ + void SetMarginOptions(int marginOptions); + + /** + Get the margin options. + + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_MARGINOPTION_NONE wxSTC_MARGINOPTION_* @endlink constants. + */ + int GetMarginOptions() const; + + //@} + + /** + @member_group_name{Annotations, Annotations} + */ + //@{ + + /** + Set the annotation text for a line + */ + void AnnotationSetText(int line, const wxString& text); + + /** + Get the annotation text for a line + */ + wxString AnnotationGetText(int line) const; + + /** + Set the style number for the annotations for a line + */ + void AnnotationSetStyle(int line, int style); + + /** + Get the style number for the annotations for a line + */ + int AnnotationGetStyle(int line) const; + + /** + Set the annotation styles for a line + */ + void AnnotationSetStyles(int line, const wxString& styles); + + /** + Get the annotation styles for a line + */ + wxString AnnotationGetStyles(int line) const; + + /** + Get the number of annotation lines for a line + */ + int AnnotationGetLines(int line) const; + + /** + Clear the annotations from all lines + */ + void AnnotationClearAll(); + + /** + Set the visibility for the annotations for a view + + The input should be one of the + @link wxStyledTextCtrl::wxSTC_ANNOTATION_HIDDEN wxSTC_ANNOTATION_* @endlink constants. + */ + void AnnotationSetVisible(int visible); + + /** + Get the visibility for the annotations for a view + + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_ANNOTATION_HIDDEN wxSTC_ANNOTATION_* @endlink constants. + */ + int AnnotationGetVisible() const; + + /** + Get the start of the range of style numbers used for annotations + */ + void AnnotationSetStyleOffset(int style); + + /** + Get the start of the range of style numbers used for annotations + */ + int AnnotationGetStyleOffset() const; + + //@} + + /** + @member_group_name{OtherSettings, Other settings} + */ + //@{ + + /** + Is drawing done first into a buffer or direct to the screen? + */ + bool GetBufferedDraw() const; + + /** + If drawing is buffered then each line of text is drawn into a bitmap buffer + before drawing it to the screen to avoid flicker. + */ + void SetBufferedDraw(bool buffered); + + /** + Set the code page used to interpret the bytes of the document as characters. + */ + void SetCodePage(int codePage); + + /** + Is the IME displayed in a window or inline? + + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_IME_WINDOWED wxSTC_IME_* @endlink constants. + @since 3.1.0 + */ + int GetIMEInteraction() const; + + /** + Choose to display the the IME in a winow or inline. + + The input should be one of the + @link wxStyledTextCtrl::wxSTC_IME_WINDOWED wxSTC_IME_* @endlink constants. + @since 3.1.0 + */ + void SetIMEInteraction(int imeInteraction); + + /** + Get the code page used to interpret the bytes of the document as characters. + */ + int GetCodePage() const; + + /** + Sets the degree of caching of layout information. + + The input should be one of the + @link wxStyledTextCtrl::wxSTC_CACHE_NONE wxSTC_CACHE_* @endlink constants. + */ + void SetLayoutCache(int cacheMode); + + /** + Is drawing done in two phases with backgrounds drawn before foregrounds? + */ + bool GetTwoPhaseDraw() const; + + /** + 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 SetTwoPhaseDraw(bool twoPhase); + + /** + How many phases is drawing done in? + + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_PHASES_ONE wxSTC_PHASES_* @endlink constants. + @since 3.1.0 + */ + int GetPhasesDraw() const; + + /** + In one phase draw, text is drawn in a series of rectangular blocks with no overlap. + In two phase draw, text is drawn in a series of lines allowing runs to overlap horizontally. + In multiple phase draw, each element is drawn over the whole drawing area, allowing text + to overlap from one line to the next. + + The input should be one of the + @link wxStyledTextCtrl::wxSTC_PHASES_ONE wxSTC_PHASES_* @endlink constants. + @since 3.1.0 + */ + void SetPhasesDraw(int phases); + + /** + Change internal focus flag. + */ + void SetSTCFocus(bool focus); + + /** + Get internal focus flag. + */ + bool GetSTCFocus() const; + + /** + Set the technology used. + + The input should be one of the + @link wxStyledTextCtrl::wxSTC_TECHNOLOGY_DEFAULT wxSTC_TECHNOLOGY_* @endlink constants. + */ + void SetTechnology(int technology); + + /** + Get the tech. + + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_TECHNOLOGY_DEFAULT wxSTC_TECHNOLOGY_* @endlink constants. + */ + int GetTechnology() const; + + //@} + + /** + @member_group_name{BraceHighlighting, Brace highlighting} + */ + //@{ + + /** + Highlight the characters at two positions. + */ + void BraceHighlight(int posA, int posB); + + /** + Use specified indicator to highlight matching braces instead of changing their style. + */ + void BraceHighlightIndicator(bool useSetting, int indicator); + + /** + Highlight the character at a position indicating there is no matching brace. + */ + void BraceBadLight(int pos); + + /** + Use specified indicator to highlight non matching brace instead of changing its style. + */ + void BraceBadLightIndicator(bool useSetting, int indicator); + + /** + Find the position of a matching brace or wxSTC_INVALID_POSITION if no match. + The maxReStyle must be 0 for now. It may be defined in a future release. + */ + int BraceMatch(int pos, int maxReStyle=0); + + //@} + + /** + @member_group_name{TabsAndIndentationGuides, Tabs and Indentation Guides} + */ + //@{ + + /** + Change the visible size of a tab to be a multiple of the width of a space character. + */ + void SetTabWidth(int tabWidth); + + /** + Retrieve the visible size of a tab. + */ + int GetTabWidth() const; + + /** + Clear explicit tabstops on a line. + + @since 3.1.0 + */ + void ClearTabStops(int line); + + /** + Add an explicit tab stop for a line. + + @since 3.1.0 + */ + void AddTabStop(int line, int x); + + /** + Find the next explicit tab stop position on a line after a position. + + @since 3.1.0 + */ + int GetNextTabStop(int line, int x); + + /** + Set the number of spaces used for one level of indentation. + */ + void SetIndent(int indentSize); + + /** + Retrieve indentation size. + */ + int GetIndent() const; + + /** + Indentation will only use space characters if useTabs is false, otherwise + it will use a combination of tabs and spaces. + */ + void SetUseTabs(bool useTabs); + + /** + Retrieve whether tabs will be used in indentation. + */ + bool GetUseTabs() const; + + /** + Change the indentation of a line to a number of columns. + */ + void SetLineIndentation(int line, int indentation); + + /** + Retrieve the number of columns that a line is indented. + */ + int GetLineIndentation(int line) const; + + /** + Retrieve the position before the first non indentation character on a line. + */ + int GetLineIndentPosition(int line) const; + + /** + Show or hide indentation guides. + + The input should be one of the + @link wxStyledTextCtrl::wxSTC_IV_NONE wxSTC_IV_* @endlink constants. + */ + void SetIndentationGuides(int indentView); + + /** + Are the indentation guides visible? + + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_IV_NONE wxSTC_IV_* @endlink constants. + */ + int GetIndentationGuides() const; + + /** + Set the highlighted indentation guide column. + 0 = no highlighted guide. + */ + void SetHighlightGuide(int column); + + /** + Get the highlighted indentation guide column. + */ + int GetHighlightGuide() const; + + /** + Sets whether a tab pressed when caret is within indentation indents. + */ + void SetTabIndents(bool tabIndents); + + /** + Does a tab pressed when caret is within indentation indent? + */ + bool GetTabIndents() const; + + /** + Sets whether a backspace pressed when caret is within indentation unindents. + */ + void SetBackSpaceUnIndents(bool bsUnIndents); + + /** + Does a backspace pressed when caret is within indentation unindent? + */ + bool GetBackSpaceUnIndents() const; + + //@} + + /** + @member_group_name{Markers, Markers} + */ + //@{ + + /** + Retrieve the line number at which a particular marker is located. + */ + int MarkerLineFromHandle(int markerHandle); + + /** + Delete a marker. + */ + void MarkerDeleteHandle(int markerHandle); + + /** + Set the symbol used for a particular marker number, + and optionally the fore and background colours. + + The second argument should be one of the + @link wxStyledTextCtrl::wxSTC_MARK_CIRCLE wxSTC_MARK_* @endlink constants. + */ + void MarkerDefine(int markerNumber, int markerSymbol, + const wxColour& foreground = wxNullColour, + const wxColour& background = wxNullColour); + + /** + Set the foreground colour used for a particular marker number. + */ + void MarkerSetForeground(int markerNumber, const wxColour& fore); + + /** + Set the background colour used for a particular marker number. + */ + void MarkerSetBackground(int markerNumber, const wxColour& back); + + /** + Set the background colour used for a particular marker number when its folding block is selected. + */ + void MarkerSetBackgroundSelected(int markerNumber, const wxColour& back); + + /** + Enable/disable highlight for current folding bloc (smallest one that contains the caret) + */ + void MarkerEnableHighlight(bool enabled); + + /** + Add a marker to a line, returning an ID which can be used to find or delete the marker. + */ + int MarkerAdd(int line, int markerNumber); + + /** + Delete a marker from a line. + */ + void MarkerDelete(int line, int markerNumber); + + /** + Delete all markers with a particular number from all lines. + */ + void MarkerDeleteAll(int markerNumber); + + /** + Get a bit mask of all the markers set on a line. + */ + int MarkerGet(int line); + + /** + Find the next line at or after lineStart that includes a marker in mask. + Return -1 when no more lines. + */ + int MarkerNext(int lineStart, int markerMask); + + /** + Find the previous line before lineStart that includes a marker in mask. + */ + int MarkerPrevious(int lineStart, int markerMask); + + /** + Define a marker from a bitmap + */ + void MarkerDefineBitmap(int markerNumber, const wxBitmap& bmp); + + /** + Add a set of markers to a line. + */ + void MarkerAddSet(int line, int markerSet); + + /** + Set the alpha used for a marker that is drawn in the text area, not the margin. + */ + void MarkerSetAlpha(int markerNumber, int alpha); + + /** + Which symbol was defined for markerNumber with MarkerDefine + + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_MARK_CIRCLE wxSTC_MARK_* @endlink constants. + */ + int GetMarkerSymbolDefined(int markerNumber); + + /** + Set the width for future RGBA image data. + */ + void RGBAImageSetWidth(int width); + + /** + Set the height for future RGBA image data. + */ + void RGBAImageSetHeight(int height); + + /** + Set the scale factor in percent for future RGBA image data. + + @since 3.1.0 + */ + void RGBAImageSetScale(int scalePercent); + + /** + Define a marker from RGBA data. + It has the width and height from RGBAImageSetWidth/Height + */ + void MarkerDefineRGBAImage(int markerNumber, const unsigned char* pixels); + + //@} + + /** + @member_group_name{Indicators, Indicators} + */ + //@{ /** Set an indicator to plain, squiggle or TT. + + The second argument should be one of the + @link wxStyledTextCtrl::wxSTC_INDIC_PLAIN wxSTC_INDIC_* @endlink constants. */ void IndicatorSetStyle(int indicator, int indicatorStyle); /** Retrieve the style of an indicator. + + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_INDIC_PLAIN wxSTC_INDIC_* @endlink constants. */ int IndicatorGetStyle(int indicator) const; @@ -3575,106 +5472,126 @@ public: /** Set a hover indicator to plain, squiggle or TT. + + @since 3.1.0 */ void IndicatorSetHoverStyle(int indicator, int indicatorStyle); /** Retrieve the hover style of an indicator. + + @since 3.1.0 */ int IndicatorGetHoverStyle(int indicator) const; /** Set the foreground hover colour of an indicator. + + @since 3.1.0 */ void IndicatorSetHoverForeground(int indicator, const wxColour& fore); /** Retrieve the foreground hover colour of an indicator. + + @since 3.1.0 */ wxColour IndicatorGetHoverForeground(int indicator) const; /** Set the attributes of an indicator. + + The second argument should be a bit list containing one or more of the + @link wxStyledTextCtrl::wxSTC_INDICFLAG_VALUEFORE wxSTC_INDICFLAG_* @endlink constants. + @since 3.1.0 */ void IndicatorSetFlags(int indicator, int flags); /** Retrieve the attributes of an indicator. + + The return value will be a bit list containing one or more of the + @link wxStyledTextCtrl::wxSTC_INDICFLAG_VALUEFORE wxSTC_INDICFLAG_* @endlink constants. + @since 3.1.0 */ int IndicatorGetFlags(int indicator) const; /** - Set the foreground colour of all whitespace and whether to use this setting. + Set the indicator used for IndicatorFillRange and IndicatorClearRange */ - void SetWhitespaceForeground(bool useSetting, const wxColour& fore); + void SetIndicatorCurrent(int indicator); /** - Set the background colour of all whitespace and whether to use this setting. + Get the current indicator */ - void SetWhitespaceBackground(bool useSetting, const wxColour& back); + int GetIndicatorCurrent() const; /** - Set the size of the dots used to mark space characters. + Set the value used for IndicatorFillRange */ - void SetWhitespaceSize(int size); + void SetIndicatorValue(int value); /** - Get the size of the dots used to mark space characters. + Get the current indicator value */ - int GetWhitespaceSize() const; + int GetIndicatorValue() const; /** - Divide each styling byte into lexical class bits (default: 5) and indicator - bits (default: 3). If a lexer requires more than 32 lexical states, then this - is used to expand the possible states. + Turn a indicator on over a range. */ - void SetStyleBits(int bits); + void IndicatorFillRange(int start, int lengthFill); /** - Retrieve number of bits in style bytes used to hold the lexical state. + Turn a indicator off over a range. */ - int GetStyleBits() const; + void IndicatorClearRange(int start, int lengthClear); /** - Used to hold extra styling information for each line. + Are any indicators present at pos? */ - void SetLineState(int line, int state); + int IndicatorAllOnFor(int pos); /** - Retrieve the extra styling information for a line. + What value does a particular indicator have at a position? */ - int GetLineState(int line) const; + int IndicatorValueAt(int indicator, int pos); /** - Retrieve the last line number that has line state. + Where does a particular indicator start? */ - int GetMaxLineState() const; + int IndicatorStart(int indicator, int pos); /** - Is the background of the line containing the caret in a different colour? + Where does a particular indicator end? */ - bool GetCaretLineVisible() const; + int IndicatorEnd(int indicator, int pos); /** - Display the background of the line containing the caret in a different colour. + Set the alpha fill colour of the given indicator. */ - void SetCaretLineVisible(bool show); + void IndicatorSetAlpha(int indicator, int alpha); /** - Get the colour of the background of the line containing the caret. + Get the alpha fill colour of the given indicator. */ - wxColour GetCaretLineBackground() const; + int IndicatorGetAlpha(int indicator) const; /** - Set the colour of the background of the line containing the caret. + Set the alpha outline colour of the given indicator. */ - void SetCaretLineBackground(const wxColour& back); + void IndicatorSetOutlineAlpha(int indicator, int alpha); /** - Set a style to be changeable or not (read only). - Experimental feature, currently buggy. + Get the alpha outline colour of the given indicator. */ - void StyleSetChangeable(int style, bool changeable); + int IndicatorGetOutlineAlpha(int indicator) const; + + //@} + + /** + @member_group_name{Autocompletion, Autocompletion} + */ + //@{ /** Display a auto-completion list. @@ -3761,11 +5678,6 @@ public: */ bool AutoCompGetIgnoreCase() const; - /** - Display a list of strings and send notification when user chooses one. - */ - void UserListShow(int listType, const wxString& itemList); - /** Set whether or not autocompletion is hidden automatically when nothing matches. */ @@ -3832,426 +5744,86 @@ public: int AutoCompGetMaxHeight() const; /** - Set the number of spaces used for one level of indentation. + Get currently selected item position in the auto-completion list */ - void SetIndent(int indentSize); + int AutoCompGetCurrent() const; /** - Retrieve indentation size. - */ - int GetIndent() const; - - /** - Indentation will only use space characters if useTabs is false, otherwise - it will use a combination of tabs and spaces. - */ - void SetUseTabs(bool useTabs); - - /** - Retrieve whether tabs will be used in indentation. - */ - bool GetUseTabs() const; - - /** - Change the indentation of a line to a number of columns. - */ - void SetLineIndentation(int line, int indentation); - - /** - Retrieve the number of columns that a line is indented. - */ - int GetLineIndentation(int line) const; - - /** - Retrieve the position before the first non indentation character on a line. - */ - int GetLineIndentPosition(int line) const; - - /** - Retrieve the column number of a position, taking tab width into account. - */ - int GetColumn(int pos) const; - - /** - Count characters between two positions. - */ - int CountCharacters(int start, int end); - - /** - Show or hide the horizontal scroll bar. - */ - void SetUseHorizontalScrollBar(bool visible); - - /** - Is the horizontal scroll bar visible? - */ - bool GetUseHorizontalScrollBar() const; - - /** - Show or hide indentation guides. - */ - void SetIndentationGuides(int indentView); - - /** - Are the indentation guides visible? - */ - int GetIndentationGuides() const; - - /** - Set the highlighted indentation guide column. - 0 = no highlighted guide. - */ - void SetHighlightGuide(int column); - - /** - Get the highlighted indentation guide column. - */ - int GetHighlightGuide() const; - - /** - Get the position after the last visible characters on a line. - */ - int GetLineEndPosition(int line) const; - - /** - Get the code page used to interpret the bytes of the document as characters. - */ - int GetCodePage() const; - - /** - Get the foreground colour of the caret. - */ - wxColour GetCaretForeground() const; - - /** - In read-only mode? - */ - bool GetReadOnly() const; - - /** - Sets the position of the caret. - */ - void SetCurrentPos(int caret); - - /** - Sets the position that starts the selection - this becomes the anchor. - */ - void SetSelectionStart(int anchor); - - /** - Returns the position at the start of the selection. - */ - int GetSelectionStart() const; - - /** - Sets the position that ends the selection - this becomes the caret. - */ - void SetSelectionEnd(int caret); - - /** - Returns the position at the end of the selection. - */ - int GetSelectionEnd() const; - - /** - Set caret to a position, while removing any existing selection. - */ - void SetEmptySelection(int caret); - - /** - Sets the print magnification added to the point size of each style for printing. - */ - void SetPrintMagnification(int magnification); - - /** - Returns the print magnification. - */ - int GetPrintMagnification() const; + Set auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference. - /** - Modify colours when printing for clearer printed text. + The input should be one of the + @link wxStyledTextCtrl::wxSTC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE wxSTC_CASEINSENSITIVEBEHAVIOUR_* @endlink constants. */ - void SetPrintColourMode(int mode); + void AutoCompSetCaseInsensitiveBehaviour(int behaviour); /** - Returns the print colour mode. - */ - int GetPrintColourMode() const; + Get auto-completion case insensitive behaviour. - /** - Find some text in the document. + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE wxSTC_CASEINSENSITIVEBEHAVIOUR_* @endlink constants. */ - int FindText(int minPos, int maxPos, const wxString& text, int flags=0); + int AutoCompGetCaseInsensitiveBehaviour() const; /** - On Windows, will draw the document into a display context such as a printer. - */ - int FormatRange(bool doDraw, - int startPos, - int endPos, - wxDC* draw, - wxDC* target, - wxRect renderRect, - wxRect pageRect); + Change the effect of autocompleting when there are multiple selections. - /** - Retrieve the display line at the top of the display. + The input should be one of the + @link wxStyledTextCtrl::wxSTC_MULTIAUTOC_ONCE wxSTC_MULTIAUTOC_* @endlink constants. + @since 3.1.0 */ - int GetFirstVisibleLine() const; + void AutoCompSetMulti(int multi); /** - Retrieve the contents of a line. - */ - wxString GetLine(int line) const; + Retrieve the effect of autocompleting when there are multiple selections. - /** - Returns the number of lines in the document. There is always at least one. + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_MULTIAUTOC_ONCE wxSTC_MULTIAUTOC_* @endlink constants. + @since 3.1.0 */ - int GetLineCount() const; + int AutoCompGetMulti() const; /** - Sets the size in pixels of the left margin. - */ - void SetMarginLeft(int pixelWidth); + Set the way autocompletion lists are ordered. - /** - Returns the size in pixels of the left margin. + The input should be one of the + @link wxStyledTextCtrl::wxSTC_ORDER_PRESORTED wxSTC_ORDER_* @endlink constants. + @since 3.1.0 */ - int GetMarginLeft() const; + void AutoCompSetOrder(int order); /** - Sets the size in pixels of the right margin. - */ - void SetMarginRight(int pixelWidth); + Get the way autocompletion lists are ordered. - /** - Returns the size in pixels of the right margin. + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_ORDER_PRESORTED wxSTC_ORDER_* @endlink constants. + @since 3.1.0 */ - int GetMarginRight() const; + int AutoCompGetOrder() const; /** - Is the document different from when it was last saved? + Register an RGBA image for use in autocompletion lists. + It has the width and height from RGBAImageSetWidth/Height */ - bool GetModify() const; + void RegisterRGBAImage(int type, const unsigned char* pixels); - /** - Retrieve the selected text. - */ - wxString GetSelectedText(); - - /** - Retrieve a range of text. - */ - wxString GetTextRange(int startPos, int endPos); - - /** - Draw the selection in normal style or with selection highlighted. - */ - void HideSelection(bool hide); - - /** - Retrieve the point in the window where a position is displayed. - */ - wxPoint PointFromPosition(int pos); + //@} /** - Retrieve the line containing a position. + @member_group_name{UserLists, User lists} */ - int LineFromPosition(int pos) const; + //@{ /** - Retrieve the position at the start of a line. + Display a list of strings and send notification when user chooses one. */ - int PositionFromLine(int line) const; + void UserListShow(int listType, const wxString& itemList); - /** - Scroll horizontally and vertically. - */ - void LineScroll(int columns, int lines); - - /** - Ensure the caret is visible. - */ - void EnsureCaretVisible(); - - /** - Scroll the argument positions and the range between them into view giving - priority to the primary position then the secondary position. - This may be used to make a search match visible. - */ - void ScrollRange(int secondary, int primary); - - /** - Replace the selected text with the argument text. - */ - void ReplaceSelection(const wxString& text); - - /** - Set to read only or read write. - */ - void SetReadOnly(bool readOnly); - - /** - Will a paste succeed? - */ - bool CanPaste() const; - - /** - Are there any undoable actions in the undo history? - */ - bool CanUndo() const; - - /** - Delete the undo history. - */ - void EmptyUndoBuffer(); - - /** - Undo one action in the undo history. - */ - void Undo(); - - /** - Cut the selection to the clipboard. - */ - void Cut(); - - /** - Copy the selection to the clipboard. - */ - void Copy(); - - /** - Paste the contents of the clipboard into the document replacing the selection. - */ - void Paste(); - - /** - Clear the selection. - */ - void Clear(); - - /** - Replace the contents of the document with the argument text. - */ - void SetText(const wxString& text); - - /** - Retrieve all the text in the document. - */ - wxString GetText() const; - - /** - Retrieve the number of characters in the document. - */ - int GetTextLength() const; - - /** - Retrieve a pointer to a function that processes messages for this Scintilla. - */ - void* GetDirectFunction() const; - - /** - Retrieve a pointer value to use as the first argument when calling - the function returned by GetDirectFunction. - */ - void* GetDirectPointer() const; - - /** - Set to overtype (true) or insert mode. - */ - void SetOvertype(bool overType); - - /** - Returns true if overtype mode is active otherwise false is returned. - */ - bool GetOvertype() const; - - /** - Set the width of the insert mode caret. - */ - void SetCaretWidth(int pixelWidth); - - /** - Returns the width of the insert mode caret. - */ - int GetCaretWidth() const; - - /** - Sets the position that starts the target which is used for updating the - document without affecting the scroll position. - */ - void SetTargetStart(int start); - - /** - Get the position that starts the target. - */ - int GetTargetStart() const; - - /** - Sets the position that ends the target which is used for updating the - document without affecting the scroll position. - */ - void SetTargetEnd(int end); - - /** - Get the position that ends the target. - */ - int GetTargetEnd() const; - - /** - Sets both the start and end of the target in one call. - */ - void SetTargetRange(int start, int end); - - /** - Retrieve the text in the target. - */ - wxString GetTargetText() const; - - /** - Make the target range start and end be the same as the selection range start and end. - */ - void TargetFromSelection(); - - /** - Sets the target to the whole document. - */ - void TargetWholeDocument(); - - /** - Replace the target text with the argument text. - Text is counted so it can contain NULs. - Returns the length of the replacement text. - */ - int ReplaceTarget(const wxString& text); - - /** - 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 ReplaceTargetRE(const wxString& text); - - /** - 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 SearchInTarget(const wxString& text); - - /** - Set the search flags used by SearchInTarget. - */ - void SetSearchFlags(int searchFlags); + //@} /** - Get the search flags used by SearchInTarget. + @member_group_name{CallTips, Call tips} */ - int GetSearchFlags() const; + //@{ /** Show a call tip containing a definition near position pos. @@ -4270,6 +5842,8 @@ public: /** Retrieve the position where the caret was before displaying the call tip. + + @since 3.1.0 */ int CallTipPosAtStart(); @@ -4299,7 +5873,7 @@ public: void CallTipSetForegroundHighlight(const wxColour& fore); /** - Enable use of STYLE_CALLTIP and set call tip tab size in pixels. + Enable use of wxSTC_STYLE_CALLTIP and set call tip tab size in pixels. */ void CallTipUseStyle(int tabSize); @@ -4308,374 +5882,12 @@ public: */ void CallTipSetPosition(bool above); - /** - Find the display line of a document line taking hidden lines into account. - */ - int VisibleFromDocLine(int docLine); - - /** - Find the document line of a display line taking hidden lines into account. - */ - int DocLineFromVisible(int displayLine); - - /** - The number of display lines needed to wrap a document line - */ - int WrapCount(int docLine); - - /** - 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 SetFoldLevel(int line, int level); - - /** - Retrieve the fold level of a line. - */ - int GetFoldLevel(int line) const; - - /** - Find the last child line of a header line. - */ - int GetLastChild(int line, int level) const; - - /** - Find the parent line of a child line. - */ - int GetFoldParent(int line) const; - - /** - Make a range of lines visible. - */ - void ShowLines(int lineStart, int lineEnd); - - /** - Make a range of lines invisible. - */ - void HideLines(int lineStart, int lineEnd); - - /** - Is a line visible? - */ - bool GetLineVisible(int line) const; - - /** - Are all lines visible? - */ - bool GetAllLinesVisible() const; - - /** - Show the children of a header line. - */ - void SetFoldExpanded(int line, bool expanded); - - /** - Is a header line expanded? - */ - bool GetFoldExpanded(int line) const; - - /** - Switch a header line between expanded and contracted. - */ - void ToggleFold(int line); - - /** - Switch a header line between expanded and contracted and show some text after the line. - */ - void ToggleFoldShowText(int line, const wxString& text); - - /** - Set the style of fold display text - */ - void FoldDisplayTextSetStyle(int style); - - /** - Expand or contract a fold header. - */ - void FoldLine(int line, int action); - - /** - Expand or contract a fold header and its children. - */ - void FoldChildren(int line, int action); - - /** - Expand a fold header and all children. Use the level argument instead of the line's current level. - */ - void ExpandChildren(int line, int level); - - /** - Expand or contract all fold headers. - */ - void FoldAll(int action); - - /** - Ensure a particular line is visible by expanding any header line hiding it. - */ - void EnsureVisible(int line); - - /** - Set automatic folding behaviours. - */ - void SetAutomaticFold(int automaticFold); - - /** - Get automatic folding behaviours. - */ - int GetAutomaticFold() const; - - /** - Set some style options for folding. - */ - void SetFoldFlags(int flags); - - /** - 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 EnsureVisibleEnforcePolicy(int line); - - /** - Sets whether a tab pressed when caret is within indentation indents. - */ - void SetTabIndents(bool tabIndents); - - /** - Does a tab pressed when caret is within indentation indent? - */ - bool GetTabIndents() const; - - /** - Sets whether a backspace pressed when caret is within indentation unindents. - */ - void SetBackSpaceUnIndents(bool bsUnIndents); - - /** - Does a backspace pressed when caret is within indentation unindent? - */ - bool GetBackSpaceUnIndents() const; - - /** - Sets the time the mouse must sit still to generate a mouse dwell event. - */ - void SetMouseDwellTime(int periodMilliseconds); - - /** - Retrieve the time the mouse must sit still to generate a mouse dwell event. - */ - int GetMouseDwellTime() const; - - /** - Get position of start of word. - */ - int WordStartPosition(int pos, bool onlyWordCharacters); - - /** - Get position of end of word. - */ - int WordEndPosition(int pos, bool onlyWordCharacters); - - /** - Is the range start..end considered a word? - */ - bool IsRangeWord(int start, int end); - - /** - Sets limits to idle styling. - */ - void SetIdleStyling(int idleStyling); - - /** - Retrieve the limits to idle styling. - */ - int GetIdleStyling() const; - - /** - Sets whether text is word wrapped. - */ - void SetWrapMode(int wrapMode); - - /** - Retrieve whether text is word wrapped. - */ - int GetWrapMode() const; - - /** - Set the display mode of visual flags for wrapped lines. - */ - void SetWrapVisualFlags(int wrapVisualFlags); - - /** - Retrive the display mode of visual flags for wrapped lines. - */ - int GetWrapVisualFlags() const; - - /** - Set the location of visual flags for wrapped lines. - */ - void SetWrapVisualFlagsLocation(int wrapVisualFlagsLocation); - - /** - Retrive the location of visual flags for wrapped lines. - */ - int GetWrapVisualFlagsLocation() const; - - /** - Set the start indent for wrapped lines. - */ - void SetWrapStartIndent(int indent); - - /** - Retrive the start indent for wrapped lines. - */ - int GetWrapStartIndent() const; - - /** - Sets how wrapped sublines are placed. Default is fixed. - */ - void SetWrapIndentMode(int wrapIndentMode); - - /** - Retrieve how wrapped sublines are placed. Default is fixed. - */ - int GetWrapIndentMode() const; - - /** - Sets the degree of caching of layout information. - */ - void SetLayoutCache(int cacheMode); - - /** - Retrieve the degree of caching of layout information. - */ - int GetLayoutCache() const; - - /** - Sets the document width assumed for scrolling. - */ - void SetScrollWidth(int pixelWidth); - - /** - Retrieve the document width assumed for scrolling. - */ - int GetScrollWidth() const; - - /** - Sets whether the maximum width line displayed is used to set scroll width. - */ - void SetScrollWidthTracking(bool tracking); - - /** - Retrieve whether the scroll width tracks wide lines. - */ - bool GetScrollWidthTracking() const; - - /** - Measure the pixel width of some text in a particular style. - NUL terminated text argument. - Does not handle tab or control characters. - */ - int TextWidth(int style, const wxString& 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 SetEndAtLastLine(bool endAtLastLine); - - /** - Retrieve whether the maximum scroll position has the last - line at the bottom of the view. - */ - bool GetEndAtLastLine() const; - - /** - Retrieve the height of a particular line of text in pixels. - */ - int TextHeight(int line); - - /** - Show or hide the vertical scroll bar. - */ - void SetUseVerticalScrollBar(bool visible); - - /** - Is the vertical scroll bar visible? - */ - bool GetUseVerticalScrollBar() const; - - /** - Append a string to the end of the document without changing the selection. - */ - void AppendText(const wxString& text); - - /** - Is drawing done in two phases with backgrounds drawn before foregrounds? - */ - bool GetTwoPhaseDraw() const; - - /** - 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 SetTwoPhaseDraw(bool twoPhase); - - /** - How many phases is drawing done in? - */ - int GetPhasesDraw() const; - - /** - In one phase draw, text is drawn in a series of rectangular blocks with no overlap. - In two phase draw, text is drawn in a series of lines allowing runs to overlap horizontally. - In multiple phase draw, each element is drawn over the whole drawing area, allowing text - to overlap from one line to the next. - */ - void SetPhasesDraw(int phases); - - /** - Scroll so that a display line is at the top of the display. - */ - void SetFirstVisibleLine(int displayLine); - - /** - Change the effect of pasting when there are multiple selections. - */ - void SetMultiPaste(int multiPaste); - - /** - Retrieve the effect of pasting when there are multiple selections. - */ - int GetMultiPaste() const; - - /** - Retrieve the value of a tag from a regular expression search. - Result is NUL-terminated. - */ - wxString GetTag(int tagNumber) const; - - /** - Join the lines in the target. - */ - void LinesJoin(); - - /** - Split the lines in the target into lines that are less wide than pixelWidth - where possible. - */ - void LinesSplit(int pixelWidth); - - /** - Set one of the colours used as a chequerboard pattern in the fold margin - */ - void SetFoldMarginColour(bool useSetting, const wxColour& back); + //@} /** - Set the other colour used as a chequerboard pattern in the fold margin + @member_group_name{KeyboardCommands, Keyboard commands} */ - void SetFoldMarginHiColour(bool useSetting, const wxColour& fore); + //@{ /** Move caret down one line. @@ -4844,16 +6056,6 @@ public: */ void VCHomeExtend(); - /** - Magnify the displayed text by increasing the sizes by 1 point. - */ - void ZoomIn(); - - /** - Make the displayed text smaller by decreasing the sizes by 1 point. - */ - void ZoomOut(); - /** Delete the word to the left of the caret. */ @@ -4978,235 +6180,6 @@ public: */ void LineCopy(); - /** - Move the caret inside current view if it's not there already. - */ - void MoveCaretInsideView(); - - /** - How many characters are on a line, including end of line characters? - */ - int LineLength(int line) const; - - /** - Highlight the characters at two positions. - */ - void BraceHighlight(int posA, int posB); - - /** - Use specified indicator to highlight matching braces instead of changing their style. - */ - void BraceHighlightIndicator(bool useSetting, int indicator); - - /** - Highlight the character at a position indicating there is no matching brace. - */ - void BraceBadLight(int pos); - - /** - Use specified indicator to highlight non matching brace instead of changing its style. - */ - void BraceBadLightIndicator(bool useSetting, int indicator); - - /** - Find the position of a matching brace or INVALID_POSITION if no match. - The maxReStyle must be 0 for now. It may be defined in a future release. - */ - int BraceMatch(int pos, int maxReStyle=0); - - /** - Are the end of line characters visible? - */ - bool GetViewEOL() const; - - /** - Make the end of line characters visible or invisible. - */ - void SetViewEOL(bool visible); - - /** - Retrieve a pointer to the document object. - */ - void* GetDocPointer(); - - /** - Change the document object used. - */ - void SetDocPointer(void* docPointer); - - /** - Set which document modification events are sent to the container. - */ - void SetModEventMask(int eventMask); - - /** - Retrieve the column number which text should be kept within. - */ - int GetEdgeColumn() const; - - /** - Set the column number of the edge. - If text goes past the edge then it is highlighted. - */ - void SetEdgeColumn(int column); - - /** - Retrieve the edge highlight mode. - */ - int GetEdgeMode() const; - - /** - The edge may be displayed by a line (EDGE_LINE/EDGE_MULTILINE) or by highlighting text that - goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). - */ - void SetEdgeMode(int edgeMode); - - /** - Retrieve the colour used in edge indication. - */ - wxColour GetEdgeColour() const; - - /** - Change the colour used in edge indication. - */ - void SetEdgeColour(const wxColour& edgeColour); - - /** - Add a new vertical edge to the view. - */ - void MultiEdgeAddLine(int column, const wxColour& edgeColour); - - /** - Clear all vertical edges. - */ - void MultiEdgeClearAll(); - - /** - Sets the current caret position to be the search anchor. - */ - void SearchAnchor(); - - /** - Find some text starting at the search anchor. - Does not ensure the selection is visible. - */ - int SearchNext(int searchFlags, const wxString& text); - - /** - Find some text starting at the search anchor and moving backwards. - Does not ensure the selection is visible. - */ - int SearchPrev(int searchFlags, const wxString& text); - - /** - Retrieves the number of lines completely visible. - */ - int LinesOnScreen() const; - - /** - Set whether a pop up menu is displayed automatically when the user presses - the wrong mouse button on certain areas. - */ - void UsePopUp(int popUpMode); - - /** - Is the selection rectangular? The alternative is the more common stream selection. - */ - bool SelectionIsRectangle() const; - - /** - Set the zoom level. This number of points is added to the size of all fonts. - It may be positive to magnify or negative to reduce. - */ - void SetZoom(int zoomInPoints); - - /** - Retrieve the zoom level. - */ - int GetZoom() const; - - /** - Create a new document object. - Starts with reference count of 1 and not selected into editor. - */ - void* CreateDocument(); - - /** - Extend life of document. - */ - void AddRefDocument(void* docPointer); - - /** - Release a reference to the document, deleting document if it fades to black. - */ - void ReleaseDocument(void* docPointer); - - /** - Get which document modification events are sent to the container. - */ - int GetModEventMask() const; - - /** - Change internal focus flag. - */ - void SetSTCFocus(bool focus); - - /** - Get internal focus flag. - */ - bool GetSTCFocus() const; - - /** - Change error status - 0 = OK. - */ - void SetStatus(int status); - - /** - Get error status. - */ - int GetStatus() const; - - /** - Set whether the mouse is captured when its button is pressed. - */ - void SetMouseDownCaptures(bool captures); - - /** - Get whether mouse gets captured. - */ - bool GetMouseDownCaptures() const; - - /** - Set whether the mouse wheel can be active outside the window. - */ - void SetMouseWheelCaptures(bool captures); - - /** - Get whether mouse wheel can be active outside the window. - */ - bool GetMouseWheelCaptures() const; - - /** - Sets the cursor to one of the SC_CURSOR* values. - */ - void SetSTCCursor(int cursorType); - - /** - Get cursor type. - */ - int GetSTCCursor() const; - - /** - Change the way control characters are displayed: - If symbol is < 32, keep the drawn way, else, use the given character. - */ - void SetControlCharSymbol(int symbol); - - /** - Get the way control characters are displayed. - */ - int GetControlCharSymbol() const; - /** Move to the previous change in capitalisation. */ @@ -5229,12 +6202,6 @@ public: */ void WordPartRightExtend(); - /** - Set the way the display area is determined when a particular line - is to be moved to by Find, FindNext, GotoLine, etc. - */ - void SetVisiblePolicy(int visiblePolicy, int visibleSlop); - /** Delete back from the current position to the start of the line. */ @@ -5245,79 +6212,6 @@ public: */ void DelLineRight(); - /** - Get and Set the xOffset (ie, horizontal scroll position). - */ - void SetXOffset(int xOffset); - int GetXOffset() const; - - /** - Set the last x chosen value to be the caret x position. - */ - void ChooseCaretX(); - - /** - Set the way the caret is kept visible when going sideways. - The exclusion zone is given in pixels. - */ - void SetXCaretPolicy(int caretPolicy, int caretSlop); - - /** - Set the way the line the caret is on is kept visible. - The exclusion zone is given in lines. - */ - void SetYCaretPolicy(int caretPolicy, int caretSlop); - - /** - Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE). - */ - void SetPrintWrapMode(int wrapMode); - - /** - Is printing line wrapped? - */ - int GetPrintWrapMode() const; - - /** - Set a fore colour for active hotspots. - */ - void SetHotspotActiveForeground(bool useSetting, const wxColour& fore); - - /** - Get the fore colour for active hotspots. - */ - wxColour GetHotspotActiveForeground() const; - - /** - Set a back colour for active hotspots. - */ - void SetHotspotActiveBackground(bool useSetting, const wxColour& back); - - /** - Get the back colour for active hotspots. - */ - wxColour GetHotspotActiveBackground() const; - - /** - Enable / Disable underlining active hotspots. - */ - void SetHotspotActiveUnderline(bool underline); - - /** - Get whether underlining for active hotspots. - */ - bool GetHotspotActiveUnderline() const; - - /** - Limit hotspots to single line so hotspots on two lines don't merge. - */ - void SetHotspotSingleLine(bool singleLine); - - /** - Get the HotspotSingleLine property - */ - bool GetHotspotSingleLine() const; - /** Move caret down one paragraph (delimited by empty lines). */ @@ -5338,55 +6232,6 @@ public: */ void ParaUpExtend(); - /** - Given a valid document position, return the previous position taking code - page into account. Returns 0 if passed 0. - */ - int PositionBefore(int pos); - - /** - Given a valid document position, return the next position taking code - page into account. Maximum value returned is the last position in the document. - */ - int PositionAfter(int pos); - - /** - Given a valid document position, return a position that differs in a number - of characters. Returned value is always between 0 and last position in document. - */ - int PositionRelative(int pos, int relative); - - /** - Copy a range of text to the clipboard. Positions are clipped into the document. - */ - void CopyRange(int start, int end); - - /** - Copy argument text to the clipboard. - */ - void CopyText(int length, const wxString& text); - - /** - Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or - by lines (SC_SEL_LINES). - */ - void SetSelectionMode(int selectionMode); - - /** - Get the mode of the current selection. - */ - int GetSelectionMode() const; - - /** - Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line). - */ - int GetLineSelStartPosition(int line); - - /** - Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line). - */ - int GetLineSelEndPosition(int line); - /** Move caret down one line, extending rectangular selection to new caret position. */ @@ -5474,193 +6319,182 @@ public: */ void WordRightEndExtend(); - /** - Set the set of characters making up whitespace for when moving or selecting by word. - Should be called after SetWordChars. - */ - void SetWhitespaceChars(const wxString& characters); - - /** - Get the set of characters making up whitespace for when moving or selecting by word. - */ - wxString GetWhitespaceChars() const; - - /** - Set the set of characters making up punctuation characters - Should be called after SetWordChars. - */ - void SetPunctuationChars(const wxString& characters); - - /** - Get the set of characters making up punctuation characters - */ - wxString GetPunctuationChars() const; - - /** - Reset the set of characters for whitespace and word characters to the defaults. - */ - void SetCharsDefault(); - - /** - Get currently selected item position in the auto-completion list - */ - int AutoCompGetCurrent() const; - - /** - Set auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference. - */ - void AutoCompSetCaseInsensitiveBehaviour(int behaviour); - - /** - Get auto-completion case insensitive behaviour. - */ - int AutoCompGetCaseInsensitiveBehaviour() const; - - /** - Change the effect of autocompleting when there are multiple selections. - */ - void AutoCompSetMulti(int multi); - - /** - Retrieve the effect of autocompleting when there are multiple selections. - */ - int AutoCompGetMulti() const; - - /** - Set the way autocompletion lists are ordered. - */ - void AutoCompSetOrder(int order); - - /** - Get the way autocompletion lists are ordered. - */ - int AutoCompGetOrder() const; - - /** - Enlarge the document to a particular size of text bytes. - */ - void Allocate(int bytes); - - /** - Find the position of a column on a line taking into account tabs and - multi-byte characters. If beyond end of line, return line end position. - */ - int FindColumn(int line, int column); - - /** - Can the caret preferred x position only be changed by explicit movement commands? - */ - int GetCaretSticky() const; - - /** - Stop the caret preferred x position changing when the user types. - */ - void SetCaretSticky(int useCaretStickyBehaviour); - - /** - Switch between sticky and non-sticky: meant to be bound to a key. - */ - void ToggleCaretSticky(); - - /** - Enable/Disable convert-on-paste for line endings - */ - void SetPasteConvertEndings(bool convert); - - /** - Get convert-on-paste setting - */ - bool GetPasteConvertEndings() const; - /** Duplicate the selection. If selection empty duplicate the line containing the caret. */ void SelectionDuplicate(); /** - Set background alpha of the caret line. + Centre current line in window. */ - void SetCaretLineBackAlpha(int alpha); + void VerticalCentreCaret(); /** - Get the background alpha of the caret line. + Scroll to start of document. */ - int GetCaretLineBackAlpha() const; + void ScrollToStart(); /** - Set the style of the caret to be drawn. + Scroll to end of document. */ - void SetCaretStyle(int caretStyle); + void ScrollToEnd(); /** - Returns the current style of the caret. + Move caret to before first visible character on display line. + If already there move to first character on display line. + + @since 3.1.0 */ - int GetCaretStyle() const; + void VCHomeDisplay(); /** - Set the indicator used for IndicatorFillRange and IndicatorClearRange + Like VCHomeDisplay but extending selection to new caret position. + + @since 3.1.0 */ - void SetIndicatorCurrent(int indicator); + void VCHomeDisplayExtend(); + + //@} /** - Get the current indicator + @member_group_name{KeyBindings, Key bindings} */ - int GetIndicatorCurrent() const; + //@{ /** - Set the value used for IndicatorFillRange + When key+modifier combination keyDefinition is pressed perform sciCommand. + + The second argument should be a bit list containing one or more of the + @link wxStyledTextCtrl::wxSTC_KEYMOD_NORM wxSTC_KEYMOD_* @endlink constants + and the third argument should be one of the + @link wxStyledTextCtrl::wxSTC_CMD_BACKTAB wxSTC_CMD_* @endlink constants. */ - void SetIndicatorValue(int value); + void CmdKeyAssign(int key, int modifiers, int cmd); /** - Get the current indicator value + When key+modifier combination keyDefinition is pressed do nothing. + + The second argument should be a bit list containing one or more of the + @link wxStyledTextCtrl::wxSTC_KEYMOD_NORM wxSTC_KEYMOD_* @endlink constants. */ - int GetIndicatorValue() const; + void CmdKeyClear(int key, int modifiers); /** - Turn a indicator on over a range. + Drop all key mappings. */ - void IndicatorFillRange(int start, int lengthFill); + void CmdKeyClearAll(); + + //@} /** - Turn a indicator off over a range. + @member_group_name{PopupEditMenu, Popup edit menu} */ - void IndicatorClearRange(int start, int lengthClear); + //@{ /** - Are any indicators present at pos? + Set whether a pop up menu is displayed automatically when the user presses + the wrong mouse button on certain areas. + + The input should be one of the + @link wxStyledTextCtrl::wxSTC_POPUP_NEVER wxSTC_POPUP_* @endlink constants. */ - int IndicatorAllOnFor(int pos); + void UsePopUp(int popUpMode); + + //@} /** - What value does a particular indicator have at a position? + @member_group_name{MacroRecording, Macro recording} */ - int IndicatorValueAt(int indicator, int pos); + //@{ /** - Where does a particular indicator start? + Start notifying the container of all key presses and commands. */ - int IndicatorStart(int indicator, int pos); + void StartRecord(); /** - Where does a particular indicator end? + Stop notifying the container of all key presses and commands. */ - int IndicatorEnd(int indicator, int pos); + void StopRecord(); + + //@} /** - Set number of entries in position cache + @member_group_name{Printing, Printing} */ - void SetPositionCacheSize(int size); + //@{ /** - How many entries are allocated to the position cache? + Sets the print magnification added to the point size of each style for printing. */ - int GetPositionCacheSize() const; + void SetPrintMagnification(int magnification); /** - Copy the selection, if selection empty copy the line with the caret + Returns the print magnification. */ - void CopyAllowLine(); + int GetPrintMagnification() const; + + /** + Modify colours when printing for clearer printed text. + + The input should be one of the + @link wxStyledTextCtrl::wxSTC_PRINT_NORMAL wxSTC_PRINT_* @endlink constants. + */ + void SetPrintColourMode(int mode); + + /** + Returns the print colour mode. + + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_PRINT_NORMAL wxSTC_PRINT_* @endlink constants. + */ + int GetPrintColourMode() const; + + /** + On Windows, will draw the document into a display context such as a printer. + */ + int FormatRange(bool doDraw, + int startPos, + int endPos, + wxDC* draw, + wxDC* target, + wxRect renderRect, + wxRect pageRect); + + /** + Set printing to line wrapped (wxSTC_WRAP_WORD) or not line wrapped (wxSTC_WRAP_NONE). + */ + void SetPrintWrapMode(int wrapMode); + + /** + Is printing line wrapped? + + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_WRAP_NONE wxSTC_WRAP_* @endlink constants. + */ + int GetPrintWrapMode() const; + + //@} + + /** + @member_group_name{DirectAccess, Direct access} + */ + //@{ + + /** + Retrieve a pointer to a function that processes messages for this Scintilla. + + @since 3.1.1 + */ + void* GetDirectFunction() const; + + /** + Retrieve a pointer value to use as the first argument when calling + the function returned by GetDirectFunction. + + @since 3.1.1 + */ + void* GetDirectPointer() const; /** Compact the document buffer and return a read-only pointer to the @@ -5681,453 +6515,426 @@ public: */ int GetGapPosition() const; - /** - Set the alpha fill colour of the given indicator. - */ - void IndicatorSetAlpha(int indicator, int alpha); + //@} /** - Get the alpha fill colour of the given indicator. + @member_group_name{MultipleViews, Multiple views} */ - int IndicatorGetAlpha(int indicator) const; + //@{ /** - Set the alpha outline colour of the given indicator. + Retrieve a pointer to the document object. */ - void IndicatorSetOutlineAlpha(int indicator, int alpha); + void* GetDocPointer(); /** - Get the alpha outline colour of the given indicator. + Change the document object used. */ - int IndicatorGetOutlineAlpha(int indicator) const; + void SetDocPointer(void* docPointer); /** - Set extra ascent for each line + Create a new document object. + Starts with reference count of 1 and not selected into editor. */ - void SetExtraAscent(int extraAscent); + void* CreateDocument(); /** - Get extra ascent for each line + Extend life of document. */ - int GetExtraAscent() const; + void AddRefDocument(void* docPointer); /** - Set extra descent for each line + Release a reference to the document, deleting document if it fades to black. */ - void SetExtraDescent(int extraDescent); + void ReleaseDocument(void* docPointer); - /** - Get extra descent for each line - */ - int GetExtraDescent() const; + //@} /** - Which symbol was defined for markerNumber with MarkerDefine + @member_group_name{BackgroundLoadSave, Background loading and saving} */ - int GetMarkerSymbolDefined(int markerNumber); + //@{ /** - Set the text in the text margin for a line + Create an ILoader*. */ - void MarginSetText(int line, const wxString& text); + void* CreateLoader(int bytes) const; - /** - Get the text in the text margin for a line - */ - wxString MarginGetText(int line) const; + //@} /** - Set the style number for the text margin for a line + @member_group_name{Folding, Folding} */ - void MarginSetStyle(int line, int style); + //@{ /** - Get the style number for the text margin for a line + Find the display line of a document line taking hidden lines into account. */ - int MarginGetStyle(int line) const; + int VisibleFromDocLine(int docLine); /** - Set the style in the text margin for a line + Find the document line of a display line taking hidden lines into account. */ - void MarginSetStyles(int line, const wxString& styles); + int DocLineFromVisible(int displayLine); /** - Get the styles in the text margin for a line + 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. */ - wxString MarginGetStyles(int line) const; + void SetFoldLevel(int line, int level); /** - Clear the margin text on all lines + Retrieve the fold level of a line. */ - void MarginTextClearAll(); + int GetFoldLevel(int line) const; /** - Get the start of the range of style numbers used for margin text + Find the last child line of a header line. */ - void MarginSetStyleOffset(int style); + int GetLastChild(int line, int level) const; /** - Get the start of the range of style numbers used for margin text + Find the parent line of a child line. */ - int MarginGetStyleOffset() const; + int GetFoldParent(int line) const; /** - Set the margin options. + Make a range of lines visible. */ - void SetMarginOptions(int marginOptions); + void ShowLines(int lineStart, int lineEnd); /** - Get the margin options. + Make a range of lines invisible. */ - int GetMarginOptions() const; + void HideLines(int lineStart, int lineEnd); /** - Set the annotation text for a line + Is a line visible? */ - void AnnotationSetText(int line, const wxString& text); + bool GetLineVisible(int line) const; /** - Get the annotation text for a line + Are all lines visible? */ - wxString AnnotationGetText(int line) const; + bool GetAllLinesVisible() const; /** - Set the style number for the annotations for a line + Show the children of a header line. */ - void AnnotationSetStyle(int line, int style); + void SetFoldExpanded(int line, bool expanded); /** - Get the style number for the annotations for a line + Is a header line expanded? */ - int AnnotationGetStyle(int line) const; + bool GetFoldExpanded(int line) const; /** - Set the annotation styles for a line + Switch a header line between expanded and contracted. */ - void AnnotationSetStyles(int line, const wxString& styles); + void ToggleFold(int line); /** - Get the annotation styles for a line - */ - wxString AnnotationGetStyles(int line) const; + Switch a header line between expanded and contracted and show some text after the line. - /** - Get the number of annotation lines for a line + @since 3.1.1 */ - int AnnotationGetLines(int line) const; + void ToggleFoldShowText(int line, const wxString& text); /** - Clear the annotations from all lines - */ - void AnnotationClearAll(); + Set the style of fold display text - /** - Set the visibility for the annotations for a view + The input should be one of the + @link wxStyledTextCtrl::wxSTC_FOLDDISPLAYTEXT_HIDDEN wxSTC_FOLDDISPLAYTEXT_* @endlink constants. + @since 3.1.1 */ - void AnnotationSetVisible(int visible); + void FoldDisplayTextSetStyle(int style); /** - Get the visibility for the annotations for a view - */ - int AnnotationGetVisible() const; + Expand or contract a fold header. - /** - Get the start of the range of style numbers used for annotations + The second argument should be one of the + @link wxStyledTextCtrl::wxSTC_FOLDACTION_CONTRACT wxSTC_FOLDACTION_* @endlink constants. + @since 3.1.0 */ - void AnnotationSetStyleOffset(int style); + void FoldLine(int line, int action); /** - Get the start of the range of style numbers used for annotations - */ - int AnnotationGetStyleOffset() const; + Expand or contract a fold header and its children. - /** - Release all extended (>255) style numbers + The second argument should be one of the + @link wxStyledTextCtrl::wxSTC_FOLDACTION_CONTRACT wxSTC_FOLDACTION_* @endlink constants. + @since 3.1.0 */ - void ReleaseAllExtendedStyles(); + void FoldChildren(int line, int action); /** - Allocate some extended (>255) style numbers and return the start of the range - */ - int AllocateExtendedStyles(int numberStyles); + Expand a fold header and all children. Use the level argument instead of the line's current level. - /** - Add a container action to the undo stack + @since 3.1.0 */ - void AddUndoAction(int token, int flags); + void ExpandChildren(int line, int level); /** - Find the position of a character from a point within the window. - */ - int CharPositionFromPoint(int x, int y); + Expand or contract all fold headers. - /** - Find the position of a character from a point within the window. - Return INVALID_POSITION if not close to text. + The input should be one of the + @link wxStyledTextCtrl::wxSTC_FOLDACTION_CONTRACT wxSTC_FOLDACTION_* @endlink constants. + @since 3.1.0 */ - int CharPositionFromPointClose(int x, int y); + void FoldAll(int action); /** - Set whether switching to rectangular mode while selecting with the mouse is allowed. + Ensure a particular line is visible by expanding any header line hiding it. */ - void SetMouseSelectionRectangularSwitch(bool mouseSelectionRectangularSwitch); + void EnsureVisible(int line); /** - Whether switching to rectangular mode while selecting with the mouse is allowed. - */ - bool GetMouseSelectionRectangularSwitch() const; + Set automatic folding behaviours. - /** - Set whether multiple selections can be made + The input should be a bit list containing one or more of the + @link wxStyledTextCtrl::wxSTC_AUTOMATICFOLD_SHOW wxSTC_AUTOMATICFOLD_* @endlink constants. + @since 3.1.0 */ - void SetMultipleSelection(bool multipleSelection); + void SetAutomaticFold(int automaticFold); /** - Whether multiple selections can be made - */ - bool GetMultipleSelection() const; + Get automatic folding behaviours. - /** - Set whether typing can be performed into multiple selections + The return value will be a bit list containing one or more of the + @link wxStyledTextCtrl::wxSTC_AUTOMATICFOLD_SHOW wxSTC_AUTOMATICFOLD_* @endlink constants. + @since 3.1.0 */ - void SetAdditionalSelectionTyping(bool additionalSelectionTyping); + int GetAutomaticFold() const; /** - Whether typing can be performed into multiple selections - */ - bool GetAdditionalSelectionTyping() const; + Set some style options for folding. - /** - Set whether additional carets will blink + The second argument should be a bit list containing one or more of the + @link wxStyledTextCtrl::wxSTC_FOLDFLAG_LINEBEFORE_EXPANDED wxSTC_FOLDFLAG_* @endlink constants. */ - void SetAdditionalCaretsBlink(bool additionalCaretsBlink); + void SetFoldFlags(int flags); /** - Whether additional carets will blink + 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. */ - bool GetAdditionalCaretsBlink() const; + void EnsureVisibleEnforcePolicy(int line); /** - Set whether additional carets are visible + Find the next line at or after lineStart that is a contracted fold header line. + Return -1 when no more lines. */ - void SetAdditionalCaretsVisible(bool additionalCaretsVisible); + int ContractedFoldNext(int lineStart); - /** - Whether additional carets are visible - */ - bool GetAdditionalCaretsVisible() const; + //@} /** - How many selections are there? + @member_group_name{LineWrapping, Line wrapping} */ - int GetSelections() const; + //@{ /** - Is every selected range empty? + The number of display lines needed to wrap a document line */ - bool GetSelectionEmpty() const; + int WrapCount(int docLine); /** - Clear selections to a single empty stream selection - */ - void ClearSelections(); + Sets whether text is word wrapped. - /** - Add a selection + The input should be one of the + @link wxStyledTextCtrl::wxSTC_WRAP_NONE wxSTC_WRAP_* @endlink constants. */ - int AddSelection(int caret, int anchor); + void SetWrapMode(int wrapMode); /** - Drop one selection - */ - void DropSelectionN(int selection); + Retrieve whether text is word wrapped. - /** - Set the main selection + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_WRAP_NONE wxSTC_WRAP_* @endlink constants. */ - void SetMainSelection(int selection); + int GetWrapMode() const; /** - Which selection is the main selection - */ - int GetMainSelection() const; + Set the display mode of visual flags for wrapped lines. - /** - Set the caret position of the nth selection. + The input should be a bit list containing one or more of the + @link wxStyledTextCtrl::wxSTC_WRAPVISUALFLAG_NONE wxSTC_WRAPVISUALFLAG_* @endlink constants. */ - void SetSelectionNCaret(int selection, int caret); + void SetWrapVisualFlags(int wrapVisualFlags); /** - Return the caret position of the nth selection. - */ - int GetSelectionNCaret(int selection) const; + Retrive the display mode of visual flags for wrapped lines. - /** - Set the anchor position of the nth selection. + The return value will be a bit list containing one or more of the + @link wxStyledTextCtrl::wxSTC_WRAPVISUALFLAG_NONE wxSTC_WRAPVISUALFLAG_* @endlink constants. */ - void SetSelectionNAnchor(int selection, int anchor); + int GetWrapVisualFlags() const; /** - Return the anchor position of the nth selection. - */ - int GetSelectionNAnchor(int selection) const; + Set the location of visual flags for wrapped lines. - /** - Set the virtual space of the caret of the nth selection. + The input should be a bit list containing one or more of the + @link wxStyledTextCtrl::wxSTC_WRAPVISUALFLAGLOC_DEFAULT wxSTC_WRAPVISUALFLAGLOC_* @endlink constants. */ - void SetSelectionNCaretVirtualSpace(int selection, int space); + void SetWrapVisualFlagsLocation(int wrapVisualFlagsLocation); /** - Return the virtual space of the caret of the nth selection. - */ - int GetSelectionNCaretVirtualSpace(int selection) const; + Retrive the location of visual flags for wrapped lines. - /** - Set the virtual space of the anchor of the nth selection. + The return value will be a bit list containing one or more of the + @link wxStyledTextCtrl::wxSTC_WRAPVISUALFLAGLOC_DEFAULT wxSTC_WRAPVISUALFLAGLOC_* @endlink constants. */ - void SetSelectionNAnchorVirtualSpace(int selection, int space); + int GetWrapVisualFlagsLocation() const; /** - Return the virtual space of the anchor of the nth selection. + Set the start indent for wrapped lines. */ - int GetSelectionNAnchorVirtualSpace(int selection) const; + void SetWrapStartIndent(int indent); /** - Sets the position that starts the selection - this becomes the anchor. + Retrive the start indent for wrapped lines. */ - void SetSelectionNStart(int selection, int anchor); + int GetWrapStartIndent() const; /** - Returns the position at the start of the selection. - */ - int GetSelectionNStart(int selection) const; + Sets how wrapped sublines are placed. Default is wxSTC_WRAPINDENT_FIXED. - /** - Sets the position that ends the selection - this becomes the currentPosition. + The input should be one of the + @link wxStyledTextCtrl::wxSTC_WRAPINDENT_FIXED wxSTC_WRAPINDENT_* @endlink constants. */ - void SetSelectionNEnd(int selection, int caret); + void SetWrapIndentMode(int wrapIndentMode); /** - Returns the position at the end of the selection. - */ - int GetSelectionNEnd(int selection) const; + Retrieve how wrapped sublines are placed. Default is wxSTC_WRAPINDENT_FIXED. - /** - Set the caret position of the rectangular selection. + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_WRAPINDENT_FIXED wxSTC_WRAPINDENT_* @endlink constants. */ - void SetRectangularSelectionCaret(int caret); + int GetWrapIndentMode() const; /** - Return the caret position of the rectangular selection. - */ - int GetRectangularSelectionCaret() const; + Retrieve the degree of caching of layout information. - /** - Set the anchor position of the rectangular selection. + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_CACHE_NONE wxSTC_CACHE_* @endlink constants. */ - void SetRectangularSelectionAnchor(int anchor); + int GetLayoutCache() const; /** - Return the anchor position of the rectangular selection. + Join the lines in the target. */ - int GetRectangularSelectionAnchor() const; + void LinesJoin(); /** - Set the virtual space of the caret of the rectangular selection. + Split the lines in the target into lines that are less wide than pixelWidth + where possible. */ - void SetRectangularSelectionCaretVirtualSpace(int space); + void LinesSplit(int pixelWidth); /** - Return the virtual space of the caret of the rectangular selection. + Set number of entries in position cache */ - int GetRectangularSelectionCaretVirtualSpace() const; + void SetPositionCacheSize(int size); /** - Set the virtual space of the anchor of the rectangular selection. + How many entries are allocated to the position cache? */ - void SetRectangularSelectionAnchorVirtualSpace(int space); + int GetPositionCacheSize() const; + + //@} /** - Return the virtual space of the anchor of the rectangular selection. + @member_group_name{Zooming, Zooming} */ - int GetRectangularSelectionAnchorVirtualSpace() const; + //@{ /** - Set options for virtual space behaviour. + Magnify the displayed text by increasing the sizes by 1 point. */ - void SetVirtualSpaceOptions(int virtualSpaceOptions); + void ZoomIn(); /** - Return options for virtual space behaviour. + Make the displayed text smaller by decreasing the sizes by 1 point. */ - int GetVirtualSpaceOptions() const; + void ZoomOut(); /** - On GTK+, allow selecting the modifier key to use for mouse-based - rectangular selection. Often the window manager requires Alt+Mouse Drag - for moving windows. - Valid values are SCMOD_CTRL(default), SCMOD_ALT, or SCMOD_SUPER. + Set the zoom level. This number of points is added to the size of all fonts. + It may be positive to magnify or negative to reduce. */ - void SetRectangularSelectionModifier(int modifier); + void SetZoom(int zoomInPoints); /** - Get the modifier key used for rectangular selection. + Retrieve the zoom level. */ - int GetRectangularSelectionModifier() const; + int GetZoom() const; + + //@} /** - Set the foreground colour of additional selections. - Must have previously called SetSelFore with non-zero first argument for this to have an effect. + @member_group_name{LongLines, Long lines} */ - void SetAdditionalSelForeground(const wxColour& fore); + //@{ /** - Set the background colour of additional selections. - Must have previously called SetSelBack with non-zero first argument for this to have an effect. + Retrieve the column number which text should be kept within. */ - void SetAdditionalSelBackground(const wxColour& back); + int GetEdgeColumn() const; /** - Set the alpha of the selection. + Set the column number of the edge. + If text goes past the edge then it is highlighted. */ - void SetAdditionalSelAlpha(int alpha); + void SetEdgeColumn(int column); /** - Get the alpha of the selection. + Retrieve the edge highlight mode. + + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_EDGE_NONE wxSTC_EDGE_* @endlink constants. */ - int GetAdditionalSelAlpha() const; + int GetEdgeMode() const; /** - Set the foreground colour of additional carets. + The edge may be displayed by a line (wxSTC_EDGE_LINE/wxSTC_EDGE_MULTILINE) or by highlighting text that + goes beyond it (wxSTC_EDGE_BACKGROUND) or not displayed at all (wxSTC_EDGE_NONE). + + The input should be one of the + @link wxStyledTextCtrl::wxSTC_EDGE_NONE wxSTC_EDGE_* @endlink constants. */ - void SetAdditionalCaretForeground(const wxColour& fore); + void SetEdgeMode(int edgeMode); /** - Get the foreground colour of additional carets. + Retrieve the colour used in edge indication. */ - wxColour GetAdditionalCaretForeground() const; + wxColour GetEdgeColour() const; /** - Set the main selection to the next selection. + Change the colour used in edge indication. */ - void RotateSelection(); + void SetEdgeColour(const wxColour& edgeColour); /** - Swap that caret and anchor of the main selection. + Add a new vertical edge to the view. + + @since 3.1.1 */ - void SwapMainAnchorCaret(); + void MultiEdgeAddLine(int column, const wxColour& edgeColour); /** - Add the next occurrence of the main selection to the set of selections as main. - If the current selection is empty then select word around caret. + Clear all vertical edges. + + @since 3.1.1 */ - void MultipleSelectAddNext(); + void MultiEdgeClearAll(); + + //@} /** - Add each occurrence of the main selection in the target to the set of selections. - If the current selection is empty then select word around caret. + @member_group_name{Lexer, Lexer} */ - void MultipleSelectAddEach(); + //@{ /** Indicate that the internal state of a lexer has changed over a range and therefore @@ -6135,158 +6942,19 @@ public: */ int ChangeLexerState(int start, int end); - /** - Find the next line at or after lineStart that is a contracted fold header line. - Return -1 when no more lines. - */ - int ContractedFoldNext(int lineStart); - - /** - Centre current line in window. - */ - void VerticalCentreCaret(); - - /** - Move the selected lines up one line, shifting the line above after the selection - */ - void MoveSelectedLinesUp(); - - /** - Move the selected lines down one line, shifting the line below before the selection - */ - void MoveSelectedLinesDown(); - - /** - Set the identifier reported as idFrom in notification messages. - */ - void SetIdentifier(int identifier); - - /** - Get the identifier. - */ - int GetIdentifier() const; - - /** - Set the width for future RGBA image data. - */ - void RGBAImageSetWidth(int width); - - /** - Set the height for future RGBA image data. - */ - void RGBAImageSetHeight(int height); - - /** - Set the scale factor in percent for future RGBA image data. - */ - void RGBAImageSetScale(int scalePercent); - - /** - Define a marker from RGBA data. - It has the width and height from RGBAImageSetWidth/Height - */ - void MarkerDefineRGBAImage(int markerNumber, const unsigned char* pixels); - - /** - Register an RGBA image for use in autocompletion lists. - It has the width and height from RGBAImageSetWidth/Height - */ - void RegisterRGBAImage(int type, const unsigned char* pixels); - - /** - Scroll to start of document. - */ - void ScrollToStart(); - - /** - Scroll to end of document. - */ - void ScrollToEnd(); - - /** - Set the technology used. - */ - void SetTechnology(int technology); - - /** - Get the tech. - */ - int GetTechnology() const; - - /** - Create an ILoader*. - */ - void* CreateLoader(int bytes) const; - - /** - Move caret to before first visible character on display line. - If already there move to first character on display line. - */ - void VCHomeDisplay(); - - /** - Like VCHomeDisplay but extending selection to new caret position. - */ - void VCHomeDisplayExtend(); - - /** - Is the caret line always visible? - */ - bool GetCaretLineVisibleAlways() const; - - /** - Sets the caret line to always visible. - */ - void SetCaretLineVisibleAlways(bool alwaysVisible); - - /** - Set the line end types that the application wants to use. May not be used if incompatible with lexer or encoding. - */ - void SetLineEndTypesAllowed(int lineEndBitSet); - - /** - Get the line end types currently allowed. - */ - int GetLineEndTypesAllowed() const; - - /** - Get the line end types currently recognised. May be a subset of the allowed types due to lexer limitation. - */ - int GetLineEndTypesActive() const; - - /** - Set the way a character is drawn. - */ - void SetRepresentation(const wxString& encodedCharacter, const wxString& representation); - - /** - Set the way a character is drawn. - Result is NUL-terminated. - */ - wxString GetRepresentation(const wxString& encodedCharacter) const; - - /** - Remove a character representation. - */ - void ClearRepresentation(const wxString& encodedCharacter); - - /** - Start notifying the container of all key presses and commands. - */ - void StartRecord(); - - /** - Stop notifying the container of all key presses and commands. - */ - void StopRecord(); - /** Set the lexing language of the document. + + The input should be one of the + @link wxStyledTextCtrl::wxSTC_LEX_A68K wxSTC_LEX_* @endlink constants. */ void SetLexer(int lexer); /** Retrieve the lexing language of the document. + + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_LEX_A68K wxSTC_LEX_* @endlink constants. */ int GetLexer() const; @@ -6312,33 +6980,32 @@ public: /** Load a lexer library (dll / so). + + @since 3.1.1 */ void LoadLexerLibrary(const wxString& path); /** - Retrieve a 'property' value previously set with SetProperty. + Retrieve a "property" value previously set with SetProperty. */ wxString GetProperty(const wxString& key); /** - Retrieve a 'property' value previously set with SetProperty, - with '$()' variable replacement on returned buffer. + Retrieve a "property" value previously set with SetProperty, + with "$()" variable replacement on returned buffer. */ wxString GetPropertyExpanded(const wxString& key); /** - Retrieve a 'property' value previously set with SetProperty, - interpreted as an int AFTER any '$()' variable replacement. + Retrieve a "property" value previously set with SetProperty, + interpreted as an int AFTER any "$()" variable replacement. */ int GetPropertyInt(const wxString &key, int defaultValue=0) const; - /** - Retrieve the number of bits the current lexer needs for styling. - */ - int GetStyleBitsNeeded() const; - /** Retrieve the lexing language of the document. + + @since 3.1.1 */ wxString GetLexerLanguage() const; @@ -6348,85 +7015,182 @@ public: void* PrivateLexerCall(int operation, void* pointer); /** - Retrieve a '\n' separated list of properties understood by the current lexer. - Result is NUL-terminated. + Retrieve a '\\n' separated list of properties understood by the current lexer. */ wxString PropertyNames() const; /** Retrieve the type of a property. + + The return value will be one of the + @link wxStyledTextCtrl::wxSTC_TYPE_BOOLEAN wxSTC_TYPE_* @endlink constants. */ int PropertyType(const wxString& name); /** Describe a property. - Result is NUL-terminated. */ wxString DescribeProperty(const wxString& name) const; /** - Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer. - Result is NUL-terminated. + Retrieve a '\\n' separated list of descriptions of the keyword sets understood by the current lexer. */ wxString DescribeKeyWordSets() const; - /** - Bit set of LineEndType enumertion for which line ends beyond the standard - LF, CR, and CRLF are supported by the lexer. - */ - int GetLineEndTypesSupported() const; - /** Allocate a set of sub styles for a particular base style, returning start of range + + @since 3.1.0 */ int AllocateSubStyles(int styleBase, int numberStyles); /** The starting style number for the sub styles associated with a base style + + @since 3.1.0 */ int GetSubStylesStart(int styleBase) const; /** The number of sub styles associated with a base style + + @since 3.1.0 */ int GetSubStylesLength(int styleBase) const; /** For a sub style, return the base style, else return the argument. + + @since 3.1.0 */ int GetStyleFromSubStyle(int subStyle) const; /** For a secondary style, return the primary style, else return the argument. + + @since 3.1.0 */ int GetPrimaryStyleFromStyle(int style) const; /** Free allocated sub styles + + @since 3.1.0 */ void FreeSubStyles(); /** Set the identifiers that are shown in a particular style + + @since 3.1.0 */ void SetIdentifiers(int style, const wxString& identifiers); /** Where styles are duplicated by a feature such as active/inactive code return the distance between the two types. + + @since 3.1.0 */ int DistanceToSecondaryStyles() const; /** Get the set of base styles that can be extended with sub styles - Result is NUL-terminated. + + @since 3.1.0 */ wxString GetSubStyleBases() const; - //}}} + //@} + + /** + @member_group_name{Notifications, Event related items} + */ + //@{ + + /** + Sets the time the mouse must sit still to generate a mouse dwell event. + + The input should be a time in milliseconds or wxSTC_TIME_FOREVER. + */ + void SetMouseDwellTime(int periodMilliseconds); + + /** + Retrieve the time the mouse must sit still to generate a mouse dwell event. + + The return value will be a time in milliseconds or wxSTC_TIME_FOREVER. + */ + int GetMouseDwellTime() const; + + /** + Set which document modification events are sent to the container. + + The input should be a bit list containing one or more of the + @link wxStyledTextCtrl::wxSTC_MOD_INSERTTEXT wxSTC_MOD_* @endlink constants, + the @link wxStyledTextCtrl::wxSTC_PERFORMED_REDO wxSTC_PERFORMED_* @endlink constants, + wxSTC_STARTACTION, wxSTC_MULTILINEUNDOREDO, wxSTC_MULTISTEPUNDOREDO, and wxSTC_LASTSTEPINUNDOREDO. + The input can also be wxSTC_MODEVENTMASKALL to indicate that all changes + should generate events. + */ + void SetModEventMask(int eventMask); + + /** + Get which document modification events are sent to the container. + + The return value will wxSTC_MODEVENTMASKALL if all changes generate + events. Otherwise it will be a bit list containing one or more of the + @link wxStyledTextCtrl::wxSTC_MOD_INSERTTEXT wxSTC_MOD_* @endlink constants, + the @link wxStyledTextCtrl::wxSTC_PERFORMED_REDO wxSTC_PERFORMED_* @endlink constants, + wxSTC_STARTACTION, wxSTC_MULTILINEUNDOREDO, wxSTC_MULTISTEPUNDOREDO, and wxSTC_LASTSTEPINUNDOREDO. + */ + int GetModEventMask() const; + + /** + Set the identifier reported as idFrom in notification messages. + */ + void SetIdentifier(int identifier); + + /** + Get the identifier. + */ + int GetIdentifier() const; //@} + /** + @member_group_name{DeprecatedMessages, Deprecated items} + + These methods should not be used in new code. + */ + //@{ + + /** + Divide each styling byte into lexical class bits (default: 5) and indicator + bits (default: 3). If a lexer requires more than 32 lexical states, then this + is used to expand the possible states. + + @deprecated + */ + void SetStyleBits(int bits); + + /** + Retrieve number of bits in style bytes used to hold the lexical state. + + @deprecated + */ + int GetStyleBits() const; + + /** + Retrieve the number of bits the current lexer needs for styling. + + @deprecated + */ + int GetStyleBitsNeeded() const; + + //@} + + //}}} + // Manually declared methods // ---------------------------------------------- diff --git a/src/stc/gen_docs.py b/src/stc/gen_docs.py new file mode 100644 index 0000000000..41f6974e5e --- /dev/null +++ b/src/stc/gen_docs.py @@ -0,0 +1,1401 @@ +#!/usr/bin/env python +#---------------------------------------------------------------------------- +# Name: src/stc/gen_docs.py +# Purpose: Helper function and data used by gen_iface.py to generate +# docstrings for wxStyledTextCtrl methods. +# Author: New Pagodi +# Created: 2017-02-24 +# Copyright: (c) 2017 wxWidgets development team +# Licence: wxWindows licence +#---------------------------------------------------------------------------- + + +# List of the categories for the documentation. Tuple items are: +# +# 1. the brief name for this category (this must be 1 word) +# 2. the full name of this category. This will appear in the documentation. +# 3. the description of this category or 0 for none. +# +categoriesList = [ + ('TextRetrievalAndModification' ,'Text retrieval and modification', 0), + ('Searching' ,'Searching and replacing', 0), + ('Overtype' ,'Overtype', 0), + ('CutCopyAndPaste' ,'Cut copy and paste', 0), + ('ErrorHandling' ,'Error handling', 0), + ('UndoAndRedo' ,'Undo and Redo', 0), + ('SelectionAndInformation' ,'Selection and information', 0), + ('MultipleSelectionAndVirtualSpace','Multiple Selection and Virtual Space', 0), + ('ScrollingAndAutomaticScrolling' ,'Scrolling and automatic scrolling', 0), + ('WhiteSpace' ,'White space', 0), + ('Cursor' ,'Cursor', 0), + ('MouseCapture' ,'Mouse capture', 0), + ('LineEndings' ,'Line endings', 0), + ('Words' ,'Words', 0), + ('Styling' ,'Styling', 0), + ('StyleDefinition' ,'Style definition', 0), + ('CaretAndSelectionStyles' ,'Caret selection and hotspot styles', 0), + ('CharacterRepresentations' ,'Character representations', 0), + ('Margins' ,'Margins', 0), + ('Annotations' ,'Annotations', 0), + ('OtherSettings' ,'Other settings', 0), + ('BraceHighlighting' ,'Brace highlighting', 0), + ('TabsAndIndentationGuides' ,'Tabs and Indentation Guides', 0), + ('Markers' ,'Markers', 0), + ('Indicators' ,'Indicators', 0), + ('Autocompletion' ,'Autocompletion', 0), + ('UserLists' ,'User lists', 0), + ('CallTips' ,'Call tips', 0), + ('KeyboardCommands' ,'Keyboard commands', 0), + ('KeyBindings' ,'Key bindings', 0), + ('PopupEditMenu' ,'Popup edit menu', 0), + ('MacroRecording' ,'Macro recording', 0), + ('Printing' ,'Printing', 0), + ('DirectAccess' ,'Direct access', 0), + ('MultipleViews' ,'Multiple views', 0), + ('BackgroundLoadSave' ,'Background loading and saving', 0), + ('Folding' ,'Folding', 0), + ('LineWrapping' ,'Line wrapping', 0), + ('Zooming' ,'Zooming', 0), + ('LongLines' ,'Long lines', 0), + ('Lexer' ,'Lexer', 0), + ('Notifications' ,'Event related items', 0), + ('DeprecatedMessages' ,'Deprecated items', + ('These methods should not be used in new code.',)) +] + +# Assign each method to a category +docsMap = { + 'AnnotationClearAll':'Annotations', + 'AnnotationGetLines':'Annotations', + 'AnnotationGetStyle':'Annotations', + 'AnnotationGetStyleOffset':'Annotations', + 'AnnotationGetStyles':'Annotations', + 'AnnotationGetText':'Annotations', + 'AnnotationGetVisible':'Annotations', + 'AnnotationSetStyle':'Annotations', + 'AnnotationSetStyleOffset':'Annotations', + 'AnnotationSetStyles':'Annotations', + 'AnnotationSetText':'Annotations', + 'AnnotationSetVisible':'Annotations', + 'AutoCActive':'Autocompletion', + 'AutoCCancel':'Autocompletion', + 'AutoCComplete':'Autocompletion', + 'AutoCGetAutoHide':'Autocompletion', + 'AutoCGetCancelAtStart':'Autocompletion', + 'AutoCGetCaseInsensitiveBehaviour':'Autocompletion', + 'AutoCGetChooseSingle':'Autocompletion', + 'AutoCGetCurrent':'Autocompletion', + 'AutoCGetDropRestOfWord':'Autocompletion', + 'AutoCGetIgnoreCase':'Autocompletion', + 'AutoCGetMaxHeight':'Autocompletion', + 'AutoCGetMaxWidth':'Autocompletion', + 'AutoCGetMulti':'Autocompletion', + 'AutoCGetOrder':'Autocompletion', + 'AutoCGetSeparator':'Autocompletion', + 'AutoCGetTypeSeparator':'Autocompletion', + 'AutoCPosStart':'Autocompletion', + 'AutoCSelect':'Autocompletion', + 'AutoCSetAutoHide':'Autocompletion', + 'AutoCSetCancelAtStart':'Autocompletion', + 'AutoCSetCaseInsensitiveBehaviour':'Autocompletion', + 'AutoCSetChooseSingle':'Autocompletion', + 'AutoCSetDropRestOfWord':'Autocompletion', + 'AutoCSetFillUps':'Autocompletion', + 'AutoCSetIgnoreCase':'Autocompletion', + 'AutoCSetMaxHeight':'Autocompletion', + 'AutoCSetMaxWidth':'Autocompletion', + 'AutoCSetMulti':'Autocompletion', + 'AutoCSetOrder':'Autocompletion', + 'AutoCSetSeparator':'Autocompletion', + 'AutoCSetTypeSeparator':'Autocompletion', + 'AutoCShow':'Autocompletion', + 'AutoCStops':'Autocompletion', + 'ClearRegisteredImages':'Autocompletion', + 'RegisterImage':'Autocompletion', + 'RegisterRGBAImage':'Autocompletion', + 'CreateLoader':'BackgroundLoadSave', + 'BraceBadLight':'BraceHighlighting', + 'BraceBadLightIndicator':'BraceHighlighting', + 'BraceHighlight':'BraceHighlighting', + 'BraceHighlightIndicator':'BraceHighlighting', + 'BraceMatch':'BraceHighlighting', + 'CallTipActive':'CallTips', + 'CallTipCancel':'CallTips', + 'CallTipPosStart':'CallTips', + 'CallTipSetBack':'CallTips', + 'CallTipSetFore':'CallTips', + 'CallTipSetForeHlt':'CallTips', + 'CallTipSetHlt':'CallTips', + 'CallTipSetPosition':'CallTips', + 'CallTipSetPosStart':'CallTips', + 'CallTipShow':'CallTips', + 'CallTipUseStyle':'CallTips', + 'GetCaretFore':'CaretAndSelectionStyles', + 'GetCaretLineBack':'CaretAndSelectionStyles', + 'GetCaretLineBackAlpha':'CaretAndSelectionStyles', + 'GetCaretLineVisible':'CaretAndSelectionStyles', + 'GetCaretLineVisibleAlways':'CaretAndSelectionStyles', + 'GetCaretPeriod':'CaretAndSelectionStyles', + 'GetCaretSticky':'CaretAndSelectionStyles', + 'GetCaretStyle':'CaretAndSelectionStyles', + 'GetCaretWidth':'CaretAndSelectionStyles', + 'GetHotspotActiveBack':'CaretAndSelectionStyles', + 'GetHotspotActiveFore':'CaretAndSelectionStyles', + 'GetHotspotActiveUnderline':'CaretAndSelectionStyles', + 'GetHotspotSingleLine':'CaretAndSelectionStyles', + 'GetSelAlpha':'CaretAndSelectionStyles', + 'GetSelEOLFilled':'CaretAndSelectionStyles', + 'SetCaretFore':'CaretAndSelectionStyles', + 'SetCaretLineBack':'CaretAndSelectionStyles', + 'SetCaretLineBackAlpha':'CaretAndSelectionStyles', + 'SetCaretLineVisible':'CaretAndSelectionStyles', + 'SetCaretLineVisibleAlways':'CaretAndSelectionStyles', + 'SetCaretPeriod':'CaretAndSelectionStyles', + 'SetCaretSticky':'CaretAndSelectionStyles', + 'SetCaretStyle':'CaretAndSelectionStyles', + 'SetCaretWidth':'CaretAndSelectionStyles', + 'SetHotspotActiveBack':'CaretAndSelectionStyles', + 'SetHotspotActiveFore':'CaretAndSelectionStyles', + 'SetHotspotActiveUnderline':'CaretAndSelectionStyles', + 'SetHotspotSingleLine':'CaretAndSelectionStyles', + 'SetSelAlpha':'CaretAndSelectionStyles', + 'SetSelBack':'CaretAndSelectionStyles', + 'SetSelEOLFilled':'CaretAndSelectionStyles', + 'SetSelFore':'CaretAndSelectionStyles', + 'ToggleCaretSticky':'CaretAndSelectionStyles', + 'ClearRepresentation':'CharacterRepresentations', + 'GetControlCharSymbol':'CharacterRepresentations', + 'GetRepresentation':'CharacterRepresentations', + 'SetControlCharSymbol':'CharacterRepresentations', + 'SetRepresentation':'CharacterRepresentations', + 'GetCursor':'Cursor', + 'SetCursor':'Cursor', + 'CanPaste':'CutCopyAndPaste', + 'Clear':'CutCopyAndPaste', + 'Copy':'CutCopyAndPaste', + 'CopyAllowLine':'CutCopyAndPaste', + 'CopyRange':'CutCopyAndPaste', + 'CopyText':'CutCopyAndPaste', + 'Cut':'CutCopyAndPaste', + 'GetPasteConvertEndings':'CutCopyAndPaste', + 'Paste':'CutCopyAndPaste', + 'SetPasteConvertEndings':'CutCopyAndPaste', + 'GetKeysUnicode':'DeprecatedMessages', + 'GetStyleBits':'DeprecatedMessages', + 'GetStyleBitsNeeded':'DeprecatedMessages', + 'SetKeysUnicode':'DeprecatedMessages', + 'SetStyleBits':'DeprecatedMessages', + 'GetCharacterPointer':'DirectAccess', + 'GetDirectFunction':'DirectAccess', + 'GetDirectPointer':'DirectAccess', + 'GetGapPosition':'DirectAccess', + 'GetRangePointer':'DirectAccess', + 'GetStatus':'ErrorHandling', + 'SetStatus':'ErrorHandling', + 'ContractedFoldNext':'Folding', + 'DocLineFromVisible':'Folding', + 'EnsureVisible':'Folding', + 'EnsureVisibleEnforcePolicy':'Folding', + 'ExpandChildren':'Folding', + 'FoldAll':'Folding', + 'FoldChildren':'Folding', + 'FoldDisplayTextSetStyle':'Folding', + 'FoldLine':'Folding', + 'GetAllLinesVisible':'Folding', + 'GetAutomaticFold':'Folding', + 'GetFoldExpanded':'Folding', + 'GetFoldLevel':'Folding', + 'GetFoldParent':'Folding', + 'GetLastChild':'Folding', + 'GetLineVisible':'Folding', + 'HideLines':'Folding', + 'SetAutomaticFold':'Folding', + 'SetFoldExpanded':'Folding', + 'SetFoldFlags':'Folding', + 'SetFoldLevel':'Folding', + 'ShowLines':'Folding', + 'ToggleFold':'Folding', + 'ToggleFoldShowText':'Folding', + 'VisibleFromDocLine':'Folding', + 'GetIndicatorCurrent':'Indicators', + 'GetIndicatorValue':'Indicators', + 'IndicatorAllOnFor':'Indicators', + 'IndicatorClearRange':'Indicators', + 'IndicatorEnd':'Indicators', + 'IndicatorFillRange':'Indicators', + 'IndicatorStart':'Indicators', + 'IndicatorValueAt':'Indicators', + 'IndicGetAlpha':'Indicators', + 'IndicGetFlags':'Indicators', + 'IndicGetFore':'Indicators', + 'IndicGetHoverFore':'Indicators', + 'IndicGetHoverStyle':'Indicators', + 'IndicGetOutlineAlpha':'Indicators', + 'IndicGetStyle':'Indicators', + 'IndicGetUnder':'Indicators', + 'IndicSetAlpha':'Indicators', + 'IndicSetFlags':'Indicators', + 'IndicSetFore':'Indicators', + 'IndicSetHoverFore':'Indicators', + 'IndicSetHoverStyle':'Indicators', + 'IndicSetOutlineAlpha':'Indicators', + 'IndicSetStyle':'Indicators', + 'IndicSetUnder':'Indicators', + 'SetIndicatorCurrent':'Indicators', + 'SetIndicatorValue':'Indicators', + 'AssignCmdKey':'KeyBindings', + 'ClearAllCmdKeys':'KeyBindings', + 'ClearCmdKey':'KeyBindings', + 'BackTab':'KeyboardCommands', + 'Cancel':'KeyboardCommands', + 'CharLeft':'KeyboardCommands', + 'CharLeftExtend':'KeyboardCommands', + 'CharLeftRectExtend':'KeyboardCommands', + 'CharRight':'KeyboardCommands', + 'CharRightExtend':'KeyboardCommands', + 'CharRightRectExtend':'KeyboardCommands', + 'DeleteBack':'KeyboardCommands', + 'DeleteBackNotLine':'KeyboardCommands', + 'DelLineLeft':'KeyboardCommands', + 'DelLineRight':'KeyboardCommands', + 'DelWordLeft':'KeyboardCommands', + 'DelWordRight':'KeyboardCommands', + 'DelWordRightEnd':'KeyboardCommands', + 'DocumentEnd':'KeyboardCommands', + 'DocumentEndExtend':'KeyboardCommands', + 'DocumentStart':'KeyboardCommands', + 'DocumentStartExtend':'KeyboardCommands', + 'EditToggleOvertype':'KeyboardCommands', + 'FormFeed':'KeyboardCommands', + 'Home':'KeyboardCommands', + 'HomeDisplay':'KeyboardCommands', + 'HomeDisplayExtend':'KeyboardCommands', + 'HomeExtend':'KeyboardCommands', + 'HomeRectExtend':'KeyboardCommands', + 'HomeWrap':'KeyboardCommands', + 'HomeWrapExtend':'KeyboardCommands', + 'LineCopy':'KeyboardCommands', + 'LineCut':'KeyboardCommands', + 'LineDelete':'KeyboardCommands', + 'LineDown':'KeyboardCommands', + 'LineDownExtend':'KeyboardCommands', + 'LineDownRectExtend':'KeyboardCommands', + 'LineDuplicate':'KeyboardCommands', + 'LineEnd':'KeyboardCommands', + 'LineEndDisplay':'KeyboardCommands', + 'LineEndDisplayExtend':'KeyboardCommands', + 'LineEndExtend':'KeyboardCommands', + 'LineEndRectExtend':'KeyboardCommands', + 'LineEndWrap':'KeyboardCommands', + 'LineEndWrapExtend':'KeyboardCommands', + 'LineScrollDown':'KeyboardCommands', + 'LineScrollUp':'KeyboardCommands', + 'LineTranspose':'KeyboardCommands', + 'LineUp':'KeyboardCommands', + 'LineUpExtend':'KeyboardCommands', + 'LineUpRectExtend':'KeyboardCommands', + 'LowerCase':'KeyboardCommands', + 'NewLine':'KeyboardCommands', + 'PageDown':'KeyboardCommands', + 'PageDownExtend':'KeyboardCommands', + 'PageDownRectExtend':'KeyboardCommands', + 'PageUp':'KeyboardCommands', + 'PageUpExtend':'KeyboardCommands', + 'PageUpRectExtend':'KeyboardCommands', + 'ParaDown':'KeyboardCommands', + 'ParaDownExtend':'KeyboardCommands', + 'ParaUp':'KeyboardCommands', + 'ParaUpExtend':'KeyboardCommands', + 'ScrollToEnd':'KeyboardCommands', + 'ScrollToStart':'KeyboardCommands', + 'SelectionDuplicate':'KeyboardCommands', + 'StutteredPageDown':'KeyboardCommands', + 'StutteredPageDownExtend':'KeyboardCommands', + 'StutteredPageUp':'KeyboardCommands', + 'StutteredPageUpExtend':'KeyboardCommands', + 'Tab':'KeyboardCommands', + 'UpperCase':'KeyboardCommands', + 'VCHome':'KeyboardCommands', + 'VCHomeDisplay':'KeyboardCommands', + 'VCHomeDisplayExtend':'KeyboardCommands', + 'VCHomeExtend':'KeyboardCommands', + 'VCHomeRectExtend':'KeyboardCommands', + 'VCHomeWrap':'KeyboardCommands', + 'VCHomeWrapExtend':'KeyboardCommands', + 'VerticalCentreCaret':'KeyboardCommands', + 'WordLeft':'KeyboardCommands', + 'WordLeftEnd':'KeyboardCommands', + 'WordLeftEndExtend':'KeyboardCommands', + 'WordLeftExtend':'KeyboardCommands', + 'WordPartLeft':'KeyboardCommands', + 'WordPartLeftExtend':'KeyboardCommands', + 'WordPartRight':'KeyboardCommands', + 'WordPartRightExtend':'KeyboardCommands', + 'WordRight':'KeyboardCommands', + 'WordRightEnd':'KeyboardCommands', + 'WordRightEndExtend':'KeyboardCommands', + 'WordRightExtend':'KeyboardCommands', + 'AllocateSubStyles':'Lexer', + 'ChangeLexerState':'Lexer', + 'Colourise':'Lexer', + 'DescribeKeyWordSets':'Lexer', + 'DescribeProperty':'Lexer', + 'DistanceToSecondaryStyles':'Lexer', + 'FreeSubStyles':'Lexer', + 'GetLexer':'Lexer', + 'GetLexerLanguage':'Lexer', + 'GetPrimaryStyleFromStyle':'Lexer', + 'GetProperty':'Lexer', + 'GetPropertyExpanded':'Lexer', + 'GetPropertyInt':'Lexer', + 'GetStyleFromSubStyle':'Lexer', + 'GetSubStyleBases':'Lexer', + 'GetSubStylesLength':'Lexer', + 'GetSubStylesStart':'Lexer', + 'LoadLexerLibrary':'Lexer', + 'PrivateLexerCall':'Lexer', + 'PropertyNames':'Lexer', + 'PropertyType':'Lexer', + 'SetIdentifiers':'Lexer', + 'SetKeyWords':'Lexer', + 'SetLexer':'Lexer', + 'SetLexerLanguage':'Lexer', + 'SetProperty':'Lexer', + 'ConvertEOLs':'LineEndings', + 'GetEOLMode':'LineEndings', + 'GetLineEndTypesActive':'LineEndings', + 'GetLineEndTypesAllowed':'LineEndings', + 'GetLineEndTypesSupported':'LineEndings', + 'GetViewEOL':'LineEndings', + 'SetEOLMode':'LineEndings', + 'SetLineEndTypesAllowed':'LineEndings', + 'SetViewEOL':'LineEndings', + 'GetLayoutCache':'LineWrapping', + 'GetPositionCache':'LineWrapping', + 'GetWrapIndentMode':'LineWrapping', + 'GetWrapMode':'LineWrapping', + 'GetWrapStartIndent':'LineWrapping', + 'GetWrapVisualFlags':'LineWrapping', + 'GetWrapVisualFlagsLocation':'LineWrapping', + 'LinesJoin':'LineWrapping', + 'LinesSplit':'LineWrapping', + 'SetPositionCache':'LineWrapping', + 'SetWrapIndentMode':'LineWrapping', + 'SetWrapMode':'LineWrapping', + 'SetWrapStartIndent':'LineWrapping', + 'SetWrapVisualFlags':'LineWrapping', + 'SetWrapVisualFlagsLocation':'LineWrapping', + 'WrapCount':'LineWrapping', + 'GetEdgeColour':'LongLines', + 'GetEdgeColumn':'LongLines', + 'GetEdgeMode':'LongLines', + 'MultiEdgeAddLine':'LongLines', + 'MultiEdgeClearAll':'LongLines', + 'SetEdgeColour':'LongLines', + 'SetEdgeColumn':'LongLines', + 'SetEdgeMode':'LongLines', + 'StartRecord':'MacroRecording', + 'StopRecord':'MacroRecording', + 'GetMarginBackN':'Margins', + 'GetMarginCursorN':'Margins', + 'GetMarginLeft':'Margins', + 'GetMarginMaskN':'Margins', + 'GetMarginOptions':'Margins', + 'GetMarginRight':'Margins', + 'GetMargins':'Margins', + 'GetMarginSensitiveN':'Margins', + 'GetMarginTypeN':'Margins', + 'GetMarginWidthN':'Margins', + 'MarginGetStyle':'Margins', + 'MarginGetStyleOffset':'Margins', + 'MarginGetStyles':'Margins', + 'MarginGetText':'Margins', + 'MarginSetStyle':'Margins', + 'MarginSetStyleOffset':'Margins', + 'MarginSetStyles':'Margins', + 'MarginSetText':'Margins', + 'MarginTextClearAll':'Margins', + 'SetFoldMarginColour':'Margins', + 'SetFoldMarginHiColour':'Margins', + 'SetMarginBackN':'Margins', + 'SetMarginCursorN':'Margins', + 'SetMarginLeft':'Margins', + 'SetMarginMaskN':'Margins', + 'SetMarginOptions':'Margins', + 'SetMarginRight':'Margins', + 'SetMargins':'Margins', + 'SetMarginSensitiveN':'Margins', + 'SetMarginTypeN':'Margins', + 'SetMarginWidthN':'Margins', + 'MarkerAdd':'Markers', + 'MarkerAddSet':'Markers', + 'MarkerDefine':'Markers', + 'MarkerDefinePixmap':'Markers', + 'MarkerDefineRGBAImage':'Markers', + 'MarkerDelete':'Markers', + 'MarkerDeleteAll':'Markers', + 'MarkerDeleteHandle':'Markers', + 'MarkerEnableHighlight':'Markers', + 'MarkerGet':'Markers', + 'MarkerLineFromHandle':'Markers', + 'MarkerNext':'Markers', + 'MarkerPrevious':'Markers', + 'MarkerSetAlpha':'Markers', + 'MarkerSetBack':'Markers', + 'MarkerSetBackSelected':'Markers', + 'MarkerSetFore':'Markers', + 'MarkerSymbolDefined':'Markers', + 'RGBAImageSetHeight':'Markers', + 'RGBAImageSetScale':'Markers', + 'RGBAImageSetWidth':'Markers', + 'GetMouseDownCaptures':'MouseCapture', + 'GetMouseWheelCaptures':'MouseCapture', + 'SetMouseDownCaptures':'MouseCapture', + 'SetMouseWheelCaptures':'MouseCapture', + 'AddSelection':'MultipleSelectionAndVirtualSpace', + 'ClearSelections':'MultipleSelectionAndVirtualSpace', + 'DropSelectionN':'MultipleSelectionAndVirtualSpace', + 'GetAdditionalCaretFore':'MultipleSelectionAndVirtualSpace', + 'GetAdditionalCaretsBlink':'MultipleSelectionAndVirtualSpace', + 'GetAdditionalCaretsVisible':'MultipleSelectionAndVirtualSpace', + 'GetAdditionalSelAlpha':'MultipleSelectionAndVirtualSpace', + 'GetAdditionalSelectionTyping':'MultipleSelectionAndVirtualSpace', + 'GetMainSelection':'MultipleSelectionAndVirtualSpace', + 'GetMultiPaste':'MultipleSelectionAndVirtualSpace', + 'GetMultipleSelection':'MultipleSelectionAndVirtualSpace', + 'GetRectangularSelectionAnchor':'MultipleSelectionAndVirtualSpace', + 'GetRectangularSelectionAnchorVirtualSpace':'MultipleSelectionAndVirtualSpace', + 'GetRectangularSelectionCaret':'MultipleSelectionAndVirtualSpace', + 'GetRectangularSelectionCaretVirtualSpace':'MultipleSelectionAndVirtualSpace', + 'GetRectangularSelectionModifier':'MultipleSelectionAndVirtualSpace', + 'GetSelectionEmpty':'MultipleSelectionAndVirtualSpace', + 'GetSelectionNAnchor':'MultipleSelectionAndVirtualSpace', + 'GetSelectionNAnchorVirtualSpace':'MultipleSelectionAndVirtualSpace', + 'GetSelectionNCaret':'MultipleSelectionAndVirtualSpace', + 'GetSelectionNCaretVirtualSpace':'MultipleSelectionAndVirtualSpace', + 'GetSelectionNEnd':'MultipleSelectionAndVirtualSpace', + 'GetSelectionNStart':'MultipleSelectionAndVirtualSpace', + 'GetSelections':'MultipleSelectionAndVirtualSpace', + 'GetVirtualSpaceOptions':'MultipleSelectionAndVirtualSpace', + 'MultipleSelectAddEach':'MultipleSelectionAndVirtualSpace', + 'MultipleSelectAddNext':'MultipleSelectionAndVirtualSpace', + 'RotateSelection':'MultipleSelectionAndVirtualSpace', + 'SetAdditionalCaretFore':'MultipleSelectionAndVirtualSpace', + 'SetAdditionalCaretsBlink':'MultipleSelectionAndVirtualSpace', + 'SetAdditionalCaretsVisible':'MultipleSelectionAndVirtualSpace', + 'SetAdditionalSelAlpha':'MultipleSelectionAndVirtualSpace', + 'SetAdditionalSelBack':'MultipleSelectionAndVirtualSpace', + 'SetAdditionalSelectionTyping':'MultipleSelectionAndVirtualSpace', + 'SetAdditionalSelFore':'MultipleSelectionAndVirtualSpace', + 'SetMainSelection':'MultipleSelectionAndVirtualSpace', + 'SetMultiPaste':'MultipleSelectionAndVirtualSpace', + 'SetMultipleSelection':'MultipleSelectionAndVirtualSpace', + 'SetRectangularSelectionAnchor':'MultipleSelectionAndVirtualSpace', + 'SetRectangularSelectionAnchorVirtualSpace':'MultipleSelectionAndVirtualSpace', + 'SetRectangularSelectionCaret':'MultipleSelectionAndVirtualSpace', + 'SetRectangularSelectionCaretVirtualSpace':'MultipleSelectionAndVirtualSpace', + 'SetRectangularSelectionModifier':'MultipleSelectionAndVirtualSpace', + 'SetSelectionNAnchor':'MultipleSelectionAndVirtualSpace', + 'SetSelectionNAnchorVirtualSpace':'MultipleSelectionAndVirtualSpace', + 'SetSelectionNCaret':'MultipleSelectionAndVirtualSpace', + 'SetSelectionNCaretVirtualSpace':'MultipleSelectionAndVirtualSpace', + 'SetSelectionNEnd':'MultipleSelectionAndVirtualSpace', + 'SetSelectionNStart':'MultipleSelectionAndVirtualSpace', + 'SetVirtualSpaceOptions':'MultipleSelectionAndVirtualSpace', + 'SwapMainAnchorCaret':'MultipleSelectionAndVirtualSpace', + 'AddRefDocument':'MultipleViews', + 'CreateDocument':'MultipleViews', + 'GetDocPointer':'MultipleViews', + 'ReleaseDocument':'MultipleViews', + 'SetDocPointer':'MultipleViews', + 'GetIdentifier':'Notifications', + 'GetModEventMask':'Notifications', + 'GetMouseDwellTime':'Notifications', + 'SetIdentifier':'Notifications', + 'SetModEventMask':'Notifications', + 'SetMouseDwellTime':'Notifications', + 'GetBufferedDraw':'OtherSettings', + 'GetCodePage':'OtherSettings', + 'GetFocus':'OtherSettings', + 'GetIMEInteraction':'OtherSettings', + 'GetPhasesDraw':'OtherSettings', + 'GetTechnology':'OtherSettings', + 'GetTwoPhaseDraw':'OtherSettings', + 'SetBufferedDraw':'OtherSettings', + 'SetCodePage':'OtherSettings', + 'SetFocus':'OtherSettings', + 'SetIMEInteraction':'OtherSettings', + 'SetLayoutCache':'OtherSettings', + 'SetPhasesDraw':'OtherSettings', + 'SetTechnology':'OtherSettings', + 'SetTwoPhaseDraw':'OtherSettings', + 'GetOvertype':'Overtype', + 'SetOvertype':'Overtype', + 'UsePopUp':'PopupEditMenu', + 'FormatRange':'Printing', + 'GetPrintColourMode':'Printing', + 'GetPrintMagnification':'Printing', + 'GetPrintWrapMode':'Printing', + 'SetPrintColourMode':'Printing', + 'SetPrintMagnification':'Printing', + 'SetPrintWrapMode':'Printing', + 'GetEndAtLastLine':'ScrollingAndAutomaticScrolling', + 'GetFirstVisibleLine':'ScrollingAndAutomaticScrolling', + 'GetHScrollBar':'ScrollingAndAutomaticScrolling', + 'GetScrollWidth':'ScrollingAndAutomaticScrolling', + 'GetScrollWidthTracking':'ScrollingAndAutomaticScrolling', + 'GetVScrollBar':'ScrollingAndAutomaticScrolling', + 'GetXOffset':'ScrollingAndAutomaticScrolling', + 'LineScroll':'ScrollingAndAutomaticScrolling', + 'ScrollCaret':'ScrollingAndAutomaticScrolling', + 'ScrollRange':'ScrollingAndAutomaticScrolling', + 'SetEndAtLastLine':'ScrollingAndAutomaticScrolling', + 'SetFirstVisibleLine':'ScrollingAndAutomaticScrolling', + 'SetHScrollBar':'ScrollingAndAutomaticScrolling', + 'SetScrollWidth':'ScrollingAndAutomaticScrolling', + 'SetScrollWidthTracking':'ScrollingAndAutomaticScrolling', + 'SetVisiblePolicy':'ScrollingAndAutomaticScrolling', + 'SetVScrollBar':'ScrollingAndAutomaticScrolling', + 'SetXCaretPolicy':'ScrollingAndAutomaticScrolling', + 'SetXOffset':'ScrollingAndAutomaticScrolling', + 'SetYCaretPolicy':'ScrollingAndAutomaticScrolling', + 'FindText':'Searching', + 'GetSearchFlags':'Searching', + 'GetTag':'Searching', + 'GetTargetEnd':'Searching', + 'GetTargetStart':'Searching', + 'GetTargetText':'Searching', + 'ReplaceTarget':'Searching', + 'ReplaceTargetRE':'Searching', + 'SearchAnchor':'Searching', + 'SearchInTarget':'Searching', + 'SearchNext':'Searching', + 'SearchPrev':'Searching', + 'SetSearchFlags':'Searching', + 'SetTargetEnd':'Searching', + 'SetTargetRange':'Searching', + 'SetTargetStart':'Searching', + 'TargetFromSelection':'Searching', + 'TargetWholeDocument':'Searching', + 'CharPositionFromPoint':'SelectionAndInformation', + 'CharPositionFromPointClose':'SelectionAndInformation', + 'ChooseCaretX':'SelectionAndInformation', + 'CountCharacters':'SelectionAndInformation', + 'FindColumn':'SelectionAndInformation', + 'GetAnchor':'SelectionAndInformation', + 'GetColumn':'SelectionAndInformation', + 'GetCurLine':'SelectionAndInformation', + 'GetCurrentPos':'SelectionAndInformation', + 'GetLength':'SelectionAndInformation', + 'GetLineCount':'SelectionAndInformation', + 'GetLineEndPosition':'SelectionAndInformation', + 'GetLineSelEndPosition':'SelectionAndInformation', + 'GetLineSelStartPosition':'SelectionAndInformation', + 'GetModify':'SelectionAndInformation', + 'GetMouseSelectionRectangularSwitch':'SelectionAndInformation', + 'GetSelectionEnd':'SelectionAndInformation', + 'GetSelectionMode':'SelectionAndInformation', + 'GetSelectionStart':'SelectionAndInformation', + 'GetSelText':'SelectionAndInformation', + 'GetTextLength':'SelectionAndInformation', + 'GotoLine':'SelectionAndInformation', + 'GotoPos':'SelectionAndInformation', + 'HideSelection':'SelectionAndInformation', + 'LineFromPosition':'SelectionAndInformation', + 'LineLength':'SelectionAndInformation', + 'LinesOnScreen':'SelectionAndInformation', + 'MoveCaretInsideView':'SelectionAndInformation', + 'MoveSelectedLinesDown':'SelectionAndInformation', + 'MoveSelectedLinesUp':'SelectionAndInformation', + 'PointXFromPosition':'SelectionAndInformation', + 'PositionAfter':'SelectionAndInformation', + 'PositionBefore':'SelectionAndInformation', + 'PositionFromLine':'SelectionAndInformation', + 'PositionFromPoint':'SelectionAndInformation', + 'PositionFromPointClose':'SelectionAndInformation', + 'PositionRelative':'SelectionAndInformation', + 'SelectAll':'SelectionAndInformation', + 'SelectionIsRectangle':'SelectionAndInformation', + 'SetAnchor':'SelectionAndInformation', + 'SetCurrentPos':'SelectionAndInformation', + 'SetEmptySelection':'SelectionAndInformation', + 'SetMouseSelectionRectangularSwitch':'SelectionAndInformation', + 'SetSelectionEnd':'SelectionAndInformation', + 'SetSelectionMode':'SelectionAndInformation', + 'SetSelectionStart':'SelectionAndInformation', + 'TextHeight':'SelectionAndInformation', + 'TextWidth':'SelectionAndInformation', + 'StyleClearAll':'StyleDefinition', + 'StyleGetBack':'StyleDefinition', + 'StyleGetBold':'StyleDefinition', + 'StyleGetCase':'StyleDefinition', + 'StyleGetChangeable':'StyleDefinition', + 'StyleGetCharacterSet':'StyleDefinition', + 'StyleGetEOLFilled':'StyleDefinition', + 'StyleGetFont':'StyleDefinition', + 'StyleGetFore':'StyleDefinition', + 'StyleGetHotSpot':'StyleDefinition', + 'StyleGetItalic':'StyleDefinition', + 'StyleGetSize':'StyleDefinition', + 'StyleGetSizeFractional':'StyleDefinition', + 'StyleGetUnderline':'StyleDefinition', + 'StyleGetVisible':'StyleDefinition', + 'StyleGetWeight':'StyleDefinition', + 'StyleResetDefault':'StyleDefinition', + 'StyleSetBack':'StyleDefinition', + 'StyleSetBold':'StyleDefinition', + 'StyleSetCase':'StyleDefinition', + 'StyleSetChangeable':'StyleDefinition', + 'StyleSetCharacterSet':'StyleDefinition', + 'StyleSetEOLFilled':'StyleDefinition', + 'StyleSetFont':'StyleDefinition', + 'StyleSetFore':'StyleDefinition', + 'StyleSetHotSpot':'StyleDefinition', + 'StyleSetItalic':'StyleDefinition', + 'StyleSetSize':'StyleDefinition', + 'StyleSetSizeFractional':'StyleDefinition', + 'StyleSetUnderline':'StyleDefinition', + 'StyleSetVisible':'StyleDefinition', + 'StyleSetWeight':'StyleDefinition', + 'GetEndStyled':'Styling', + 'GetIdleStyling':'Styling', + 'GetLineState':'Styling', + 'GetMaxLineState':'Styling', + 'SetIdleStyling':'Styling', + 'SetLineState':'Styling', + 'SetStyling':'Styling', + 'SetStylingEx':'Styling', + 'StartStyling':'Styling', + 'AddTabStop':'TabsAndIndentationGuides', + 'ClearTabStops':'TabsAndIndentationGuides', + 'GetBackSpaceUnIndents':'TabsAndIndentationGuides', + 'GetHighlightGuide':'TabsAndIndentationGuides', + 'GetIndent':'TabsAndIndentationGuides', + 'GetIndentationGuides':'TabsAndIndentationGuides', + 'GetLineIndentation':'TabsAndIndentationGuides', + 'GetLineIndentPosition':'TabsAndIndentationGuides', + 'GetNextTabStop':'TabsAndIndentationGuides', + 'GetTabIndents':'TabsAndIndentationGuides', + 'GetTabWidth':'TabsAndIndentationGuides', + 'GetUseTabs':'TabsAndIndentationGuides', + 'SetBackSpaceUnIndents':'TabsAndIndentationGuides', + 'SetHighlightGuide':'TabsAndIndentationGuides', + 'SetIndent':'TabsAndIndentationGuides', + 'SetIndentationGuides':'TabsAndIndentationGuides', + 'SetLineIndentation':'TabsAndIndentationGuides', + 'SetTabIndents':'TabsAndIndentationGuides', + 'SetTabWidth':'TabsAndIndentationGuides', + 'SetUseTabs':'TabsAndIndentationGuides', + 'AddStyledText':'TextRetrievalAndModification', + 'AddText':'TextRetrievalAndModification', + 'Allocate':'TextRetrievalAndModification', + 'AllocateExtendedStyles':'TextRetrievalAndModification', + 'AppendText':'TextRetrievalAndModification', + 'ChangeInsertion':'TextRetrievalAndModification', + 'ClearAll':'TextRetrievalAndModification', + 'ClearDocumentStyle':'TextRetrievalAndModification', + 'DeleteRange':'TextRetrievalAndModification', + 'GetCharAt':'TextRetrievalAndModification', + 'GetLine':'TextRetrievalAndModification', + 'GetReadOnly':'TextRetrievalAndModification', + 'GetStyleAt':'TextRetrievalAndModification', + 'GetStyledText':'TextRetrievalAndModification', + 'GetText':'TextRetrievalAndModification', + 'GetTextRange':'TextRetrievalAndModification', + 'InsertText':'TextRetrievalAndModification', + 'ReleaseAllExtendedStyles':'TextRetrievalAndModification', + 'ReplaceSel':'TextRetrievalAndModification', + 'SetReadOnly':'TextRetrievalAndModification', + 'SetSavePoint':'TextRetrievalAndModification', + 'SetText':'TextRetrievalAndModification', + 'AddUndoAction':'UndoAndRedo', + 'BeginUndoAction':'UndoAndRedo', + 'CanRedo':'UndoAndRedo', + 'CanUndo':'UndoAndRedo', + 'EmptyUndoBuffer':'UndoAndRedo', + 'EndUndoAction':'UndoAndRedo', + 'GetUndoCollection':'UndoAndRedo', + 'Redo':'UndoAndRedo', + 'SetUndoCollection':'UndoAndRedo', + 'Undo':'UndoAndRedo', + 'UserListShow':'UserLists', + 'GetExtraAscent':'WhiteSpace', + 'GetExtraDescent':'WhiteSpace', + 'GetTabDrawMode':'WhiteSpace', + 'GetViewWS':'WhiteSpace', + 'GetWhitespaceSize':'WhiteSpace', + 'SetExtraAscent':'WhiteSpace', + 'SetExtraDescent':'WhiteSpace', + 'SetTabDrawMode':'WhiteSpace', + 'SetViewWS':'WhiteSpace', + 'SetWhitespaceBack':'WhiteSpace', + 'SetWhitespaceFore':'WhiteSpace', + 'SetWhitespaceSize':'WhiteSpace', + 'GetPunctuationChars':'Words', + 'GetWhitespaceChars':'Words', + 'GetWordChars':'Words', + 'IsRangeWord':'Words', + 'SetCharsDefault':'Words', + 'SetPunctuationChars':'Words', + 'SetWhitespaceChars':'Words', + 'SetWordChars':'Words', + 'WordEndPosition':'Words', + 'WordStartPosition':'Words', + 'GetZoom':'Zooming', + 'SetZoom':'Zooming', + 'ZoomIn':'Zooming', + 'ZoomOut':'Zooming' +} + + +# A few of docstrings in Scintilla.iface are unsuitable for use with wxSTC. +# This map can be used to supply alternate docstrings for those items. +docOverrides = { + 'ClearRegisteredImages':('Clear all the registered images.',), + 'RegisterImage':('Register an image for use in autocompletion lists.',), + + 'MarkerDefine': + ('Set the symbol used for a particular marker number,', + 'and optionally the fore and background colours.',), + + 'MarkerDefinePixmap':('Define a marker from a bitmap',), + + 'SetCodePage': + ('Set the code page used to interpret the bytes of the document as characters.',), + + 'GetXOffset':('Get the xOffset (ie, horizontal scroll position).',), + 'SetXOffset':('Set the xOffset (ie, horizontal scroll position).',), + 'GetSelText':('Retrieve the selected text.',), + + 'PointXFromPosition': + ('Retrieve the point in the window where a position is displayed.',), + + 'StyleGetFont':('Get the font facename of a style',), + 'GetLine':('Retrieve the contents of a line.',), + 'GetStyledText':('Retrieve a buffer of cells.',), + 'GetText':('Retrieve all the text in the document.',), + 'GetTextRange':('Retrieve a range of text.',), + + 'GetWordChars': + ('Get the set of characters making up words for when moving or selecting by word.',), + + 'GetLexerLanguage':('Retrieve the lexing language of the document.',) +} + + +# This map can be used to change a few words in a docstring to make it +# consistent with names used by wxSTC. +# +# For example {'INVALID_POSITION':'wxSTC_INVALID_POSITION'} will turn the +# string 'Return INVALID_POSITION if not close to text.' +# into 'Return wxSTC_INVALID_POSITION if not close to text.' +# +docSubstitutions = { + 'BraceMatch':{'INVALID_POSITION':'wxSTC_INVALID_POSITION'}, + 'GetLineSelEndPosition':{'INVALID_POSITION':'wxSTC_INVALID_POSITION'}, + 'GetLineSelStartPosition':{'INVALID_POSITION':'wxSTC_INVALID_POSITION'}, + 'PositionFromPointClose':{'INVALID_POSITION':'wxSTC_INVALID_POSITION'}, + 'CharPositionFromPointClose':{'INVALID_POSITION':'wxSTC_INVALID_POSITION'}, + + 'GetRepresentation':{'Result is NUL-terminated.':''}, + 'GetSubStyleBases':{'Result is NUL-terminated.':''}, + 'DescribeProperty':{'Result is NUL-terminated.':''}, + 'GetProperty':{'Result is NUL-terminated.':''}, + 'GetPropertyExpanded':{'Result is NUL-terminated.':''}, + 'GetTag':{'Result is NUL-terminated.':''}, + 'TextWidth':{'NUL terminated text argument.':''}, + 'GetCurLine':{'Result is NUL-terminated.':'', + 'Returns the index of the caret on the line.':''}, + + 'DescribeKeyWordSets':{'\\n':'\\\\n','Result is NUL-terminated.':''}, + 'PropertyNames':{'\\n':'\\\\n','Result is NUL-terminated.':''}, + 'ReplaceTargetRE':{'\\d':'\\\\d','\\(':'\\\\(','\\)':'\\\\)'}, + + 'CallTipUseStyle':{'STYLE_CALLTIP':'wxSTC_STYLE_CALLTIP'}, + 'ChangeInsertion':{'SC_MOD_INSERTCHECK':'wxSTC_MOD_INSERTCHECK'}, + 'GetWrapIndentMode':{'Default is fixed':'Default is wxSTC_WRAPINDENT_FIXED'}, + 'GetTabDrawMode':{'SCTD_*':'wxSTC_TD_*'}, + 'GetViewWS':{'SCWS_*':'wxSTC_WS_*'}, + 'SetCursor':{'SC_CURSOR':'wxSTC_CURSOR'}, + 'SetMarginBackN':{'SC_MARGIN_COLOUR':'wxSTC_MARGIN_COLOUR'}, + 'SetWrapIndentMode':{'Default is fixed':'Default is wxSTC_WRAPINDENT_FIXED'}, + + 'GetEOLMode': + {'CRLF, CR, or LF':'wxSTC_EOL_CRLF, wxSTC_EOL_CR, or wxSTC_EOL_LF'}, + + 'SetEdgeMode':{'EDGE_LINE':'wxSTC_EDGE_LINE', + 'EDGE_MULTILINE':'wxSTC_EDGE_MULTILINE', + 'EDGE_BACKGROUND':'wxSTC_EDGE_BACKGROUND','EDGE_NONE':'wxSTC_EDGE_NONE'}, + + 'SetPrintWrapMode': + {'SC_WRAP_WORD':'wxSTC_WRAP_WORD','SC_WRAP_NONE':'wxSTC_WRAP_NONE'}, + + 'SetRectangularSelectionModifier':{'SCMOD_CTRL':'wxSTC_KEYMOD_CTRL ', + 'SCMOD_ALT':'wxSTC_KEYMOD_ALT','SCMOD_SUPER':'wxSTC_KEYMOD_SUPER'}, + + 'SetSelectionMode':{'SC_SEL_STREAM':'wxSTC_SEL_STREAM', + 'SC_SEL_RECTANGLE':'wxSTC_SEL_RECTANGLE','SC_SEL_THIN':'wxSTC_SEL_THIN', + 'SC_SEL_LINES':'wxSTC_SEL_LINES'} +} + + +# This map can be used to add extended documentation to the interface header. +extendedDocs = { + + 'GetSearchFlags': + ('The return value will be a bit list containing one or more of the', + '@link wxStyledTextCtrl::wxSTC_FIND_WHOLEWORD wxSTC_FIND_* @endlink constants.',), + + 'SetSearchFlags': + ('The input should be a bit list containing one or more of the', + '@link wxStyledTextCtrl::wxSTC_FIND_WHOLEWORD wxSTC_FIND_* @endlink constants.',), + + 'GetStatus': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_STATUS_OK wxSTC_STATUS_* @endlink constants.',), + + 'SetStatus': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_STATUS_OK wxSTC_STATUS_* @endlink constants.',), + + 'GetSelectionMode': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_SEL_STREAM wxSTC_SEL_* @endlink constants.',), + + 'GetMultiPaste': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_MULTIPASTE_ONCE wxSTC_MULTIPASTE_* ' + '@endlink constants.',), + + 'SetMultiPaste': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_MULTIPASTE_ONCE wxSTC_MULTIPASTE_* ' + '@endlink constants.',), + + 'GetVirtualSpaceOptions': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_VS_NONE wxSTC_VS_* @endlink constants.',), + + 'SetVirtualSpaceOptions': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_VS_NONE wxSTC_VS_* @endlink constants.',), + + 'GetRectangularSelectionModifier': + ('The return value will be a bit list containing one or more of the', + '@link wxStyledTextCtrl::wxSTC_KEYMOD_NORM wxSTC_KEYMOD_* @endlink constants.',), + + 'SetXCaretPolicy': + ('The first argument should be a bit list containing one or more of the', + '@link wxStyledTextCtrl::wxSTC_CARET_SLOP wxSTC_CARET_* @endlink constants.',), + + 'SetYCaretPolicy': + ('The first argument should be a bit list containing one or more of the', + '@link wxStyledTextCtrl::wxSTC_CARET_SLOP wxSTC_CARET_* @endlink constants.',), + + 'SetVisiblePolicy': + ('The first argument should be a bit list containing one or more of the', + '@link wxStyledTextCtrl::wxSTC_VISIBLE_SLOP wxSTC_VISIBLE_* @endlink constants.',), + + 'SetViewWS': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_WS_INVISIBLE wxSTC_WS_* @endlink constants.',), + + 'SetTabDrawMode': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_TD_LONGARROW wxSTC_TD_* @endlink constants.',), + + 'GetCursor': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_CURSORNORMAL wxSTC_CURSOR* @endlink constants.',), + + 'SetEOLMode': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_EOL_CRLF wxSTC_EOL_* @endlink constants.',), + + 'GetLineEndTypesActive': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_LINE_END_TYPE_DEFAULT wxSTC_LINE_END_TYPE_* ' + '@endlink constants.',), + + 'GetLineEndTypesAllowed': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_LINE_END_TYPE_DEFAULT wxSTC_LINE_END_TYPE_* ' + '@endlink constants.',), + + 'SetLineEndTypesAllowed': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_LINE_END_TYPE_DEFAULT ' + 'wxSTC_LINE_END_TYPE_* @endlink constants.',), + + 'GetLineEndTypesSupported': + ('The return value will be a bit list containing one or more of the', + '@link wxStyledTextCtrl::wxSTC_LINE_END_TYPE_DEFAULT ' + 'wxSTC_LINE_END_TYPE_* @endlink constants.',), + + 'GetIdleStyling': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_IDLESTYLING_NONE wxSTC_IDLESTYLING_* ' + '@endlink constants.',), + + 'SetIdleStyling': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_IDLESTYLING_NONE wxSTC_IDLESTYLING_* ' + '@endlink constants.',), + + 'StyleGetWeight': + ('The return value will be an integer that is possibly one of the', + '@link wxStyledTextCtrl::wxSTC_WEIGHT_NORMAL wxSTC_WEIGHT_* @endlink constants.',), + + 'StyleSetWeight': + ('The second argument can be an integer or one of the', + '@link wxStyledTextCtrl::wxSTC_WEIGHT_NORMAL wxSTC_WEIGHT_* @endlink constants.',), + + 'StyleGetCase': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_CASE_MIXED wxSTC_CASE_* @endlink constants.',), + + 'StyleSetCase': + ('The second argument should be one of the', + '@link wxStyledTextCtrl::wxSTC_CASE_MIXED wxSTC_CASE_* @endlink constants.',), + + 'GetCaretStyle': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_CARETSTYLE_INVISIBLE wxSTC_CARETSTYLE_* ' + '@endlink constants.',), + + 'SetCaretStyle': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_CARETSTYLE_INVISIBLE wxSTC_CARETSTYLE_* ' + '@endlink constants.',), + + 'GetCaretSticky': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_CARETSTICKY_OFF wxSTC_CARETSTICKY_* ' + '@endlink constants.',), + + 'SetCaretSticky': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_CARETSTICKY_OFF wxSTC_CARETSTICKY_* ' + '@endlink constants.',), + + 'GetMarginTypeN': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_MARGIN_SYMBOL wxSTC_MARGIN_* @endlink constants.',), + + 'SetMarginTypeN': + ('The second argument should be one of the', + '@link wxStyledTextCtrl::wxSTC_MARGIN_SYMBOL wxSTC_MARGIN_* @endlink constants.',), + + 'GetMarginCursorN': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_CURSORNORMAL wxSTC_CURSOR* @endlink constants.',), + + 'SetMarginCursorN': + ('The second argument should be one of the', + '@link wxStyledTextCtrl::wxSTC_CURSORNORMAL wxSTC_CURSOR* @endlink constants.',), + + 'GetMarginOptions': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_MARGINOPTION_NONE wxSTC_MARGINOPTION_* ' + '@endlink constants.',), + + 'SetMarginOptions': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_MARGINOPTION_NONE wxSTC_MARGINOPTION_* ' + '@endlink constants.',), + + 'AnnotationGetVisible': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_ANNOTATION_HIDDEN wxSTC_ANNOTATION_* ' + '@endlink constants.',), + + 'AnnotationSetVisible': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_ANNOTATION_HIDDEN wxSTC_ANNOTATION_* ' + '@endlink constants.',), + + 'GetPhasesDraw': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_PHASES_ONE wxSTC_PHASES_* @endlink constants.',), + + 'SetPhasesDraw': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_PHASES_ONE wxSTC_PHASES_* @endlink constants.',), + + 'GetTechnology': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_TECHNOLOGY_DEFAULT wxSTC_TECHNOLOGY_* ' + '@endlink constants.',), + + 'SetTechnology': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_TECHNOLOGY_DEFAULT wxSTC_TECHNOLOGY_* ' + '@endlink constants.',), + + 'GetIMEInteraction': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_IME_WINDOWED wxSTC_IME_* @endlink constants.',), + + 'SetIMEInteraction': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_IME_WINDOWED wxSTC_IME_* @endlink constants.',), + + 'GetIndentationGuides': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_IV_NONE wxSTC_IV_* @endlink constants.',), + + 'SetIndentationGuides': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_IV_NONE wxSTC_IV_* @endlink constants.',), + + 'MarkerSymbolDefined': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_MARK_CIRCLE wxSTC_MARK_* @endlink constants.',), + + 'MarkerDefine': + ('The second argument should be one of the', + '@link wxStyledTextCtrl::wxSTC_MARK_CIRCLE wxSTC_MARK_* @endlink constants.',), + + 'IndicGetStyle': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_INDIC_PLAIN wxSTC_INDIC_* @endlink constants.',), + + 'IndicSetStyle': + ('The second argument should be one of the', + '@link wxStyledTextCtrl::wxSTC_INDIC_PLAIN wxSTC_INDIC_* @endlink constants.',), + + 'IndicGetFlags': + ('The return value will be a bit list containing one or more of the', + '@link wxStyledTextCtrl::wxSTC_INDICFLAG_VALUEFORE wxSTC_INDICFLAG_* ' + '@endlink constants.',), + + 'IndicSetFlags': + ('The second argument should be a bit list containing one or more of the', + '@link wxStyledTextCtrl::wxSTC_INDICFLAG_VALUEFORE wxSTC_INDICFLAG_* ' + '@endlink constants.',), + + 'AutoCGetCaseInsensitiveBehaviour': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE ' + 'wxSTC_CASEINSENSITIVEBEHAVIOUR_* @endlink constants.',), + + 'AutoCSetCaseInsensitiveBehaviour': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE ' + 'wxSTC_CASEINSENSITIVEBEHAVIOUR_* @endlink constants.',), + + 'AutoCGetMulti': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_MULTIAUTOC_ONCE wxSTC_MULTIAUTOC_* ' + '@endlink constants.',), + + 'AutoCSetMulti': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_MULTIAUTOC_ONCE wxSTC_MULTIAUTOC_* ' + '@endlink constants.',), + + 'AutoCGetOrder': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_ORDER_PRESORTED wxSTC_ORDER_* @endlink constants.',), + + 'AutoCSetOrder': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_ORDER_PRESORTED wxSTC_ORDER_* @endlink constants.',), + + 'GetPrintColourMode': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_PRINT_NORMAL wxSTC_PRINT_* @endlink constants.',), + + 'SetPrintColourMode': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_PRINT_NORMAL wxSTC_PRINT_* @endlink constants.',), + + 'GetPrintWrapMode': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_WRAP_NONE wxSTC_WRAP_* @endlink constants.',), + + 'SetFoldFlags': + ('The second argument should be a bit list containing one or more of the', + '@link wxStyledTextCtrl::wxSTC_FOLDFLAG_LINEBEFORE_EXPANDED ' + 'wxSTC_FOLDFLAG_* @endlink constants.',), + + 'GetAutomaticFold': + ('The return value will be a bit list containing one or more of the', + '@link wxStyledTextCtrl::wxSTC_AUTOMATICFOLD_SHOW ' + 'wxSTC_AUTOMATICFOLD_* @endlink constants.',), + + 'SetAutomaticFold': + ('The input should be a bit list containing one or more of the', + '@link wxStyledTextCtrl::wxSTC_AUTOMATICFOLD_SHOW ' + 'wxSTC_AUTOMATICFOLD_* @endlink constants.',), + + 'FoldDisplayTextSetStyle': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_FOLDDISPLAYTEXT_HIDDEN ' + 'wxSTC_FOLDDISPLAYTEXT_* @endlink constants.',), + + 'GetWrapMode': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_WRAP_NONE wxSTC_WRAP_* @endlink constants.',), + + 'SetWrapMode': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_WRAP_NONE wxSTC_WRAP_* @endlink constants.',), + + 'GetWrapVisualFlags': + ('The return value will be a bit list containing one or more of the', + '@link wxStyledTextCtrl::wxSTC_WRAPVISUALFLAG_NONE ' + 'wxSTC_WRAPVISUALFLAG_* @endlink constants.',), + + 'SetWrapVisualFlags': + ('The input should be a bit list containing one or more of the', + '@link wxStyledTextCtrl::wxSTC_WRAPVISUALFLAG_NONE ' + 'wxSTC_WRAPVISUALFLAG_* @endlink constants.',), + + 'GetWrapVisualFlagsLocation': + ('The return value will be a bit list containing one or more of the', + '@link wxStyledTextCtrl::wxSTC_WRAPVISUALFLAGLOC_DEFAULT ' + 'wxSTC_WRAPVISUALFLAGLOC_* @endlink constants.',), + + 'SetWrapVisualFlagsLocation': + ('The input should be a bit list containing one or more of the', + '@link wxStyledTextCtrl::wxSTC_WRAPVISUALFLAGLOC_DEFAULT ' + 'wxSTC_WRAPVISUALFLAGLOC_* @endlink constants.',), + + 'GetWrapIndentMode': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_WRAPINDENT_FIXED wxSTC_WRAPINDENT_* ' + '@endlink constants.',), + + 'SetWrapIndentMode': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_WRAPINDENT_FIXED wxSTC_WRAPINDENT_* ' + '@endlink constants.',), + + 'GetLayoutCache': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_CACHE_NONE wxSTC_CACHE_* @endlink constants.',), + + 'SetLayoutCache': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_CACHE_NONE wxSTC_CACHE_* @endlink constants.',), + + 'GetEdgeMode': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_EDGE_NONE wxSTC_EDGE_* @endlink constants.',), + + 'SetEdgeMode': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_EDGE_NONE wxSTC_EDGE_* @endlink constants.',), + + 'GetLexer': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_LEX_A68K wxSTC_LEX_* @endlink constants.',), + + 'SetLexer': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_LEX_A68K wxSTC_LEX_* @endlink constants.',), + + 'GetModEventMask': + ('The return value will wxSTC_MODEVENTMASKALL if all changes generate', + 'events. Otherwise it will be a bit list containing one or more of the', + '@link wxStyledTextCtrl::wxSTC_MOD_INSERTTEXT wxSTC_MOD_* @endlink constants,', + 'the @link wxStyledTextCtrl::wxSTC_PERFORMED_REDO wxSTC_PERFORMED_* @endlink constants,', + 'wxSTC_STARTACTION, wxSTC_MULTILINEUNDOREDO, ' + 'wxSTC_MULTISTEPUNDOREDO, and wxSTC_LASTSTEPINUNDOREDO.',), + + 'SetModEventMask': + ('The input should be a bit list containing one or more of the', + '@link wxStyledTextCtrl::wxSTC_MOD_INSERTTEXT wxSTC_MOD_* @endlink constants,', + 'the @link wxStyledTextCtrl::wxSTC_PERFORMED_REDO wxSTC_PERFORMED_* @endlink constants,', + 'wxSTC_STARTACTION, wxSTC_MULTILINEUNDOREDO, ' + 'wxSTC_MULTISTEPUNDOREDO, and wxSTC_LASTSTEPINUNDOREDO.', + 'The input can also be wxSTC_MODEVENTMASKALL to indicate that all changes', + 'should generate events.'), + + 'GetMouseDwellTime': + ('The return value will be a time in milliseconds or wxSTC_TIME_FOREVER.',), + + 'SetMouseDwellTime': + ('The input should be a time in milliseconds or wxSTC_TIME_FOREVER.',), + + 'FindText': + ('The fourth argument should be a bit list containing one or more of the', + '@link wxStyledTextCtrl::wxSTC_FIND_WHOLEWORD wxSTC_FIND_* @endlink constants.',), + + 'AddUndoAction': + ('The flags argument can be either 0 or wxSTC_UNDO_MAY_COALESCE.',), + + 'AssignCmdKey': + ('The second argument should be a bit list containing one or more of the', + '@link wxStyledTextCtrl::wxSTC_KEYMOD_NORM wxSTC_KEYMOD_* @endlink constants', + 'and the third argument should be one of the', + '@link wxStyledTextCtrl::wxSTC_CMD_BACKTAB wxSTC_CMD_* @endlink constants.',), + + 'ClearCmdKey': + ('The second argument should be a bit list containing one or more of the', + '@link wxStyledTextCtrl::wxSTC_KEYMOD_NORM wxSTC_KEYMOD_* @endlink constants.'), + + 'FoldLine': + ('The second argument should be one of the', + '@link wxStyledTextCtrl::wxSTC_FOLDACTION_CONTRACT wxSTC_FOLDACTION_* ' + '@endlink constants.'), + + 'FoldChildren': + ('The second argument should be one of the', + '@link wxStyledTextCtrl::wxSTC_FOLDACTION_CONTRACT wxSTC_FOLDACTION_* ' + '@endlink constants.'), + + 'FoldAll': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_FOLDACTION_CONTRACT wxSTC_FOLDACTION_* ' + '@endlink constants.'), + + 'UsePopUp': + ('The input should be one of the', + '@link wxStyledTextCtrl::wxSTC_POPUP_NEVER wxSTC_POPUP_* @endlink constants.',), + + 'PropertyType': + ('The return value will be one of the', + '@link wxStyledTextCtrl::wxSTC_TYPE_BOOLEAN wxSTC_TYPE_* @endlink constants.',), + + 'GetCurLine': + ('linePos can optionally be passed in to receive the index of the', + 'caret on the line.',), + + 'StyleSetCharacterSet': + ('Converts the Scintilla character set values to a wxFontEncoding.',), + +} + + +# This map can be used to add since annotations to the interface header. +sinceAnnotations= { + 'AddTabStop':'3.1.0', + 'AllocateExtendedStyles':'3.1.0', + 'AllocateSubStyles':'3.1.0', + 'AutoCGetMulti':'3.1.0', + 'AutoCGetOrder':'3.1.0', + 'AutoCSetMulti':'3.1.0', + 'AutoCSetOrder':'3.1.0', + 'CallTipPosStart':'3.1.0', + 'ChangeInsertion':'3.1.0', + 'ClearRepresentation':'3.1.0', + 'ClearTabStops':'3.1.0', + 'DistanceToSecondaryStyles':'3.1.0', + 'DropSelectionN':'3.1.0', + 'ExpandChildren':'3.1.0', + 'FoldAll':'3.1.0', + 'FoldChildren':'3.1.0', + 'FoldLine':'3.1.0', + 'FreeSubStyles':'3.1.0', + 'GetAutomaticFold':'3.1.0', + 'GetCaretLineVisibleAlways':'3.1.0', + 'GetIMEInteraction':'3.1.0', + 'GetLineEndTypesActive':'3.1.0', + 'GetLineEndTypesAllowed':'3.1.0', + 'GetLineEndTypesSupported':'3.1.0', + 'GetMouseSelectionRectangularSwitch':'3.1.0', + 'GetNextTabStop':'3.1.0', + 'GetPhasesDraw':'3.1.0', + 'GetPrimaryStyleFromStyle':'3.1.0', + 'GetRepresentation':'3.1.0', + 'GetSelectionEmpty':'3.1.0', + 'GetStyleFromSubStyle':'3.1.0', + 'GetSubStyleBases':'3.1.0', + 'GetSubStylesLength':'3.1.0', + 'GetSubStylesStart':'3.1.0', + 'GetTargetText':'3.1.0', + 'IndicGetFlags':'3.1.0', + 'IndicGetHoverFore':'3.1.0', + 'IndicGetHoverStyle':'3.1.0', + 'IndicSetFlags':'3.1.0', + 'IndicSetHoverFore':'3.1.0', + 'IndicSetHoverStyle':'3.1.0', + 'PositionRelative':'3.1.0', + 'ReleaseAllExtendedStyles':'3.1.0', + 'RGBAImageSetScale':'3.1.0', + 'ScrollRange':'3.1.0', + 'SetAutomaticFold':'3.1.0', + 'SetCaretLineVisibleAlways':'3.1.0', + 'SetIdentifiers':'3.1.0', + 'SetIMEInteraction':'3.1.0', + 'SetLineEndTypesAllowed':'3.1.0', + 'SetMouseSelectionRectangularSwitch':'3.1.0', + 'SetPhasesDraw':'3.1.0', + 'SetRepresentation':'3.1.0', + 'SetTargetRange':'3.1.0', + 'VCHomeDisplay':'3.1.0', + 'VCHomeDisplayExtend':'3.1.0', + + 'FoldDisplayTextSetStyle':'3.1.1', + 'GetDirectFunction':'3.1.1', + 'GetDirectPointer':'3.1.1', + 'GetIdleStyling':'3.1.1', + 'GetLexerLanguage':'3.1.1', + 'GetMarginBackN':'3.1.1', + 'GetMargins':'3.1.1', + 'GetMouseWheelCaptures':'3.1.1', + 'GetTabDrawMode':'3.1.1', + 'IsRangeWord':'3.1.1', + 'LoadLexerLibrary':'3.1.1', + 'MultiEdgeAddLine':'3.1.1', + 'MultiEdgeClearAll':'3.1.1', + 'MultipleSelectAddEach':'3.1.1', + 'MultipleSelectAddNext':'3.1.1', + 'SetIdleStyling':'3.1.1', + 'SetMarginBackN':'3.1.1', + 'SetMargins':'3.1.1', + 'SetMouseWheelCaptures':'3.1.1', + 'SetTabDrawMode':'3.1.1', + 'TargetWholeDocument':'3.1.1', + 'ToggleFoldShowText':'3.1.1' +} + + +#---------------------------------------------------------------------------- + +def buildDocs(name, docs): + docsLong = 0 + + # If an item does not have a category or the category to which it is + # assigned is not in categoriesList, it will be assigned to 'OtherSettings' + if name in docsMap: + category = docsMap[name] + else: + category = 'OtherSettings' + + if category not in [ x for (x,y,z) in categoriesList]: + category = 'OtherSettings' + + if name in docOverrides: + docs = docOverrides[name] + + if name in docSubstitutions: + post = docSubstitutions[name] + newdocs = [] + for d in docs: + for x,y in post.items(): + d=d.replace(x,y) + newdocs.append(d) + newdocs[:] = [x for x in newdocs if x.strip()!=''] + docs=tuple(newdocs) + + if name in extendedDocs: + docsLong = extendedDocs[name] + + if name in sinceAnnotations: + note = ('@since '+sinceAnnotations[name],) + if docsLong==0: + docsLong = note + else: + docsLong = docsLong + note + + if category=='DeprecatedMessages': + note = ('@deprecated',) + if docsLong==0: + docsLong = note + else: + docsLong = docsLong + note + + return category, docs, docsLong diff --git a/src/stc/gen_iface.py b/src/stc/gen_iface.py index 0494fff26d..67a235a650 100755 --- a/src/stc/gen_iface.py +++ b/src/stc/gen_iface.py @@ -14,6 +14,8 @@ import sys, string, re, os from fileinput import FileInput +sys.dont_write_bytecode = True +from gen_docs import categoriesList,buildDocs IFACE = os.path.abspath('./scintilla/include/Scintilla.iface') HDR_SCN = os.path.abspath('./scintilla/include/Scintilla.h') @@ -89,7 +91,6 @@ paramTypeMap = { # default name. # 2. Method definition for the .h file, 0 to leave alone # 3. Method implementation for the .cpp file, 0 to leave alone. -# 4. tuple of Doc string lines, or 0 to leave alone. # methodOverrideMap = { 'AddText' : (0, @@ -97,38 +98,38 @@ methodOverrideMap = { '''void %s(const wxString& text) { const wxWX2MBbuf buf = wx2stc(text); - SendMsg(%s, wx2stclen(text, buf), (sptr_t)(const char*)buf);''', - 0), + SendMsg(%s, wx2stclen(text, buf), (sptr_t)(const char*)buf);''' + ), 'AddStyledText' : (0, 'void %s(const wxMemoryBuffer& data);', '''void %s(const wxMemoryBuffer& data) { - SendMsg(%s, data.GetDataLen(), (sptr_t)data.GetData());''', - 0), + SendMsg(%s, data.GetDataLen(), (sptr_t)data.GetData());''' + ), 'AppendText' : (0, 'void %s(const wxString& text) wxOVERRIDE;', '''void %s(const wxString& text) { const wxWX2MBbuf buf = wx2stc(text); - SendMsg(%s, wx2stclen(text, buf), (sptr_t)(const char*)buf);''', - 0), + SendMsg(%s, wx2stclen(text, buf), (sptr_t)(const char*)buf);''' + ), - 'GetViewWS' : ( 'GetViewWhiteSpace', 0, 0, 0), - 'SetViewWS' : ( 'SetViewWhiteSpace', 0, 0, 0), + 'GetViewWS' : ( 'GetViewWhiteSpace', 0, 0), + 'SetViewWS' : ( 'SetViewWhiteSpace', 0, 0), 'GetCharAt' : ( 0, 0, '''int %s(int pos) const { - return (unsigned char)SendMsg(%s, pos, 0);''', - 0), + return (unsigned char)SendMsg(%s, pos, 0);''' + ), 'GetStyleAt' : ( 0, 0, '''int %s(int pos) const { - return (unsigned char)SendMsg(%s, pos, 0);''', - 0), + return (unsigned char)SendMsg(%s, pos, 0);''' + ), 'GetStyledText' : (0, @@ -149,9 +150,8 @@ methodOverrideMap = { tr.chrg.cpMax = endPos; len = SendMsg(%s, 0, (sptr_t)&tr); buf.UngetWriteBuf(len); - return buf;''', - - ('Retrieve a buffer of cells.',)), + return buf;''' + ), 'PositionFromPoint' : @@ -159,8 +159,8 @@ methodOverrideMap = { 'int %s(wxPoint pt) const;', '''int %s(wxPoint pt) const { - return SendMsg(%s, pt.x, pt.y);''', - 0), + return SendMsg(%s, pt.x, pt.y);''' + ), 'GetCurLine' : (0, @@ -180,15 +180,14 @@ methodOverrideMap = { mbuf.UngetWriteBuf(len); mbuf.AppendByte(0); if (linePos) *linePos = pos; - return stc2wx(buf);''', + return stc2wx(buf);''' + ), - 0), + 'MarkerSetFore' : ('MarkerSetForeground', 0, 0), + 'MarkerSetBack' : ('MarkerSetBackground', 0, 0), + 'MarkerSetBackSelected' : ('MarkerSetBackgroundSelected', 0,0), - 'MarkerSetFore' : ('MarkerSetForeground', 0, 0, 0), - 'MarkerSetBack' : ('MarkerSetBackground', 0, 0, 0), - 'MarkerSetBackSelected' : ('MarkerSetBackgroundSelected', 0,0,0), - - 'MarkerSymbolDefined' : ('GetMarkerSymbolDefined', 0, 0, 0), + 'MarkerSymbolDefined' : ('GetMarkerSymbolDefined', 0, 0), 'MarkerDefine' : (0, @@ -204,10 +203,8 @@ methodOverrideMap = { if (foreground.IsOk()) MarkerSetForeground(markerNumber, foreground); if (background.IsOk()) - MarkerSetBackground(markerNumber, background);''', - - ('Set the symbol used for a particular marker number,', - 'and optionally the fore and background colours.')), + MarkerSetBackground(markerNumber, background);''' + ), 'MarkerDefinePixmap' : @@ -226,24 +223,24 @@ methodOverrideMap = { buff[len] = 0; SendMsg(%s, markerNumber, (sptr_t)buff); delete [] buff; - ''', - ('Define a marker from a bitmap',)), + ''' + ), + + 'GetMargins' : ('GetMarginCount', 0, 0), + 'SetMargins' : ('SetMarginCount', 0, 0), + 'GetMarginBackN' : ('GetMarginBackground', 0, 0), + 'SetMarginBackN' : ('SetMarginBackground', 0, 0), + 'SetMarginTypeN' : ('SetMarginType', 0, 0), + 'GetMarginTypeN' : ('GetMarginType', 0, 0), + 'SetMarginWidthN' : ('SetMarginWidth', 0, 0), + 'GetMarginWidthN' : ('GetMarginWidth', 0, 0), + 'SetMarginMaskN' : ('SetMarginMask', 0, 0), + 'GetMarginMaskN' : ('GetMarginMask', 0, 0), + 'SetMarginSensitiveN' : ('SetMarginSensitive', 0, 0), + 'GetMarginSensitiveN' : ('GetMarginSensitive', 0, 0), + 'SetMarginCursorN' : ('SetMarginCursor', 0, 0), + 'GetMarginCursorN' : ('GetMarginCursor', 0, 0), - 'GetMargins' : ('GetMarginCount', 0, 0, 0), - 'SetMargins' : ('SetMarginCount', 0, 0, 0), - 'GetMarginBackN' : ('GetMarginBackground', 0, 0, 0), - 'SetMarginBackN' : ('SetMarginBackground', 0, 0, 0), - 'SetMarginTypeN' : ('SetMarginType', 0, 0, 0), - 'GetMarginTypeN' : ('GetMarginType', 0, 0, 0), - 'SetMarginWidthN' : ('SetMarginWidth', 0, 0, 0), - 'GetMarginWidthN' : ('GetMarginWidth', 0, 0, 0), - 'SetMarginMaskN' : ('SetMarginMask', 0, 0, 0), - 'GetMarginMaskN' : ('GetMarginMask', 0, 0, 0), - 'SetMarginSensitiveN' : ('SetMarginSensitive', 0, 0, 0), - 'GetMarginSensitiveN' : ('GetMarginSensitive', 0, 0, 0), - 'SetMarginCursorN' : ('SetMarginCursor', 0, 0, 0), - 'GetMarginCursorN' : ('GetMarginCursor', 0, 0, 0), - 'MarginGetText' : (0, 'wxString %s(int line) const;', @@ -257,10 +254,10 @@ methodOverrideMap = { SendMsg(msg, line, (sptr_t)buf); mbuf.UngetWriteBuf(len); mbuf.AppendByte(0); - return stc2wx(buf);''', - 0), - - 'MarginGetStyles' : + return stc2wx(buf);''' + ), + + 'MarginGetStyles' : (0, 'wxString %s(int line) const;', @@ -273,13 +270,13 @@ methodOverrideMap = { SendMsg(msg, line, (sptr_t)buf); mbuf.UngetWriteBuf(len); mbuf.AppendByte(0); - return stc2wx(buf);''', - 0), + return stc2wx(buf);''' + ), - 'SetAdditionalSelFore' : ('SetAdditionalSelForeground', 0, 0, 0), - 'SetAdditionalSelBack' : ('SetAdditionalSelBackground', 0, 0, 0), - 'SetAdditionalCaretFore' : ('SetAdditionalCaretForeground', 0, 0, 0), - 'GetAdditionalCaretFore' : ('GetAdditionalCaretForeground', 0, 0, 0), + 'SetAdditionalSelFore' : ('SetAdditionalSelForeground', 0, 0), + 'SetAdditionalSelBack' : ('SetAdditionalSelBackground', 0, 0), + 'SetAdditionalCaretFore' : ('SetAdditionalCaretForeground', 0, 0), + 'GetAdditionalCaretFore' : ('GetAdditionalCaretForeground', 0, 0), 'AnnotationGetText' : (0, @@ -294,8 +291,8 @@ methodOverrideMap = { SendMsg(msg, line, (sptr_t)buf); mbuf.UngetWriteBuf(len); mbuf.AppendByte(0); - return stc2wx(buf);''', - 0), + return stc2wx(buf);''' + ), 'AnnotationGetStyles' : (0, @@ -310,16 +307,17 @@ methodOverrideMap = { SendMsg(msg, line, (sptr_t)buf); mbuf.UngetWriteBuf(len); mbuf.AppendByte(0); - return stc2wx(buf);''', - 0), + return stc2wx(buf);''' + ), + + 'StyleGetFore' : ('StyleGetForeground', 0, 0), + 'StyleGetBack' : ('StyleGetBackground', 0, 0), + 'StyleSetFore' : ('StyleSetForeground', 0, 0), + 'StyleSetBack' : ('StyleSetBackground', 0, 0), + 'SetSelFore' : ('SetSelForeground', 0, 0), + 'SetSelBack' : ('SetSelBackground', 0, 0), + 'SetCaretFore' : ('SetCaretForeground', 0, 0), - 'StyleGetFore' : ('StyleGetForeground', 0, 0, 0), - 'StyleGetBack' : ('StyleGetBackground', 0, 0, 0), - 'StyleSetFore' : ('StyleSetForeground', 0, 0, 0), - 'StyleSetBack' : ('StyleSetBackground', 0, 0, 0), - 'SetSelFore' : ('SetSelForeground', 0, 0, 0), - 'SetSelBack' : ('SetSelBackground', 0, 0, 0), - 'SetCaretFore' : ('SetCaretForeground', 0, 0, 0), 'StyleGetFont' : ('StyleGetFaceName', 'wxString %s(int style);', @@ -331,9 +329,10 @@ methodOverrideMap = { SendMsg(msg, style, (sptr_t)buf); mbuf.UngetWriteBuf(len); mbuf.AppendByte(0); - return stc2wx(buf);''', - ('Get the font facename of a style',)), - 'StyleSetFont' : ('StyleSetFaceName', 0, 0, 0), + return stc2wx(buf);''' + ), + + 'StyleSetFont' : ('StyleSetFaceName', 0, 0), 'StyleSetCharacterSet' : (0, 0, '''void %s(int style, int characterSet) { @@ -429,17 +428,16 @@ methodOverrideMap = { // effective wxFONENCODING_DEFAULT == SC_SHARSET_DEFAULT and so when // Scintilla internally uses SC_CHARSET_DEFAULT we will translate it back // to wxFONENCODING_DEFAULT in Font::Create. - SendMsg(%s, style, encoding+1);''', - ('Set the character set of the font in a style.', - 'Converts the Scintilla character set values to a wxFontEncoding.'),), + SendMsg(%s, style, encoding+1);''' + ), 'AssignCmdKey' : ('CmdKeyAssign', 'void %s(int key, int modifiers, int cmd);', '''void %s(int key, int modifiers, int cmd) { - SendMsg(%s, MAKELONG(key, modifiers), cmd);''', - 0), + SendMsg(%s, MAKELONG(key, modifiers), cmd);''' + ), 'ClearCmdKey' : @@ -447,10 +445,10 @@ methodOverrideMap = { 'void %s(int key, int modifiers);', '''void %s(int key, int modifiers) { - SendMsg(%s, MAKELONG(key, modifiers));''', - 0), + SendMsg(%s, MAKELONG(key, modifiers));''' + ), - 'ClearAllCmdKeys' : ('CmdKeyClearAll', 0, 0, 0), + 'ClearAllCmdKeys' : ('CmdKeyClearAll', 0, 0), 'StartStyling' : (0, @@ -460,73 +458,73 @@ methodOverrideMap = { wxASSERT_MSG(unused==0, "The second argument passed to StartStyling should be 0"); - SendMsg(%s, start, unused);''', - 0), + SendMsg(%s, start, unused);''' + ), 'SetStylingEx' : ('SetStyleBytes', 'void %s(int length, char* styleBytes);', '''void %s(int length, char* styleBytes) { - SendMsg(%s, length, (sptr_t)styleBytes);''', - 0), + SendMsg(%s, length, (sptr_t)styleBytes);''' + ), - 'IndicSetAlpha' : ('IndicatorSetAlpha', 0, 0, 0), - 'IndicGetAlpha' : ('IndicatorGetAlpha', 0, 0, 0), - 'IndicSetOutlineAlpha' : ('IndicatorSetOutlineAlpha', 0, 0, 0), - 'IndicGetOutlineAlpha' : ('IndicatorGetOutlineAlpha', 0, 0, 0), - 'IndicSetStyle' : ('IndicatorSetStyle', 0, 0, 0), - 'IndicGetStyle' : ('IndicatorGetStyle', 0, 0, 0), - 'IndicSetFore' : ('IndicatorSetForeground', 0, 0, 0), - 'IndicGetFore' : ('IndicatorGetForeground', 0, 0, 0), - 'IndicSetUnder': ('IndicatorSetUnder', 0, 0, 0), - 'IndicGetUnder': ('IndicatorGetUnder', 0, 0, 0), - 'IndicSetHoverStyle': ('IndicatorSetHoverStyle', 0, 0, 0), - 'IndicGetHoverStyle': ('IndicatorGetHoverStyle', 0, 0, 0), - 'IndicSetHoverFore': ('IndicatorSetHoverForeground', 0, 0, 0), - 'IndicGetHoverFore': ('IndicatorGetHoverForeground', 0, 0, 0), - 'IndicSetFlags': ('IndicatorSetFlags', 0, 0, 0), - 'IndicGetFlags': ('IndicatorGetFlags', 0, 0, 0), + 'IndicSetAlpha' : ('IndicatorSetAlpha', 0, 0), + 'IndicGetAlpha' : ('IndicatorGetAlpha', 0, 0), + 'IndicSetOutlineAlpha' : ('IndicatorSetOutlineAlpha', 0, 0), + 'IndicGetOutlineAlpha' : ('IndicatorGetOutlineAlpha', 0, 0), + 'IndicSetStyle' : ('IndicatorSetStyle', 0, 0), + 'IndicGetStyle' : ('IndicatorGetStyle', 0, 0), + 'IndicSetFore' : ('IndicatorSetForeground', 0, 0), + 'IndicGetFore' : ('IndicatorGetForeground', 0, 0), + 'IndicSetUnder': ('IndicatorSetUnder', 0, 0), + 'IndicGetUnder': ('IndicatorGetUnder', 0, 0), + 'IndicSetHoverStyle': ('IndicatorSetHoverStyle', 0, 0), + 'IndicGetHoverStyle': ('IndicatorGetHoverStyle', 0, 0), + 'IndicSetHoverFore': ('IndicatorSetHoverForeground', 0, 0), + 'IndicGetHoverFore': ('IndicatorGetHoverForeground', 0, 0), + 'IndicSetFlags': ('IndicatorSetFlags', 0, 0), + 'IndicGetFlags': ('IndicatorGetFlags', 0, 0), - 'SetWhitespaceFore' : ('SetWhitespaceForeground', 0, 0, 0), - 'SetWhitespaceBack' : ('SetWhitespaceBackground', 0, 0, 0), + 'SetWhitespaceFore' : ('SetWhitespaceForeground', 0, 0), + 'SetWhitespaceBack' : ('SetWhitespaceBackground', 0, 0), - 'AutoCShow' : ('AutoCompShow', 0, 0, 0), - 'AutoCCancel' : ('AutoCompCancel', 0, 0, 0), - 'AutoCActive' : ('AutoCompActive', 0, 0, 0), - 'AutoCPosStart' : ('AutoCompPosStart', 0, 0, 0), - 'AutoCComplete' : ('AutoCompComplete', 0, 0, 0), - 'AutoCStops' : ('AutoCompStops', 0, 0, 0), - 'AutoCSetSeparator' : ('AutoCompSetSeparator', 0, 0, 0), - 'AutoCGetSeparator' : ('AutoCompGetSeparator', 0, 0, 0), - 'AutoCSelect' : ('AutoCompSelect', 0, 0, 0), - 'AutoCSetCancelAtStart' : ('AutoCompSetCancelAtStart', 0, 0, 0), - 'AutoCGetCancelAtStart' : ('AutoCompGetCancelAtStart', 0, 0, 0), - 'AutoCSetFillUps' : ('AutoCompSetFillUps', 0, 0, 0), - 'AutoCSetChooseSingle' : ('AutoCompSetChooseSingle', 0, 0, 0), - 'AutoCGetChooseSingle' : ('AutoCompGetChooseSingle', 0, 0, 0), - 'AutoCSetIgnoreCase' : ('AutoCompSetIgnoreCase', 0, 0, 0), - 'AutoCGetIgnoreCase' : ('AutoCompGetIgnoreCase', 0, 0, 0), - 'AutoCSetAutoHide' : ('AutoCompSetAutoHide', 0, 0, 0), - 'AutoCGetAutoHide' : ('AutoCompGetAutoHide', 0, 0, 0), - 'AutoCSetDropRestOfWord' : ('AutoCompSetDropRestOfWord', 0,0,0), - 'AutoCGetDropRestOfWord' : ('AutoCompGetDropRestOfWord', 0,0,0), - 'AutoCGetTypeSeparator' : ('AutoCompGetTypeSeparator', 0, 0, 0), - 'AutoCSetTypeSeparator' : ('AutoCompSetTypeSeparator', 0, 0, 0), - 'AutoCGetCurrent' : ('AutoCompGetCurrent', 0, 0, 0), - 'AutoCGetCurrentText' : (None, 0, 0, 0), - 'AutoCSetMaxWidth' : ('AutoCompSetMaxWidth', 0, 0, 0), - 'AutoCGetMaxWidth' : ('AutoCompGetMaxWidth', 0, 0, 0), - 'AutoCSetMaxHeight' : ('AutoCompSetMaxHeight', 0, 0, 0), - 'AutoCGetMaxHeight' : ('AutoCompGetMaxHeight', 0, 0, 0), - 'AutoCGetMaxHeight' : ('AutoCompGetMaxHeight', 0, 0, 0), - 'AutoCSetCaseInsensitiveBehaviour' : ('AutoCompSetCaseInsensitiveBehaviour', 0, 0, 0), - 'AutoCGetCaseInsensitiveBehaviour' : ('AutoCompGetCaseInsensitiveBehaviour', 0, 0, 0), - 'AutoCSetMulti' : ('AutoCompSetMulti', 0, 0, 0), - 'AutoCGetMulti' : ('AutoCompGetMulti', 0, 0, 0), - 'AutoCSetOrder' : ('AutoCompSetOrder', 0, 0, 0), - 'AutoCGetOrder' : ('AutoCompGetOrder', 0, 0, 0), + 'AutoCShow' : ('AutoCompShow', 0, 0), + 'AutoCCancel' : ('AutoCompCancel', 0, 0), + 'AutoCActive' : ('AutoCompActive', 0, 0), + 'AutoCPosStart' : ('AutoCompPosStart', 0, 0), + 'AutoCComplete' : ('AutoCompComplete', 0, 0), + 'AutoCStops' : ('AutoCompStops', 0, 0), + 'AutoCSetSeparator' : ('AutoCompSetSeparator', 0, 0), + 'AutoCGetSeparator' : ('AutoCompGetSeparator', 0, 0), + 'AutoCSelect' : ('AutoCompSelect', 0, 0), + 'AutoCSetCancelAtStart' : ('AutoCompSetCancelAtStart', 0, 0), + 'AutoCGetCancelAtStart' : ('AutoCompGetCancelAtStart', 0, 0), + 'AutoCSetFillUps' : ('AutoCompSetFillUps', 0, 0), + 'AutoCSetChooseSingle' : ('AutoCompSetChooseSingle', 0, 0), + 'AutoCGetChooseSingle' : ('AutoCompGetChooseSingle', 0, 0), + 'AutoCSetIgnoreCase' : ('AutoCompSetIgnoreCase', 0, 0), + 'AutoCGetIgnoreCase' : ('AutoCompGetIgnoreCase', 0, 0), + 'AutoCSetAutoHide' : ('AutoCompSetAutoHide', 0, 0), + 'AutoCGetAutoHide' : ('AutoCompGetAutoHide', 0, 0), + 'AutoCSetDropRestOfWord' : ('AutoCompSetDropRestOfWord', 0,0), + 'AutoCGetDropRestOfWord' : ('AutoCompGetDropRestOfWord', 0,0), + 'AutoCGetTypeSeparator' : ('AutoCompGetTypeSeparator', 0, 0), + 'AutoCSetTypeSeparator' : ('AutoCompSetTypeSeparator', 0, 0), + 'AutoCGetCurrent' : ('AutoCompGetCurrent', 0, 0), + 'AutoCGetCurrentText' : (None, 0, 0), + 'AutoCSetMaxWidth' : ('AutoCompSetMaxWidth', 0, 0), + 'AutoCGetMaxWidth' : ('AutoCompGetMaxWidth', 0, 0), + 'AutoCSetMaxHeight' : ('AutoCompSetMaxHeight', 0, 0), + 'AutoCGetMaxHeight' : ('AutoCompGetMaxHeight', 0, 0), + 'AutoCGetMaxHeight' : ('AutoCompGetMaxHeight', 0, 0), + 'AutoCSetCaseInsensitiveBehaviour' : ('AutoCompSetCaseInsensitiveBehaviour', 0, 0), + 'AutoCGetCaseInsensitiveBehaviour' : ('AutoCompGetCaseInsensitiveBehaviour', 0, 0), + 'AutoCSetMulti' : ('AutoCompSetMulti', 0, 0), + 'AutoCGetMulti' : ('AutoCompGetMulti', 0, 0), + 'AutoCSetOrder' : ('AutoCompSetOrder', 0, 0), + 'AutoCGetOrder' : ('AutoCompGetOrder', 0, 0), 'RegisterImage' : (0, @@ -544,21 +542,16 @@ methodOverrideMap = { buff[len] = 0; SendMsg(%s, type, (sptr_t)buff); delete [] buff; - ''', - ('Register an image for use in autocompletion lists.',)), + ''' + ), + 'SetHScrollBar' : ('SetUseHorizontalScrollBar', 0, 0), + 'GetHScrollBar' : ('GetUseHorizontalScrollBar', 0, 0), - 'ClearRegisteredImages' : (0, 0, 0, - ('Clear all the registered images.',)), + 'SetVScrollBar' : ('SetUseVerticalScrollBar', 0, 0), + 'GetVScrollBar' : ('GetUseVerticalScrollBar', 0, 0), - - 'SetHScrollBar' : ('SetUseHorizontalScrollBar', 0, 0, 0), - 'GetHScrollBar' : ('GetUseHorizontalScrollBar', 0, 0, 0), - - 'SetVScrollBar' : ('SetUseVerticalScrollBar', 0, 0, 0), - 'GetVScrollBar' : ('GetUseVerticalScrollBar', 0, 0, 0), - - 'GetCaretFore' : ('GetCaretForeground', 0, 0, 0), + 'GetCaretFore' : ('GetCaretForeground', 0, 0), 'FindText' : (0, @@ -573,8 +566,8 @@ methodOverrideMap = { const wxWX2MBbuf buf = wx2stc(text); ft.lpstrText = (char*)(const char*)buf; - return SendMsg(%s, flags, (sptr_t)&ft);''', - 0), + return SendMsg(%s, flags, (sptr_t)&ft);''' + ), 'FormatRange' : (0, @@ -612,8 +605,8 @@ methodOverrideMap = { fr.chrg.cpMin = startPos; fr.chrg.cpMax = endPos; - return SendMsg(%s, doDraw, (sptr_t)&fr);''', - 0), + return SendMsg(%s, doDraw, (sptr_t)&fr);''' + ), 'GetLine' : @@ -629,11 +622,10 @@ methodOverrideMap = { SendMsg(%s, line, (sptr_t)buf); mbuf.UngetWriteBuf(len); mbuf.AppendByte(0); - return stc2wx(buf);''', + return stc2wx(buf);''' + ), - ('Retrieve the contents of a line.',)), - - 'SetSel' : (None, 0,0,0), #'SetSelection', 0, 0, 0), + 'SetSel' : (None, 0,0), #'SetSelection', 0, 0, 0), 'GetSelText' : ('GetSelectedText', @@ -648,10 +640,8 @@ methodOverrideMap = { SendMsg(%s, 0, (sptr_t)buf); mbuf.UngetWriteBuf(len); mbuf.AppendByte(0); - return stc2wx(buf);''', - - ('Retrieve the selected text.',)), - + return stc2wx(buf);''' + ), 'GetTextRange' : (0, @@ -674,9 +664,8 @@ methodOverrideMap = { SendMsg(%s, 0, (sptr_t)&tr); mbuf.UngetWriteBuf(len); mbuf.AppendByte(0); - return stc2wx(buf);''', - - ('Retrieve a range of text.',)), + return stc2wx(buf);''' + ), 'PointXFromPosition' : ('PointFromPosition', @@ -684,14 +673,14 @@ methodOverrideMap = { '''wxPoint %s(int pos) { int x = SendMsg(%s, 0, pos); int y = SendMsg(SCI_POINTYFROMPOSITION, 0, pos); - return wxPoint(x, y);''', - ('Retrieve the point in the window where a position is displayed.',)), + return wxPoint(x, y);''' + ), - 'PointYFromPosition' : (None, 0, 0, 0), + 'PointYFromPosition' : (None, 0, 0), - 'ScrollCaret' : ('EnsureCaretVisible', 0, 0, 0), - 'ReplaceSel' : ('ReplaceSelection', 0, 0, 0), - 'Null' : (None, 0, 0, 0), + 'ScrollCaret' : ('EnsureCaretVisible', 0, 0), + 'ReplaceSel' : ('ReplaceSelection', 0, 0), + 'Null' : (None, 0, 0), 'GetText' : (0, @@ -704,23 +693,22 @@ methodOverrideMap = { SendMsg(%s, len+1, (sptr_t)buf); mbuf.UngetWriteBuf(len); mbuf.AppendByte(0); - return stc2wx(buf);''', - - ('Retrieve all the text in the document.', )), + return stc2wx(buf);''' + ), 'GetDirectFunction' : (0, 'void* %s() const;', '''void* %s() const { - return (void*)SendMsg(%s);''', - 0), + return (void*)SendMsg(%s);''' + ), 'GetDirectPointer' : (0, 'void* %s() const;', '''void* %s() const { - return (void*)SendMsg(%s);''', - 0), + return (void*)SendMsg(%s);''' + ), 'GetTargetText' : (0, @@ -734,24 +722,23 @@ methodOverrideMap = { SendMsg(%s, 0, (sptr_t)buf); mbuf.UngetWriteBuf(endPos-startPos); mbuf.AppendByte(0); - return stc2wx(buf);''', + return stc2wx(buf);''' + ), - 0), + 'CallTipPosStart' : ('CallTipPosAtStart', 0, 0), + 'CallTipSetPosStart': ('CallTipSetPosAtStart', 0, 0), + 'CallTipSetHlt' : ('CallTipSetHighlight', 0, 0), + 'CallTipSetBack' : ('CallTipSetBackground', 0, 0), + 'CallTipSetFore' : ('CallTipSetForeground', 0, 0), + 'CallTipSetForeHlt' : ('CallTipSetForegroundHighlight', 0, 0), - 'CallTipPosStart' : ('CallTipPosAtStart', 0, 0, 0), - 'CallTipSetPosStart': ('CallTipSetPosAtStart', 0, 0, 0), - 'CallTipSetHlt' : ('CallTipSetHighlight', 0, 0, 0), - 'CallTipSetBack' : ('CallTipSetBackground', 0, 0, 0), - 'CallTipSetFore' : ('CallTipSetForeground', 0, 0, 0), - 'CallTipSetForeHlt' : ('CallTipSetForegroundHighlight', 0, 0, 0), + 'SetHotspotActiveFore' : ('SetHotspotActiveForeground', 0, 0), + 'SetHotspotActiveBack' : ('SetHotspotActiveBackground', 0, 0), + 'GetHotspotActiveFore' : ('GetHotspotActiveForeground', 0, 0), + 'GetHotspotActiveBack' : ('GetHotspotActiveBackground', 0, 0), - 'SetHotspotActiveFore' : ('SetHotspotActiveForeground', 0, 0, 0), - 'SetHotspotActiveBack' : ('SetHotspotActiveBackground', 0, 0, 0), - 'GetHotspotActiveFore' : ('GetHotspotActiveForeground', 0, 0, 0), - 'GetHotspotActiveBack' : ('GetHotspotActiveBackground', 0, 0, 0), - - 'GetCaretLineBack' : ('GetCaretLineBackground', 0, 0, 0), - 'SetCaretLineBack' : ('SetCaretLineBackground', 0, 0, 0), + 'GetCaretLineBack' : ('GetCaretLineBackground', 0, 0), + 'SetCaretLineBack' : ('SetCaretLineBackground', 0, 0), 'ReplaceTarget' : (0, @@ -760,8 +747,8 @@ methodOverrideMap = { ''' int %s(const wxString& text) { const wxWX2MBbuf buf = wx2stc(text); - return SendMsg(%s, wx2stclen(text, buf), (sptr_t)(const char*)buf);''', - 0), + return SendMsg(%s, wx2stclen(text, buf), (sptr_t)(const char*)buf);''' + ), 'ReplaceTargetRE' : (0, @@ -770,13 +757,8 @@ methodOverrideMap = { ''' int %s(const wxString& text) { const wxWX2MBbuf buf = wx2stc(text); - return SendMsg(%s, 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.',)), + return SendMsg(%s, wx2stclen(text, buf), (sptr_t)(const char*)buf);''' + ), 'SearchInTarget' : (0, @@ -785,13 +767,13 @@ methodOverrideMap = { ''' int %s(const wxString& text) { const wxWX2MBbuf buf = wx2stc(text); - return SendMsg(%s, wx2stclen(text, buf), (sptr_t)(const char*)buf);''', - 0), + return SendMsg(%s, wx2stclen(text, buf), (sptr_t)(const char*)buf);''' + ), # not sure what to do about these yet - 'TargetAsUTF8' : ( None, 0, 0, 0), - 'SetLengthForEncode' : ( None, 0, 0, 0), - 'EncodedFromUTF8' : ( None, 0, 0, 0), + 'TargetAsUTF8' : ( None, 0, 0), + 'SetLengthForEncode' : ( None, 0, 0), + 'EncodedFromUTF8' : ( None, 0, 0), 'GetProperty' : @@ -807,8 +789,8 @@ methodOverrideMap = { SendMsg(%s, (uptr_t)(const char*)wx2stc(key), (sptr_t)buf); mbuf.UngetWriteBuf(len); mbuf.AppendByte(0); - return stc2wx(buf);''', - ("Retrieve a 'property' value previously set with SetProperty.",)), + return stc2wx(buf);''' + ), 'GetPropertyExpanded' : (0, @@ -823,17 +805,15 @@ methodOverrideMap = { SendMsg(%s, (uptr_t)(const char*)wx2stc(key), (sptr_t)buf); mbuf.UngetWriteBuf(len); mbuf.AppendByte(0); - return stc2wx(buf);''', - ("Retrieve a 'property' value previously set with SetProperty,", - "with '$()' variable replacement on returned buffer.")), + return stc2wx(buf);''' + ), 'GetPropertyInt' : (0, 'int %s(const wxString &key, int defaultValue=0) const;', '''int %s(const wxString &key, int defaultValue) const { - return SendMsg(%s, (uptr_t)(const char*)wx2stc(key), defaultValue);''', - ("Retrieve a 'property' value previously set with SetProperty,", - "interpreted as an int AFTER any '$()' variable replacement.")), + return SendMsg(%s, (uptr_t)(const char*)wx2stc(key), defaultValue);''' + ), 'BraceMatch' : (0, @@ -842,43 +822,43 @@ methodOverrideMap = { wxASSERT_MSG(maxReStyle==0, "The second argument passed to BraceMatch should be 0"); - return SendMsg(%s, pos, maxReStyle);''', - 0), + return SendMsg(%s, pos, maxReStyle);''' + ), 'GetDocPointer' : (0, 'void* %s();', '''void* %s() { - return (void*)SendMsg(%s);''', - 0), + return (void*)SendMsg(%s);''' + ), 'SetDocPointer' : (0, 'void %s(void* docPointer);', '''void %s(void* docPointer) { - SendMsg(%s, 0, (sptr_t)docPointer);''', - 0), + SendMsg(%s, 0, (sptr_t)docPointer);''' + ), 'CreateDocument' : (0, 'void* %s();', '''void* %s() { - return (void*)SendMsg(%s);''', - 0), + return (void*)SendMsg(%s);''' + ), 'AddRefDocument' : (0, 'void %s(void* docPointer);', '''void %s(void* docPointer) { - SendMsg(%s, 0, (sptr_t)docPointer);''', - 0), + SendMsg(%s, 0, (sptr_t)docPointer);''' + ), 'ReleaseDocument' : (0, 'void %s(void* docPointer);', '''void %s(void* docPointer) { - SendMsg(%s, 0, (sptr_t)docPointer);''', - 0), + SendMsg(%s, 0, (sptr_t)docPointer);''' + ), 'SetCodePage' : (0, @@ -891,20 +871,20 @@ methodOverrideMap = { wxASSERT_MSG(codePage != wxSTC_CP_UTF8, wxT("wxSTC_CP_UTF8 may not be used when wxUSE_UNICODE is off.")); #endif - SendMsg(%s, codePage);''', - ("Set the code page used to interpret the bytes of the document as characters.",) ), + SendMsg(%s, codePage);''' + ), - 'GrabFocus' : (None, 0, 0, 0), + 'GrabFocus' : (None, 0, 0), # Rename some that would otherwise hide the wxWindow methods - 'SetFocus' : ('SetSTCFocus', 0, 0, 0), - 'GetFocus' : ('GetSTCFocus', 0, 0, 0), - 'SetCursor' : ('SetSTCCursor', 0, 0, 0), - 'GetCursor' : ('GetSTCCursor', 0, 0, 0), + 'SetFocus' : ('SetSTCFocus', 0, 0), + 'GetFocus' : ('GetSTCFocus', 0, 0), + 'SetCursor' : ('SetSTCCursor', 0, 0), + 'GetCursor' : ('GetSTCCursor', 0, 0), - 'SetPositionCache' : ('SetPositionCacheSize', 0, 0, 0), - 'GetPositionCache' : ('GetPositionCacheSize', 0, 0, 0), + 'SetPositionCache' : ('SetPositionCacheSize', 0, 0), + 'GetPositionCache' : ('GetPositionCacheSize', 0, 0), 'GetLexerLanguage' :(0, 'wxString %s() const;', @@ -919,26 +899,24 @@ methodOverrideMap = { SendMsg(msg, 0, (sptr_t)buf); mbuf.UngetWriteBuf(len); mbuf.AppendByte(0); - return stc2wx(buf);''', + return stc2wx(buf);''' + ), - ('Retrieve the lexing language of the document.',)), - - 'SetFontQuality' : (None, 0, 0, 0), - 'GetFontQuality' : (None, 0, 0, 0), - 'SetSelection' : (None, 0, 0, 0), + 'SetFontQuality' : (None, 0, 0), + 'GetFontQuality' : (None, 0, 0), + 'SetSelection' : (None, 0, 0), 'GetCharacterPointer' : (0, 'const char* %s() const;', 'const char* %s() const {\n' - ' return (const char*)SendMsg(%s, 0, 0);', - 0), - + ' return (const char*)SendMsg(%s, 0, 0);' + ), + 'GetRangePointer' : (0, 'const char* %s(int position, int rangeLength) const;', 'const char* %s(int position, int rangeLength) const {\n' - ' return (const char*)SendMsg(%s, position, rangeLength);', - 0), - + ' return (const char*)SendMsg(%s, position, rangeLength);' + ), 'GetWordChars' : (0, @@ -954,9 +932,8 @@ methodOverrideMap = { SendMsg(msg, 0, (sptr_t)buf); mbuf.UngetWriteBuf(len); mbuf.AppendByte(0); - return stc2wx(buf);''', - - ('Get the set of characters making up words for when moving or selecting by word.',)), + return stc2wx(buf);''' + ), 'GetTag' : (0, @@ -972,8 +949,8 @@ methodOverrideMap = { SendMsg(msg, tagNumber, (sptr_t)buf); mbuf.UngetWriteBuf(len); mbuf.AppendByte(0); - return stc2wx(buf);''', - 0), + return stc2wx(buf);''' + ), 'GetWhitespaceChars' : (0, @@ -989,8 +966,8 @@ methodOverrideMap = { SendMsg(msg, 0, (sptr_t)buf); mbuf.UngetWriteBuf(len); mbuf.AppendByte(0); - return stc2wx(buf);''', - 0), + return stc2wx(buf);''' + ), 'GetPunctuationChars' : @@ -1007,8 +984,8 @@ methodOverrideMap = { SendMsg(msg, 0, (sptr_t)buf); mbuf.UngetWriteBuf(len); mbuf.AppendByte(0); - return stc2wx(buf);''', - 0), + return stc2wx(buf);''' + ), 'PropertyNames' : @@ -1025,8 +1002,8 @@ methodOverrideMap = { SendMsg(msg, 0, (sptr_t)buf); mbuf.UngetWriteBuf(len); mbuf.AppendByte(0); - return stc2wx(buf);''', - 0), + return stc2wx(buf);''' + ), @@ -1044,8 +1021,8 @@ methodOverrideMap = { SendMsg(msg, (sptr_t)(const char*)wx2stc(name), (sptr_t)buf); mbuf.UngetWriteBuf(len); mbuf.AppendByte(0); - return stc2wx(buf);''', - 0), + return stc2wx(buf);''' + ), @@ -1063,38 +1040,37 @@ methodOverrideMap = { SendMsg(msg, 0, (sptr_t)buf); mbuf.UngetWriteBuf(len); mbuf.AppendByte(0); - return stc2wx(buf);''', - 0), - + return stc2wx(buf);''' + ), 'MarkerDefineRGBAImage' : (0, 'void %s(int markerNumber, const unsigned char* pixels);', '''void %s(int markerNumber, const unsigned char* pixels) { - SendMsg(%s, markerNumber, (sptr_t)pixels);''', - 0), + SendMsg(%s, markerNumber, (sptr_t)pixels);''' + ), 'RegisterRGBAImage' : (0, 'void %s(int type, const unsigned char* pixels);', '''void %s(int type, const unsigned char* pixels) { - SendMsg(%s, type, (sptr_t)pixels);''', - 0), + SendMsg(%s, type, (sptr_t)pixels);''' + ), # I think these are only available on the native OSX backend, so # don't add them to the wx API... - 'FindIndicatorShow' : (None, 0,0,0), - 'FindIndicatorFlash' : (None, 0,0,0), - 'FindIndicatorHide' : (None, 0,0,0), + 'FindIndicatorShow' : (None, 0,0), + 'FindIndicatorFlash' : (None, 0,0), + 'FindIndicatorHide' : (None, 0,0), 'CreateLoader' : (0, 'void* %s(int bytes) const;', """void* %s(int bytes) const { - return (void*)(sptr_t)SendMsg(%s, bytes); """, - 0), + return (void*)(sptr_t)SendMsg(%s, bytes); """ + ), 'GetRepresentation' : (0, @@ -1109,19 +1085,15 @@ methodOverrideMap = { SendMsg(msg, (sptr_t)(const char*)wx2stc(encodedCharacter), (sptr_t)buf); mbuf.UngetWriteBuf(len); mbuf.AppendByte(0); - return stc2wx(buf);''', - 0), + return stc2wx(buf);''' + ), 'PrivateLexerCall' : (0, 'void* %s(int operation, void* pointer);', """void* %s(int operation, void* pointer) { - return (void*)(sptr_t)SendMsg(%s, operation, (sptr_t)pointer); """, - 0), - - 'GetMultiPaste' : - (0, 0, 0, - ('Retrieve the effect of pasting when there are multiple selections.',)), + return (void*)(sptr_t)SendMsg(%s, operation, (sptr_t)pointer); """ + ), 'GetSubStyleBases' : (0, @@ -1136,10 +1108,10 @@ methodOverrideMap = { SendMsg(msg, 0, (sptr_t)buf); mbuf.UngetWriteBuf(len); mbuf.AppendByte(0); - return stc2wx(buf);''', - 0), - - '' : ('', 0, 0, 0), + return stc2wx(buf);''' + ), + + '' : ('', 0, 0), } @@ -1215,6 +1187,16 @@ def processIface(iface, h_tmplt, cpp_tmplt, ih_tmplt, h_dest, cpp_dest, docstr_d else: print('***** Unknown line type: %s' % line) + # build the items for the table of contents in the interface header + tableitems='' + firstitem=True + for category, title, description in categoriesList: + if firstitem: + firstitem=False + else: + tableitems+='\n' + tableitems+=' - @ref_member_group{'+category+', '+title+'}' + # process templates data = {} data['VALUES'] = processVals(values) @@ -1223,6 +1205,7 @@ def processIface(iface, h_tmplt, cpp_tmplt, ih_tmplt, h_dest, cpp_dest, docstr_d data['METHOD_DEFS'] = defs data['METHOD_IDEFS'] = idefs data['METHOD_IMPS'] = imps + data['TABLE_OF_CONTENTS'] = tableitems # get template text h_text = open(h_tmplt).read() @@ -1288,16 +1271,23 @@ def processMethods(methods): idefs = [] imps = [] dstr = [] + piecesForInterface = {} - for retType, name, number, param1, param2, docs, is_const, is_override in methods: + # Initialize each of the piecesForInterface with an empty list + for c in categoriesList: + piecesForInterface[c[0]]=[] + + for retType, interfName, number, param1, param2, docs, is_const, is_override in methods: retType = retTypeMap.get(retType, retType) params = makeParamString(param1, param2) - name, theDef, theImp, docs = checkMethodOverride(name, number, docs) + name, theDef, theImp = checkMethodOverride(interfName, number) if name is None: continue + category, docs, docsLong = buildDocs(interfName, docs) + # Build docstrings st = 'DocStr(wxStyledTextCtrl::%s,\n' \ '"%s", "");\n' % (name, joinWithNewLines(docs)) @@ -1322,17 +1312,29 @@ def processMethods(methods): theDef = theDef.replace(' wxOVERRIDE', '') # Build the method definition for the interface .h file + intrflines = [] if docs: - idefs.append('') - idefs.append(' /**') + intrflines.append('') + intrflines.append(' /**') for x in docs: - idefs.append(' ' + x) - idefs.append(' */') - if name == 'GetCurLine': - idefs.append(' wxString GetCurLine(int* linePos=NULL);') + intrflines.append(' ' + x) + + if docsLong != 0: + intrflines.append('') + for y in docsLong: + intrflines.append(' ' + y) + intrflines.append(' */') else: - idefs.append(theDef) - + print('warning: ' + name + ' is undocumented.') + + if name == 'GetCurLine': + intrflines.append(' wxString GetCurLine(int* linePos=NULL);') + else: + intrflines.append(theDef) + + piecesForInterface[category]+=intrflines + + # Build the method implementation string if docs: imps.append('') @@ -1358,13 +1360,29 @@ def processMethods(methods): theImp = theImp + ';\n}' imps.append(theImp) + # For the interface file, merge all the pieces into one list + for c in categoriesList: + idefs.append('') + idefs.append(' /**') + idefs.append(' @member_group_name{' + c[0] + ', ' + c[1] + '}') + + if c[2] != 0: + idefs.append('') + for z in c[2]: + idefs.append(' ' + z) + + idefs.append(' */') + idefs.append(' //@{') + + idefs+=piecesForInterface[c[0]] + idefs.append('') + idefs.append(' //@}') return joinWithNewLines(defs), joinWithNewLines(imps), joinWithNewLines(dstr), joinWithNewLines(idefs) - #---------------------------------------------------------------------------- -def checkMethodOverride(name, number, docs): +def checkMethodOverride(name, number): theDef = theImp = None if name in methodOverrideMap: item = methodOverrideMap[name] @@ -1376,13 +1394,11 @@ def checkMethodOverride(name, number, docs): theDef = ' ' + (item[1] % name) if item[2] != 0: theImp = item[2] % ('wxStyledTextCtrl::'+name, number) + '\n}' - if item[3] != 0: - docs = item[3] except: print("************* " + name) raise - return name, theDef, theImp, docs + return name, theDef, theImp #---------------------------------------------------------------------------- diff --git a/src/stc/scintilla/README.txt b/src/stc/scintilla/README.txt index cea8c56395..79de26b48e 100644 --- a/src/stc/scintilla/README.txt +++ b/src/stc/scintilla/README.txt @@ -46,7 +46,8 @@ that list. Also, for any enums that begin with 'SCXX_' instead of 'SC_', add an entry to valPrefixes to make sure the new names for constants are generated consistently. -7. Run gen_iface.py. +7. Run gen_iface.py. It's best to use python 2.6 or later. If +using an earlier version, please delete any .pyc files generated. 8. Any other new methods should be checked to ensure that the generated code is appropriate for what they are doing and if not then @@ -56,7 +57,8 @@ instead. 9. Add documentation code for any new methods to interface/wx/stc/stc.h, also check any documentation-only changes from Scintilla.iface and see if the existing docs for those items should be -updated too. +updated too. For new functions in Scintilla.iface, an entry should be +added to the docsMap and sinceAnnotations dictionaries in gen_docs.py. 10. Apply the fix for scintilla/src/UniConversion.h based on commit by Vadim Zeitlin from March 5th, 2016. diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index fad8f97326..c45d240bf7 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -287,7 +287,7 @@ void wxStyledTextCtrl::InsertText(int pos, const wxString& text) SendMsg(SCI_INSERTTEXT, pos, (sptr_t)(const char*)wx2stc(text)); } -// Change the text that is being inserted in response to SC_MOD_INSERTCHECK +// Change the text that is being inserted in response to wxSTC_MOD_INSERTCHECK void wxStyledTextCtrl::ChangeInsertion(int length, const wxString& text) { SendMsg(SCI_CHANGEINSERTION, length, (sptr_t)(const char*)wx2stc(text)); @@ -409,7 +409,7 @@ bool wxStyledTextCtrl::GetUndoCollection() const } // Are white space characters currently visible? -// Returns one of SCWS_* constants. +// Returns one of wxSTC_WS_* constants. int wxStyledTextCtrl::GetViewWhiteSpace() const { return SendMsg(SCI_GETVIEWWS, 0, 0); @@ -422,7 +422,7 @@ void wxStyledTextCtrl::SetViewWhiteSpace(int viewWS) } // Retrieve the current tab draw mode. -// Returns one of SCTD_* constants. +// Returns one of wxSTC_TD_* constants. int wxStyledTextCtrl::GetTabDrawMode() const { return SendMsg(SCI_GETTABDRAWMODE, 0, 0); @@ -440,7 +440,7 @@ int wxStyledTextCtrl::PositionFromPoint(wxPoint pt) const { } // Find the position from a point within the window but return -// INVALID_POSITION if not close to text. +// wxSTC_INVALID_POSITION if not close to text. int wxStyledTextCtrl::PositionFromPointClose(int x, int y) { return SendMsg(SCI_POSITIONFROMPOINTCLOSE, x, y); @@ -466,8 +466,6 @@ void wxStyledTextCtrl::SetAnchor(int anchor) } // Retrieve the text of the line containing the caret. -// Returns the index of the caret on the line. -// Result is NUL-terminated. wxString wxStyledTextCtrl::GetCurLine(int* linePos) { int len = LineLength(GetCurrentLine()); if (!len) { @@ -497,7 +495,7 @@ void wxStyledTextCtrl::ConvertEOLs(int eolMode) SendMsg(SCI_CONVERTEOLS, eolMode, 0); } -// Retrieve the current end of line mode - one of CRLF, CR, or LF. +// Retrieve the current end of line mode - one of wxSTC_EOL_CRLF, wxSTC_EOL_CR, or wxSTC_EOL_LF. int wxStyledTextCtrl::GetEOLMode() const { return SendMsg(SCI_GETEOLMODE, 0, 0); @@ -755,7 +753,7 @@ int wxStyledTextCtrl::GetMarginCursor(int margin) const return SendMsg(SCI_GETMARGINCURSORN, margin, 0); } -// Set the background colour of a margin. Only visible for SC_MARGIN_COLOUR. +// Set the background colour of a margin. Only visible for wxSTC_MARGIN_COLOUR. void wxStyledTextCtrl::SetMarginBackground(int margin, const wxColour& back) { SendMsg(SCI_SETMARGINBACKN, margin, wxColourAsLong(back)); @@ -958,7 +956,6 @@ int wxStyledTextCtrl::StyleGetWeight(int style) const } // Set the character set of the font in a style. -// Converts the Scintilla character set values to a wxFontEncoding. void wxStyledTextCtrl::StyleSetCharacterSet(int style, int characterSet) { wxFontEncoding encoding; @@ -2074,7 +2071,7 @@ void wxStyledTextCtrl::TargetWholeDocument() // 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 \). +// 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. @@ -2158,7 +2155,7 @@ void wxStyledTextCtrl::CallTipSetForegroundHighlight(const wxColour& fore) SendMsg(SCI_CALLTIPSETFOREHLT, wxColourAsLong(fore), 0); } -// Enable use of STYLE_CALLTIP and set call tip tab size in pixels. +// Enable use of wxSTC_STYLE_CALLTIP and set call tip tab size in pixels. void wxStyledTextCtrl::CallTipUseStyle(int tabSize) { SendMsg(SCI_CALLTIPUSESTYLE, tabSize, 0); @@ -2437,13 +2434,13 @@ int wxStyledTextCtrl::GetWrapStartIndent() const return SendMsg(SCI_GETWRAPSTARTINDENT, 0, 0); } -// Sets how wrapped sublines are placed. Default is fixed. +// Sets how wrapped sublines are placed. Default is wxSTC_WRAPINDENT_FIXED. void wxStyledTextCtrl::SetWrapIndentMode(int wrapIndentMode) { SendMsg(SCI_SETWRAPINDENTMODE, wrapIndentMode, 0); } -// Retrieve how wrapped sublines are placed. Default is fixed. +// Retrieve how wrapped sublines are placed. Default is wxSTC_WRAPINDENT_FIXED. int wxStyledTextCtrl::GetWrapIndentMode() const { return SendMsg(SCI_GETWRAPINDENTMODE, 0, 0); @@ -2486,7 +2483,6 @@ bool wxStyledTextCtrl::GetScrollWidthTracking() const } // 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) { @@ -2579,7 +2575,6 @@ int wxStyledTextCtrl::GetMultiPaste() const } // Retrieve the value of a tag from a regular expression search. -// Result is NUL-terminated. wxString wxStyledTextCtrl::GetTag(int tagNumber) const { const int msg = SCI_GETTAG; int len = SendMsg(msg, tagNumber, (sptr_t)NULL); @@ -3013,7 +3008,7 @@ void wxStyledTextCtrl::BraceBadLightIndicator(bool useSetting, int indicator) SendMsg(SCI_BRACEBADLIGHTINDICATOR, useSetting, indicator); } -// Find the position of a matching brace or INVALID_POSITION if no match. +// Find the position of a matching brace or wxSTC_INVALID_POSITION if no match. // The maxReStyle must be 0 for now. It may be defined in a future release. int wxStyledTextCtrl::BraceMatch(int pos, int maxReStyle){ wxASSERT_MSG(maxReStyle==0, @@ -3069,8 +3064,8 @@ int wxStyledTextCtrl::GetEdgeMode() const return SendMsg(SCI_GETEDGEMODE, 0, 0); } -// The edge may be displayed by a line (EDGE_LINE/EDGE_MULTILINE) or by highlighting text that -// goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). +// The edge may be displayed by a line (wxSTC_EDGE_LINE/wxSTC_EDGE_MULTILINE) or by highlighting text that +// goes beyond it (wxSTC_EDGE_BACKGROUND) or not displayed at all (wxSTC_EDGE_NONE). void wxStyledTextCtrl::SetEdgeMode(int edgeMode) { SendMsg(SCI_SETEDGEMODE, edgeMode, 0); @@ -3223,7 +3218,7 @@ bool wxStyledTextCtrl::GetMouseWheelCaptures() const return SendMsg(SCI_GETMOUSEWHEELCAPTURES, 0, 0) != 0; } -// Sets the cursor to one of the SC_CURSOR* values. +// Sets the cursor to one of the wxSTC_CURSOR* values. void wxStyledTextCtrl::SetSTCCursor(int cursorType) { SendMsg(SCI_SETCURSOR, cursorType, 0); @@ -3293,11 +3288,13 @@ void wxStyledTextCtrl::DelLineRight() SendMsg(SCI_DELLINERIGHT, 0, 0); } -// Get and Set the xOffset (ie, horizontal scroll position). +// Set the xOffset (ie, horizontal scroll position). void wxStyledTextCtrl::SetXOffset(int xOffset) { SendMsg(SCI_SETXOFFSET, xOffset, 0); } + +// Get the xOffset (ie, horizontal scroll position). int wxStyledTextCtrl::GetXOffset() const { return SendMsg(SCI_GETXOFFSET, 0, 0); @@ -3323,7 +3320,7 @@ void wxStyledTextCtrl::SetYCaretPolicy(int caretPolicy, int caretSlop) SendMsg(SCI_SETYCARETPOLICY, caretPolicy, caretSlop); } -// Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE). +// Set printing to line wrapped (wxSTC_WRAP_WORD) or not line wrapped (wxSTC_WRAP_NONE). void wxStyledTextCtrl::SetPrintWrapMode(int wrapMode) { SendMsg(SCI_SETPRINTWRAPMODE, wrapMode, 0); @@ -3442,8 +3439,8 @@ void wxStyledTextCtrl::CopyText(int length, const wxString& text) SendMsg(SCI_COPYTEXT, length, (sptr_t)(const char*)wx2stc(text)); } -// Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or -// by lines (SC_SEL_LINES). +// Set the selection mode to stream (wxSTC_SEL_STREAM) or rectangular (wxSTC_SEL_RECTANGLE/wxSTC_SEL_THIN) or +// by lines (wxSTC_SEL_LINES). void wxStyledTextCtrl::SetSelectionMode(int selectionMode) { SendMsg(SCI_SETSELECTIONMODE, selectionMode, 0); @@ -3455,13 +3452,13 @@ int wxStyledTextCtrl::GetSelectionMode() const return SendMsg(SCI_GETSELECTIONMODE, 0, 0); } -// Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line). +// Retrieve the position of the start of the selection at the given line (wxSTC_INVALID_POSITION if no selection on this line). int wxStyledTextCtrl::GetLineSelStartPosition(int line) { return SendMsg(SCI_GETLINESELSTARTPOSITION, line, 0); } -// Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line). +// Retrieve the position of the end of the selection at the given line (wxSTC_INVALID_POSITION if no selection on this line). int wxStyledTextCtrl::GetLineSelEndPosition(int line) { return SendMsg(SCI_GETLINESELENDPOSITION, line, 0); @@ -4077,7 +4074,7 @@ int wxStyledTextCtrl::CharPositionFromPoint(int x, int y) } // Find the position of a character from a point within the window. -// Return INVALID_POSITION if not close to text. +// Return wxSTC_INVALID_POSITION if not close to text. int wxStyledTextCtrl::CharPositionFromPointClose(int x, int y) { return SendMsg(SCI_CHARPOSITIONFROMPOINTCLOSE, x, y); @@ -4320,7 +4317,7 @@ int wxStyledTextCtrl::GetVirtualSpaceOptions() const // On GTK+, allow selecting the modifier key to use for mouse-based // rectangular selection. Often the window manager requires Alt+Mouse Drag // for moving windows. -// Valid values are SCMOD_CTRL(default), SCMOD_ALT, or SCMOD_SUPER. +// Valid values are wxSTC_KEYMOD_CTRL (default), wxSTC_KEYMOD_ALT, or wxSTC_KEYMOD_SUPER. void wxStyledTextCtrl::SetRectangularSelectionModifier(int modifier) { SendMsg(SCI_SETRECTANGULARSELECTIONMODIFIER, modifier, 0); @@ -4550,7 +4547,6 @@ void wxStyledTextCtrl::SetRepresentation(const wxString& encodedCharacter, const } // Set the way a character is drawn. -// Result is NUL-terminated. wxString wxStyledTextCtrl::GetRepresentation(const wxString& encodedCharacter) const { int msg = SCI_GETREPRESENTATION; int len = SendMsg(msg, (sptr_t)(const char*)wx2stc(encodedCharacter), (sptr_t)NULL); @@ -4624,7 +4620,7 @@ void wxStyledTextCtrl::LoadLexerLibrary(const wxString& path) SendMsg(SCI_LOADLEXERLIBRARY, 0, (sptr_t)(const char*)wx2stc(path)); } -// Retrieve a 'property' value previously set with SetProperty. +// Retrieve a "property" value previously set with SetProperty. wxString wxStyledTextCtrl::GetProperty(const wxString& key) { int len = SendMsg(SCI_GETPROPERTY, (sptr_t)(const char*)wx2stc(key), 0); if (!len) return wxEmptyString; @@ -4637,8 +4633,8 @@ wxString wxStyledTextCtrl::GetProperty(const wxString& key) { return stc2wx(buf); } -// Retrieve a 'property' value previously set with SetProperty, -// with '$()' variable replacement on returned buffer. +// Retrieve a "property" value previously set with SetProperty, +// with "$()" variable replacement on returned buffer. wxString wxStyledTextCtrl::GetPropertyExpanded(const wxString& key) { int len = SendMsg(SCI_GETPROPERTYEXPANDED, (uptr_t)(const char*)wx2stc(key), 0); if (!len) return wxEmptyString; @@ -4651,8 +4647,8 @@ wxString wxStyledTextCtrl::GetPropertyExpanded(const wxString& key) { return stc2wx(buf); } -// Retrieve a 'property' value previously set with SetProperty, -// interpreted as an int AFTER any '$()' variable replacement. +// Retrieve a "property" value previously set with SetProperty, +// interpreted as an int AFTER any "$()" variable replacement. int wxStyledTextCtrl::GetPropertyInt(const wxString &key, int defaultValue) const { return SendMsg(SCI_GETPROPERTYINT, (uptr_t)(const char*)wx2stc(key), defaultValue); } @@ -4682,8 +4678,7 @@ void* wxStyledTextCtrl::PrivateLexerCall(int operation, void* pointer) { return (void*)(sptr_t)SendMsg(SCI_PRIVATELEXERCALL, operation, (sptr_t)pointer); } -// Retrieve a '\n' separated list of properties understood by the current lexer. -// Result is NUL-terminated. +// Retrieve a '\\n' separated list of properties understood by the current lexer. wxString wxStyledTextCtrl::PropertyNames() const { const int msg = SCI_PROPERTYNAMES; int len = SendMsg(msg, 0, (sptr_t)NULL); @@ -4704,7 +4699,6 @@ int wxStyledTextCtrl::PropertyType(const wxString& name) } // Describe a property. -// Result is NUL-terminated. wxString wxStyledTextCtrl::DescribeProperty(const wxString& name) const { const int msg = SCI_DESCRIBEPROPERTY; int len = SendMsg(msg, (sptr_t)(const char*)wx2stc(name), (sptr_t)NULL); @@ -4718,8 +4712,7 @@ wxString wxStyledTextCtrl::DescribeProperty(const wxString& name) const { return stc2wx(buf); } -// Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer. -// Result is NUL-terminated. +// Retrieve a '\\n' separated list of descriptions of the keyword sets understood by the current lexer. wxString wxStyledTextCtrl::DescribeKeyWordSets() const { const int msg = SCI_DESCRIBEKEYWORDSETS; int len = SendMsg(msg, 0, (sptr_t)NULL); @@ -4790,7 +4783,6 @@ int wxStyledTextCtrl::DistanceToSecondaryStyles() const } // Get the set of base styles that can be extended with sub styles -// Result is NUL-terminated. wxString wxStyledTextCtrl::GetSubStyleBases() const { int msg = SCI_GETSUBSTYLEBASES; int len = SendMsg(msg, 0, (sptr_t)NULL); diff --git a/src/stc/stc.interface.h.in b/src/stc/stc.interface.h.in index 3603715838..2e4d1216c0 100644 --- a/src/stc/stc.interface.h.in +++ b/src/stc/stc.interface.h.in @@ -50,7 +50,7 @@ Links for quick access to the various categories of wxStyledTextCtrl functions: - @ref_member_group{ctor, Constructors and related methods} - - @ref_member_group{scintilla_functions, Scintilla methods} +%(TABLE_OF_CONTENTS)s - @ref_member_group{additional_methods, Additional wxStyledTextCtrl methods} - @ref_member_group{raw_variants , Raw variants} - @ref_member_group{text_entry, Text entry methods} @@ -181,8 +181,6 @@ public: // Scintilla methods (generated by gen_iface.py) // ---------------------------------------------- - ///@member_group_name{scintilla_functions, Scintilla methods} - //@{ // **** Generated methods {{{ @@ -190,8 +188,6 @@ public: //}}} - //@} - // Manually declared methods // ----------------------------------------------