Commit Graph
77516 Commits
Author SHA1 Message Date
Blake-Madden d8ba9ce111 Implement wxTextCtrl::SearchText() for wxGTK3
Closes #24897.
2025-01-08 18:24:18 +01:00
Blake-Madden e314f2c4ba Fix comment in wxMSW wxTextCtrl::SearchText()
No real changes.

See #24897.
2025-01-08 18:02:55 +01:00
Vadim Zeitlin bb17ec57b3 Stop using -single_module option with macOS linker
It's default since 10.4, apparently, i.e. is not necessary on any of the
systems supported by wxOSX, and results in warnings about using it
unnecessarily in the recent ld versions.

See #25054.
2025-01-08 18:00:26 +01:00
Vadim Zeitlin afa366eafb Merge branch 'qt-enter-leave-events' of https://github.com/AliKet/wxWidgets
Fix wxEVT_{ENTER,LEAVE}_WINDOW events generation in wxQt and add a test
for them.

See #24883.
2025-01-08 17:32:30 +01:00
Blake-Madden cac1fc8e67 Clarify the continued use of wxLocale
CMake builds / ${{ matrix.name }} (-DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe, Ninja, SOME, CONSOLE_ONLY, Windows MSVC, 1, windows-latest) (push) Waiting to run
CMake builds / ${{ matrix.name }} (-DCMAKE_SYSTEM_NAME=iOS -DCMAKE_FIND_ROOT_PATH=/usr/local -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO, Xcode, OFF, OFF, macOS 14 wxIOS, macos-14) (push) Waiting to run
CMake builds / ${{ matrix.name }} (Unix Makefiles, ALL, Ubuntu 22.04 wxGTK 3, ubuntu-22.04) (push) Waiting to run
CMake builds / ${{ matrix.name }} (Xcode, macOS 14 wxOSX, macos-14) (push) Waiting to run
Mac builds / ${{ matrix.name }} (arm64, --with-cxx=14 --enable-universal_binary=arm64,x86_64 --disable-shared --disable-debug --enable-optimise, wxMac Universal C++14, self-hosted) (push) Waiting to run
Mac builds / ${{ matrix.name }} (arm64, wxMac ARM with ASAN, self-hosted, true) (push) Waiting to run
Mac builds / ${{ matrix.name }} (true, x86_64, PKG_CONFIG_LIBDIR=/dev/null, --with-osx_iphone --enable-monolithic --disable-sys-libs --host=i686-apple-darwin_sim --build=x86_64-apple-darwin17.7.0, wxiOS, macos-14, true, true, iphonesimulator) (push) Waiting to run
Mac builds / ${{ matrix.name }} (x86_64, --disable-sys-libs, wxMac macOS 14, macos-14) (push) Waiting to run
Mac builds / ${{ matrix.name }} (x86_64, --with-cxx=17 --with-macosx-version-min=10.12 --enable-debug, wxMac Intel C++17, self-hosted) (push) Waiting to run
Mac Xcode builds / ${{ matrix.name }} (x86_64, Debug, generic/platform=iOS, iOS static Debug, build/osx/wxiphone.xcodeproj, macos-latest, static) (push) Waiting to run
Mac Xcode builds / ${{ matrix.name }} (x86_64, Release, generic/platform=iOS Simulator, iOS Simulator static, samples/minimal/minimal_iphone.xcodeproj, macos-latest, app-static) (push) Waiting to run
Mac Xcode builds / ${{ matrix.name }} (x86_64, Release, generic/platform=macOS, macOS dynamic Release, samples/minimal/minimal_cocoa.xcodeproj, self-hosted, app-dynamic) (push) Waiting to run
MSW builds / wxMSW vs${{ matrix.vsversion }} ${{ matrix.configuration }} ${{ matrix.platform }} (DLL Debug, x64, true, 2022) (push) Waiting to run
MSW builds / wxMSW vs${{ matrix.vsversion }} ${{ matrix.configuration }} ${{ matrix.platform }} (DLL Release, x64, 2019) (push) Waiting to run
MSW builds / wxMSW vs${{ matrix.vsversion }} ${{ matrix.configuration }} ${{ matrix.platform }} (Debug, Win32, 2019) (push) Waiting to run
MSW builds / wxMSW vs${{ matrix.vsversion }} ${{ matrix.configuration }} ${{ matrix.platform }} (Release, arm64, 2022) (push) Waiting to run
MSW builds / msw-msys2-clang (push) Waiting to run
MSW cross-builds / ${{ matrix.name }} (--disable-compat32, testing, wxMSW 64 bits) (push) Waiting to run
MSW cross-builds / ${{ matrix.name }} (--enable-universal --disable-compat32 --disable-debug --disable-optimise, testing, true, wxMSW/Univ) (push) Waiting to run
MSW cross-builds / ${{ matrix.name }} (stable, wxMSW 32 bits, i686-w64-mingw32) (push) Waiting to run
Code Checks / Check Spelling (push) Waiting to run
Code Checks / Check Whitespace (push) Waiting to run
Code Checks / Check Mixed EOL (push) Waiting to run
Code Checks / Check C++ Style (push) Waiting to run
Update Documentation / Update Online Documentation (push) Waiting to run
Explain when it should still be used.

