Commit graph

7058 commits

Author SHA1 Message Date
Vadim Zeitlin
e89f05faba Remove memory debugging/tracing support and all related options
Drop disabled by default and pretty useless memory tracing code and all
the overlapping and poorly documented build options related to it.

Remove memory.cpp entirely and update all the make/project files, but
preserve the now completely trivial wx/memory.h for compatibility and
also keep including wx/string.h from wx/object.h as it seems like a lot
of existing code actually depends on this, even if it should not.

Replace the options in the propgrid sample with a couple of other
debug-related options that were not used before to avoid leaving the
"Debugging Section" completely empty.
2023-01-05 21:41:38 +01:00
Vadim Zeitlin
d74c9e51da Remove memcheck sample
This sample wasn't really useful and demonstrated functionality which
was disabled by default since many years and will be completely removed
soon.
2023-01-05 18:24:57 +01:00
Vadim Zeitlin
b7f24a65d8 Rebake after the copyright year update
This should have been part of f5daf28932 (Update copyright years to
2023, 2023-01-03).
2023-01-03 18:39:06 +01:00
Vadim Zeitlin
f5daf28932 Update copyright years to 2023
Just run misc/scripts/inc_year and commit the results.

See #18690.
2023-01-03 04:15:08 +01:00
Vadim Zeitlin
79e97bd4ca Merge branch 'msw-dlls-arch-suffix'
Include arch-specific suffix in the DLLs names in makefile.vc too.

See #23053, #23093.
2022-12-31 17:02:07 +01:00
Vadim Zeitlin
8120d3f75d Merge branch 'avoid-unused-var-warnings' of https://github.com/PBfordev/wxWidgets
Avoid unused variable warnings.

See #23077.
2022-12-29 01:43:41 +01:00
Vadim Zeitlin
53935f6607 Improve stc sample appearance in dark mode
This shows one possible way of adapting the application to support dark
mode, using the default for/background colours and SelectLightDark() for
the custom ones.

Note that this replaces "background" field of the styles in this sample
as it was never used (more precisely, was always specified as "WHITE")
with the new "foregroundDark" field which is set pretty arbitrarily but
differently enough from the foreground used in light mode for the sample
to look better in dark mode.

Also remove some duplicated code for setting styles and remove the code
for setting the defaults completely, as this is unnecessary, and even
harmful, after the changes of the previous commit.
2022-12-28 23:53:06 +00:00
Vadim Zeitlin
e0db72d80e Include arch-specific suffix in the DLLs names in makefile.vc too
This is similar to edcfeab29d (Include arch-specific suffix in the DLL
names in CMake builds too, 2022-12-23).

See #23053.
2022-12-28 22:06:41 +01:00
Vadim Zeitlin
208142c14a Merge branch 'msw-dark-mode'
Add experimental support for dark mode for wxMSW.

See #23028.
2022-12-27 22:20:34 +01:00
Vadim Zeitlin
a7b39f63b3 Send wxEVT_SYS_COLOUR_CHANGED on dark/light theme change in wxMSW
wxOSX already does it, so do it in wxMSW too for consistency and because
it seems useful to be able to react to the same event in all cases.

Update the drawing sample to refresh its system colours scheme whenever
the theme is changed.
2022-12-26 22:10:32 +00:00
Vadim Zeitlin
7ce2ba9b0c Add wxSystemAppearance::AreAppsDark() and IsSystemDark()
This allows to determine if dark mode is enabled (for the applications
and/or the system UI itself, respectively) system-wide which is useful
now that IsDark() returns false unless MSWEnableDarkMode() is called.

Also document the incompatible change to IsDark().
2022-12-26 22:02:11 +00:00
PB
b4a29dfab7 Remove unused variable from the dialogs sample 2022-12-24 12:49:09 +01:00
Tobias Taschner
db9419af4b
Add wxWebView::EnableBrowserAcceleratorKeys()
The edge backend has various accelerator keys enable per default.
This include Ctrl-P, Ctrl-F, F5 and others. In many uses of webview
this might not be desirable and can be disabled.

This is currently only implemented for the Edge backend.

