Commit Graph
7527 Commits
Author SHA1 Message Date
PB a3d1fef5e6 Use wxIMPLEMENT_APP_CONSOLE() in the archive sample
Replacing wxIMPLEMENT_APP() with wxIMPLEMENT_APP_CONSOLE() allows
building the sample on Windows with CMake with wxWidgets built in
the monolithic configuration.

The archive sample is a console, not GUI, sample and console applications
should use wxIMPLEMENT_APP_CONSOLE() instead of wxIMPLEMENT_APP(). This
matters on Windows when compiling with MSVC and the linker subsystem set
to console.

It can still work when wxUSE_GUI=0 is defined but this is not possible
with wxWidgets monolithic build, where wxUSE_GUI=1 is defined for all
the projects.

Closes #26755.
2026-07-30 19:52:10 +02:00
anhnong90 03f61d05c6 Modernize loops across source files using clang-tidy
Replace index‑based iteration with C++11 range‑based for loops where
appropriate.

Closes #26640.
2026-07-30 19:24:25 +02:00
PB eb543bcf61 Clean up the stylus sample
Prevent the signed/unsigned comparison compiler warning.

Remove the unused header.

Make the sample follow the wxWidgets coding style standards.

Fix the stylus sample in MSVS samples solutions.

Closes #26746.
2026-07-30 19:01:25 +02:00
Steve Cornett d7d94f918d Support explicit switching both to and from dark mode in wxMSW
With these changes, wxApp::SetAppearance() and
wxApp::MSWEnableDarkMode() can change the dark/light mode at any time.
They can be called before or after windows are created, and can be
called more than once.

The widgets sample has new menu commands to demonstrate this.

Closes #26734.
2026-07-24 23:31:50 +02:00
Steve Cornett 58dfc19c96 Fix wxGrid handling of system color change
Fix wxGrid for system color change for colors that were assigned
defaults in Init(), and therefore did not update. These colors are
now determined as needed during drawing.

The grid sample "Colours" menu gets additional commands so you can set
all these colors.

Closes #26729.
2026-07-23 23:47:12 +02:00
Richard 5d0a9f3a43 Fix wxHTML nested definition-list indentation
Track the active DL nesting depth while parsing definition lists and
use it when indenting DD content, so nested definition lists are laid
out deeper than their parent item. Add parser coverage and a sample
case for the old nested DL repro.

Fixes #20752.

Closes #26676.
2026-07-21 18:56:15 +02:00
Vadim Zeitlin abaebefb57 Merge branch 'improve-samples' of github.com:PBfordev/wxWidgets
Tiny improvements to drawing and menu samples.

See #26702.
2026-07-21 01:04:55 +02:00
Richard 4e9b924ec6 HTML: Honor TABLE ALIGN as table placement
Apply TABLE ALIGN to the wrapper that positions the table instead of
using it as the default alignment for TD/TH content. Leave cell text
alignment controlled by row/cell alignment, with the existing TH default.

Add a parser layout regression test and sample markup for the centered
table case.

Fixes #21853.

Closes #26672.
2026-07-20 20:23:34 +02:00
PB bb21ab03d3 Remove conflicting keyboard shortcut from the menu sample.
The sample used <Alt+F> for the Get menu info command. However,
this conflicted with the shortcut used to invoke the File menu.

Fix this by using a different shortcut for the Get menu info.
2026-07-17 09:12:17 +02:00
PB fc2bf0bc22 Fix drawing color emoji in the drawing sample with MSVS 2015
The old-but-still-supported MSVS 2015 has problem parsing Unicode
literals outside the BMP when using the '\U' escape. Use raw octet
syntax to work around this.
2026-07-17 09:09:23 +02:00
Vadim Zeitlin 5ccdcd6b2a Update version to 3.3.4
Run misc/scripts/inc_release, update version.bkl and rebake.
2026-07-09 15:08:08 +02:00
Tobias PredelandVadim Zeitlin a239436129 Allow drawing color emoji using Direct2D under Windows
Enable color font option for Direct2D text drawing on Windows 8.1 and
newer.

Closes #19275.

Closes #26657.

Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>
2026-07-05 17:37:03 +02:00
Blake-Madden e871f1a841 Add wxWebView::PrintToPDF()
Add a possibility to save the page as PDF, possibly with some
non-default print settings.

Closes #26583.
2026-06-21 18:51:38 +02:00
Maarten Bent 89d1921478 Enable saving SVG for graphics context page in drawing sample 2026-06-13 21:15:23 +02:00
Maarten Bent 8746823e94 Fix overlay in drawing sample when wxGC is disabled 2026-06-13 21:15:14 +02:00
Vadim Zeitlin 22245eee13 Use more readable pane names in the AUI sample
This makes debugging simpler as panes can be identified more easily.
2026-06-01 21:05:53 +02:00
Blake-Madden 8b430b4897 Fix user scaling in SVG sample
Add missing conversion to the device units for the SVG view box.