See #24785.

Closes #25035.

Closes #25051.
2025-01-08 03:01:33 +01:00
Vadim Zeitlin 50da7c0297 Merge branch 'FontEncodings' of https://github.com/Blake-Madden/wxWidgets
Document all font encodings and make them more consistent.

Also add correct wxFONTENCODING_MACVIETNAMESE name for the previously
misspelled wxFONTENCODING_MACVIATNAMESE (which is still kept for
backward compatibility).

See #25050.
2025-01-08 02:59:33 +01:00
Lauri Nurmi 3dddaeb8f2 Optional only accept string literals in translation macros
If a new wxNO_REQUIRE_LITERAL_MSGIDS is defined, redirect the
translation macros to wrapper functions that only accept string
literals. This is not enabled by default, because it would be a
backward-incompatible change (even though most incompatibilities
uncovered by it are likely to be bugs), but defining the new macro is
recommended because the arguments nearly always need to be string
literals.

While at present the arguments do not technically need to be string
literals, variables can easily introduce subtle bugs that are not
obvious to spot. The fact that xgettext only picks string literals
is easy to forget.

Consider  the following code:
wxString itm("item");
_(itm);
wxGETTEXT_IN_CONTEXT("context_1", itm);
wxGETTEXT_IN_CONTEXT(itm, "item");
wxPLURAL(wxString::Format("%s", "singX"), "plurX", 1);
wxPLURAL("singY", wxString::Format("%s", "plurY"), 2);
wxGETTEXT_IN_CONTEXT_PLURAL("context_1", _("singZ"), "plurZ", 1);

All of these lines compile without warnings. However, only one string,
"singZ", is picked by xgettext, all others are silently ignored. Some
lines would work if accompanied by a proper wxTRANSLATE* call, but nested
calls (see the last line) to translation macros do not make sense in the
first place.

Closes #24957.
2025-01-08 02:54:01 +01:00
Vadim Zeitlin 4eae795f7d Merge branch 'cmake-install' of https://github.com/MaartenBent/wxWidgets
Miscellaneous CMake improvements:

- Add more configuration options for CMake installation.
- Only install the headers of the used platform/toolkit.
- Fix some bugs and warnings.

See #24792.
2025-01-08 02:51:04 +01:00
734face9c5 Add support for raw touch events
Add new API and implement for GTK, MSW and OSX ports.

Add a new sample.

See #649.

Closes #17077.

Closes #24610.