Raises required WebView2 SDK version from 1.0.705.50 to 1.0.864.35
2022-12-23 14:12:36 +01:00
Artur Wieczorek
cf661f9293 Specify what is the limit set by wxPGProperty::SetMaxLength()
It needs to be stated clearly that the limit applies only to the text
the user can enter in the editor associated with property.
This constraint does not apply to the length of text represenations
of values set programmatically.
Corresponding test were added.
2022-12-22 20:53:44 +01:00
Vadim Zeitlin
5bc7ffd8c7 Suppress -Wnonnull warning in the except sample
We really want to crash here, so disable the helpful warning that tries
to prevent us from doing it.
2022-12-18 23:21:19 +01:00
Vadim Zeitlin
92a076b12b Avoid -Wunused-result in the except sample
MinGW gcc 12 started giving this (useful) warning in STL build because
its std::vector::operator[] is declared with nodiscard attribute, but we
really don't want to use the result here, so suppress it.
2022-12-18 02:10:12 +01:00
ali kettab
51d813cab7 wxQt: Make wxListCtrl::SetColumnWidth() conformant to documentation
Also update the listctrl sample to show it's effect on the second column
wxLIST_AUTOSIZE (Ctrl+R) to resize the column to content
wxLIST_AUTOSIZE_USEHEADER (Ctrl+Shift+R) to resize it to header section
2022-12-10 18:48:07 +01:00
Vadim Zeitlin
d05a909c58 Merge branch 'msw-composited-parent'
Fixes for using WS_EX_COMPOSITED in wxMSW.

See #23002.
2022-12-04 01:04:27 +01:00
Artur Wieczorek
1d85e22543 Implement new wxPGProperty::HasAnyChild() method
There are many checks in the code whether wxPGProperty has any child.
Doing so by checking if GetChildCount() is greater than zero doesn't
seem to express intent simply and clearly. With dedicated method this
could be done simpler and hopefully in a more optimal way.
2022-12-03 17:15:28 +01:00
Artur Wieczorek
2cc7f7d8d7 Use default ctor's and dtor's instead of those with empty bodies 2022-12-03 17:15:28 +01:00
Artur Wieczorek
48d226bb84 Adjust scrolled contents only for wxPaintDC (drawing sample)
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.
2022-11-29 18:41:08 +01:00
Vadim Zeitlin
c5f613c941 Revert "Remove wxStaticBox custom drawing code entirely"
This reverts commit 616586f301 because it
turns out that using WS_EX_TRANSPARENT is incompatible with using
WS_EX_COMPOSITED (see parent commit).

Reintroducing all this code is painful, but there doesn't seem to be any
way of avoiding to have it as long as we use WS_EX_COMPOSITED. If we
stop using this style, we could revert this commit, this re-applying the
original change.

Closes #22982.
2022-11-28 19:04:59 +00:00
Vadim Zeitlin
20bbc43a20 Redefine wxTRANSPARENT_WINDOW as 0 and stop using it
This style never did anything useful in wxMSW and did nothing at all in
all the other ports, so always was rather useless, but became actively
harmful not that WS_EX_COMPOSITED is used in wxMSW because using it and
WS_EX_TRANSPARENT, enabled by wxTRANSPARENT_WINDOW, together doesn't
work and results in an endless stream of WM_PAINT messages being sent to
the _siblings_ of the window with wxTRANSPARENT_WINDOW style.
2022-11-28 19:04:56 +00:00
Vadim Zeitlin
f8ce99bf66 Merge branch 'more-cxx11-fixes'
More simplifications that are possible now that C++11 is required.

No real changes to the behaviour.

See #22962.

Closes #22684.
2022-11-12 18:03:12 +01:00
Vadim Zeitlin
699042a272 Remove EnterHandlingTextCtrl class from the dialogs sample
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.
2022-11-11 13:58:18 +01:00
Vadim Zeitlin
0f6c54cdb6 Define __WXFUNCTION__ as __func__ and don't use it any more
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.
2022-11-11 01:24:13 +01:00
Vadim Zeitlin
16473d9b19 Make class used as template parameter local now that we can
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.
2022-11-11 00:34:40 +01:00
Vadim Zeitlin
616586f301 Remove wxStaticBox custom drawing code entirely
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.
2022-11-09 15:50:43 +00:00
Vadim Zeitlin
fec8c06a53 Merge branch 'drop-ansi'
Remove support for "ANSI" build not using Unicode.

