// 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
The type of events sent from wxStyledTextCtrl.
- TODO
+ @todo list styled text ctrl events.
@library{wxbase}
- @category{FIXME}
+ @category{events,stc}
*/
class wxStyledTextEvent : public wxCommandEvent
{
public:
//@{
/**
-
+ Ctors; used internally by wxWidgets.
*/
wxStyledTextEvent(wxEventType commandType = 0, int id = 0);
wxStyledTextEvent(const wxStyledTextEvent& event);
//@}
/**
-
- */
- wxEvent* Clone() const;
- /**
-
*/
bool GetAlt() const;
/**
-
+
*/
bool GetControl() const;
/**
-
+
*/
bool GetDragAllowMove();
/**
-
+
*/
wxDragResult GetDragResult();
/**
-
+
*/
wxString GetDragText();
/**
-
+
*/
int GetFoldLevelNow() const;
/**
-
+
*/
int GetFoldLevelPrev() const;
/**
-
+
*/
int GetKey() const;
/**
-
+
*/
int GetLParam() const;
/**
-
+
*/
int GetLength() const;
/**
-
+
*/
int GetLine() const;
/**
-
+
*/
int GetLinesAdded() const;
/**
-
+
*/
int GetListType() const;
/**
-
+
*/
int GetMargin() const;
/**
-
+
*/
int GetMessage() const;
/**
-
+
*/
int GetModificationType() const;
/**
-
+
*/
int GetModifiers() const;
/**
-
+
*/
int GetPosition() const;
/**
-
+
*/
bool GetShift() const;
/**
-
+
*/
wxString GetText() const;
/**
-
+
*/
int GetWParam() const;
/**
-
+
*/
int GetX() const;
/**
-
+
*/
int GetY() const;
/**
-
+
*/
void SetDragAllowMove(bool val);
/**
-
+
*/
void SetDragResult(wxDragResult val);
/**
-
+
*/
void SetDragText(const wxString& val);
/**
-
+
*/
void SetFoldLevelNow(int val);
/**
-
+
*/
void SetFoldLevelPrev(int val);
/**
-
+
*/
void SetKey(int k);
/**
-
+
*/
void SetLParam(int val);
/**
-
+
*/
void SetLength(int len);
/**
-
+
*/
void SetLine(int val);
/**
-
+
*/
void SetLinesAdded(int num);
/**
-
+
*/
void SetListType(int val);
/**
-
+
*/
void SetMargin(int val);
/**
-
+
*/
void SetMessage(int val);
/**
-
+
*/
void SetModificationType(int t);
/**
-
+
*/
void SetModifiers(int m);
/**
-
+
*/
void SetPosition(int pos);
/**
-
+
*/
void SetText(const wxString& t);
/**
-
+
*/
void SetWParam(int val);
/**
-
+
*/
void SetX(int val);
/**
-
+
*/
void SetY(int val);
};
A wxWidgets implementation of the Scintilla source code editing component.
As well as features found in standard text editing components, Scintilla
- includes
- features especially useful when editing and debugging source code. These
- include
- support for syntax styling, error indicators, code completion and call tips.
- The
- selection margin can contain markers like those used in debuggers to indicate
+ includes features especially useful when editing and debugging source code.
+ These include support for syntax styling, error indicators, code completion
+ and call tips.
+
+ The selection margin can contain markers like those used in debuggers to indicate
breakpoints and the current line. Styling choices are more open than with many
editors, allowing the use of proportional fonts, bold and italics, multiple
foreground and background colours and multiple fonts.
wxStyledTextCtrl is a 1 to 1 mapping of "raw" scintilla interface, whose
- documentation
- can be found in the Scintilla website.
+ documentation can be found in the Scintilla website (http://www.scintilla.org/).
+
+ @beginEventEmissionTable{wxStyledTextEvent}
+ @event{EVT_STC_CHANGE(id, fn)}
+ TOWRITE
+ @event{EVT_STC_STYLENEEDED(id, fn)}
+ TOWRITE
+ @event{EVT_STC_CHARADDED(id, fn)}
+ TOWRITE
+ @event{EVT_STC_SAVEPOINTREACHED(id, fn)}
+ TOWRITE
+ @event{EVT_STC_SAVEPOINTLEFT(id, fn)}
+ TOWRITE
+ @event{EVT_STC_ROMODIFYATTEMPT(id, fn)}
+ TOWRITE
+ @event{EVT_STC_KEY(id, fn)}
+ TOWRITE
+ @event{EVT_STC_DOUBLECLICK(id, fn)}
+ TOWRITE
+ @event{EVT_STC_UPDATEUI(id, fn)}
+ TOWRITE
+ @event{EVT_STC_MODIFIED(id, fn)}
+ TOWRITE
+ @event{EVT_STC_MACRORECORD(id, fn)}
+ TOWRITE
+ @event{EVT_STC_MARGINCLICK(id, fn)}
+ TOWRITE
+ @event{EVT_STC_NEEDSHOWN(id, fn)}
+ TOWRITE
+ @event{EVT_STC_PAINTED(id, fn)}
+ TOWRITE
+ @event{EVT_STC_USERLISTSELECTION(id, fn)}
+ TOWRITE
+ @event{EVT_STC_URIDROPPED(id, fn)}
+ TOWRITE
+ @event{EVT_STC_DWELLSTART(id, fn)}
+ TOWRITE
+ @event{EVT_STC_DWELLEND(id, fn)}
+ TOWRITE
+ @event{EVT_STC_START_DRAG(id, fn)}
+ TOWRITE
+ @event{EVT_STC_DRAG_OVER(id, fn)}
+ TOWRITE
+ @event{EVT_STC_DO_DROP(id, fn)}
+ TOWRITE
+ @event{EVT_STC_ZOOM(id, fn)}
+ TOWRITE
+ @event{EVT_STC_HOTSPOT_CLICK(id, fn)}
+ TOWRITE
+ @event{EVT_STC_HOTSPOT_DCLICK(id, fn)}
+ TOWRITE
+ @event{EVT_STC_CALLTIP_CLICK(id, fn)}
+ TOWRITE
+ @event{EVT_STC_AUTOCOMP_SELECTION(id, fn)}
+ TOWRITE
+ @event{EVT_STC_INDICATOR_CLICK(id, fn)}
+ TOWRITE
+ @event{EVT_STC_INDICATOR_RELEASE(id, fn)}
+ TOWRITE
+ @event{EVT_STC_AUTOCOMP_CANCELLED(id, fn)}
+ TOWRITE
+ @event{EVT_STC_AUTOCOMP_CHAR_DELETED(id, fn)}
+ TOWRITE
+ @endEventTable
@library{wxbase}
@category{stc}
*/
wxStyledTextCtrl::wxStyledTextCtrl(wxWindow* parent,
wxWindowID id = wxID_ANY,
- const wxPoint pos = wxDefaultPosition,
- const wxSize size = wxDefaultSize,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
long style = 0,
- const wxString name = "stcwindow");
+ const wxString& name = wxSTCNameStr);
/**
Extend life of document.
void AddStyledText(const wxMemoryBuffer& data);
/**
- BEGIN generated section. The following code is automatically generated
- by gen_iface.py. Do not edit this file. Edit stc.h.in instead
- and regenerate
Add text to the document at current position.
*/
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 AppendText(const wxString& text);
+ virtual void AppendText(const wxString& text);
/**
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?
Retrieve whether or not autocompletion is hidden automatically when nothing
matches.
*/
- bool AutoCompGetAutoHide();
+ bool AutoCompGetAutoHide() const;
/**
Retrieve whether auto-completion cancelled by backspacing before start.
*/
- bool AutoCompGetCancelAtStart();
+ bool AutoCompGetCancelAtStart() const;
/**
Retrieve whether a single item auto-completion list automatically choose the
item.
*/
- bool AutoCompGetChooseSingle();
+ bool AutoCompGetChooseSingle() const;
/**
Get currently selected item position in the auto-completion list
Retrieve whether or not autocompletion deletes any word characters
after the inserted text upon completion.
*/
- bool AutoCompGetDropRestOfWord();
+ bool AutoCompGetDropRestOfWord() const;
/**
Retrieve state of ignore case flag.
*/
- bool AutoCompGetIgnoreCase();
+ bool AutoCompGetIgnoreCase() const;
/**
Set the maximum height, in rows, of auto-completion and user lists.
*/
- int AutoCompGetMaxHeight();
+ int AutoCompGetMaxHeight() const;
/**
Get the maximum width, in characters, of auto-completion and user lists.
*/
- int AutoCompGetMaxWidth();
+ int AutoCompGetMaxWidth() const;
/**
Retrieve the auto-completion list separator character.
*/
- int AutoCompGetSeparator();
+ int AutoCompGetSeparator() const;
/**
Retrieve the auto-completion list type-separator character.
*/
- int AutoCompGetTypeSeparator();
+ int AutoCompGetTypeSeparator() const;
/**
Retrieve the position of the caret when the auto-completion list was displayed.
void AutoCompSetSeparator(int separatorCharacter);
/**
- Change the type-separator character in the string setting up an auto-completion
- list.
+ Change the type-separator character in the string setting up an auto-completion list.
Default is '?' but can be changed if items contain '?'.
*/
void AutoCompSetTypeSeparator(int separatorCharacter);
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);
/**
Will a paste succeed?
*/
- bool CanPaste();
+ virtual bool CanPaste() const;
/**
Are there any redoable actions in the undo history?
*/
- bool CanRedo();
+ virtual bool CanRedo() const;
/**
Are there any undoable actions in the undo history?
*/
- bool CanUndo();
+ virtual bool CanUndo() const;
/**
Cancel any modes such as call tip or auto-completion list display.
/**
Clear the selection.
*/
- void Clear();
+ virtual void Clear();
/**
Delete all text in the document.
/**
Copy the selection to the clipboard.
*/
- void Copy();
+ virtual void Copy();
/**
Copy a range of text to the clipboard. Positions are clipped into the document.
void CopyText(int length, const wxString& text);
/**
-
+
*/
bool Create(wxWindow* parent, wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
/**
Cut the selection to the clipboard.
*/
- void Cut();
+ virtual void Cut();
/**
Delete back from the current position to the start of the line.
/**
Returns the position of the opposite end of the selection to the caret.
*/
- int GetAnchor();
+ int GetAnchor() const;
/**
Does a backspace pressed when caret is within indentation unindent?
*/
- bool GetBackSpaceUnIndents();
+ bool GetBackSpaceUnIndents() const;
/**
Is drawing done first into a buffer or direct to the screen?
*/
- bool GetBufferedDraw();
+ bool GetBufferedDraw() const;
/**
Get the foreground colour of the caret.
*/
- wxColour GetCaretForeground();
+ wxColour GetCaretForeground() const;
/**
Get the background alpha of the caret line.
*/
- int GetCaretLineBackAlpha();
+ int GetCaretLineBackAlpha() const;
/**
Get the colour of the background of the line containing the caret.
*/
- wxColour GetCaretLineBackground();
+ wxColour GetCaretLineBackground() const;
/**
Is the background of the line containing the caret in a different colour?
*/
- bool GetCaretLineVisible();
+ bool GetCaretLineVisible() const;
/**
Get the time in milliseconds that the caret is on and off.
*/
- int GetCaretPeriod();
+ int GetCaretPeriod() const;
/**
Can the caret preferred x position only be changed by explicit movement
commands?
*/
- bool GetCaretSticky();
+ bool GetCaretSticky() const;
/**
Returns the width of the insert mode caret.
*/
- int GetCaretWidth();
+ int GetCaretWidth() const;
/**
Returns the character byte at the position.
*/
- int GetCharAt(int pos);
+ int GetCharAt(int pos) const;
/**
Get the code page used to interpret the bytes of the document as characters.
*/
- int GetCodePage();
+ int GetCodePage() const;
/**
Retrieve the column number of a position, taking tab width into account.
*/
- int GetColumn(int pos);
+ int GetColumn(int pos) const;
/**
Get the way control characters are displayed.
*/
- int GetControlCharSymbol();
+ int GetControlCharSymbol() const;
/**
-
+
*/
- wxString GetCurLine(int* OUTPUT);
+ wxString GetCurLine(int* linePos = NULL);
/**
-
+
*/
- wxCharBuffer GetCurLineRaw(int* OUTPUT);
+ wxCharBuffer GetCurLineRaw(int* linePos = NULL);
/**
END of generated section
/**
Returns the position of the caret.
*/
- int GetCurrentPos();
+ int GetCurrentPos() const;
/**
Retrieve a pointer to the document object.
/**
Retrieve the current end of line mode - one of CRLF, CR, or LF.
*/
- int GetEOLMode();
+ int GetEOLMode() const;
/**
Retrieve the colour used in edge indication.
*/
- wxColour GetEdgeColour();
+ wxColour GetEdgeColour() const;
/**
Retrieve the column number which text should be kept within.
*/
- int GetEdgeColumn();
+ int GetEdgeColumn() const;
/**
Retrieve the edge highlight mode.
*/
- int GetEdgeMode();
+ int GetEdgeMode() const;
/**
Retrieve whether the maximum scroll position has the last
line at the bottom of the view.
*/
- bool GetEndAtLastLine();
+ bool GetEndAtLastLine() const;
/**
Retrieve the position of the last correctly styled character.
*/
- int GetEndStyled();
+ int GetEndStyled() const;
/**
Retrieve the display line at the top of the display.
*/
- int GetFirstVisibleLine();
+ int GetFirstVisibleLine() const;
/**
Is a header line expanded?
*/
- bool GetFoldExpanded(int line);
+ bool GetFoldExpanded(int line) const;
/**
Retrieve the fold level of a line.
*/
- int GetFoldLevel(int line);
+ int GetFoldLevel(int line) const;
/**
Find the parent line of a child line.
*/
- int GetFoldParent(int line);
+ int GetFoldParent(int line) const;
/**
Get the highlighted indentation guide column.
*/
- int GetHighlightGuide();
+ int GetHighlightGuide() const;
/**
Retrieve indentation size.
*/
- int GetIndent();
+ int GetIndent() const;
/**
Are the indentation guides visible?
*/
- bool GetIndentationGuides();
+ int GetIndentationGuides() const;
/**
Find the last child line of a header line.
*/
- int GetLastChild(int line, int level);
+ int GetLastChild(int line, int level) const;
/**
Can be used to prevent the EVT_CHAR handler from adding the char
/**
Retrieve the degree of caching of layout information.
*/
- int GetLayoutCache();
+ int GetLayoutCache() const;
/**
- Returns the number of characters in the document.
+ Returns the number of bytes in the document.
*/
- int GetLength();
+ int GetLength() const;
/**
Retrieve the lexing language of the document.
*/
- int GetLexer();
+ int GetLexer() const;
/**
Retrieve the contents of a line.
*/
- wxString GetLine(int line);
+ wxString GetLine(int line) const;
/**
Returns the number of lines in the document. There is always at least one.
*/
- int GetLineCount();
+ int GetLineCount() const;
/**
Get the position after the last visible characters on a line.
*/
- int GetLineEndPosition(int line);
+ int GetLineEndPosition(int line) const;
/**
Retrieve the position before the first non indentation character on a line.
*/
- int GetLineIndentPosition(int line);
+ int GetLineIndentPosition(int line) const;
/**
Retrieve the number of columns that a line is indented.
*/
- int GetLineIndentation(int line);
+ int GetLineIndentation(int line) const;
/**
Retrieve the contents of a line.
/**
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);
/**
Retrieve the extra styling information for a line.
*/
- int GetLineState(int line);
+ int GetLineState(int line) const;
/**
Is a line visible?
*/
- bool GetLineVisible(int line);
+ bool GetLineVisible(int line) const;
/**
Returns the size in pixels of the left margin.
*/
- int GetMarginLeft();
+ int GetMarginLeft() const;
/**
Retrieve the marker mask of a margin.
*/
- int GetMarginMask(int margin);
+ int GetMarginMask(int margin) const;
/**
Returns the size in pixels of the right margin.
*/
- int GetMarginRight();
+ int GetMarginRight() const;
/**
Retrieve the mouse click sensitivity of a margin.
*/
- bool GetMarginSensitive(int margin);
+ bool GetMarginSensitive(int margin) const;
/**
Retrieve the type of a margin.
*/
- int GetMarginType(int margin);
+ int GetMarginType(int margin) const;
/**
Retrieve the width of a margin in pixels.
*/
- int GetMarginWidth(int margin);
+ int GetMarginWidth(int margin) const;
/**
Retrieve the last line number that has line state.
*/
- int GetMaxLineState();
+ int GetMaxLineState() const;
/**
Get which document modification events are sent to the container.
*/
- int GetModEventMask();
+ int GetModEventMask() const;
/**
Is the document different from when it was last saved?
*/
- bool GetModify();
+ bool GetModify() const;
/**
Get whether mouse gets captured.
*/
- bool GetMouseDownCaptures();
+ bool GetMouseDownCaptures() const;
/**
Retrieve the time the mouse must sit still to generate a mouse dwell event.
*/
- int GetMouseDwellTime();
+ int GetMouseDwellTime() const;
/**
Returns @true if overtype mode is active otherwise @false is returned.
*/
- bool GetOvertype();
+ bool GetOvertype() const;
/**
Get convert-on-paste setting
*/
- bool GetPasteConvertEndings();
+ bool GetPasteConvertEndings() const;
/**
Returns the print colour mode.
*/
- int GetPrintColourMode();
+ int GetPrintColourMode() const;
/**
Returns the print magnification.
*/
- int GetPrintMagnification();
+ int GetPrintMagnification() const;
/**
Is printing line wrapped?
*/
- int GetPrintWrapMode();
+ int GetPrintWrapMode() const;
/**
Retrieve a 'property' value previously set with SetProperty.
Retrieve a 'property' value previously set with SetProperty,
interpreted as an int AFTER any '$()' variable replacement.
*/
- int GetPropertyInt(const wxString& key);
+ int GetPropertyInt(const wxString& key) const;
/**
In read-only mode?
*/
- bool GetReadOnly();
+ bool GetReadOnly() const;
/**
Get cursor type.
*/
- int GetSTCCursor();
+ int GetSTCCursor() const;
/**
Get internal focus flag.
*/
- bool GetSTCFocus();
+ bool GetSTCFocus() const;
/**
Retrieve the document width assumed for scrolling.
*/
- int GetScrollWidth();
+ int GetScrollWidth() const;
/**
Get the search flags used by SearchInTarget.
*/
- int GetSearchFlags();
+ int GetSearchFlags() const;
/**
Get the alpha of the selection.
*/
- int GetSelAlpha();
+ int GetSelAlpha() const;
/**
Retrieve the selected text.
wxCharBuffer GetSelectedTextRaw();
/**
-
+
*/
void GetSelection(int* OUTPUT, int* OUTPUT);
/**
Returns the position at the end of the selection.
*/
- int GetSelectionEnd();
+ int GetSelectionEnd() const;
/**
Get the mode of the current selection.
*/
- int GetSelectionMode();
+ int GetSelectionMode() const;
/**
Returns the position at the start of the selection.
*/
- int GetSelectionStart();
+ int GetSelectionStart() const;
/**
Get error status.
*/
- int GetStatus();
+ int GetStatus() const;
/**
Returns the style byte at the position.
*/
- int GetStyleAt(int pos);
+ int GetStyleAt(int pos) const;
/**
Retrieve number of bits in style bytes used to hold the lexical state.
*/
- int GetStyleBits();
+ int GetStyleBits() const;
/**
Retrieve the number of bits the current lexer needs for styling.
*/
- int GetStyleBitsNeeded();
+ int GetStyleBitsNeeded() const;
/**
Retrieve a buffer of cells.
/**
Does a tab pressed when caret is within indentation indent?
*/
- bool GetTabIndents();
+ bool GetTabIndents() const;
/**
Retrieve the visible size of a tab.
*/
- int GetTabWidth();
+ int GetTabWidth() const;
/**
Get the position that ends the target.
*/
- int GetTargetEnd();
+ int GetTargetEnd() const;
/**
Get the position that starts the target.
*/
- int GetTargetStart();
+ int GetTargetStart() const;
/**
Retrieve all the text in the document.
*/
- wxString GetText();
+ wxString GetText() const;
/**
Retrieve the number of characters in the document.
*/
- int GetTextLength();
+ int GetTextLength() const;
/**
Retrieve a range of text.
/**
Is drawing done in two phases with backgrounds drawn before foregrounds?
*/
- bool GetTwoPhaseDraw();
+ bool GetTwoPhaseDraw() const;
/**
Is undo history being collected?
*/
- bool GetUndoCollection();
+ bool GetUndoCollection() const;
/**
Returns the current UseAntiAliasing setting.
/**
Is the horizontal scroll bar visible?
*/
- bool GetUseHorizontalScrollBar();
+ bool GetUseHorizontalScrollBar() const;
/**
Retrieve whether tabs will be used in indentation.
*/
- bool GetUseTabs();
+ bool GetUseTabs() const;
/**
Is the vertical scroll bar visible?
*/
- bool GetUseVerticalScrollBar();
+ bool GetUseVerticalScrollBar() const;
/**
Are the end of line characters visible?
*/
- bool GetViewEOL();
+ bool GetViewEOL() const;
/**
Are white space characters currently visible?
Returns one of SCWS_* constants.
*/
- int GetViewWhiteSpace();
+ int GetViewWhiteSpace() const;
/**
Retrieve whether text is word wrapped.
*/
- int GetWrapMode();
+ int GetWrapMode() const;
/**
- Retrive the start indent for wrapped lines.
+ Retrieve the start indent for wrapped lines.
*/
- int GetWrapStartIndent();
+ 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();
+ int GetWrapVisualFlags() const;
/**
- Retrive the location of visual flags for wrapped lines.
+ Retrieve the location of visual flags for wrapped lines.
*/
- int GetWrapVisualFlagsLocation();
+ int GetWrapVisualFlagsLocation() const;
/**
-
+
*/
- int GetXOffset();
+ int GetXOffset() const;
/**
Retrieve the zoom level.
*/
- int GetZoom();
+ int GetZoom() const;
/**
Set caret to start of a line and ensure it is visible.
except they behave differently when word-wrap is enabled:
They go first to the start / end of the display line, like (Home|LineEnd)Display
The difference is that, the cursor is already at the point, it goes on to the
- start
- or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
+ start or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
*/
void HomeWrap();
/**
-
+
*/
void HomeWrapExtend();
/**
Retrieve the foreground colour of an indicator.
*/
- wxColour IndicatorGetForeground(int indic);
+ wxColour IndicatorGetForeground(int indic) const;
/**
Retrieve the style of an indicator.
*/
- int IndicatorGetStyle(int indic);
+ int IndicatorGetStyle(int indic) const;
/**
Set the foreground colour of an indicator.
void LineEndRectExtend();
/**
-
+
*/
void LineEndWrap();
/**
-
+
*/
void LineEndWrapExtend();
/**
Retrieve the line containing a position.
*/
- int LineFromPosition(int pos);
+ int LineFromPosition(int pos) const;
/**
- How many characters are on a line, not including end of line characters?
+ How many characters are on a line, including end of line characters?
*/
- int LineLength(int line);
+ int LineLength(int line) const;
/**
Scroll horizontally and vertically.
/**
Retrieves the number of lines completely visible.
*/
- int LinesOnScreen();
+ int LinesOnScreen() const;
/**
Split the lines in the target into lines that are less wide than pixelWidth
/**
Load the contents of filename into the editor
*/
- bool LoadFile(const wxString& filename);
+ bool LoadFile(const wxString& file, int fileType = wxTEXT_TYPE_ANY);
/**
Transform the selection to lower case.
void ParaDown();
/**
-
+
*/
void ParaDownExtend();
/**
-
+
*/
void ParaUp();
/**
-
+
*/
void ParaUpExtend();
/**
Paste the contents of the clipboard into the document replacing the selection.
*/
- void Paste();
+ virtual void Paste();
/**
Retrieve the point in the window where a position is displayed.
/**
Retrieve the position at the start of a line.
*/
- int PositionFromLine(int line);
+ int PositionFromLine(int line) const;
/**
Find the position from a point within the window.
*/
- int PositionFromPoint(wxPoint pt);
+ 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);
/**
Redoes the next action on the undo history.
*/
- void Redo();
+ virtual void Redo();
/**
Register an image for use in autocompletion lists.
int ReplaceTarget(const wxString& text);
/**
- 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.
- 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
- ).
+
+ 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.
+ caused by processing the d patterns.
*/
int ReplaceTargetRE(const wxString& text);
/**
Write the contents of the editor to filename
*/
- bool SaveFile(const wxString& filename);
+ bool SaveFile(const wxString& file = wxEmptyString, int fileType = wxTEXT_TYPE_ANY);
/**
Scroll enough to make the given column visible
/**
Select all the text in the document.
*/
- void SelectAll();
+ virtual void SelectAll();
/**
Duplicate the selection. If selection empty duplicate the line containing the
Is the selection rectangular? The alternative is the more common stream
selection.
*/
- bool SelectionIsRectangle();
+ bool SelectionIsRectangle() const;
/**
Send a message to Scintilla
*/
- long SendMsg(int msg, long wp = 0, long lp = 0);
+ wxIntPtr SendMsg(int msg, wxUIntPtr wp = 0, wxIntPtr lp = 0) const;
/**
Set the selection anchor to a position. The anchor is the opposite
void SetFoldMarginColour(bool useSetting, const wxColour& back);
/**
-
+
*/
void SetFoldMarginHiColour(bool useSetting, const wxColour& fore);
/**
Show or hide indentation guides.
*/
- void SetIndentationGuides(bool show);
+ void SetIndentationGuides(int indentView);
/**
Set up the key words used by the lexer.
void SetKeyWords(int keywordSet, const wxString& keyWords);
/**
-
+
*/
void SetLastKeydownProcessed(bool val);
void SetSelAlpha(int alpha);
/**
- Set the background colour of the selection and whether to use this setting.
+ Set the background colour of the main and additional selections and whether to use this setting.
*/
void SetSelBackground(bool useSetting, const wxColour& back);
/**
- Set the foreground colour of the selection and whether to use this setting.
+ Set the foreground colour of the main and additional selections and whether to use this setting.
*/
void SetSelForeground(bool useSetting, const wxColour& fore);
/**
Select a range of text.
*/
- void SetSelection(int start, int end);
+ virtual void SetSelection(long from, long to);
/**
Sets the position that ends the selection - this becomes the currentPosition.
void SetSelectionEnd(int pos);
/**
- Set the selection mode to stream (SC_SEL_STREAM) or rectangular
- (SC_SEL_RECTANGLE) 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 mode);
void SetWhitespaceForeground(bool useSetting,
const wxColour& fore);
+ /**
+ 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 the set of characters making up words for when moving or selecting by word.
- First sets deaults like SetCharsDefault.
+ First sets defaults like SetCharsDefault.
*/
void SetWordChars(const wxString& characters);
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);
/**
Undo one action in the undo history.
*/
- void Undo();
+ virtual void Undo();
/**
Transform the selection to upper case.
void VCHomeRectExtend();
/**
-
+
*/
void VCHomeWrap();
/**
-
+
*/
void VCHomeWrapExtend();
Make the displayed text smaller by decreasing the sizes by 1 point.
*/
void ZoomOut();
+
+
+ /**
+ Sets how wrapped sublines are placed. Default is fixed.
+ */
+ void SetWrapIndentMode(int mode);
+
+ /**
+ Retrieve how wrapped sublines are placed. Default is fixed.
+ */
+ int GetWrapIndentMode() const;
+
+ /**
+ Scroll so that a display line is at the top of the display.
+ */
+ void SetFirstVisibleLine(int lineDisplay);
+
+
+
+ /**
+ Copy the selection, if selection empty copy the line with the caret
+ */
+ void CopyAllowLine();
+
+ /**
+ Compact the document buffer and return a read-only pointer to the
+ characters in the document.
+ */
+ const char* GetCharacterPointer();
+
+ /**
+ Always interpret keyboard input as Unicode
+ */
+ void SetKeysUnicode(bool keysUnicode);
+
+ /**
+ Are keys always interpreted as Unicode?
+ */
+ bool GetKeysUnicode() 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.
+ */
+ int IndicatorGetAlpha(int indicator) 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;
+
+ /**
+ Which symbol was defined for markerNumber with MarkerDefine
+ */
+ int GetMarkerSymbolDefined(int markerNumber);
+
+ /**
+ 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 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
+ */
+ void AnnotationSetVisible(int visible);
+
+ /**
+ Get the visibility for the annotations for a view
+ */
+ 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;
+
+ /**
+ Add a container action to the undo stack
+ */
+ void AddUndoAction(int token, int flags);
+
+ /**
+ 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 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 additionalCaretsBlink);
+
+ /**
+ Whether additional carets are visible
+ */
+ bool GetAdditionalCaretsVisible() const;
+
+ /**
+ How many selections are there?
+ */
+ int GetSelections() const;
+
+ /**
+ Clear selections to a single empty stream selection
+ */
+ void ClearSelections();
+
+ /**
+ Add a selection
+ */
+ int AddSelection(int caret, int anchor);
+
+ /**
+ Set the main selection
+ */
+ void SetMainSelection(int selection);
+
+ /**
+ Which selection is the main selection
+ */
+ int GetMainSelection() const;
+
+ void SetSelectionNCaret(int selection, int pos);
+ int GetSelectionNCaret(int selection) const;
+ void SetSelectionNAnchor(int selection, int posAnchor);
+ int GetSelectionNAnchor(int selection) const;
+ void SetSelectionNCaretVirtualSpace(int selection, int space);
+ int GetSelectionNCaretVirtualSpace(int selection) const;
+ void SetSelectionNAnchorVirtualSpace(int selection, int space);
+ int GetSelectionNAnchorVirtualSpace(int selection) const;
+
+ /**
+ Sets the position that starts the selection - this becomes the anchor.
+ */
+ void SetSelectionNStart(int selection, int pos);
+
+ /**
+ 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 pos);
+
+ /**
+ Returns the position at the end of the selection.
+ */
+ int GetSelectionNEnd(int selection) const;
+
+ void SetRectangularSelectionCaret(int pos);
+ int GetRectangularSelectionCaret() const;
+ void SetRectangularSelectionAnchor(int posAnchor);
+ int GetRectangularSelectionAnchor() const;
+ void SetRectangularSelectionCaretVirtualSpace(int space);
+ int GetRectangularSelectionCaretVirtualSpace() const;
+ void SetRectangularSelectionAnchorVirtualSpace(int space);
+ int GetRectangularSelectionAnchorVirtualSpace() const;
+ void SetVirtualSpaceOptions(int virtualSpaceOptions);
+ int GetVirtualSpaceOptions() const;
+
+ /**
+ Select the modifier key to use for mouse-based rectangular selection.
+ */
+ void SetRectangularSelectionModifier(int modifier);
+
+ /**
+ Get the modifier key used for rectangular selection.
+ */
+ 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();
+
+ /**
+ Get Scintilla library version information.
+
+ @since 2.9.2
+ @see wxVersionInfo
+ */
+ static wxVersionInfo GetLibraryVersionInfo();
};