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.
This commit is contained in:
New Pagodi
2017-02-28 22:49:43 +01:00
committed by Artur Wieczorek
parent aaa31b121c
commit 2278bb0dfa
7 changed files with 4493 additions and 2330 deletions

View File

@@ -2870,7 +2870,7 @@ public:
// Insert string at a position. // Insert string at a position.
void InsertText(int pos, const wxString& text); 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); void ChangeInsertion(int length, const wxString& text);
// Delete all text in the document. // Delete all text in the document.
@@ -2927,14 +2927,14 @@ public:
bool GetUndoCollection() const; bool GetUndoCollection() const;
// Are white space characters currently visible? // Are white space characters currently visible?
// Returns one of SCWS_* constants. // Returns one of wxSTC_WS_* constants.
int GetViewWhiteSpace() const; int GetViewWhiteSpace() const;
// Make white space characters invisible, always visible or visible outside indentation. // Make white space characters invisible, always visible or visible outside indentation.
void SetViewWhiteSpace(int viewWS); void SetViewWhiteSpace(int viewWS);
// Retrieve the current tab draw mode. // Retrieve the current tab draw mode.
// Returns one of SCTD_* constants. // Returns one of wxSTC_TD_* constants.
int GetTabDrawMode() const; int GetTabDrawMode() const;
// Set how tabs are drawn when visible. // Set how tabs are drawn when visible.
@@ -2944,7 +2944,7 @@ public:
int PositionFromPoint(wxPoint pt) const; int PositionFromPoint(wxPoint pt) const;
// Find the position from a point within the window but return // 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); int PositionFromPointClose(int x, int y);
// Set caret to start of a line and ensure it is visible. // Set caret to start of a line and ensure it is visible.
@@ -2958,8 +2958,6 @@ public:
void SetAnchor(int anchor); void SetAnchor(int anchor);
// Retrieve the text of the line containing the caret. // Retrieve the text of the line containing the caret.
// Returns the index of the caret on the line.
// Result is NUL-terminated.
#ifdef SWIG #ifdef SWIG
wxString GetCurLine(int* OUTPUT); wxString GetCurLine(int* OUTPUT);
#else #else
@@ -2972,7 +2970,7 @@ public:
// Convert all line endings in the document to one mode. // Convert all line endings in the document to one mode.
void ConvertEOLs(int eolMode); 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; int GetEOLMode() const;
// Set the current end of line mode. // Set the current end of line mode.
@@ -3093,7 +3091,7 @@ public:
// Retrieve the cursor shown in a margin. // Retrieve the cursor shown in a margin.
int GetMarginCursor(int margin) const; 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); void SetMarginBackground(int margin, const wxColour& back);
// Retrieve the background colour of a margin // Retrieve the background colour of a margin
@@ -3191,7 +3189,6 @@ public:
int StyleGetWeight(int style) const; int StyleGetWeight(int style) const;
// Set the character set of the font in a style. // 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); void StyleSetCharacterSet(int style, int characterSet);
// Set a style to be a hotspot or not. // 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. // Replace the target text with the argument text after \\d processing.
// Text is counted so it can contain NULs. // Text is counted so it can contain NULs.
// Looks for \\d where d is between 1 and 9 and replaces these with the strings // 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 // Returns the length of the replacement text including any change
// caused by processing the \\d patterns. // caused by processing the \\d patterns.
int ReplaceTargetRE(const wxString& text); int ReplaceTargetRE(const wxString& text);
@@ -3720,7 +3717,7 @@ public:
// Set the foreground colour for the highlighted part of the call tip. // Set the foreground colour for the highlighted part of the call tip.
void CallTipSetForegroundHighlight(const wxColour& fore); 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); void CallTipUseStyle(int tabSize);
// Set position of calltip, above or below text. // Set position of calltip, above or below text.
@@ -3861,10 +3858,10 @@ public:
// Retrive the start indent for wrapped lines. // Retrive the start indent for wrapped lines.
int GetWrapStartIndent() const; 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); 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; int GetWrapIndentMode() const;
// Sets the degree of caching of layout information. // Sets the degree of caching of layout information.
@@ -3886,7 +3883,6 @@ public:
bool GetScrollWidthTracking() const; bool GetScrollWidthTracking() const;
// Measure the pixel width of some text in a particular style. // Measure the pixel width of some text in a particular style.
// NUL terminated text argument.
// Does not handle tab or control characters. // Does not handle tab or control characters.
int TextWidth(int style, const wxString& text); int TextWidth(int style, const wxString& text);
@@ -3937,7 +3933,6 @@ public:
int GetMultiPaste() const; int GetMultiPaste() const;
// Retrieve the value of a tag from a regular expression search. // Retrieve the value of a tag from a regular expression search.
// Result is NUL-terminated.
wxString GetTag(int tagNumber) const; wxString GetTag(int tagNumber) const;
// Join the lines in the target. // Join the lines in the target.
@@ -4156,7 +4151,7 @@ public:
// Use specified indicator to highlight non matching brace instead of changing its style. // Use specified indicator to highlight non matching brace instead of changing its style.
void BraceBadLightIndicator(bool useSetting, int indicator); 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. // The maxReStyle must be 0 for now. It may be defined in a future release.
int BraceMatch(int pos, int maxReStyle=0); int BraceMatch(int pos, int maxReStyle=0);
@@ -4185,8 +4180,8 @@ public:
// Retrieve the edge highlight mode. // Retrieve the edge highlight mode.
int GetEdgeMode() const; int GetEdgeMode() const;
// The edge may be displayed by a line (EDGE_LINE/EDGE_MULTILINE) or by highlighting text that // The edge may be displayed by a line (wxSTC_EDGE_LINE/wxSTC_EDGE_MULTILINE) or by highlighting text that
// goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). // goes beyond it (wxSTC_EDGE_BACKGROUND) or not displayed at all (wxSTC_EDGE_NONE).
void SetEdgeMode(int edgeMode); void SetEdgeMode(int edgeMode);
// Retrieve the colour used in edge indication. // Retrieve the colour used in edge indication.
@@ -4266,7 +4261,7 @@ public:
// Get whether mouse wheel can be active outside the window. // Get whether mouse wheel can be active outside the window.
bool GetMouseWheelCaptures() const; 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); void SetSTCCursor(int cursorType);
// Get cursor type. // Get cursor type.
@@ -4303,8 +4298,10 @@ public:
// Delete forwards from the current position to the end of the line. // Delete forwards from the current position to the end of the line.
void DelLineRight(); void DelLineRight();
// Get and Set the xOffset (ie, horizontal scroll position). // Set the xOffset (ie, horizontal scroll position).
void SetXOffset(int xOffset); void SetXOffset(int xOffset);
// Get the xOffset (ie, horizontal scroll position).
int GetXOffset() const; int GetXOffset() const;
// Set the last x chosen value to be the caret x position. // Set the last x chosen value to be the caret x position.
@@ -4318,7 +4315,7 @@ public:
// The exclusion zone is given in lines. // The exclusion zone is given in lines.
void SetYCaretPolicy(int caretPolicy, int caretSlop); 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); void SetPrintWrapMode(int wrapMode);
// Is printing line wrapped? // Is printing line wrapped?
@@ -4378,17 +4375,17 @@ public:
// Copy argument text to the clipboard. // Copy argument text to the clipboard.
void CopyText(int length, const wxString& text); 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 // Set the selection mode to stream (wxSTC_SEL_STREAM) or rectangular (wxSTC_SEL_RECTANGLE/wxSTC_SEL_THIN) or
// by lines (SC_SEL_LINES). // by lines (wxSTC_SEL_LINES).
void SetSelectionMode(int selectionMode); void SetSelectionMode(int selectionMode);
// Get the mode of the current selection. // Get the mode of the current selection.
int GetSelectionMode() const; 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); 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); int GetLineSelEndPosition(int line);
// Move caret down one line, extending rectangular selection to new caret position. // Move caret down one line, extending rectangular selection to new caret position.
@@ -4680,7 +4677,7 @@ public:
int CharPositionFromPoint(int x, int y); int CharPositionFromPoint(int x, int y);
// Find the position of a character from a point within the window. // 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); int CharPositionFromPointClose(int x, int y);
// Set whether switching to rectangular mode while selecting with the mouse is allowed. // 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 // On GTK+, allow selecting the modifier key to use for mouse-based
// rectangular selection. Often the window manager requires Alt+Mouse Drag // rectangular selection. Often the window manager requires Alt+Mouse Drag
// for moving windows. // 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); void SetRectangularSelectionModifier(int modifier);
// Get the modifier key used for rectangular selection. // Get the modifier key used for rectangular selection.
@@ -4924,7 +4921,6 @@ public:
void SetRepresentation(const wxString& encodedCharacter, const wxString& representation); void SetRepresentation(const wxString& encodedCharacter, const wxString& representation);
// Set the way a character is drawn. // Set the way a character is drawn.
// Result is NUL-terminated.
wxString GetRepresentation(const wxString& encodedCharacter) const; wxString GetRepresentation(const wxString& encodedCharacter) const;
// Remove a character representation. // Remove a character representation.
@@ -4957,15 +4953,15 @@ public:
// Load a lexer library (dll / so). // Load a lexer library (dll / so).
void LoadLexerLibrary(const wxString& path); 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); wxString GetProperty(const wxString& key);
// Retrieve a 'property' value previously set with SetProperty, // Retrieve a "property" value previously set with SetProperty,
// with '$()' variable replacement on returned buffer. // with "$()" variable replacement on returned buffer.
wxString GetPropertyExpanded(const wxString& key); wxString GetPropertyExpanded(const wxString& key);
// Retrieve a 'property' value previously set with SetProperty, // Retrieve a "property" value previously set with SetProperty,
// interpreted as an int AFTER any '$()' variable replacement. // interpreted as an int AFTER any "$()" variable replacement.
int GetPropertyInt(const wxString &key, int defaultValue=0) const; int GetPropertyInt(const wxString &key, int defaultValue=0) const;
// Retrieve the number of bits the current lexer needs for styling. // 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. // For private communication between an application and a known lexer.
void* PrivateLexerCall(int operation, void* pointer); void* PrivateLexerCall(int operation, void* pointer);
// Retrieve a '\n' separated list of properties understood by the current lexer. // Retrieve a '\\n' separated list of properties understood by the current lexer.
// Result is NUL-terminated.
wxString PropertyNames() const; wxString PropertyNames() const;
// Retrieve the type of a property. // Retrieve the type of a property.
int PropertyType(const wxString& name); int PropertyType(const wxString& name);
// Describe a property. // Describe a property.
// Result is NUL-terminated.
wxString DescribeProperty(const wxString& name) const; wxString DescribeProperty(const wxString& name) const;
// Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer. // Retrieve a '\\n' separated list of descriptions of the keyword sets understood by the current lexer.
// Result is NUL-terminated.
wxString DescribeKeyWordSets() const; wxString DescribeKeyWordSets() const;
// Bit set of LineEndType enumertion for which line ends beyond the standard // Bit set of LineEndType enumertion for which line ends beyond the standard
@@ -5022,7 +5015,6 @@ public:
int DistanceToSecondaryStyles() const; int DistanceToSecondaryStyles() const;
// Get the set of base styles that can be extended with sub styles // Get the set of base styles that can be extended with sub styles
// Result is NUL-terminated.
wxString GetSubStyleBases() const; wxString GetSubStyleBases() const;
//}}} //}}}

