Adjust scrolled contents for screen drawing directly in EVT_PAINT
handler instead of doing so conditionally for generic wxDC.
This also helps demonstrating if wxPaintDC transformations
are transferred properly to wxGCDC.
This code was simplified by 16473d9b19 (Make class used as template
parameter local now that we can, 2022-11-11) but we can simplify it even
more by just getting rid of this class completely and using a small
lambda as the event handler.
No real changes.
Use __func__ without checking if the compiler supports it, it's part of
C++11 and so should be supported by all compilers.
Also use __func__ instead of __WXFUNCTION__ in our own code.
No real changes.
Address a minor TODO-C++11 comment in the dialogs sample by moving the
class declaration into the function using it, now that we don't have to
keep it outside it.
This commit is best viewed with Git --color-moved option.
Get rid of a big amount of non-trivial drawing code at the price of
having to switch to using a control label if the foreground colour is
changed, as we can't change the label colour otherwise now.
The only known drawback of this change is that the box will flicker now
if doubler buffering is disabled. But as long as we do use double
buffering, it shouldn't be a problem.
There is no need to add 1 any more since the changes of 99c52403f9 (Use
usual half-open interval for wxID_LOWEST..wxID_HIGHEST, 2022-10-23), so
don't.
Closes#22923.
It might be unnecessary to define it on command line at all, as it's
done in wx/setup.h, but keep doing it for now.
However stop using a variable for this, as setting wxUSE_UNICODE to 0 is
not supported any longer.
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.
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.
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.
We could, and probably should, set target-level property on wx libraries
instead, but we'll have to increase the minimum required CMake version
to 3.8 in order to be able to do it.
Make GTK notebook log suppression opt-in to avoid a fatal error when the
application calls g_log_set_writer_func() itself, as doing it more than
once immediately kills the application with glib 2.73 and there is no
way to check if it had been already done or not (you have to admire the
purity of the API design here).
This is unfortunate as 99% of the wxWidgets applications that do _not_
call g_log_set_writer_func() would now show the spurious diagnostics by
default again, but preferable to making the remaining 1% crash, and
there doesn't seem to be any other solution.
Call the new GTKAllowDiagnosticsControl() function in the notebook
sample to at least still avoid getting the spurious diagnostic messages
described in #22176 there.
See #22717,.
Replace them with std::string-like equivalents when possible (i.e.
replace Length() with length(), IsNull() with empty()) or, at least,
with wx 2 functions if not (e.g. Remove() with Truncate(), First() with
Find(), LowerCase() with MakeLower() etc).
Closes#22638.
This allows to add application-specific directories to the file dialog.
This commit only contains the implementation for wxMSW and a change
showing the new function in the sample.
When the document was forced to close, OnSaveModified() was still called
and allowed the user to cancel closing the document -- but it was still
closed after OnSaveModified() returned.
Be more upfront about it and tell the user that the document will be
closed anyhow, but still propose them to save it if necessary.
An alternative solution might be to just deprecate "force closing"
entirely, as this seems very user-unfriendly.
This file was removed back in 961a1c2b39 (Remove unused Java class files
without sources from help sample, 2017-10-04) but was left in the bake-
and make-files.
Somehow this didn't create any problems with GNU make, where cp exited
with an error, but make recipe succeeded nevertheless, but it results in
a build error with BSD make.
CMake: Create a config file for use with find_package and use it for
building our own sample, as the config file has the advantage of working
with wx 3.2.0 too, unlike the existing FindwxWidgets.cmake.
See #22536.