Commit graph

73396 commits

Author SHA1 Message Date
Maarten Bent
2af3719a4e
Add new scintilla sources to build systems
Mention updating the CMake file in the readme.
Remove NO_CXX11_REGEX from scintilla build.
Manually update vcxproj files.
Define LPEG_LEXER=0, prevent LPEG_LEXER is not defined error.
2022-10-22 19:05:18 +02:00
Maarten Bent
6c3b0f66f3
Update scintilla to 3.21.1 2022-10-22 19:05:06 +02:00
Vadim Zeitlin
0a33da8058 Fix MSW "Save" dialog overwrite prompt for files without ext
We need to call IFileDialog::SetDefaultExtension() to ensure that the
native dialog itself appends the extension itself to the files entered
without extension it, otherwise it doesn't do it at all, in spite of
SetFileTypes() being already called, and so doesn't show "Confirm
overwrite" prompt for them, while wxMSW own code does append the
extension later, resulting in the existing files being overwritten
without any confirmation.

It would probably be a good idea to stop appending the extension on our
own and just use the one appended by the dialog to ensure that we don't
have similar problems in the future, but don't change this yet.

Closes #22898.
2022-10-21 01:46:58 +01:00
Vadim Zeitlin
0850666ebd Fix wxTaskBarButton availability in the documentation
It's only available under MSW and doesn't have a generic implementation.
2022-10-21 02:21:22 +02:00
Vadim Zeitlin
6e3d4b8766 Correct wxBitmapBundle best match choice description in its docs
Closes #22891.
2022-10-19 14:28:52 +02:00
Vadim Zeitlin
78a041f2ed Merge branch 'ci-avoid-deprec'
Fix deprecation warnings in GitHub Actions CI builds.

See #22888.
2022-10-18 21:59:05 +02:00
Vadim Zeitlin
7ef80d2474 Merge branch 'catch-2.x'
Switch to using CATCH v2 for the tests.

See #22874.
2022-10-18 21:56:52 +02:00
Vadim Zeitlin
2de6e8b191 Merge branch 'generic-treectrl-hidpi'
Generic wxTreeCtrl icons high DPI improvements.

See #22887.
2022-10-18 21:55:32 +02:00
Vadim Zeitlin
f2cfcd3d2f Avoid another warning triggered by the last warning workaround
Initialize a variable to avoid -Wmaybe-uninitialized triggered by using
wxUnusedVar() with it now.
2022-10-18 21:40:48 +02:00
Vadim Zeitlin
0594dfeb72 Update hendrikmuhs/ccache-action to avoid deprecation warnings
Upgrade it to v1.2.3.
2022-10-18 19:48:12 +02:00
Vadim Zeitlin
ddeefc0ff2 Update microsoft/setup-msbuild to avoid deprecation warnings
Upgrade it to v1.1.3.
2022-10-18 19:48:00 +02:00
Vadim Zeitlin
f044e5cab3 Avoid deprecation warnings for gha-setup-vsdevenv action
Switch to a local fork of the action using node 16 and latest
actions/core package as both are necessary to avoid getting deprecation
warnings.
2022-10-18 19:45:15 +02:00
Vadim Zeitlin
f8da25ca45 Switch CMake wxGTK build to Ubuntu 22.04
Avoid warnings about using deprecated Ubuntu 18.04 runner.
2022-10-18 19:17:48 +02:00
Vadim Zeitlin
895dd8424c Avoid harmless -Wunused-variable in unit tests
This warning used to be suppressed in Catch headers, but this is not the
case any longer, so work around it in the tests themselves now.
2022-10-18 18:39:13 +02:00
Vadim Zeitlin
b2050fcb6f Update to Catch v2
Use Catch2 public header instead of using internal Catch v1 headers: we
can do this now because Catch2 supports (albeit in a rather ugly way)
being used with PCH.
2022-10-18 18:39:13 +02:00
Vadim Zeitlin
d5a29e1743 Fix harmless signed/unsigned comparison warning in wxFile test
This warning didn't happen with Catch 1.x, but is given with 2.x, so
avoid it by casting to the correct type.
2022-10-18 18:39:13 +02:00
Vadim Zeitlin
3cff415ba9 Don't compare wide strings with narrow ones in the tests
This works with Catch 1.x, but not with Catch2, which seems to behave
more closely to the "real" comparisons.
2022-10-18 18:39:13 +02:00
Vadim Zeitlin
a3331c87d0 Stop using Catch::toString()
This function doesn't exist in Catch2 any longer, so prepare for the
upgrade by stopping to use it and converting things to string more
explicitly.