Co-Authored-By: Alex Shvartzkop <dudesuchamazing@gmail.com>
Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
2025-01-08 02:48:31 +01:00
Blake-Madden 9f609578fe Remove redundant text 2025-01-07 15:11:33 -05:00
Blake-Madden 8352dcd961 Remove wxFONTENCODING_MACVIATNAMESE from docs
It's still in the code for backward compatability, but no reason to keep it in the docs.
2025-01-07 15:07:36 -05:00
Blake-Madden 82d3a44c25 Document all font encodings
Document all of them and make explanations more consistent.
Also, `wxFONTENCODING_MACVIATNAMESE` was misspelled. Replaced it with `wxFONTENCODING_MACVIETNAMESE` and kept `wxFONTENCODING_MACVIATNAMESE` as an alias for backward compatability.
Fixed missing "!<" in doxygen comment.
2025-01-07 14:07:54 -05:00
PB e0b055e53b Improve window sizing documentation
CMake builds / ${{ matrix.name }} (-DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe, Ninja, SOME, CONSOLE_ONLY, Windows MSVC, 1, windows-latest) (push) Has been cancelled
CMake builds / ${{ matrix.name }} (-DCMAKE_SYSTEM_NAME=iOS -DCMAKE_FIND_ROOT_PATH=/usr/local -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO, Xcode, OFF, OFF, macOS 14 wxIOS, macos-14) (push) Has been cancelled
CMake builds / ${{ matrix.name }} (Unix Makefiles, ALL, Ubuntu 22.04 wxGTK 3, ubuntu-22.04) (push) Has been cancelled
CMake builds / ${{ matrix.name }} (Xcode, macOS 14 wxOSX, macos-14) (push) Has been cancelled
Mac builds / ${{ matrix.name }} (arm64, --with-cxx=14 --enable-universal_binary=arm64,x86_64 --disable-shared --disable-debug --enable-optimise, wxMac Universal C++14, self-hosted) (push) Has been cancelled
Mac builds / ${{ matrix.name }} (arm64, wxMac ARM with ASAN, self-hosted, true) (push) Has been cancelled
Mac builds / ${{ matrix.name }} (true, x86_64, PKG_CONFIG_LIBDIR=/dev/null, --with-osx_iphone --enable-monolithic --disable-sys-libs --host=i686-apple-darwin_sim --build=x86_64-apple-darwin17.7.0, wxiOS, macos-14, true, true, iphonesimulator) (push) Has been cancelled
Mac builds / ${{ matrix.name }} (x86_64, --disable-sys-libs, wxMac macOS 14, macos-14) (push) Has been cancelled
Mac builds / ${{ matrix.name }} (x86_64, --with-cxx=17 --with-macosx-version-min=10.12 --enable-debug, wxMac Intel C++17, self-hosted) (push) Has been cancelled
Mac Xcode builds / ${{ matrix.name }} (x86_64, Debug, generic/platform=iOS, iOS static Debug, build/osx/wxiphone.xcodeproj, macos-latest, static) (push) Has been cancelled
Mac Xcode builds / ${{ matrix.name }} (x86_64, Release, generic/platform=iOS Simulator, iOS Simulator static, samples/minimal/minimal_iphone.xcodeproj, macos-latest, app-static) (push) Has been cancelled
Mac Xcode builds / ${{ matrix.name }} (x86_64, Release, generic/platform=macOS, macOS dynamic Release, samples/minimal/minimal_cocoa.xcodeproj, self-hosted, app-dynamic) (push) Has been cancelled
MSW builds / wxMSW vs${{ matrix.vsversion }} ${{ matrix.configuration }} ${{ matrix.platform }} (DLL Debug, x64, true, 2022) (push) Has been cancelled
MSW builds / wxMSW vs${{ matrix.vsversion }} ${{ matrix.configuration }} ${{ matrix.platform }} (DLL Release, x64, 2019) (push) Has been cancelled
MSW builds / wxMSW vs${{ matrix.vsversion }} ${{ matrix.configuration }} ${{ matrix.platform }} (Debug, Win32, 2019) (push) Has been cancelled
MSW builds / wxMSW vs${{ matrix.vsversion }} ${{ matrix.configuration }} ${{ matrix.platform }} (Release, arm64, 2022) (push) Has been cancelled
MSW builds / msw-msys2-clang (push) Has been cancelled
MSW cross-builds / ${{ matrix.name }} (--disable-compat32, testing, wxMSW 64 bits) (push) Has been cancelled
MSW cross-builds / ${{ matrix.name }} (--enable-universal --disable-compat32 --disable-debug --disable-optimise, testing, true, wxMSW/Univ) (push) Has been cancelled
MSW cross-builds / ${{ matrix.name }} (stable, wxMSW 32 bits, i686-w64-mingw32) (push) Has been cancelled
Code Checks / Check Spelling (push) Has been cancelled
Code Checks / Check Whitespace (push) Has been cancelled
Code Checks / Check Mixed EOL (push) Has been cancelled
Code Checks / Check C++ Style (push) Has been cancelled
Update Documentation / Update Online Documentation (push) Has been cancelled
Fix the flag name in wxSizerFlags::Shaped() description.

Add a reference to Windows Sizing Overview to Window Layout page and
Sizers Overview.

Add a reference to Sizers Overview to Window Sizing Overview.

Closes #25044.
2025-01-06 22:16:06 +01:00
Vadim Zeitlin cf201c9b7f Merge branch 'do-not-set-dc-attrs'
Do not set wxDC attributes unnecessarily when they're already inherited
from the window.

