Commit Graph

177 Commits

Author SHA1 Message Date
Vadim Zeitlin
d7f19ee610 Fix spelling in comments and documentation using codespell
Apply the utility from https://github.com/codespell-project/codespell/
to fix spelling issues in the headers under both include and interface
directories and add a file with a couple of exceptions.

The exact command line used was:

    $ codespell -w -I misc/scripts/codespell.ignore -i 3 in*
2020-06-27 22:56:22 +02:00
wangqr
e07640fb75 Forward IME messages to ScintillaWX and handle them
The handling code is copied from ScintillaWin

Closes #18759
2020-05-11 00:37:49 -04:00
Maarten Bent
62c5b2d8d1 Support DPI change in wxStyledTextCtrl
Change to zoom-level and margin width based on the active DPI.
Send wxDPIChangedEvent to all controls and windows.
2019-10-07 00:54:58 +02:00
New Pagodi
203074567c Regenerate wxSTC files after recent changes 2019-09-28 00:50:47 -05:00
New Pagodi
d24f58cc55 Add AUTOCOMP_SELECTION_CHANGE event for wxSTC
The SCN_AUTOCSELECTIONCHANGE notification was added in Scintilla 4.0 to
notify an application when a new item is selected in an autocompletion
or user list. However the version of Scintilla currently used is 3.7.2,
so this potentially useful notification is not available.

These changes allow an event corresponding to this notification to be
generated completely in the wxWidgets portion of wxSTC. If the Scintilla
library is ever updated to 4.0 or later, only one method should need to
be modified let Scintilla generate the event instead.
2019-07-13 12:23:06 -05:00
New Pagodi
caaebf43bc Remove wxSTC methods for configuring autocomp popup
The wxSTC methods AutoCompSetColours and AutoCompUseListCtrl were added
in fe7b332b7b to allow some configuration
of the autocompletion popup window. Based on subsequent discussion, it
was decided that a better method of configuring the popup and getting
information about the configuration is needed. For now, simply remove
the current methods while the better solution is created.

In addition, since the configuration options are being removed, set the
popup to have the appearance of a list control since that was the
appearance before any configuration options were added.
2019-07-13 12:20:10 -05:00
Andreas Falkenhahn
c3ce5244e3 Return -1 from GetLineLength() if line number is out of range
Make wxTextCtrl behaviour in all ports consistent with the documentation
and also update wxStyledTextCtrl to behave accordingly.

Closes #18431.
2019-07-07 03:35:21 +02:00
Andreas Falkenhahn
6e556d4a71 Check parameters of XYToPosition() and PositionToXY() in wxSTC too
For consistency with wxTextCtrl, return -1 if input parameters are out
of range.

Closes #18430.
2019-07-07 03:30:37 +02:00
New Pagodi
fe7b332b7b Regenerate STC files after recent changes 2019-03-20 00:15:44 -05:00
New Pagodi
f4e0c1aaee Regenerate wxSTC files after recent changes 2019-03-17 01:49:30 -05:00
Jan Niklas Hasse
496da2e550 Remove trailing whitespace from several files
No real changes.

See https://github.com/wxWidgets/wxWidgets/pull/787
2018-04-18 15:45:42 +02:00
Jan Niklas Hasse
8d02384792 Use wxString() instead of "" for empty strings
This will allow this code to work even when implicit conversion from
"const char*" is disabled in wxString and is already marginally more
efficient even now.

See https://github.com/wxWidgets/wxWidgets/pull/782
2018-04-17 22:32:25 +02:00
New Pagodi
b936bfe85e Add Direct2D support to wxSTC 2018-01-25 16:07:54 -06:00
New Pagodi
3a362c64cf Implement EVT_MOUSE_CAPTURE_LOST handler in wxSTC
When mouse is captured somwhere in the application, it's recommended
to have implemented a EVT_MOUSE_CAPTURE_LOST handler.
Resetting in the handler flag signalling captured state seems
to be a sufficient action because something like this is implemented
in the native Scintilla and it works fine in SciTE.

Closes #17961.
2017-10-08 10:22:59 +02:00
Artur Wieczorek
f311807112 Handle EVT_CONTEXT_MENU directly in wxSTC (wxOSX)
A simulation of context menu event by handling directly EVT_RIGHT_UP was implemented in wxSTC in 451c5cc7b9, but later on, EVT_CONTEXT_MENU generation in wxOSX was fixed in 524c47aa3a so  simulation is no longer necessary and this event can be directly handled in wxSTC.
2017-07-02 13:02:13 +02:00
Artur Wieczorek
e4a1e9a27f Schedule deprecated wxSTC constants and functions for removal in the future
Insert recently deprecated wxSTC elements in WXWIN_COMPATIBILITY_3_0 blocks
to mark them for removal in a future wx version.
2017-05-01 14:27:41 +02:00
Metallicow
8c8d8c4d3a Fix "ont" (instead of "one") typo in wxSTC
Correct "ont" to "one" in several places.
2017-04-18 12:25:46 +02:00
New Pagodi
91a2869b0e Extend FindText() to return end position of matched text in wxSTC
New 5th parameter of FindText() can be used to receive the end position of matched text returned by SCI_FINDTEXT API.