No real changes yet.
2022-10-18 18:39:13 +02:00
Vadim Zeitlin
715b2cd48c Use wxSTATEMENT_MACRO_BEGIN/END in wx/catch_cppunit.h
This is more clear and doesn't rely on internal Catch::alwaysFalse()
which doesn't exist in Catch v2.x any more.
2022-10-18 18:39:13 +02:00
Vadim Zeitlin
3699dcf6b3 Check for adding NULL macro too
This might be too coarse, e.g. NULL is still needed in C code, so this
might need to be restricted to C++ files only later.
2022-10-18 18:36:30 +02:00
Vadim Zeitlin
9f46e67eec Merge branch 'nullptr'
Use nullptr instead of NULL in the code, comments and the documentation.

See #22881.
2022-10-18 18:34:07 +02:00
Vadim Zeitlin
c2eab06e4b Merge branch 'remove-motif-and-gtk1'
Remove obsolete and unmaintained wxMotif and wxGTK1 ports.

See #22877.
2022-10-18 18:30:58 +02:00
Vadim Zeitlin
6f6dde9121 Use wxDCClipper instead of manual DestroyClippingRegion()
No real changes, just avoid manual cleanup and use a RAII helper
instead.
2022-10-18 18:26:20 +02:00
Vadim Zeitlin
3d5078cefb Remove commented out code using GetImageList()
No real changes, just remove final mentions of GetImageList() as this
function shouldn't be used at all -- and now is not, any longer.
2022-10-18 18:08:09 +02:00
Vadim Zeitlin
4f076dc51c Check for any images presence in wxGenericTreeCtrl
Use HasImages() instead of GetImageList() as the goal here is to check
if we have any images and not whether we specifically have an image
list.
2022-10-18 18:08:08 +02:00
Vadim Zeitlin
65e4be6f82 Add wxWithImages::GetImageLogicalSize() helper too
This is similar to the just added GetImageBitmapFor() and works both
when using legacy wxImageList and wxBitmapBundle.

Use the new function in wxGenericTreeCtrl code.
2022-10-18 18:08:08 +02:00
Vadim Zeitlin
306a982e9a Support high DPI state, button bitmaps in wxGenericTreeCtrl too
This is similar to the grandparent commit for the normal bitmaps and
uses the version of the icon appropriate for the current DPI instead of
always scaling up the normal-sized image.
2022-10-18 18:08:08 +02:00
Vadim Zeitlin
087fc9fc5c Add helper wxWithImages::GetImageBitmapFor()
This function is simpler to use than calling GetBitmapBundle() first and
then calling GetBitmapFor() on it, avoids creating a temporary
wxBitmapBundle unnecessarily when wxImageList is used and, most
importantly, is public and not protected, which will allow
wxGenericTreeCtrl to use it for the other image lists than the main one.

The slightly unwieldy name is due to trying to use "Image" in all public
functions of this class, which should hopefully minimize clashes with
any user-defined functions that may exist in the classes deriving from
it, without requiring the use of even uglier "WX" prefix.

No real changes yet.
2022-10-18 18:06:53 +02:00
Gerhard Stein
6ba09fc580 Render icon correctly in high DPI in wxGenericTreeCtrl
Retrieve the icon of the size corresponding to the current DPI from
wxBitmapBundle instead of always scaling up the icon with the default
size.

Closes #22879.
2022-10-18 16:04:45 +02:00
Vadim Zeitlin
2ebd4a6f8d Add check for obsolete macros to automatic code style checks
Avoid checking in code using wxOVERRIDE or wxNOEXCEPT again, now that
we've got rid of them.
2022-10-18 02:23:01 +02:00
Vadim Zeitlin
8afec036ee Replace wxOVERRIDE with override in Objective-C++ files too
This completes the changes of 88d526660f (Replace wxOVERRIDE and
wxNOEXCEPT with override and noexcept, 2022-10-12).
2022-10-18 02:18:43 +02:00
Vadim Zeitlin
23b0c7f9d2 Enable -Wzero-as-null-pointer-constant in wx headers
This warning shouldn't need to be disabled any longer now that we use
nullptr instead of NULL.
2022-10-18 01:25:25 +02:00
Vadim Zeitlin
4f4c5fcfdf Use nullptr instead of NULL in the code and documentation
This is a combination of running clang-tidy with modernize-use-nullptr
check for some ports (GTK, X11, OSX) and manual changes to the ports for
which it couldn't be used easily (MSW, DFB) and also manually updating
the docs.

Also replace NULL with null or nullptr in the comments as this is more
consistent with the use of nullptr in the code and makes it simpler to
grep for the remaining occurrences of NULL itself.

And also use null in the assert messages.

Only a few occurrences of "NULL" are still left in non-C files, mostly
corresponding to unclear comments or string output which it might not be
safe to change.
2022-10-18 01:25:25 +02:00
Vadim Zeitlin
e3cf23e945 Merge branch 'msw-composited-fixes'
Fix regressions in wxMSW after enabling WS_EX_COMPOSITED and document
this change.