See #25043.
2025-01-06 22:16:06 +01:00
Vadim Zeitlin c55ba785d3 Use PCRE2 function for counting the number of captures
Don't try parsing the regex ourselves, which is not just slower but also
more buggy: in particular, we didn't handle regexes with trailing
backslash correctly and could keep reading after the end of the buffer
in this case.

See #25040.
2025-01-06 22:16:06 +01:00
Blake-Madden a38c48bd16 Improve wxGetTranslation()-related documentation and comments
Explain difference between wxGetTranslation and _() in internat sample.

Also, some minor documentation fixes.

Closes #25037.
2025-01-06 22:16:06 +01:00
Martin Corino f21a7a6616 Don't append unwanted extension in wxMSW wxFileDialog
IFileDialog already does what our own AppendExtension() tries to do, so
there is no need to call it again, as this results in extra unwanted
extension in some cases.

Closes #24949.

Closes #25034.
2025-01-06 22:16:06 +01:00
Vadim Zeitlin 981341c913 Update copyright years to 2025
Just run misc/scripts/inc_year and commit the results.

See #18690, #25041.
2025-01-06 22:16:06 +01:00
Paul Cornett 12bb1123eb Fix border size for wxStaticBox with GTK3
CMake builds / ${{ matrix.name }} (-DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe, Ninja, SOME, CONSOLE_ONLY, Windows MSVC, 1, windows-latest) (push) Waiting to run
CMake builds / ${{ matrix.name }} (-DCMAKE_SYSTEM_NAME=iOS -DCMAKE_FIND_ROOT_PATH=/usr/local -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO, Xcode, OFF, OFF, macOS 14 wxIOS, macos-14) (push) Waiting to run
CMake builds / ${{ matrix.name }} (Unix Makefiles, ALL, Ubuntu 22.04 wxGTK 3, ubuntu-22.04) (push) Waiting to run
CMake builds / ${{ matrix.name }} (Xcode, macOS 14 wxOSX, macos-14) (push) Waiting to run
Code Checks / Check Spelling (push) Waiting to run
Code Checks / Check Whitespace (push) Waiting to run
Code Checks / Check Mixed EOL (push) Waiting to run
Code Checks / Check C++ Style (push) Waiting to run
The GtkFrame border was not being accounted for in GetBordersForSizer().
See #25045
2025-01-05 14:01:04 -08:00
Maarten Bent c3e21a04e0 CMake: Install MSVC props 2025-01-03 17:12:41 +01:00
Maarten Bent f3766bea3f CMake: Fix installing to correct directory
Update path-style of CMAKE_INSTALL_PREFIX after the project is created, otherwise it might not be initialized
2025-01-03 17:12:08 +01:00
Maarten Bent fd9d6b4d29 CMake: Fix missing custom command type 2025-01-03 17:11:25 +01:00
Maarten Bent 4ac91d2836 CMake: Silence compatibility warnings 2025-01-03 17:11:24 +01:00
Maarten Bent 0c3a52d9e8 CMake: Include more source groups from files.cmake 2025-01-03 17:11:24 +01:00
Maarten Bent 20f49d6c59 CMake: Add target to create and install locale files
See #24287
2025-01-03 17:11:23 +01:00
Maarten Bent 0c725cdaea CMake: Only install headers required by the used toolkit
See #22714
2025-01-03 17:11:18 +01:00
Maarten Bent 9dfb25adcf CMake: Add option to enable installing PDB files
Fixes #23884
2025-01-03 17:11:18 +01:00
Maarten Bent bcf041d9c3 CMake: Add options to specify custom install directories
Specify wxBUILD_INSTALL_RUNTIME_DIR to use a custom directory for the runtime artifacts
Specify wxBUILD_INSTALL_LIBRARY_DIR to use a custom directory for the library artifacts
Specify wxBUILD_INSTALL_ARCHIVE_DIR to use a custom directory for the archive artifacts
Set wxBUILD_INSTALL_PLATFORM_SUBDIR to false to not use the default msvc library sub-directory (like vc_x64_dll)

See #23527
2025-01-03 17:11:17 +01:00
Vadim Zeitlin f9d6f34d5c Remove useless wxDC::SetFont() etc calls
wxPaintDC and wxInfoDC already use the window font and colours by
default, so there is no need to explicitly set them again after
constructing them.