Closes #17305.
Closes https://github.com/wxWidgets/wxWidgets/pull/23
2017-03-13 20:21:41 +01:00
New Pagodi
1bcb30f6d7 Add wxStyledTextCtrl::AutoCompGetCurrentText()
Added support for SCI_AUTOCGETCURRENTTEXT API.

Closes #16263.
2017-03-07 19:15:46 +01:00
New Pagodi
15ee1ebd12 Improve generating wxSTC code and documentation
Several new features were implemented in gen_iface.py and accompanying '.in' files:
1. Added an option to parse provisional section in Scintilla.iface. When global variable GENERATE_PROVISIONAL_ITEMS is set to 1, methods and values in this section receive corresponding wxSTC items.
2. Deprecated section in Scintilla.iface is not skipped, but parsed and corresponding wxSTC items are created (marked as deprecated in the code and documentation).
3. Added a set 'notMappedSciValues' that can be used to prevent the creation of specific wxSTC values which are intended to be handled manually.
4. For deprecated constants there is generated a code to raise respective warnings during the compilation.

Closes #17671.
2017-03-06 18:38:56 +01:00
New Pagodi
2278bb0dfa 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.
2017-02-28 22:49:43 +01:00
New Pagodi
ee609de199 Fix names for some wxSTC constants
Generally, Scintilla constants which names beginning with 'SCXX' are mapped to wxSTC names by by stripping out the 'SC' before prepending 'wxSTC_', for example SCWS_INVISIBLE gets mapped to wxSTC_WS_INVISIBLE. Unfortunately, this common rule of mapping the names is not applied to the (legacy) names beginning with 'SCVS_' and 'SCMOD_'.
For the sake of consistency, also these names should conform to the common naming convention, so gen_iface.py is updated to generate conformant names for all affected prefixes. Legacy names are preserved for backward compatibility but commented deprecated and no longer referenced in the documentation.

Closes #17808.
2017-02-25 18:05:59 +01:00
New Pagodi
98720ee7a4 Fix names of newly introduced wxSTC constants
In 68888ca0a2 there were introduced new wxSTC constants representing Scintilla SCTD_* parameters. Unfortunately, their names don't conform to naming convention of other constants and therefore should be changed. For the sake of consistency, Scintilla SCTD_* names should be mapped to wxSTC_TD_* ones.

Closes #17807.
2017-02-23 23:03:40 +01:00
New Pagodi
6bf083857f Update wxStyledTextCtrl documentation
Table of contents is added to the documentation for wxSTC and the brief list of methods is broken into categories corresponding to this table. Documentation of several methods is rearranged and edited.

Closes #17803.
2017-02-21 00:32:55 +01:00
New Pagodi
e68cafaf94 Remove references to never generated wxSTC events
EVT_STC_KEY and EVT_STC_URIDROPPED events are never generated so there is no need to reference them in the code and documentation. For backwards compatibility reasons their declarations are not entirely removed but marked as deprecated.

Closes #17688.
2017-02-16 18:18:13 +01:00
New Pagodi
68888ca0a2 Upgrade Scintilla component to 3.7.2
Closes #17705.