File diff suppressed because it is too large Load Diff

1401
src/stc/gen_docs.py Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -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 'SC_', add an entry to valPrefixes to make sure the new names for
constants are generated consistently. 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 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 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 9. Add documentation code for any new methods to
interface/wx/stc/stc.h, also check any documentation-only changes from 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 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 10. Apply the fix for scintilla/src/UniConversion.h based on commit by
Vadim Zeitlin <vadim@wxwidgets.org> from March 5th, 2016. Vadim Zeitlin <vadim@wxwidgets.org> from March 5th, 2016.

View File

@@ -287,7 +287,7 @@ void wxStyledTextCtrl::InsertText(int pos, const wxString& text)
SendMsg(SCI_INSERTTEXT, pos, (sptr_t)(const char*)wx2stc(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) void wxStyledTextCtrl::ChangeInsertion(int length, const wxString& text)
{ {
SendMsg(SCI_CHANGEINSERTION, length, (sptr_t)(const char*)wx2stc(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? // Are white space characters currently visible?
// Returns one of SCWS_* constants. // Returns one of wxSTC_WS_* constants.
int wxStyledTextCtrl::GetViewWhiteSpace() const int wxStyledTextCtrl::GetViewWhiteSpace() const
{ {
return SendMsg(SCI_GETVIEWWS, 0, 0); return SendMsg(SCI_GETVIEWWS, 0, 0);
@@ -422,7 +422,7 @@ void wxStyledTextCtrl::SetViewWhiteSpace(int viewWS)
} }
// Retrieve the current tab draw mode. // Retrieve the current tab draw mode.
// Returns one of SCTD_* constants. // Returns one of wxSTC_TD_* constants.
int wxStyledTextCtrl::GetTabDrawMode() const int wxStyledTextCtrl::GetTabDrawMode() const
{ {
return SendMsg(SCI_GETTABDRAWMODE, 0, 0); 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 // 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) int wxStyledTextCtrl::PositionFromPointClose(int x, int y)
{ {
return SendMsg(SCI_POSITIONFROMPOINTCLOSE, x, 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. // 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) { wxString wxStyledTextCtrl::GetCurLine(int* linePos) {
int len = LineLength(GetCurrentLine()); int len = LineLength(GetCurrentLine());
if (!len) { if (!len) {
@@ -497,7 +495,7 @@ void wxStyledTextCtrl::ConvertEOLs(int eolMode)
SendMsg(SCI_CONVERTEOLS, eolMode, 0); 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 int wxStyledTextCtrl::GetEOLMode() const
{ {
return SendMsg(SCI_GETEOLMODE, 0, 0); return SendMsg(SCI_GETEOLMODE, 0, 0);
@@ -755,7 +753,7 @@ int wxStyledTextCtrl::GetMarginCursor(int margin) const
return SendMsg(SCI_GETMARGINCURSORN, margin, 0); 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) void wxStyledTextCtrl::SetMarginBackground(int margin, const wxColour& back)
{ {
SendMsg(SCI_SETMARGINBACKN, margin, wxColourAsLong(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. // 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) { void wxStyledTextCtrl::StyleSetCharacterSet(int style, int characterSet) {
wxFontEncoding encoding; wxFontEncoding encoding;
@@ -2074,7 +2071,7 @@ void wxStyledTextCtrl::TargetWholeDocument()
// Replace the target text with the argument text after \\d processing. // Replace the target text with the argument text after \\d processing.
// Text is counted so it can contain NULs. // Text is counted so it can contain NULs.
// Looks for \\d where d is between 1 and 9 and replaces these with the strings // 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 // Returns the length of the replacement text including any change
// caused by processing the \\d patterns. // caused by processing the \\d patterns.
@@ -2158,7 +2155,7 @@ void wxStyledTextCtrl::CallTipSetForegroundHighlight(const wxColour& fore)
SendMsg(SCI_CALLTIPSETFOREHLT, wxColourAsLong(fore), 0); 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) void wxStyledTextCtrl::CallTipUseStyle(int tabSize)
{ {
SendMsg(SCI_CALLTIPUSESTYLE, tabSize, 0); SendMsg(SCI_CALLTIPUSESTYLE, tabSize, 0);
@@ -2437,13 +2434,13 @@ int wxStyledTextCtrl::GetWrapStartIndent() const
return SendMsg(SCI_GETWRAPSTARTINDENT, 0, 0); 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) void wxStyledTextCtrl::SetWrapIndentMode(int wrapIndentMode)
{ {
SendMsg(SCI_SETWRAPINDENTMODE, wrapIndentMode, 0); 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 int wxStyledTextCtrl::GetWrapIndentMode() const
{ {
return SendMsg(SCI_GETWRAPINDENTMODE, 0, 0); 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. // Measure the pixel width of some text in a particular style.
// NUL terminated text argument.
// Does not handle tab or control characters. // Does not handle tab or control characters.
int wxStyledTextCtrl::TextWidth(int style, const wxString& text) 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. // Retrieve the value of a tag from a regular expression search.
// Result is NUL-terminated.
wxString wxStyledTextCtrl::GetTag(int tagNumber) const { wxString wxStyledTextCtrl::GetTag(int tagNumber) const {
const int msg = SCI_GETTAG; const int msg = SCI_GETTAG;
int len = SendMsg(msg, tagNumber, (sptr_t)NULL); int len = SendMsg(msg, tagNumber, (sptr_t)NULL);
@@ -3013,7 +3008,7 @@ void wxStyledTextCtrl::BraceBadLightIndicator(bool useSetting, int indicator)
SendMsg(SCI_BRACEBADLIGHTINDICATOR, useSetting, 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. // The maxReStyle must be 0 for now. It may be defined in a future release.
int wxStyledTextCtrl::BraceMatch(int pos, int maxReStyle){ int wxStyledTextCtrl::BraceMatch(int pos, int maxReStyle){
wxASSERT_MSG(maxReStyle==0, wxASSERT_MSG(maxReStyle==0,
@@ -3069,8 +3064,8 @@ int wxStyledTextCtrl::GetEdgeMode() const
return SendMsg(SCI_GETEDGEMODE, 0, 0); return SendMsg(SCI_GETEDGEMODE, 0, 0);
} }
// The edge may be displayed by a line (EDGE_LINE/EDGE_MULTILINE) or by highlighting text that // The edge may be displayed by a line (wxSTC_EDGE_LINE/wxSTC_EDGE_MULTILINE) or by highlighting text that
// goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). // goes beyond it (wxSTC_EDGE_BACKGROUND) or not displayed at all (wxSTC_EDGE_NONE).
void wxStyledTextCtrl::SetEdgeMode(int edgeMode) void wxStyledTextCtrl::SetEdgeMode(int edgeMode)
{ {
SendMsg(SCI_SETEDGEMODE, edgeMode, 0); SendMsg(SCI_SETEDGEMODE, edgeMode, 0);
@@ -3223,7 +3218,7 @@ bool wxStyledTextCtrl::GetMouseWheelCaptures() const
return SendMsg(SCI_GETMOUSEWHEELCAPTURES, 0, 0) != 0; 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) void wxStyledTextCtrl::SetSTCCursor(int cursorType)
{ {
SendMsg(SCI_SETCURSOR, cursorType, 0); SendMsg(SCI_SETCURSOR, cursorType, 0);
@@ -3293,11 +3288,13 @@ void wxStyledTextCtrl::DelLineRight()
SendMsg(SCI_DELLINERIGHT, 0, 0); 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) void wxStyledTextCtrl::SetXOffset(int xOffset)
{ {
SendMsg(SCI_SETXOFFSET, xOffset, 0); SendMsg(SCI_SETXOFFSET, xOffset, 0);
} }
// Get the xOffset (ie, horizontal scroll position).
int wxStyledTextCtrl::GetXOffset() const int wxStyledTextCtrl::GetXOffset() const
{ {
return SendMsg(SCI_GETXOFFSET, 0, 0); return SendMsg(SCI_GETXOFFSET, 0, 0);
@@ -3323,7 +3320,7 @@ void wxStyledTextCtrl::SetYCaretPolicy(int caretPolicy, int caretSlop)
SendMsg(SCI_SETYCARETPOLICY, caretPolicy, 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) void wxStyledTextCtrl::SetPrintWrapMode(int wrapMode)
{ {
SendMsg(SCI_SETPRINTWRAPMODE, wrapMode, 0); 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)); 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 // Set the selection mode to stream (wxSTC_SEL_STREAM) or rectangular (wxSTC_SEL_RECTANGLE/wxSTC_SEL_THIN) or
// by lines (SC_SEL_LINES). // by lines (wxSTC_SEL_LINES).
void wxStyledTextCtrl::SetSelectionMode(int selectionMode) void wxStyledTextCtrl::SetSelectionMode(int selectionMode)
{ {
SendMsg(SCI_SETSELECTIONMODE, selectionMode, 0); SendMsg(SCI_SETSELECTIONMODE, selectionMode, 0);
@@ -3455,13 +3452,13 @@ int wxStyledTextCtrl::GetSelectionMode() const
return SendMsg(SCI_GETSELECTIONMODE, 0, 0); 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) int wxStyledTextCtrl::GetLineSelStartPosition(int line)
{ {
return SendMsg(SCI_GETLINESELSTARTPOSITION, line, 0); 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) int wxStyledTextCtrl::GetLineSelEndPosition(int line)
{ {
return SendMsg(SCI_GETLINESELENDPOSITION, line, 0); 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. // 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) int wxStyledTextCtrl::CharPositionFromPointClose(int x, int y)
{ {
return SendMsg(SCI_CHARPOSITIONFROMPOINTCLOSE, x, 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 // On GTK+, allow selecting the modifier key to use for mouse-based
// rectangular selection. Often the window manager requires Alt+Mouse Drag // rectangular selection. Often the window manager requires Alt+Mouse Drag
// for moving windows. // 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) void wxStyledTextCtrl::SetRectangularSelectionModifier(int modifier)
{ {
SendMsg(SCI_SETRECTANGULARSELECTIONMODIFIER, modifier, 0); SendMsg(SCI_SETRECTANGULARSELECTIONMODIFIER, modifier, 0);
@@ -4550,7 +4547,6 @@ void wxStyledTextCtrl::SetRepresentation(const wxString& encodedCharacter, const
} }
// Set the way a character is drawn. // Set the way a character is drawn.
// Result is NUL-terminated.
wxString wxStyledTextCtrl::GetRepresentation(const wxString& encodedCharacter) const { wxString wxStyledTextCtrl::GetRepresentation(const wxString& encodedCharacter) const {
int msg = SCI_GETREPRESENTATION; int msg = SCI_GETREPRESENTATION;
int len = SendMsg(msg, (sptr_t)(const char*)wx2stc(encodedCharacter), (sptr_t)NULL); 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)); 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) { wxString wxStyledTextCtrl::GetProperty(const wxString& key) {
int len = SendMsg(SCI_GETPROPERTY, (sptr_t)(const char*)wx2stc(key), 0); int len = SendMsg(SCI_GETPROPERTY, (sptr_t)(const char*)wx2stc(key), 0);
if (!len) return wxEmptyString; if (!len) return wxEmptyString;
@@ -4637,8 +4633,8 @@ wxString wxStyledTextCtrl::GetProperty(const wxString& key) {
return stc2wx(buf); return stc2wx(buf);
} }
// Retrieve a 'property' value previously set with SetProperty, // Retrieve a "property" value previously set with SetProperty,
// with '$()' variable replacement on returned buffer. // with "$()" variable replacement on returned buffer.
wxString wxStyledTextCtrl::GetPropertyExpanded(const wxString& key) { wxString wxStyledTextCtrl::GetPropertyExpanded(const wxString& key) {
int len = SendMsg(SCI_GETPROPERTYEXPANDED, (uptr_t)(const char*)wx2stc(key), 0); int len = SendMsg(SCI_GETPROPERTYEXPANDED, (uptr_t)(const char*)wx2stc(key), 0);
if (!len) return wxEmptyString; if (!len) return wxEmptyString;
@@ -4651,8 +4647,8 @@ wxString wxStyledTextCtrl::GetPropertyExpanded(const wxString& key) {
return stc2wx(buf); return stc2wx(buf);
} }
// Retrieve a 'property' value previously set with SetProperty, // Retrieve a "property" value previously set with SetProperty,
// interpreted as an int AFTER any '$()' variable replacement. // interpreted as an int AFTER any "$()" variable replacement.
int wxStyledTextCtrl::GetPropertyInt(const wxString &key, int defaultValue) const { int wxStyledTextCtrl::GetPropertyInt(const wxString &key, int defaultValue) const {
return SendMsg(SCI_GETPROPERTYINT, (uptr_t)(const char*)wx2stc(key), defaultValue); 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); return (void*)(sptr_t)SendMsg(SCI_PRIVATELEXERCALL, operation, (sptr_t)pointer);
} }
// Retrieve a '\n' separated list of properties understood by the current lexer. // Retrieve a '\\n' separated list of properties understood by the current lexer.
// Result is NUL-terminated.
wxString wxStyledTextCtrl::PropertyNames() const { wxString wxStyledTextCtrl::PropertyNames() const {
const int msg = SCI_PROPERTYNAMES; const int msg = SCI_PROPERTYNAMES;
int len = SendMsg(msg, 0, (sptr_t)NULL); int len = SendMsg(msg, 0, (sptr_t)NULL);
@@ -4704,7 +4699,6 @@ int wxStyledTextCtrl::PropertyType(const wxString& name)
} }
// Describe a property. // Describe a property.
// Result is NUL-terminated.
wxString wxStyledTextCtrl::DescribeProperty(const wxString& name) const { wxString wxStyledTextCtrl::DescribeProperty(const wxString& name) const {
const int msg = SCI_DESCRIBEPROPERTY; const int msg = SCI_DESCRIBEPROPERTY;
int len = SendMsg(msg, (sptr_t)(const char*)wx2stc(name), (sptr_t)NULL); 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); return stc2wx(buf);
} }
// Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer. // Retrieve a '\\n' separated list of descriptions of the keyword sets understood by the current lexer.
// Result is NUL-terminated.
wxString wxStyledTextCtrl::DescribeKeyWordSets() const { wxString wxStyledTextCtrl::DescribeKeyWordSets() const {
const int msg = SCI_DESCRIBEKEYWORDSETS; const int msg = SCI_DESCRIBEKEYWORDSETS;
int len = SendMsg(msg, 0, (sptr_t)NULL); 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 // Get the set of base styles that can be extended with sub styles
// Result is NUL-terminated.
wxString wxStyledTextCtrl::GetSubStyleBases() const { wxString wxStyledTextCtrl::GetSubStyleBases() const {
int msg = SCI_GETSUBSTYLEBASES; int msg = SCI_GETSUBSTYLEBASES;
int len = SendMsg(msg, 0, (sptr_t)NULL); int len = SendMsg(msg, 0, (sptr_t)NULL);

View File

@@ -50,7 +50,7 @@
Links for quick access to the various categories of wxStyledTextCtrl functions: Links for quick access to the various categories of wxStyledTextCtrl functions:
- @ref_member_group{ctor, Constructors and related methods} - @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{additional_methods, Additional wxStyledTextCtrl methods}
- @ref_member_group{raw_variants , Raw variants} - @ref_member_group{raw_variants , Raw variants}
- @ref_member_group{text_entry, Text entry methods} - @ref_member_group{text_entry, Text entry methods}
@@ -181,8 +181,6 @@ public:
// Scintilla methods (generated by gen_iface.py) // Scintilla methods (generated by gen_iface.py)
// ---------------------------------------------- // ----------------------------------------------
///@member_group_name{scintilla_functions, Scintilla methods}
//@{
// **** Generated methods {{{ // **** Generated methods {{{
@@ -190,8 +188,6 @@ public:
//}}} //}}}
//@}
// Manually declared methods // Manually declared methods
// ---------------------------------------------- // ----------------------------------------------