Merge branch 'morestcfixes' of https://github.com/NewPagodi/wxWidgets
Several minor improvements to wxSTC and documentation and one crash fix under macOS. See https://github.com/wxWidgets/wxWidgets/pull/1412 Closes #18434.
This commit is contained in:
@@ -2777,6 +2777,9 @@
|
||||
wxStyledTextCtrl is a 1 to 1 mapping of "raw" scintilla interface, whose
|
||||
documentation can be found in the Scintilla website (http://www.scintilla.org/).
|
||||
|
||||
Please see wxStyledTextEvent for the documentation of all event types you
|
||||
can use with wxStyledTextCtrl.
|
||||
|
||||
|
||||
@section stc_index Index of the member groups
|
||||
|
||||
@@ -2830,86 +2833,6 @@
|
||||
- @ref_member_group{text_entry, Text entry methods}
|
||||
- @ref_member_group{text_area, Text area methods}
|
||||
|
||||
|
||||
@section event_list Events
|
||||
|
||||
@beginEventEmissionTable{wxStyledTextEvent}
|
||||
@event{EVT_STC_AUTOCOMP_CANCELLED(id, fn)}
|
||||
Process a @c wxEVT_STC_AUTOCOMP_CANCELLED event.
|
||||
@event{EVT_STC_AUTOCOMP_CHAR_DELETED(id, fn)}
|
||||
Process a @c wxEVT_STC_AUTOCOMP_CHAR_DELETED event.
|
||||
@event{EVT_STC_AUTOCOMP_COMPLETED(id, fn)}
|
||||
Process a @c wxEVT_STC_AUTOCOMP_COMPLETED event.
|
||||
@since 3.1.1
|
||||
|
||||
@event{EVT_STC_AUTOCOMP_SELECTION(id, fn)}
|
||||
Process a @c wxEVT_STC_AUTOCOMP_SELECTION event.
|
||||
@event{EVT_STC_CALLTIP_CLICK(id, fn)}
|
||||
Process a @c wxEVT_STC_CALLTIP_CLICK event.
|
||||
@event{EVT_STC_CHANGE(id, fn)}
|
||||
Process a @c wxEVT_STC_CHANGE event.
|
||||
@event{EVT_STC_CHARADDED(id, fn)}
|
||||
Process a @c wxEVT_STC_CHARADDED event.
|
||||
@event{EVT_STC_CLIPBOARD_COPY(id, fn)}
|
||||
Process a @c wxEVT_STC_CLIPBOARD_COPY event.
|
||||
@since 3.1.0
|
||||
|
||||
@event{EVT_STC_CLIPBOARD_PASTE(id, fn)}
|
||||
Process a @c wxEVT_STC_CLIPBOARD_PASTE event.
|
||||
@since 3.1.0
|
||||
|
||||
@event{EVT_STC_DO_DROP(id, fn)}
|
||||
Process a @c wxEVT_STC_DO_DROP event.
|
||||
@event{EVT_STC_DOUBLECLICK(id, fn)}
|
||||
Process a @c wxEVT_STC_DOUBLECLICK event.
|
||||
@event{EVT_STC_DRAG_OVER(id, fn)}
|
||||
Process a @c wxEVT_STC_DRAG_OVER event.
|
||||
@event{EVT_STC_DWELLEND(id, fn)}
|
||||
Process a @c wxEVT_STC_DWELLEND event.
|
||||
@event{EVT_STC_DWELLSTART(id, fn)}
|
||||
Process a @c wxEVT_STC_DWELLSTART event.
|
||||
@event{EVT_STC_HOTSPOT_CLICK(id, fn)}
|
||||
Process a @c wxEVT_STC_HOTSPOT_CLICK event.
|
||||
@event{EVT_STC_HOTSPOT_DCLICK(id, fn)}
|
||||
Process a @c wxEVT_STC_HOTSPOT_DCLICK event.
|
||||
@event{EVT_STC_HOTSPOT_RELEASE_CLICK(id, fn)}
|
||||
Process a @c wxEVT_STC_HOTSPOT_RELEASE_CLICK event.
|
||||
@event{EVT_STC_INDICATOR_CLICK(id, fn)}
|
||||
Process a @c wxEVT_STC_INDICATOR_CLICK event.
|
||||
@event{EVT_STC_INDICATOR_RELEASE(id, fn)}
|
||||
Process a @c wxEVT_STC_INDICATOR_RELEASE event.
|
||||
@event{EVT_STC_MACRORECORD(id, fn)}
|
||||
Process a @c wxEVT_STC_MACRORECORD event.
|
||||
@event{EVT_STC_MARGIN_RIGHT_CLICK(id, fn)}
|
||||
Process a @c wxEVT_STC_MARGIN_RIGHT_CLICK event.
|
||||
@since 3.1.1
|
||||
|
||||
@event{EVT_STC_MARGINCLICK(id, fn)}
|
||||
Process a @c wxEVT_STC_MARGINCLICK event.
|
||||
@event{EVT_STC_MODIFIED(id, fn)}
|
||||
Process a @c wxEVT_STC_MODIFIED event.
|
||||
@event{EVT_STC_NEEDSHOWN(id, fn)}
|
||||
Process a @c wxEVT_STC_NEEDSHOWN event.
|
||||
@event{EVT_STC_PAINTED(id, fn)}
|
||||
Process a @c wxEVT_STC_PAINTED event.
|
||||
@event{EVT_STC_ROMODIFYATTEMPT(id, fn)}
|
||||
Process a @c wxEVT_STC_ROMODIFYATTEMPT event.
|
||||
@event{EVT_STC_SAVEPOINTLEFT(id, fn)}
|
||||
Process a @c wxEVT_STC_SAVEPOINTLEFT event.
|
||||
@event{EVT_STC_SAVEPOINTREACHED(id, fn)}
|
||||
Process a @c wxEVT_STC_SAVEPOINTREACHED event.
|
||||
@event{EVT_STC_START_DRAG(id, fn)}
|
||||
Process a @c wxEVT_STC_START_DRAG event.
|
||||
@event{EVT_STC_STYLENEEDED(id, fn)}
|
||||
Process a @c wxEVT_STC_STYLENEEDED event.
|
||||
@event{EVT_STC_UPDATEUI(id, fn)}
|
||||
Process a @c wxEVT_STC_UPDATEUI event.
|
||||
@event{EVT_STC_USERLISTSELECTION(id, fn)}
|
||||
Process a @c wxEVT_STC_USERLISTSELECTION event.
|
||||
@event{EVT_STC_ZOOM(id, fn)}
|
||||
Process a @c wxEVT_STC_ZOOM event.
|
||||
@endEventTable
|
||||
|
||||
@library{wxstc}
|
||||
@category{stc}
|
||||
|
||||
@@ -7423,54 +7346,6 @@ public:
|
||||
*/
|
||||
void RegisterImage(int type, const wxBitmap& bmp);
|
||||
|
||||
/**
|
||||
Set the colours used to display the items in an autocompletion list.
|
||||
|
||||
This method can be used if the default colours make the list hard to
|
||||
read or if specific colours are desired for whatever reason.
|
||||
@param background
|
||||
The colour used for the background of the list.
|
||||
@param text
|
||||
The colour used for all text except for the selected item.
|
||||
@param highlight
|
||||
The colour used to highlight the selected item in the list.
|
||||
@param highlightText
|
||||
The colour used for the text of the selected item.
|
||||
@remarks
|
||||
To reset one or more of the colours to its default,
|
||||
call this method with wxNullColour for the colour or colours
|
||||
to be reset.
|
||||
|
||||
@since 3.1.3
|
||||
*/
|
||||
void AutoCompSetColours(const wxColour& background, const wxColour& text,
|
||||
const wxColour& highlight,
|
||||
const wxColour& highlightText);
|
||||
|
||||
/**
|
||||
Use a wxListCtrl to display autocompletion and user lists.
|
||||
|
||||
By default lists will be displayed in a wxListBox. Use this method to
|
||||
display them in a wxListCtrl instead. The primary difference is that
|
||||
wxListCtrl has hot tracking to highlight the item under the mouse cursor.
|
||||
@param useListCtrl
|
||||
Set this to true to use a wxListCtrl and to false to use a
|
||||
wxListBox.
|
||||
@param currentBgColour
|
||||
The colour used to highlight the item under the mouse cursor.
|
||||
@param currentTextColour
|
||||
The colour used for the text of the item under the mouse cursor.
|
||||
@remarks
|
||||
To reset one or more of the colours to its default,
|
||||
call this method with wxNullColour for the colour or colours
|
||||
to be reset.
|
||||
|
||||
@since 3.1.3
|
||||
*/
|
||||
void AutoCompUseListCtrl(bool useListCtrl = true,
|
||||
const wxColour& currentBgColour = wxNullColour,
|
||||
const wxColour& currentTextColour = wxNullColour);
|
||||
|
||||
//@}
|
||||
|
||||
|
||||
@@ -7591,7 +7466,7 @@ public:
|
||||
@param value
|
||||
The value to replace the existing text with.
|
||||
*/
|
||||
virtual void Replace(long from, long to, const wxString& text);
|
||||
virtual void Replace(long from, long to, const wxString& value);
|
||||
|
||||
/**
|
||||
Sets the insertion point at the given position.
|
||||
@@ -7724,7 +7599,7 @@ public:
|
||||
@return
|
||||
The length of the line, or -1 if @a lineNo was invalid.
|
||||
*/
|
||||
virtual int GetLineLength(long n) const;
|
||||
virtual int GetLineLength(long lineNo) const;
|
||||
|
||||
/**
|
||||
Returns the contents of a given line in the text control, not including
|
||||
@@ -7736,7 +7611,7 @@ public:
|
||||
@return
|
||||
The contents of the line.
|
||||
*/
|
||||
virtual wxString GetLineText(long n) const;
|
||||
virtual wxString GetLineText(long lineNo) const;
|
||||
|
||||
/**
|
||||
Returns the number of lines in the text control buffer.
|
||||
@@ -7924,6 +7799,10 @@ public:
|
||||
|
||||
@event{EVT_STC_AUTOCOMP_SELECTION(id, fn)}
|
||||
Process a @c wxEVT_STC_AUTOCOMP_SELECTION event.
|
||||
@event{EVT_STC_AUTOCOMP_SELECTION_CHANGE(id, fn)}
|
||||
Process a @c wxEVT_STC_AUTOCOMP_SELECTION_CHANGE event.
|
||||
@since 3.1.3
|
||||
|
||||
@event{EVT_STC_CALLTIP_CLICK(id, fn)}
|
||||
Process a @c wxEVT_STC_CALLTIP_CLICK event.
|
||||
@event{EVT_STC_CHANGE(id, fn)}
|
||||
@@ -8044,6 +7923,27 @@ public:
|
||||
@link wxStyledTextEvent::GetString GetString@endlink,
|
||||
@link wxStyledTextEvent::GetListCompletionMethod GetListCompletionMethod@endlink.
|
||||
|
||||
@c wxEVT_STC_AUTOCOMP_SELECTION_CHANGE
|
||||
|
||||
- Generated when items are highlighted in an autocompletion or user list.
|
||||
|
||||
- @link wxStyledTextEvent::GetPosition GetPosition@endlink will return the
|
||||
position at which the list is being shown.
|
||||
|
||||
- For a user list, @link wxStyledTextEvent::GetListType GetListType@endlink
|
||||
will return the list type. The list type is a value input in to the
|
||||
@link wxStyledTextCtrl::UserListShow wxStyledTextCtrl::UserListShow@endlink
|
||||
method when a user list is created.
|
||||
|
||||
- For an autocompletion list,
|
||||
@link wxStyledTextEvent::GetListType GetListType@endlink will always return
|
||||
zero.
|
||||
|
||||
- Valid event functions:
|
||||
@link wxStyledTextEvent::GetListType GetListType@endlink,
|
||||
@link wxStyledTextEvent::GetPosition GetPosition@endlink,
|
||||
@link wxStyledTextEvent::GetString GetString@endlink.
|
||||
|
||||
@c wxEVT_STC_CALLTIP_CLICK
|
||||
|
||||
- Generated when a calltip has been clicked.
|
||||
@@ -8059,7 +7959,8 @@ public:
|
||||
|
||||
- Generated when the text of the document has changed.
|
||||
|
||||
- This an older style event and should probably not be used in new code.
|
||||
- This an older style event and should probably not be used in new code. Use
|
||||
@c wxEVT_STC_MODIFIED instead.
|
||||
|
||||
- Valid event functions: none.
|
||||
|
||||
@@ -8536,7 +8437,8 @@ public:
|
||||
wxStyledTextCtrl::UserListShow @endlink method and can be used to
|
||||
distinguish lists if more than one is used.
|
||||
|
||||
This method is valid for @c wxEVT_STC_USERLISTSELECTION events.
|
||||
This method is valid for @c wxEVT_STC_AUTOCOMP_SELECTION_CHANGE and
|
||||
@c wxEVT_STC_USERLISTSELECTION events.
|
||||
*/
|
||||
int GetListType() const;
|
||||
|
||||
@@ -8684,6 +8586,7 @@ public:
|
||||
- @c wxEVT_STC_INDICATOR_RELEASE
|
||||
- @c wxEVT_STC_CALLTIP_CLICK
|
||||
- @c wxEVT_STC_AUTOCOMP_SELECTION
|
||||
- @c wxEVT_STC_AUTOCOMP_SELECTION_CHANGE
|
||||
- @c wxEVT_STC_AUTOCOMP_COMPLETED
|
||||
- @c wxEVT_STC_MARGIN_RIGHT_CLICK
|
||||
*/
|
||||
@@ -8937,3 +8840,4 @@ const wxEventType wxEVT_STC_CLIPBOARD_COPY;
|
||||
const wxEventType wxEVT_STC_CLIPBOARD_PASTE;
|
||||
const wxEventType wxEVT_STC_AUTOCOMP_COMPLETED;
|
||||
const wxEventType wxEVT_STC_MARGIN_RIGHT_CLICK;
|
||||
const wxEventType wxEVT_STC_AUTOCOMP_SELECTION_CHANGE;
|
||||
|
Reference in New Issue
Block a user