Commit graph

540 commits

Author SHA1 Message Date
Vadim Zeitlin
1b4dfc292a Merge branch 'vlistbox-current-accessors' of https://github.com/wsu-cb/wxWidgets
wxVListBox: add GetCurrent()/SetCurrent() accessors.

See #24204.
2024-01-22 21:41:28 +01:00
Bill Su
a3951b6863 wxUniv: wxWindow: rename SetCurrent() to WXMakeCurrent()
avoid name conflicts between port-specific function and
wxVListBox::SetCurrent()
2024-01-17 00:52:01 -05:00
Vadim Zeitlin
ff59ef301b Merge branch 'master' into webview-chromium 2024-01-17 00:22:39 +01:00
Paul Cornett
ce1d317768 Remove GLU dependency
See #23721
2023-12-28 14:49:42 -08:00
Vadim Zeitlin
e90817930a Merge branch 'master' into webview-chromium 2023-11-30 18:30:26 +01:00
Vadim Zeitlin
dede4b9326 Use "= default" for all trivial default ctors and dtors
Replace user-specified empty constructors and destructors with the
compiler-generated versions, which has a number of advantages for code
generation, in addition to being more clear.

Closes #22965.

Closes #24058.
2023-11-17 01:33:32 +01:00
Vadim Zeitlin
e43f913313 Remove all blank "Modified by:" lines from top comment blocks
Having this line is not useful at all as it doesn't contain any
information and shouldn't be filled in the future as git-shortlog can
provide the information about people who changed the given file more
more reliably than consulting the comments in any case.

Keep the non-blank lines for historical purposes.
2023-10-22 01:22:48 +02:00
Vadim Zeitlin
b6bfdd97c9 Merge branch 'master' into webview-chromium
Update to the latest master.
2023-08-30 02:03:00 +02:00
PB
10d09ec2b2 Remove outdated parts from build system
Remove support for unsupported MSVS versions earlier than 2015
and Windows versions earlier than 7 from CMake build as they are not
supported any longer.

Also update wxUSE_GRAPHICS_GDIPLUS and wxUSE_GRAPHICS_DIRECT2D comments
in wxMSW setup.h to remove mentions of unsupported Windows XP but do
mention that MinGW-w64 can use Direct2D.

Closes #23787.
2023-08-24 15:15:57 +02:00
Brian Nixon
567a66aac2 Remove dependency of wxUSE_SOCKETS on wxUSE_STOPWATCH
It isn't actually needed, so don't check for it in wx/chkconf.h and
remove the comment claiming that it is from various setup.h files.

Closes #23609.
2023-06-05 15:13:21 +02:00
Vadim Zeitlin
20b3c887f5 Improve wxUSE_STD_IOSTREAM documentation
Clarify that it is 1 by default in the documentation, instead of
implying that it's off by default and needs to be enabled.

Improve the description of this option in setup.h files.

And also document this compilation option in the summary page.
2023-04-28 15:26:46 +02:00
Vadim Zeitlin
7824391f64 Merge branch 'use-std-containers'
Remove avoidable uses of legacy container classes by replacing them with
the standard containers.

See #23440.
2023-04-17 17:02:27 +02:00
Vadim Zeitlin
889845fbc4 Add support for wxNO_IMPLICIT_WXSTRING_CONV_TO_PTR to wxString
This symbol is similar to the existing wxNO_IMPLICIT_WXSTRING_ENCODING
and can be defined when building the application (as opposed to when
building the library) to disable implicit wxString conversions to
pointer types, i.e. char*, wchat_t* and void*.

This makes the just added wxUSE_CHAR_CONV_IN_WXSTRING library build
option unnecessary, so remove it.
2023-04-16 01:16:56 +02:00
Vadim Zeitlin
35c35c235e Remove wxUSE_STL which is not really used any longer
wxString is always based on std::[w]string since 2c0c727f49 (Remove wx
own wxStringImpl implementation, 2022-11-16) and all containers use
standard containers by default too now -- and there is a separate
wxUSE_STD_CONTAINERS for this anyhow.

The only remaining use of wxUSE_STL was as the default value for
wxUSE_STD_STRING_CONV_IN_WXSTRING option, but it's not really needed
for this neither, and this option can just be set to 0 by default.

Also add wxUSE_CHAR_CONV_IN_WXSTRING which can now be set to 0 too to
disable all unwanted implicit conversions (even "safe" ones, to wide
strings, in addition to the unsafe ones to narrow strings that could be
already disabled with wxUSE_UNSAFE_WXSTRING_CONV) to allow people who
don't want to have any implicit conversions at all to do it.

Keep --enable-stl configure option for compatibility, but warn if it is
used to tell people that it is not needed any longer.
2023-04-15 17:22:09 +02:00
Vadim Zeitlin
70a342a602 Stop using object array in wxUniv wxMenuBar implementation
Replace it with a simple vector of wxMenuInfo objects.

Also don't export these objects from the shared library, this is
completely unnecessary.