No real changes, just simplify the code a bit.
2025-01-02 16:49:19 +01:00
Vadim Zeitlin 81c3c7314d Inherit associated window attributes in wxBufferedPaintDC
This class should behave in the same way as wxPaintDC which does inherit
them, so do it here as well.
2025-01-02 16:49:19 +01:00
Vadim Zeitlin 092985b565 Delegate to new wxBufferedPaintDC ctor to avoid code duplication
Don't repeat the same code in 2 almost identical ctors and factor it out
into a new private one which can then be just delegated to from the
existing ctors.

No real changes, just make it easier to update this code by keeping only
a single copy of it.
2025-01-02 16:49:19 +01:00
Vadim Zeitlin 1b0378cc8b Make wx[Auto]BufferedPaintDC ctors explicit
No real changes, just add a guardrail to prevent implicit conversions
from wxWindow that make no sense.
2025-01-02 01:32:19 +01:00
Maarten Bent b4ab993c27 CMake: Expose used CURL libraries
Try to fix #22860
2024-12-28 17:02:43 +01:00
Maarten Bent 4d68b8ea4c CMake: Fix joystick.h include check
It should also be checked when building gtk toolkit on macOS.

See #23475
2024-12-28 17:00:31 +01:00
Maarten Bent de0cca78d6 CMake: Only define WXMAC and WXOSX when building cocoa toolkit
These should not be defined when building with gtk toolkit.

See #23475
2024-12-28 17:00:13 +01:00
Vadim Zeitlin 15126644aa Merge branch 'msg-queue-no-copy'
Allow using wxMessageQueue with move-only types.

See #25026.
2024-12-26 17:10:55 +01:00
Vadim Zeitlin 0af03c15c8 Merge branch 'gtk-dvc-cleanup'
Clean up wxGTK wxDataViewCtrl code.

See #25020.
2024-12-26 17:10:09 +01:00
Vadim Zeitlin f5eb38410d Allow using move-only types with wxMessageQueue
Add Post() overload taking r-value reference and a unit test showing
that we can use it with a non-copyable type.
2024-12-26 15:19:08 +01:00
Vadim Zeitlin 65c8b058ef Use unique_ptr<> instead of manual calls to delete
No real changes.
2024-12-26 14:43:15 +01:00
Vadim Zeitlin aa94d0b21e Get rid of CppUnit boilerplate in wxMessageQueue unit test
No real changes, just remove the completely unnecessary test case class.

This commit is best viewed ignoring whitespace-only changes.
2024-12-26 14:40:45 +01:00
Vadim Zeitlin c213730d17 Stop using wxArray in wxMessageQueue unit test
Use std::vector<> instead.
2024-12-26 14:33:48 +01:00
Vadim Zeitlin efb1264435 Stop using wx array for wxGtkTreeModelChildren too
Use std::vector<> and std::sort() instead of wx equivalents.

No real changes.
2024-12-23 22:50:36 +01:00
Vadim Zeitlin e882acc864 Add wxGtkTreeModelNode::ResortChildrenIfNeeded()
No real changes, just factor out a common fragment into a function.
2024-12-23 22:50:36 +01:00
Vadim Zeitlin 34264bcaaa Stop using wx arrays for sorting wxDVC items
Use std::sort() instead, this is simpler and slightly less ugly as it
avoids using void***.

No real changes.
2024-12-23 22:50:36 +01:00
Vadim Zeitlin dade7b0e0a Remove more commented out code related to sorting
It doesn't look like this could ever be useful, so just remove it.
2024-12-23 22:50:36 +01:00
Vadim Zeitlin d9a1a949f8 Replace index-based loops over m_nodes with range-for ones
No real changes, just make the code clearer, shorter and safer.
2024-12-23 22:50:36 +01:00
Vadim Zeitlin fedcaac663 Use std::vector<> instead of wx array for wxGtkTreeModelNodes
No real changes.
2024-12-23 22:50:36 +01:00
Vadim Zeitlin 2584cb3fc5 Make wxDataViewCtrlInternal notifier functions void
Their return value was ignored anyhow, so don't return anything from
them.

Also remove declared but not defined BeforeReset() and AfterReset()
completely.
2024-12-23 22:22:07 +01:00
Vadim Zeitlin 7d32f79830 Fix typo in a comment
No real changes.
2024-12-23 22:22:07 +01:00
Vadim Zeitlin 8405ad2ed6 Remove commented out code in ItemDeleted()
There is no need to leave the code which is described as being wrong.

No real changes.
2024-12-23 22:22:07 +01:00