See #22882.
2022-10-18 00:38:09 +02:00
Vadim Zeitlin
c9a6c55dad Merge branch 'deprecate-wxqsort'
Deprecate never used wxQsort() function.

See #22884.
2022-10-18 00:37:29 +02:00
Vadim Zeitlin
59cb83ea17 Don't use wxOVERRIDE in generated wxSTC files
This should have been done together with 88d526660f (Replace wxOVERRIDE
and wxNOEXCEPT with override and noexcept, 2022-10-12).
2022-10-18 00:29:29 +02:00
Vadim Zeitlin
ec830fffec Deprecate wxQsort()
This function is not really useful and doesn't seem to be used anywhere.
2022-10-17 18:51:20 +02:00
Vadim Zeitlin
7e73d4e198 Remove commented out code from wxGTK wxDataViewCtrl
This code has been unused since 2009, so it's probably not very useful
to keep it there.

No real changes.
2022-10-17 18:48:02 +02:00
Vadim Zeitlin
a482a310a3 Remove documentation of wxPostDelete()
This function not only doesn't exist, but seems to never have existed at
all.

Not really sure what happened here, but we definitely don't need to
document it any more.
2022-10-17 18:45:52 +02:00
Vadim Zeitlin
e5d999963d Remove wxQSORT_DECLARED hack
This is not needed any longer since we don't need wxQsort() in
wx/vector.h any more after eb97bf90e4 (Remove custom wxVector
implementation, 2022-10-11).
2022-10-17 18:38:15 +02:00
Vadim Zeitlin
b0ed71658d Document WS_EX_COMPOSITED impact on wxClientDC
This is a big and incompatible change but, arguably, is still worth
making because it makes wxMSW behaviour similar to that of wxOSX and
wxGTK when using Wayland.

Do document it prominently and also document MSWDisableComposited() as
it will probably end up being used in quite a lot of existing code.
2022-10-17 17:22:43 +01:00
Vadim Zeitlin
3a7394fe08 Disable use of composition in forty demo under MSW
This is ugly but allows the carts to be visible while they're being
dragged again under MSW.

The game still doesn't work at all under GTK/Wayland (and probably
macOS).
2022-10-17 15:42:56 +01:00
Vadim Zeitlin
9261816feb Disable compositing when using wxDragImage
ImageList_BeginDrag() doesn't seem to be compatible with the use of
WS_EX_COMPOSITED, so turn it off when using it.

We probably could turn it back on again in EndDrag(), but for now keep
things simple and just fix the regression which resulted in wxDragImage
not working at all any more since d4ced54755 (Merge branch
'msw-double-buffer', 2022-10-15).
2022-10-17 13:33:16 +01:00
Vadim Zeitlin
b5d434dc91 Move wxListCtrl::MSWResetParentComposited() to wxWindow
This function will need to be used from other places too, so make it
available in the base class itself.

Also disable WS_EX_COMPOSITED for this window itself too.
2022-10-17 13:31:28 +01:00
Vadim Zeitlin
39ea524943 Replace a reference to a very old SourceForge ticket number
Not sure if it's the exact same ticket or if it's even relevant 18 years
later, but it seems to be close.
2022-10-16 23:40:34 +02:00
Vadim Zeitlin
ff629f3853 Fix drawing wxListCtrl since enabling double buffering by default
We need to avoid using WS_EX_COMPOSITED for any of the parents of this
native control and not just for the control itself.
2022-10-16 21:26:33 +01:00
Vadim Zeitlin
cd637663c8 Add wxWindow::MSWAfterReparent() virtual function
Refactor the existing code to extract the part of Reparent() updating
the new parent style to an overridable virtual function.

No real changes yet.
2022-10-16 21:16:13 +01:00
Vadim Zeitlin
fb4f0b590c Remove wxGTK1 port and GPE support
Remove the port files and references to it from the common headers and
elsewhere.

Also remove GPE (GNOME PDA Environment) support as libgpewidget is
unmaintained since 2006 or so and has never been really used.

Use __WXGTK__ to test for any version of wxGTK now. Still define
__WXGTK20__ for compatibility, but always define it now and don't test
for it in the library code.
2022-10-16 22:01:02 +02:00
Vadim Zeitlin
0ef1cdcc21 Remove support for wxMotif
This port hasn't been updated for ages and is not used by anybody any
longer, so remove its code to facilitate maintenance.

Also remove references to this port from the documentation and most of
the other places (VMS-specific descrip.vms files still check for it
because it's not clear how to update them all), including configure.

Regenerate the latter and rebake all makefiles.

Finally document that this port is not available any longer.
2022-10-16 16:39:56 +02:00
Vadim Zeitlin
041060d0de Remove a very obsolete and unused "publicity" document
Its contents has become embarrassingly obsolete by now.
2022-10-16 15:30:29 +02:00