Note that this required moving wxMenuBar ctor and a method using the
vector directly out of line, as vector of objects of incomplete type
must not be used from the header.
2023-04-12 18:09:48 +01:00
Vadim Zeitlin
e273d45c9b Enable use of the standard container classes by default
This is mostly, even if not completely, compatible with the previous
default build using wxUSE_STD_CONTAINERS=0, so try enabling this by
default again. Hopefully it should work better now than the last time we
tried it, see 01871bf642 (Add wxUSE_STD_CONTAINERS and turn it on by
default., 2011-03-30) and the subsequent 7311debd0d (Don't use the
standard containers by default., 2011-05-13).

See #22718.
2023-04-10 17:00:32 +01:00
Vadim Zeitlin
0677d493df Add wxUSE_UNICODE_UTF8 to wx/setup.h
This option can also be used under MSW, so move it to the common setup.h
instead of having it in setup.h.in only.

Also do the same thing for wxUSE_UTF8_LOCALE_ONLY, even if it's less
clear if this one is really useful in non-Unix environment.
2023-03-24 19:18:30 +01:00
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
c2f3a3db01 Always use wxDynamicLibrary in wxMSW and remove checks for it
Force wxUSE_DYNLIB_CLASS to be 1 when using wxMSW and remove checks for
it being 0 from the code.

No real changes.
2022-12-04 02:12:22 +00:00
Vadim Zeitlin
be7860c766 Remove wxUSE_STD_STRING and wxUSE_STD_CONTAINERS_COMPATIBLY
Assume they are always 1 now, there is no good reason to ever set them
to 0 any more.

Note that we still keep wxUSE_STD_IOSTREAM for now, but we can drop
wxUSE_STD_DEFAULT as it's not worth having it just for this single
option (previously it was used as the default value for 3 of them).
2022-11-17 00:40:50 +01:00
Vadim Zeitlin
20571f07e2 Get rid of platform-specific wxPanel classes
There is no need to have them as they were identical for all platforms.

This basically reverts 5b87bd6c0b (Split wxPanel in wxPanelBase and
platform-specific files., 2011-03-20) as, 10+ years later, it turns out
that we're not going to have more MSW-specific parts, but none of them.

No real changes.
2022-11-12 21:54:35 +01:00
Vadim Zeitlin
544855c5ea Remove unused IsCanvasWindow() from wxUniv
This function existed but was never used, so just remove it.
2022-11-12 21:50:48 +01:00
Gerhard Gruber
065ff2d2d8 Add wxNotebook::GetTabRect() to retrieve the tab position
This function is currently only implemented in wxMSW and wxUniv and just
asserts under the other platforms.

Also add a helper GetTabOrientation().

Update the documentation and add a minimal test case for the new
function.

Closes #22941.
2022-11-10 16:43:43 +01:00
Vadim Zeitlin
b4b23ac423 Merge branch 'always-use-thread-local'
Always use thread_local as we can rely on compiler TLS support working
under Windows 7 and later.

There are some known problems in MinGW thread local variable support,
but they only affect (obsolete) 32-bit builds and will hopefully be
fixed in this compiler soon.

See #22917.
2022-11-10 16:32:42 +01:00
Vadim Zeitlin
5d3e5ccf32 Always define wxUSE_UNICODE as 1
Remove the option allowing to set wxUSE_UNICODE to 0.
2022-10-27 01:04:15 +01:00
Vadim Zeitlin
4e802e6fc7 Remove wxUSE_COMPILER_TLS and always use C++11 thread_local
Don't use compiler-specific __thread and use the standard keyword
instead.

Keep the existing TLS-related macros for compatibility, but remove our
custom implementation of them, so that they're always trivial now.
2022-10-26 03:31:54 +02:00
PB
c22f6ba4fc Update comments in setup_inc.h and various wx/setup.h files
Update the outdated or just plain incorrect comments.

Closes #22857.
2022-10-23 15:00:38 +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
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
924db833f4 Require MSVS 2015+ and remove checks for earlier versions
Simplify the code checking for _MSC_VER or __VISUALC__ or using
wxCHECK_VISUALC_VERSION() macro (which is not very useful any longer,
but keep it in case we need it again in the future).
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
7ee8ea2d5b Update wxMSW-specific options in wxUniv setup.h
This section of the file wasn't updated when rerunning update-setup-h,
add the missing line to it and commit the results of rerunning it.
2022-10-11 00:02:29 +02:00
Vadim Zeitlin
1e26cbfcaf Always set wxUSE_GRAPHICS_CONTEXT to 1 by default
Don't bother with compiler and gcc version check, all compilers should
provide GDI+ headers/libraries by now.
2022-10-11 00:02:29 +02:00
Lauri Nurmi
66916c74a3 Fix double negatives used with 'neither' in docs and comments
In many cases it should be 'either', and 'nor' should be 'or'
accordingly.

No changes to actual code.

