Assign wx2stc() return value to a suitably const variable instead of using
ugly casts to get rid of constness.
Also use wxCharBuffer/char* explicitly inside explicit wxUSE_UNICODE checks,
using wxWX2MBbuf here doesn't gain us anything and just confuses the reader of
this code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The value returned by wx2stc() in non-Unicode build is a simple "char*" and we
can't call length() method on it, add a helper wx2stclen() function to get the
length from the original wxString itself in this case.
Closes#14013.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
In long running programs the wxEvent time stamp could wrap around resulting in
all mouse wheel events being ignored in wxStyledTextCtrl as the comparison of
the (positive) time until which all the subsequent events were supposed to be
blocked and the (now negative) current event time stamp would be always false.
Fix this by using wxStopWatch::TimeInMicro() to avoid wraparound instead of
wxEvent::GetTimestamp().
Also rename the variable to have a more clear name as the original code wasn't
easy to understand.
Closes#9057.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Revert the changes of r67280 which fixed several typos in these files as they
were getting modified each time gen_iface.py was rerun and we don't want to
touch the original Scintilla files to fix these typos.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Applied patch by snowleopard2 fixing a bunch of typos such as misspellings and double words in the documentation. Combined the patch with some local queued typos waiting to be committed as well as adding new typo fixes inspired by the patch.
Function names with American spelling were not changed nor was third-party code touched. The only code changes involve some changes in strings that are translated ("Can not" -> "Cannot").
Closes#13063 (again).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix the minor version determination for libtiff which was done wrongly by
r66259 and provide a properly formatted description for Scintilla version.
See #12690.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add simple wxVersionInfo class holding the version information.
Also add GetLibraryVersionInfo() static method to wx{JPEG,PNG,TIFF}Handler,
wxStyledTextCtrl and wxXmlDocument classes and wxGetZlibVersionInfo() and
wxGetLibraryVersionInfo() global functions using it.
Closes#12690.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Correct the changes of r65827 to also compile with wxUSE_DRAG_AND_DROP==0
(especially important for the ports without dnd support such as wxX11 and
wxDFB).
Also do the changes in the correct files, i.e. src/stc/stc.{h,cpp}.in and not
in the generated files themselves to prevent them from being overwritten the
next time gen_iface.py is ran.
Finally keep backwards compatibility as SetDragAllowMove(bool) is a public
method so preserve its old semantics and add a new SetDragFlags() instead of
silently breaking the existing code using SetDragAllowMove().
See #11709.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65840 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Drag and drop in wxStyledTextCtrl was broken, apparently since upgrade to
Scintilla 2. Restore it by using the correct wxDrag_XXX constants instead of
boolean values in the code for wxEVT_STC_START_DRAG events generation.
Closes#11709.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65827 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use "wxWindows licence" and not "wxWidgets licence" (the latter doesn't
exist) and consistently spell "licence" using British spelling.
See #12165.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Keep the code for saving and loading text contents from files in a single
place instead of doing it differently in wxTextCtrl and wxStyledTextCtrl.
This required adding Set/GetValue() methods to wxTextAreaBase just so that its
DoLoad/SaveFile() could use them, even if they are the same as wxTextEntryBase
methods and are overridden in wxTextCtrlBase to be implemented in terms of the
latter.
Notice that wxRichTextCtrl might need to be refactored to use this code too in
the future.
Also notice that this reverts the change of r62081 which replaced SetValue()
with ChangeValue() in DoLoadFile() as wxTextAreaBase only has SetValue() and
it's not worth adding ChangeValue() to it too just to preserve this recent
change in behaviour.
Closes#10715.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62139 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
buffer. They behave similarly to the same methods without the "Raw" in
the name, except they don't use wxStrings. This can save some
conversions to/from unicode and utf-8 in a Unicode build.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775