See #22920.
2022-10-29 18:09:00 +02:00
Vadim Zeitlin
0d6f2f2b85 Remove wxSuffix from MSBuild files, it's always "u" now
This doesn't change the library names, but just removes the now
unnecessary (and somewhat confusing when used alongside wxSuffixDebug)
build variable.
2022-10-28 18:26:15 +01:00
Blake Madden
9c76bc27c0 Use wxID_HIGHEST instead of wxID_HIGHEST+1 in samples
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.
2022-10-28 01:43:46 +02:00
Vadim Zeitlin
c78b0d652b Remove UNICODE build option, hardcode its value as 1
Also hardcode "u" suffix for the library names -- it doesn't make sense
any longer, but we need to keep it for compatibility.
2022-10-27 19:43:59 +02:00
Vadim Zeitlin
6e8290a9ce Stop defining _UNICODE in makefiles
This shouldn't be necessary any longer, so don't do it.
2022-10-27 19:43:30 +02:00
Vadim Zeitlin
53b3b979fe Remove tests for _UNICODE too
It is now always defined, so testing for it is useless.

Give an error in MSVC-specific header if it is not defined as it should
be.
2022-10-27 19:43:30 +02:00
Vadim Zeitlin
4519d8e08a Remove wxUSE_UNICODE checks as they're always true now
Also remove all code guarded by "#if !wxUSE_UNICODE".
2022-10-27 19:43:30 +02:00
Vadim Zeitlin
5c49448c75 Remove bakefile UNICODE_DEFINE variable, always define _UNICODE
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.
2022-10-27 19:43:30 +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
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
PB
88d526660f Replace wxOVERRIDE and wxNOEXCEPT with override and noexcept
Don't use deprecated macros in wxWidgets itself.
2022-10-15 18:10:45 +02:00
Vadim Zeitlin
d517a48c31 Require C++11 in the minimal sample CMakefile too
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.
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
1cf49f9909 Remove MSVS 2005 and 2008 project files
These compilers are not supported any longer.

Also disable their regeneration in Bakefiles.bkgen.
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
d05e4b6616 Rebake webview sample makefiles after recent changes
This corresponds to the changes done in samples/webview/webview.bkl in
0adf31169d (Add advanced handler to webview sample, 2022-09-14).

See #22797.
2022-10-09 23:54:38 +02:00
Vadim Zeitlin
a818e505c4 Add "Process Enter" checkbox to bitmap combo widgets sample page
Allow toggling wxTE_PROCESS_ENTER and even set it by default -- and turn
off wxCB_READONLY which was set by default for some reason.
2022-10-05 19:44:09 +01:00
Vadim Zeitlin
ffbcbd78b1 Show details of key events in the control in dataview sample
This is just to make it more obvious that we get these events.

See #15377.
2022-10-03 20:02:58 +02:00
Vadim Zeitlin
99f5ea62f9 Allow checking wxDataViewCtrl::HitTest() result in the sample
Call HitTest() for the current mouse position when Ctrl-M is pressed to
allow testing whether this function works correctly.
2022-10-03 02:42:38 +02:00
Tobias Taschner
0adf31169d
Add advanced handler to webview sample
Demonstrate how to implement and use wxWebViewHandler::StartRequest()
2022-09-16 21:00:52 +02:00
Jouk
966ebcc93d Do not call GTKAllowDiagnosticsControl() for gtk<2.0 2022-09-02 12:28:17 +02:00
Vadim Zeitlin
ef6ee28876 Merge branch 'gtk-log'
Fix crash when using wxNotebook in applications calling
g_log_set_writer_func() with glib 2.73+

See #22753.
2022-08-30 12:19:31 +02:00
Vadim Zeitlin
de345d33b2 Merge branch 'docview-onclosedoc'
Improvements to closing wxDocument: don't call OnCloseDocument() twice.

See #22627.
2022-08-30 11:12:58 +01:00