Detailed Description

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 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.

Process a wxEVT_STC_START_DRAG event, generated when text is being dragged from the control. Details of the drag may be altered by changing the respective fields of the event; in particular, set an empty string to prohibit the drag entirely. Valid event functions: GetDragFlags, SetDragFlags, GetPosition, GetString, SetString.

These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)? 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)?. More...

This method may be overridden in the derived classes to return false to indicate that while this control can, in principle, have focus if the user clicks it with the mouse, it shouldn't be included in the TAB traversal chain when using the keyboard. More...

This method calls SetSizer() and then wxSizer::SetSizeHints which sets the initial window size to the size needed to accommodate all sizer elements and sets the size hints which, if this window is a top level one, prevent the user from resizing it to be less than this minimal size. More...

Get the window border style from the given flags: this is different from simply doing flags & wxBORDER_MASK because it uses GetDefaultBorder() to translate wxBORDER_DEFAULT to something reasonable. More...

This function is (or should be, in case of custom controls) called during window creation to intelligently set up the window visual attributes, that is the font and the foreground and background colours. More...

Returns true if the window contents is double-buffered by the system, i.e. if any drawing done on the window is really done on a temporary backing surface and transferred to the screen all at once later. More...

This virtual function is normally only used internally, but sometimes an application may need it to implement functionality that should not be disabled by an application defining an OnIdle handler in a derived class. More...

Processes the pending events previously queued using QueueEvent() or AddPendingEvent(); you must call this function only if you are sure there are pending events for this handler, otherwise a wxCHECK will fail. More...

Unbinds the given function, functor or method dynamically from the event handler, using the specified parameters as search criteria and returning true if a matching function has been found and removed. More...

This is defined as the zero based index of the character position to the right of the insertion point. For example, if the insertion point is at the end of the single-line text control, it is equal to GetLastPosition().

Notice that insertion position is, in general, different from the index of the character the cursor position at in the string returned by GetValue(). While this is always the case for the single line controls, multi-line controls can use two characters "\\r\\n" as line separator (this is notably the case under MSW) meaning that indices in the control and its string value are offset by 1 for every line.

Hence to correctly get the character at the current cursor position, taking into account that there can be none if the cursor is at the end of the string, you could do the following:

If the returned values are equal, there was no selection. Please note that the indices returned may be used with the other wxTextCtrl methods but don't necessarily represent the correct indices into the string returned by GetValue() for multiline controls under Windows (at least,) you should use GetStringSelection() to get the selected text.

Parameters

from

The returned first position.

to

The returned last position.

wxPerl Note: In wxPerl this method takes no parameters and returns a 2-element list (from, to).

Move caret to first position on display line extending selection to new caret position.

void wxStyledTextCtrl::HomeExtend

(

)

Move caret to first position on line extending selection to new caret position.

void wxStyledTextCtrl::HomeRectExtend

(

)

Move caret to first position on line, extending rectangular selection to new caret position.

void wxStyledTextCtrl::HomeWrap

(

)

These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)? 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)?.

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.