Closes #26396.

Closes #26500.
2026-05-23 16:40:12 +02:00
Vadim Zeitlin 1bebb41046 Merge branch 'msw-rtl-fixes' of github.com:AliKet/wxWidgets
Don't mirror coordinates passed to GDI functions in RTL layout as they
already mirror them internally, resulting in incorrect coordinates being
used. As a consequence, wxDC::LogicalToDevice() now always returns
unmirrored coordinates, even in RTL layout, which is consistent with
wxGTK3 and wxQt.

Also fix scaling even in LTR layout by using ::ScaleWindowExtEx().

See #26398.
2026-05-19 03:15:07 +02:00
Vadim Zeitlin e1c72e28fc Add wxSVGGraphicsContext
Allow using wxGraphicsContext API for SVG generation.

Also add wxSVGFileDC::Begin/EndLayer() and wxSVGLayer RAII helper.

Closes #26395.
2026-05-19 03:01:39 +02:00
AliKet 8000d6e283 Fix rendering GridFrame (in griddemo) in RTL layout 2026-05-16 14:12:49 +01:00
iht f5cb9a66c0 Update wxwidgets.props and common.bkl for VS 2026
This is in line with the changes in a0f5c92b96 and 3d88038d01
2026-05-12 16:29:03 +02:00
Blake-Madden 6d818815c8 Add accessibility support to wxSVGFileDC
Adds an ARIA group builder and wrapper for drawing commands within SVG
output.

Closes #26379.
2026-04-15 02:30:09 +02:00
Randalphwa 722f58e238 Refactor wxRibbon to use wxBitmapBundle for icons and images
- Update wxRibbonPanel to accept wxBitmapBundle for minimised icons.
- Modify wxRibbonToolBar to utilize wxBitmapBundle for tool icons.
- Change wxRibbonAUIArtProvider and wxRibbonMSWArtProvider to handle
  wxBitmapBundle for drawing operations.
- Adjust wxRibbonGallery to support wxBitmapBundle for gallery items.
- Implement DPI change handling in wxRibbonBar, wxRibbonPage,
  wxRibbonPanel, and wxRibbonToolBar to recalculate sizes and redraw
  with the correct bitmap for the current DPI.
- Ensure all relevant methods and event handlers are updated to work
  with wxBitmapBundle instead of wxBitmap.

Closes #26117.
2026-04-14 23:52:51 +02:00
utelle 9ea3455164 Update German translation of the internat sample
See #26354.
2026-04-06 18:14:48 +02:00
Vadim Zeitlin 85eeee1757 Merge branch 'use-0-build-fixes'
Fix build errors when wxUSE_REGKEY, wxUSE_INTL and/or wxUSE_MIMETYPE are
set to 0.

See #26332.
2026-04-05 18:22:55 +02:00
Vadim Zeitlin b9c3bdd13e Initialize member variables in declarations in typetest sample
No real changes, just reduce the number of "#if" checks and make the
code a bit more readable.
2026-04-05 18:20:38 +02:00
Vadim Zeitlin e0321c2ddf Fix layout of new page in the notebook sample
Use sizer to position the buttons on the new pages instead of hardcoding
the buttons positions which, unsurprisingly, didn't work well and
resulted in buttons overlapping each other in high DPI.
2026-04-04 15:25:02 +02:00
Tim Stahlhut f3af0385e6 Fix sample builds for wxUSE_INTL=0 2026-04-02 19:07:43 -04:00
Tim Stahlhut b40c110047 Add wxUSE_MIMETYPE guard to samples 2026-04-02 19:07:43 -04:00
Tim Stahlhut aabed97b00 Fix build of sample when wxUSE_REGKEY=0 2026-04-02 19:07:43 -04:00
Bill Su b51b388f9a dnd: comment purpose of DnDShapeFrame::TryBefore() 2026-03-18 00:11:22 -04:00
Bill Su 1d91d71a8c dnd: improve autoscroll example
Using wxScrolled<> on the wxFrame meant that the status
bar moved when scrolling, so use give the frame a
wxScrolledCanvas child.