Closes https://github.com/wxWidgets/wxWidgets/pull/409
2017-02-12 19:56:21 +01:00
Maarten
977a826639 use more wxOVERRIDE (#329) 2016-09-25 13:21:28 -07:00
New Pagodi
b06e63dbd2 Add new wxStyledTextCtrl wxEVT_STC_AUTOCOMP_COMPLETED event
This is the translation of Scintilla SCN_AUTOCCOMPLETED notification.

Closes #17664.
2016-09-16 01:38:27 +02:00
New Pagodi
b99d28bb46 Add wxStyledTextEvent::GetListCompletionMethod()
Provide access to Scintilla "listCompletionMethod" field of SCR_AUTOCSELECTION
event.

Closes #17648.
2016-09-13 13:05:25 +02:00
HasheeLeo
ef85c41d0c Pass wxFont by const reference to wxStyledTextCtrl::StyleSetFont()
Since wxStyledTextCtrl::StyleSetFont does not change its 'font' parameter, it
should be a constant reference so we can pass in temporary wxFont objects.

Closes https://github.com/wxWidgets/wxWidgets/pull/321
2016-09-08 01:13:39 +02:00
Paul Kulchenko
36c5b5f9ca Updated Scintilla to add GetTargetTextRaw (closes #17426). 2016-05-31 23:06:51 -07:00
Paul Kulchenko
c03ce59b86 Upgrade Scintilla component to 3.6.6. 2016-05-31 22:19:10 -07:00
New Pagodi
0a3057b83c Add GetDirect{Function,Pointer}() methods to wxStyledTextCtrl
These methods can be useful when working with dynamic lexers.

Closes #17481.
2016-04-03 15:50:21 +02:00
New Pagodi
a6e249ea1a Add support for loading external lexers to wxStyledTextCtrl
Implement Scintilla DynamicLibraryImpl and generate LoadLexerLibrary() and
GetLexerLanguage().

Closes #17480.
2016-04-03 15:47:48 +02:00
Paul Kulchenko
b5ac178789 Upgrade scintilla component to 3.6.3. 2016-03-03 09:49:53 -08:00
Hartwig
474461601f Addition of overrides in diverse headers 2015-11-22 10:16:01 +01:00
Vadim Zeitlin
af7ed311ed Fix wx2stclen() return values after upgrade to Scintilla 3.5.5.
The fix to the length allocated for the buffer (which was off by 1) in
wx2stc() in 9f81ac16f0 exposed another bug,
which used to compensate for that one, in wx2stclen(), so fix it too.

See #16776.
2015-07-11 22:41:34 +02:00
ARATA Mizuki
28e80e5b58 Update Scintilla from 3.5.2 to 3.5.5 2015-06-15 01:32:08 +02:00
ARATA Mizuki
43057d1c43 Update Scintilla from 3.4.4 to 3.5.2 2015-06-15 01:32:06 +02:00
ARATA Mizuki
7ebb51a895 Update Scintilla from 3.4.3 to 3.4.4 2015-06-15 01:32:06 +02:00
ARATA Mizuki
40a18a74f9 Update Scintilla from 3.4.1 to 3.4.2 2015-06-15 01:32:05 +02:00
Dimitri Schoolwerth
31145b8e3a Fix some typos, no code changes (besides strings) 2015-06-05 02:54:46 +04:00
Dimitri Schoolwerth
8f8d58d193 Use wx-prefixed macros throughout the repository.
Change {DECLARE,IMPLEMENT}_*CLASS and {DECLARE,BEGIN,END}_EVENT_TABLE
occurrences to use the wx-prefixed version of the macros.
2015-04-23 22:00:35 +04:00
Vadim Zeitlin
a3cf902002 Update the bundled Scintilla version to 3.4.1.
There are relatively few changes, see Scintilla changelog at
http://www.scintilla.org/ScintillaHistory.html

Closes #16182.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78042 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-19 12:57:22 +00:00
Vadim Zeitlin
f4b80e5337 Remove MSVC6 support.
Don't support this compiler any more, this allows to get rid of tons of
MSVC6-specific workarounds, in particular we can now use Bind() and natural
template functions calls in the library code.

Also remove MSVC6 project and solution files and don't generate them when
bakefile_gen is ran any more (removing the remaining occurrences of msvc6prj
from the bakefiles results in weird bake-time errors, so it's simpler to just
leave them there).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-15 22:32:17 +00:00
Vadim Zeitlin
47138ac8fa Add wxStyledTextCtrl copy/paste text events.
Add wxEVT_STC_CLIPBOARD_{COPY,PASTE} events, allowing to transform the text
being copied from or pasted into wxStyledTextCtrl.

Closes #16191.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76487 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-08 14:43:45 +00:00
Vadim Zeitlin
0acb665006 Remove wxStyledTextEvent::m_text and m_dragText.
These fields were unnecessary and duplicated m_cmdString inherited from the
base class.

Also use base class GetString() instead of the redundant GetText() and
GetDragText() in the code, even though these methods are still kept for
backwards compatibility.

See #16191.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-08 14:43:38 +00:00
Vadim Zeitlin
d6ace87b61 Upgrade included Scintilla to version 3.3.9.
Closes #15742.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 13:23:54 +00:00
Vadim Zeitlin
876859fcb7 Expose ScintillaWX DoDragEnter() and DoDragLeave() methods.
These methods are needed to allow implementing alternative wxDropTargets, in
addition to the already public DoDragOver().

Closes #16010.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:54:39 +00:00
Steve Lamerton
11a23db531 Fix stc doxygen warnings and regen stc files.
We need to manually escape a few parts of the autogenerated documentation. 

See #15346.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74783 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-11 12:03:07 +00:00