Closes #22723.
2022-08-19 16:22:21 +02:00
Artur Wieczorek
5e2da5a106 Get rid of v2.8 code 2022-08-02 08:26:29 +02:00
Artur Wieczorek
8a64c8abdc Remove v2.8 compatibility flag, add v3.2 flag 2022-08-02 08:26:04 +02:00
Vadim Zeitlin
c0dbe808a6 Move SetBitmap() and GetBitmap() to wxMenuItemBase
Ensure that all derived classes have these functions and let them to
avoid defining them if they can just use the default implementation,
which was the case for most ports.

Also move m_bitmap to the base class from the derived ones.

No real changes.
2022-06-16 01:09:43 +01:00
Vadim Zeitlin
7f3baa9abf Rename wxMenuItem::m_bmpChecked to m_bitmap in wxMSW and wxUniv
These two ports were the only ones to use something other than m_bitmap
for wxBitmapBundle storing the item bitmap, rename it for consistency
with the other ports and to allow moving this field into the base class
in the upcoming commit.

No real changes.
2022-06-14 18:27:07 +01:00
Maarten Bent
931370f0ad Add NanoSVG setup options
An option to enable or disable using NanoSVG for rasterizing SVG files.
And an option to indicate an external NanoSVG library is used.
2022-05-05 22:15:49 +02:00
Vadim Zeitlin
5fcea04d71 Take wxBitmapBundle in wxMenuItem::SetBitmap() in all ports
Update the remaining ports to take wxBitmapBundle rather than wxBitmap
as well to make their API consistent with the tier 1 ports -- even if
there is no actual support for choosing the resolution-appropriate
bitmap in them yet.
2022-02-20 18:06:09 +01:00
Tobias Taschner
57ebad4f7d
Allow usage of static loader with wxWebViewEdge
Add a new build option wxUSE_WEBVIEW_EDGE_STATIC.
If it is set to 1 the WebView2 loader is static linked into the binary
and removes the runtime dependency on WebView2Loader.dll.
2022-02-07 22:49:33 +01:00
Vadim Zeitlin
3abec9254f Take wxBitmapBundle in wxStaticBitmap::SetBitmap()
This allows using higher resolution bitmaps when using high DPI
automatically in this control too.
2021-10-26 00:11:57 +02:00
Vadim Zeitlin
b403624f22 Add common implementations of wxStaticBitmap icon methods
Instead of defining them, slightly differently, in all the non-MSW
ports, define them once in wxStaticBitmapBase.

No real changes, this is just a simplification.
2021-10-25 13:40:18 +01:00
Vadim Zeitlin
1fb7b13812 Fix typo in "class" in wxUSE_STOPWATCH comment
Closes https://github.com/wxWidgets/wxWidgets/pull/2556
2021-10-22 01:42:53 +02:00
Vadim Zeitlin
4e5d2d97e2 Allow using wxBitmapBundle for wxButton bitmaps
Take wxBitmapBundle in wxButton::SetBitmapLabel() and related functions
in order to be able to associate several bitmaps to be used in different
resolutions with the button, instead of just a single bitmap.
2021-10-18 11:50:10 +02:00
Vadim Zeitlin
af1069374e Merge branch 'bitmap-bundle'
Add wxBitmapBundle and use it in wxToolBar.

See https://github.com/wxWidgets/wxWidgets/pull/2535
2021-10-05 18:58:18 +02:00
Vadim Zeitlin
97f6c85d9b Add first version of wxBitmapBundle and use it in wxToolBar
This first version provides only a generic implementation of
wxBitmapBundle using a collection of bitmaps and only supports using it
in wxToolBar in wxMSW and wxGTK.

More methods of creating wxBitmapBundle will be provided later and more
functions taking wxBitmap will be changed to take wxBitmapBundle later
too and, of course, all the other ports will be updated to use the new
API too.
2021-10-05 15:49:43 +01:00
Blake Madden
668a2186cd Fix comment typos in sources
No real changes.

Closes https://github.com/wxWidgets/wxWidgets/pull/2541
2021-10-03 17:07:44 +02:00
Vadim Zeitlin
d9ea30cf84 Always set wxUSE_SPELLCHECK to 1 by default for simplicity
It does no real harm to set it to 1 and this avoids the need for the
platform checks in setup.h files, simplifying things (although it does
require checking for GTK 3 in the code compiled for both GTK 2 and 3, as
gtkspell library can only be used with GTK 3).
2021-08-23 14:16:16 +02:00
iwbnwif
472aec2d7e Add support for using native spell checking in wxTextCtrl
Add wxTextCtrl::EnableSpellCheck() and implement it for wxMSW and
wxGTK3.

Closes #17544.
2021-08-23 14:15:38 +02:00
Vadim Zeitlin
5d0b3c1129 Merge branch 'univ_textctrl_fixtest' of https://github.com/Kvaz1r/wxWidgets
Fix multiple problems in wxUniv wxTextCtrl, allowing it to pass more
unit tests.

See https://github.com/wxWidgets/wxWidgets/pull/2447
2021-08-17 23:47:03 +02:00