Also, wxDC::FloodFill() doesn't seem to work well with a
scrolling window.  (Maybe because the center point isn't
necessarily visible?)  Using DrawRectangle(), etc works
better.
2026-03-17 00:57:43 -04:00
Bill Su 2484d14ec6 wxScrolled<>: add support for autoscroll during drag
Add wxScrolled<> API to enable autoscroll when
wxScrolled<> does not have mouse capture.  The
intent is that autoscroll-without-capture can be
enabled on DragEnter and disabled on DragLeave.
2026-03-15 21:40:29 +01:00
Iulian-Nicu Serbanoiu 373249631b Add support for generating wxStylusEvent for graphical tablets
Implement this for wxMSW only for now.

Add a sample showing how to handle this event and allowing to test
tablet support.

Closes #26223.
2026-03-15 21:35:02 +01:00
Blake-Madden d9018cdb44 Add wxRibbonMSWFlatArtProvider, a (Fluent UI like) flat theme
Also add some previously missing checks to other art providers and
improve their documentation.

Closes #26253.
2026-03-13 15:47:20 +01:00
Blake-Madden 82f3989c82 Add new Print function to WebView that takes printer settings
Implement it for Edge, GTK and macOS backends and simply fall through to
Print() without parameters for the other ones.

Closes #26239.
2026-03-13 15:39:54 +01:00
Vadim Zeitlin edefb4475e Update version to 3.3.3
Run misc/scripts/inc_release and rebake and rerun autoconf.
2026-03-04 19:40:20 +01:00
Vadim Zeitlin 1528506767 Merge branch 'autoscroll-zone' of github.com:wsu-cb/wxWidgets
Make wxScrolled<> autoscroll region configurable.

See #25978.
2026-02-21 21:23:18 +01:00
Bill Su 673ee930e7 wxScrolled<>: simplify autoscroll zone config API 2026-02-21 00:52:13 -05:00
Vadim Zeitlin b0d50ffe91 Add wxGLContext::GetProcAddress()
Implement this function as a trivial wrapper for wglGetProcAddress(),
glXGetProcAddressARB() or eglGetProcAddress() depending on the platform
(currently not implemented for macOS).

Account for the known bug in some Windows OpenGL drivers by checking for
manifestly invalid return values and handling them as null.

Use the new function in wxGL code itself and in the pyramid sample.

Closes #9215.

Closes #26209.
2026-02-20 15:26:58 +01:00
Bill Su af88a67896 Improve auto-scrolling in wxScrolled
Support auto-scrolling both orientations simultaneously and make
auto-scroll region configurable.

Also allow changing auto-scroll dir without ending drag operation and
starting another one.

Closes #25978.
2026-02-14 22:05:33 +01:00
Lauri Nurmi d7fd467f18 Add wxTextEntryDialog::SetHint()
Sets the hint text for the underlying wxTextCtrl.

Closes #26176.
2026-02-11 13:46:22 +01:00
Vadim Zeitlin 0e3a3b8c55 Merge branch 'text-fixes'
Fixes for wxMSW wxTextCtrl and text sample.

See #26178.
2026-02-11 13:45:09 +01:00
AliKet 21bf245fc5 Remove unnecessary call to ClearBackground()
Calling ClearBackground() followed by a Refresh() doesn't make any sense
because ClearBackground() either a no-op (e.g. wxGTK) or just redundant
under (wxOSX and wxQt) or will be overwritten in wxMSW.
2026-02-10 15:33:48 +01:00
Daniel Collins acd8b7295e Document that wxApp::OnExit() should be called from overrides
And update the samples to follow the advice in the documentation.

Closes #26173.
2026-02-10 01:05:59 +01:00
Vadim Zeitlin de8545b8d9 Merge branch 'frame_modality' of github.com:AliKet/wxWidgets
Add window modality support to wxFrame.

See #26147.
2026-02-10 00:57:03 +01:00
Vadim Zeitlin 14687e2b0a Remove hard coded controls positions and sizes from text sample
This was not only useless, because the controls were repositioned by the
sizers later anyhow, but also actively harmful in at least one case,
when creating a control with wxTE_MULTILINE and wxTE_NO_VSCROLL styles
with too small height prevented the text from being appended to it.

Closes #26177.
2026-02-10 00:50:20 +01:00
Vadim Zeitlin 72447342ba Show text state in text sample with a single wxLogMessage() call
This is easier to read than 3 different log messages.

Also group pieces of related information together.

No real changes.
2026-02-09 23:59:23 +01:00
Vadim Zeitlin a54a4392a4 Fix format specifiers used for size_t in text sample
Using "%lu" for size_t resulted in an assertion failure under Win64.

Also remove casts of size_t to "unsigned int", even if this worked, it
is ugly and using "%zu" is simpler.

And remove even more useless casts of int to long too.
2026-02-09 23:53:15 +01:00
AliKet 6d92b3912f Fix printing sample compilation after recent changes 2026-02-08 13:25:16 +01:00