Commit Graph
7359 Commits
Author SHA1 Message Date
Vadim Zeitlin 60eb8d0627 Operate on both controls in "Hyperlink" page of widgets sample
This ensures that operations such as disabling the control affect both
hyperlink controls on this page.
2025-06-13 18:14:34 +02:00
PB d5c140a801 Fix webrequest and webview samples build with MSVC in C++20 mode
Unix builds / Ubuntu 24.04 wxGTK with ASAN (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 3 compatible 3.0 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK UTF-8 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxQt (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxX11 (push) Has been cancelled
Unix builds / Ubuntu 20.04 wxGTK 3 with clang (push) Has been cancelled
Unix builds / Ubuntu 22.04 wxGTK with wx containers (push) Has been cancelled
Unix builds / Ubuntu 24.04 wxGTK with UBSAN (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxDFB (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 3 static with gcc 4.8 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 2 (push) Has been cancelled
CMake builds / Ubuntu 22.04 wxGTK 3 (push) Has been cancelled
CMake builds / Windows MSVC (push) Has been cancelled
CMake builds / macOS latest wxOSX Ninja (push) Has been cancelled
CMake builds / macOS 14 wxOSX Xcode (push) Has been cancelled
CMake builds / macOS 14 wxIOS (push) Has been cancelled
CMake builds / Windows wxQt 6.8 (push) Has been cancelled
Mac builds / wxMac Universal C++14 (push) Has been cancelled
Mac builds / wxMac ARM with ASAN (push) Has been cancelled
Mac builds / wxiOS (push) Has been cancelled
Mac builds / wxMac Intel C++17 (push) Has been cancelled
Mac Xcode builds / iOS Simulator static (push) Has been cancelled
Mac Xcode builds / macOS dynamic Release (push) Has been cancelled
Mac Xcode builds / iOS static Debug (push) Has been cancelled
MSW builds / wxMSW vs2022 DLL Debug x64 (push) Has been cancelled
MSW builds / wxMSW vs2019 DLL Release x64 (push) Has been cancelled
MSW builds / wxMSW vs2019 Debug Win32 (push) Has been cancelled
MSW builds / wxMSW vs2022 Release arm64 (push) Has been cancelled
MSW builds / msw-msys2-clang (push) Has been cancelled
MSW cross-builds / wxMSW 64 bits (push) Has been cancelled
MSW cross-builds / wxMSW/Univ (push) Has been cancelled
MSW cross-builds / wxMSW 32 bits (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
Code Checks / Check All Headers In allheaders.h (push) Has been cancelled
Update Documentation / Update Online Documentation (push) Has been cancelled
No Response / no-response (push) Has been cancelled
Using a const char* and a wxString in the two branches of the ternary
operator resulted in compile-time errors when using C++20 standard
since the result type of the conditional expression was ambiguous,
so add explicit conversions to fix it.

See also #19355.

Closes #25501.
2025-06-09 22:57:00 +02:00
Vadim Zeitlin 29f9d3512a Update version to 3.3.1 and rebake 2025-06-09 22:36:35 +02:00
Paul Cornett b9eb9cdec3 Avoid some -Wfloat-conversion warnings 2025-06-01 07:28:49 -07:00
Vadim Zeitlin b095a1d4db Don't store bitmaps in wxArrayPtrVoid in widgets sample
Using wxArrayPtrVoid was ugly and completely unnecessary, just store
both item labels and bitmaps in a single vector.

No real changes, this is just code cleanup.
2025-05-31 18:57:54 +02:00
Blake-Madden cd07eabd54 Add support for "Do not show this again" checkbox to wxInfoBar
Closes #25394.
2025-05-26 17:54:07 +02:00
ChipZhang 5621b2bc8f Fix compilation of widgets sample with wxUSE_TREEBOOK==0
Replace the remaining call to SetImageList() with SetImages() too.

This should have been part of e0ed66b8d3 (Use wxBitmapBundle for widgets
sample icons, 2025-03-30), see #25282.

Closes #25428.

Closes #25429.
2025-05-20 15:06:27 +02:00
Vadim Zeitlin 74a1498eee Remove unnecessary use of wxLogXXX("%s")
Just pass the strings directly to wxLogXXX functions as this works
correctly after the changes of the parent commit.
2025-05-17 22:44:48 +02:00
Vadim Zeitlin 3e6b664762 Merge branch 'cursor-bundle'
Unix builds / Ubuntu 24.04 wxGTK with ASAN (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 3 compatible 3.0 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK UTF-8 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxQt (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxX11 (push) Has been cancelled
Unix builds / Ubuntu 20.04 wxGTK 3 with clang (push) Has been cancelled
Unix builds / Ubuntu 22.04 wxGTK with wx containers (push) Has been cancelled
Unix builds / Ubuntu 24.04 wxGTK with UBSAN (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxDFB (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 3 static with gcc 4.8 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 2 (push) Has been cancelled
CMake builds / Ubuntu 22.04 wxGTK 3 (push) Has been cancelled
CMake builds / Windows MSVC (push) Has been cancelled
CMake builds / macOS 14 wxOSX (push) Has been cancelled
CMake builds / macOS 14 wxIOS (push) Has been cancelled
CMake builds / Windows wxQt 6.8 (push) Has been cancelled
Mac builds / wxMac Universal C++14 (push) Has been cancelled
Mac builds / wxMac ARM with ASAN (push) Has been cancelled
Mac builds / wxiOS (push) Has been cancelled
Mac builds / wxMac Intel C++17 (push) Has been cancelled
Mac Xcode builds / iOS Simulator static (push) Has been cancelled
Mac Xcode builds / macOS dynamic Release (push) Has been cancelled
Mac Xcode builds / iOS static Debug (push) Has been cancelled
MSW builds / wxMSW vs2022 DLL Debug x64 (push) Has been cancelled
MSW builds / wxMSW vs2019 DLL Release x64 (push) Has been cancelled
MSW builds / wxMSW vs2019 Debug Win32 (push) Has been cancelled
MSW builds / wxMSW vs2022 Release arm64 (push) Has been cancelled
MSW builds / msw-msys2-clang (push) Has been cancelled
MSW cross-builds / wxMSW 64 bits (push) Has been cancelled
MSW cross-builds / wxMSW/Univ (push) Has been cancelled
MSW cross-builds / wxMSW 32 bits (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
Code Checks / Check All Headers In allheaders.h (push) Has been cancelled
Update Documentation / Update Online Documentation (push) Has been cancelled
No Response / no-response (push) Has been cancelled
Add wxCursorBundle to make supporting high resolution cursors simpler.

Also some other cursor-related fixes.

See #25374.
2025-05-11 18:53:32 +02:00
Maarten Bent fd14294606 Recreate build-files 2025-05-10 18:22:27 +02:00
Maarten Bent b0b3da6ce2 Add libwebp to MSVS solutions 2025-05-10 18:06:41 +02:00
Maarten Bent ad80d9c45d Fix outdated vcxproj files 2025-05-10 18:06:40 +02:00
Maarten Bent d6209abf2d Update and generate build files
Run upmake, bakefile_gen, makeprojects.py, update-setup-h, autogen.
2025-05-10 17:19:29 +02:00
Maarten Bent 090282a2e1 Add WebP format to animation sample
Improve high-dpi support.
2025-05-10 17:19:29 +02:00
Maarten Bent be1ab5bfca Show frames of animated images in image sample 2025-05-10 17:19:28 +02:00
Maarten Bent a3087255b9 Add WebP image to image sample 2025-05-10 17:19:27 +02:00
Vadim Zeitlin aa4ef6528a Use wxCursorBundle for testing cursor in wxImage sample
As part of this change, the cursor.png file of unclear provenance added
back in 9ea83ebc7c (Add test for a custom cursor to the image sample.,
2010-07-24) is replaced with the new hand image with a non-zero hotspot
point taken from https://uxwing.com/up-hand-pointer-icon/
2025-05-07 23:16:11 +02:00
Vadim Zeitlin c87b291d32 Add wxCursorBundle and implement support for it in wxGTK
This new class allows to let wxWidgets select the appropriate cursor,
similarly to how wxBitmapBundle allows to select the bitmap of the
appropriate size.

Document the new class and show using it in the drawing sample.
2025-05-07 23:16:11 +02:00
Vadim Zeitlin 9def7c87b4 Construct wxCursor from wxBitmap in the image sample
There is no need to use an intermediate wxImage any more.

We also don't need to copy cursor.png to the build directory, as it is
now used only during the build and not when running the sample, so don't
do this.
2025-05-07 23:16:11 +02:00
Vadim Zeitlin 3f85f59543 Add wxSysMetricChangedEvent and generate it in wxMSW
This event can be used to react to the changes in the default system
cursor size.
2025-05-07 23:16:11 +02:00
Vadim Zeitlin 817d82b779 Merge branch 'cursor-size' into master
Return correct cursor size in wxMSW and wxGTK.

Also show the different stock cursors in the drawing sample.

See #25364.

Closes #25328.
2025-05-04 22:07:26 +02:00
Vadim Zeitlin dbf906eaed Show stock cursors in the drawing sample too
Allow seeing the shapes (and sizes) of different standard cursors.
2025-05-04 19:39:07 +02:00
Vadim Zeitlin e958b31ba9 Show the current cursor size in the drawing sample
There doesn't seem to be any sample more suitable than this one, so add
a "Cursors" screen to it, as we already have "Colours" screens there.

For now just show the cursor size.
2025-05-04 18:26:36 +02:00
Vadim Zeitlin 35c1764568 Test setting cursor from wxEVT_SET_CURSOR in event sample
It seems like the least inappropriate place to do it.
2025-05-03 18:27:55 +02:00
Vadim Zeitlin 0173a414fd Make wxAuiFlatTabArt the default wxAuiNotebook art provider
Add wxAuiNativeTabArt which can be used to restore the previous default
behaviour.

See #25316.
2025-04-17 18:16:52 +02:00
Vadim Zeitlin a854e209a2 Merge branch 'gtk-safe-idle'
Fix handling exceptions thrown from wxApp idle event handler.

See #25315.
2025-04-11 16:40:26 +02:00
Vadim Zeitlin e6bb972215 Merge branch 'aui-flat-tab-art'
Add new flat AUI tab art.

See #25275.
2025-04-10 17:24:08 +02:00
Vadim Zeitlin 15f547b5bd Test throwing exception from wxApp idle handler
This doesn't work correctly in wxGTK currently, as the exception is not
passed to wxApp::OnExceptionInMainLoop() as expected, but it will be
fixed soon.
2025-04-10 16:40:08 +02:00
Vadim Zeitlin 01fef1580d Merge branch 'treectrl-indent' of github.com:MaartenBent/wxWidgets
Fix wxTreeCtrl indent regression when the tree icon sizes is too small.

See #24640 , #25282.
2025-04-04 17:58:10 +02:00
Maarten Bent e0ed66b8d3 Use wxBitmapBundle for widgets sample icons
Increase the size of the wxTreeCtrl slightly so the items better fit.
2025-03-30 22:21:53 +02:00
Paul Cornett 6111681a94 Use a better size for date and time pickers in widgets sample 2025-03-28 16:22:21 -07:00
Paul Cornett b79a391ffb Avoid some unnecessary float conversions 2025-03-28 16:18:57 -07:00
Paul Cornett e95eea2d5a Avoid -Wstring-concatenation warning 2025-03-28 16:10:43 -07:00
Paul Cornett bfb6c452bd Replace zero with nullptr 2025-03-28 16:06:22 -07:00
Vadim Zeitlin 4406f28ec7 Add wxAuiFlatTabArt art provider
This provider implements a non-glossy look, unlike wxAuiGenericTabArt,
but is still not as weird/ugly as wxAuiSimpleTabArt.

For now this provider has to be chosen explicitly, but the plan is to
make it the default one in the future.
2025-03-28 19:19:36 +01:00
Vadim Zeitlin 36856435a5 Prevent choosing incompatible AUI notebook style and theme
Simple art provider can't be used if pin or unpin buttons are used, so
prevent this from happening.

This is not ideal, but better than just giving an endless stream of
asserts and nobody cares about the simple art provider anyhow.
2025-03-24 22:51:49 +01:00
Vadim Zeitlin 6e4995dca9 Simplify code iterating over AUI panes in the sample
Use range-for loop over AUI panes instead of counted for loop and also
consistently use wxDynamicCast() instead of IsKindOf() and subsequent
C-style cast everywhere.

No real changes, just simplify the code.
2025-03-24 22:51:49 +01:00
Vadim Zeitlin f225b4a603 Fix notebook art EVT_UPDATE_UI handler in the AUI sample
The existing code was confusing because it did something strange for
ID_NotebookArt{Gloss,Simple} in OnUpdateUI(), but this handler wasn't
actually connected to the menu items with these IDs.

Do connect it and add another member variable storing the current choice
of the art provider, as the existing handler code couldn't, and didn't,
work (and this only wasn't a problem because it was never executed).
2025-03-24 19:24:51 +01:00
Vadim Zeitlin 486bcf61fb Use standard wx camelCase naming convention in the AUI sample
Rename the identifiers using snake_case convention to use the wx standard one.

No real changes.
2025-03-24 19:23:43 +01:00
Vadim Zeitlin b5c121b9a0 Use wxLog instead of assert in the AUI sample
This is done mostly to avoid a (harmless) warning about unused
parameters in this function in the builds where assertions are disabled.
2025-03-17 00:27:16 +01:00
Vadim Zeitlin c1107c6be1 Improve (de)serializing pinned tabs in wxAuiNotebook
Stop saving and restoring locked tabs: their semantics dictates that
their state can't be changed by the user, and so they must remain locked
no matter what, whereas it was possible to turn a locked tab into a
normal one via data given to the deserializer (e.g. by editing a config
file manually).

Also ensure that restoring the pinned tabs doesn't break the control
invariant, i.e. that they don't come after any normal tabs. If the
deserializer returns the data that puts pinned tabs on invalid
positions, just ignore it and don't make them pinned: this is better
than ending up in an invalid state and simpler than moving them before
the normal tabs.
2025-03-16 20:28:36 +01:00
Vadim Zeitlin 84438143e6 Save and restore the active tab control page too
It can be useful to preserve the last selected page -- and if the
application doesn't want to do it, it can avoid it by not saving
wxAuiTabLayoutInfo::active.
2025-03-16 20:05:51 +01:00
Vadim Zeitlin 5ab4e9aa32 Handle deserializing wxAuiNotebook data without all pages
This allows newer versions of the program, adding new pages, to still
restore data saved by the older versions.

By default the pages not described by the deserialized data are simply
appended to the main tab control, however this behaviour can be
customized by overriding the new HandleOrphanedPage() function.

The signature of the new function is rather complex and not very
elegant, but this seems to be the least bad solution, as it allows wxAUI
itself to provide the default values (main tab control and -1, meaning
to append, for the index), making the code of the applications
overriding this function simpler.

Also note that we really need to get the location for the page in some
way, e.g. we couldn't just let HandleOrphanedPage() or a similar
function put it into its place on its own because at the moment of its
call the wxAuiNotebook invariant saying that each page in m_tabs is
present in exactly one wxAuiTabCtrl is broken, and so many wxAuiNotebook
functions, including e.g. DeletePage(), don't work as expected.
2025-03-16 20:05:51 +01:00
Vadim Zeitlin 4cba8642e8 Fix dangling references to temporaries in internat sample
In some build variants (e.g. when wxUSE_INTL==0) _() is a macro doing
nothing, in particular not involving a function call, and the temporary
wxString created by it doesn't survive past the end of the statement and
hence a reference to it can't be used.

Just make a copy of the string to fix this.
2025-03-09 17:07:49 +01:00
Vadim Zeitlin 245e993aab Merge branch 'aui-improve-hint'
Improve wxAUI hint appearance and API.

Note that this disables fade-in effect by default.

See #25213.
2025-03-08 18:09:53 +01:00
Vadim Zeitlin c4f501724f Merge branch 'aui-pinned-tabs'
Add support for pinned and locked tabs to wxAUI.

See #25187.
2025-03-03 19:04:07 +01:00
Vadim Zeitlin e352cd2c03 Deprecate wxAUI_MGR_NO_VENETIAN_BLINDS_FADE
This style doesn't make much sense any longer now that using
wxAUI_MGR_VENETIAN_BLINDS_HINT on its down doesn't enable fade-in
effect, so (informally) deprecate it and keep it defined as 0 just for
compatibility.
2025-03-02 20:35:25 +01:00
Vadim Zeitlin 34fd35bccb Merge branch 'bookctrl-text'
Fix confusion between wxNotebook pages text and label.

See #25197.
2025-02-26 17:55:48 +01:00
Vadim Zeitlin f5d238a7d1 Serialize and restore wxAUI pane visibility too
Panes may be hidden by user, so it makes sense to store their visibility
as part of the serialized representation to be able to restore the same
visual layout later.

See #25186.
2025-02-26 17:55:13 +01:00
Vadim Zeitlin 59b1fafe1a Update wxBookCtrl unit test to cover mnemonics in page text
This passes now, after the recent changes.

Also update the sample to use a mnemonic for one of the pages to be able
to check that it appears correctly visually too.
2025-02-24 18:09:00 +01:00