// Purpose: interface of wxStyledTextEvent
// Author: wxWidgets team
// RCS-ID: $Id$
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+/// Represents an invalid position.
+#define wxSTC_INVALID_POSITION -1
+
/**
@class wxStyledTextEvent
*/
int GetY() const;
+ /**
+ */
+ int GetToken() const;
+
+ /**
+ */
+ int GetAnnotationsLinesAdded() const;
+
+ /**
+ */
+ int GetUpdated() const;
+
/**
*/
*/
void SetY(int val);
+
+ /**
+ */
+ void SetToken(int val);
+
+ /**
+ */
+ void SetAnnotationLinesAdded(int val);
+
+ /**
+ */
+ void SetUpdated(int val);
+
};
TOWRITE
@event{EVT_STC_AUTOCOMP_CHAR_DELETED(id, fn)}
TOWRITE
+ @event{EVT_STC_HOTSPOT_RELEASE_CLICK(id, fn)}
+ TOWRITE
@endEventTable
@library{wxbase}
void AddText(const wxString& text);
/**
- The following methods are nearly equivallent to their similarly named
- cousins above. The difference is that these methods bypass wxString
- and always use a char* even if used in a unicode build of wxWidgets.
- In that case the character data will be utf-8 encoded since that is
- what is used internally by Scintilla in unicode builds.
- Add text to the document at current position.
+ Add raw text to the document at current position.
*/
- void AddTextRaw(const char* text);
+ void AddTextRaw(const char* text, int length=-1);
/**
Enlarge the document to a particular size of text bytes.
/**
Append a string to the end of the document without changing the selection.
*/
- void AppendTextRaw(const char* text);
+ void AppendTextRaw(const char* text, int length=-1);
/**
Is there an auto-completion list visible?
*/
void AutoCompStops(const wxString& characterSet);
+ /**
+ 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;
+
/**
Dedent the selected lines.
*/
*/
void BraceBadLight(int pos);
+ /**
+ Use specified indicator to highlight matching braces instead of changing their style.
+ */
+ void BraceHighlightIndicator(bool useBraceHighlightIndicator, int indicator);
+
+ /**
+ Use specified indicator to highlight non matching brace instead of changing its style.
+ */
+ void BraceBadLightIndicator(bool useBraceBadLightIndicator, int indicator);
+
/**
Highlight the characters at two positions.
*/
void BraceHighlight(int pos1, int pos2);
/**
- 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.
*/
int BraceMatch(int pos);
*/
void CallTipSetHighlight(int start, int end);
+ /**
+ Set position of calltip, above or below text.
+ */
+ void CallTipSetPosition(bool above);
+
/**
Show a call tip containing a definition near position pos.
*/
*/
void CopyText(int length, const wxString& text);
+ /**
+ Count characters between two positions.
+ */
+ int CountCharacters(int startPos, int endPos);
+
/**
*/
*/
virtual void Cut();
+ /**
+ Delete a range of text in the document.
+ */
+ void DeleteRange(int pos, int deleteLength);
+
/**
Delete back from the current position to the start of the line.
*/
Can the caret preferred x position only be changed by explicit movement
commands?
*/
- bool GetCaretSticky() const;
+ int GetCaretSticky() const;
/**
Returns the width of the insert mode caret.
/**
Retrieve the position of the end of the selection at the given line
- (INVALID_POSITION if no selection on this line).
+ (wxSTC_INVALID_POSITION if no selection on this line).
*/
int GetLineSelEndPosition(int line);
/**
Retrieve the position of the start of the selection at the given line
- (INVALID_POSITION if no selection on this line).
+ (wxSTC_INVALID_POSITION if no selection on this line).
*/
int GetLineSelStartPosition(int line);
*/
bool GetLineVisible(int line) const;
+ /**
+ Are all lines visible?
+ */
+ bool GetAllLinesVisible() const;
+
/**
Returns the size in pixels of the left margin.
*/
int GetWrapMode() const;
/**
- Retrive the start indent for wrapped lines.
+ Retrieve the start indent for wrapped lines.
*/
int GetWrapStartIndent() const;
/**
- Retrive the display mode of visual flags for wrapped lines.
+ Retrieve the display mode of visual flags for wrapped lines.
*/
int GetWrapVisualFlags() const;
/**
- Retrive the location of visual flags for wrapped lines.
+ Retrieve the location of visual flags for wrapped lines.
*/
int GetWrapVisualFlagsLocation() const;
int MarkerLineFromHandle(int handle);
/**
- Find the next line after lineStart that includes a marker in mask.
+ 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);
*/
void MarkerSetForeground(int markerNumber, const wxColour& fore);
+ /**
+ 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);
+
/**
Move the caret inside current view if it's not there already.
*/
/**
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);
/**
Stop the caret preferred x position changing when the user types.
*/
- void SetCaretSticky(bool useCaretStickyBehaviour);
+ void SetCaretSticky(int useCaretStickyBehaviour);
/**
Set the width of the insert mode caret.
*/
void SetMarginWidth(int margin, int pixelWidth);
+ /**
+ 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 left and right margin in the edit area, measured in pixels.
*/
*/
void SetPasteConvertEndings(bool convert);
+ /**
+ 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.
+ */
+ wxString GetTag(int tagNumber) const;
+
/**
Modify colours when printing for clearer printed text.
*/
*/
void SetSelForeground(bool useSetting, const wxColour& fore);
+ /**
+ Set caret to a position, while removing any existing selection.
+ */
+ void SetEmptySelection(int pos);
+
/**
Select a range of text.
*/
*/
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;
+
/**
Set the foreground colour of all whitespace and whether to use this setting.
*/
*/
void SetWordChars(const wxString& characters);
+ /**
+ Get the set of characters making up words for when moving or selecting by word.
+ */
+ wxString GetWordChars() const;
+
/**
Sets whether text is word wrapped.
*/
void SetXCaretPolicy(int caretPolicy, int caretSlop);
/**
- Get and Set the xOffset (ie, horizonal scroll position).
+ Get and Set the xOffset (ie, horizontal scroll position).
*/
void SetXOffset(int newOffset);
*/
void StyleSetSize(int style, int sizePoints);
+ /**
+ Set the size of characters of a style. Size is in points multiplied by 100.
+ */
+ void StyleSetSizeFractional(int style, int caseForce);
+
+ /**
+ Get the size of characters of a style in points multiplied by 100
+ */
+ int StyleGetSizeFractional(int style) const;
+
+ /**
+ Set the weight of characters of a style.
+ */
+ void StyleSetWeight(int style, int weight);
+
+ /**
+ *Get the weight of characters of a style.
+ */
+ int StyleGetWeight(int style) const;
+
+
/**
Extract style settings from a spec-string which is composed of one or
more of the following comma separated elements:
*/
const char* GetCharacterPointer();
+ /**
+ Return a read-only pointer to a range of characters in the document.
+ May move the gap so that the range is contiguous, but will only move up
+ to rangeLength bytes.
+ */
+ const char* GetRangePointer(int position, int rangeLength) const;
+
+ /**
+ Return a position which, to avoid performance costs, should not be within
+ the range of a call to GetRangePointer.
+ */
+ int GetGapPosition() const;
+
/**
Always interpret keyboard input as Unicode
*/
*/
int IndicatorGetAlpha(int indicator) const;
+ /**
+ Set the alpha outline colour of the given indicator.
+ */
+ void IndicatorSetOutlineAlpha(int indicator, int alpha);
+
+ /**
+ Get the alpha outline colour of the given indicator.
+ */
+ int IndicatorGetOutlineAlpha(int indicator) const;
+
/**
Set extra ascent for each line
*/
*/
int MarginGetStyleOffset() const;
+ /**
+ Set the margin options.
+ */
+ void SetMarginOptions(int marginOptions);
+
+ /**
+ Get the margin options.
+ */
+ int GetMarginOptions() const;
+
/**
Set the annotation text for a line
*/
*/
void AnnotationClearAll();
+ /**
+ Clear the annotations from the given line.
+
+ @since 2.9.5
+ */
+ void AnnotationClearAll(int line);
+
/**
Set the visibility for the annotations for a view
*/
/**
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);
Swap that caret and anchor of the main selection.
*/
void SwapMainAnchorCaret();
-
+
+ /**
+ Indicate that the internal state of a lexer has changed over a range and therefore
+ there may be a need to redraw.
+ */
+ 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);
+
+ /**
+ 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();
+
+ /**
+ Create an ILoader.
+ (This is a Scintilla type which can be used to load a document in
+ a background thread. See Scintilla's documentation for details.)
+ */
+ void* CreateLoader(int bytes);
+
+ /**
+ 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.
+ */
+ wxString PropertyNames() const;
+
+ /**
+ Retrieve the type of a property.
+ */
+ int PropertyType(const wxString& name);
+
+ /**
+ Describe a property.
+ */
+ wxString DescribeProperty(const wxString& name) const;
+
+ /**
+ Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer.
+ */
+ wxString DescribeKeyWordSets() const;
+
+
+ /**
+ Get Scintilla library version information.
+
+ @since 2.9.2
+ @see wxVersionInfo
+ */
+ static wxVersionInfo GetLibraryVersionInfo();
};