5694 Commits
Author SHA1 Message Date
Vadim Zeitlin fb2e182b34 Merge branch 'listctrl-check-events'
Make events sent by wxListCtrl::CheckItem() consistent across all
platforms.

See #27154.
2026-10-04 19:30:26 +02:00
Vadim Zeitlin 107ff30b47 Make wxListCtrl::CheckItem() event generation consistent
Previously, wxMSW native version only sent wxEVT_LIST_ITEM_[UN]CHECKED
if the item state has really changed, while the generic version, used in
wxGTK and wxOSX, did it unconditionally and wxQt native version never
did it at all.

Make all ports behave as wxMSW, which seems like the most useful
behaviour and add a unit test checking that this behaves as expected.

Note that virtual controls still always send the events in all ports, as
they work as notifications for the model in their case, and a new test
checks that this is the case in all ports (except wxQt which doesn't
support them).
2026-10-04 15:41:02 +02:00
Vadim Zeitlin 19135e81ed Merge branch 'docs-msw-hicon-ids' of github.com:trypsynth/wxWidgets
Minor wxMSW-specific documentation improvements.

See #27151.
2026-10-04 14:40:19 +02:00
Ryan Lucia e998defe63 Add inline IME support to wxStyledTextCtrl
Implement native pre-edit handling for wxGTK and Cocoa using Scintilla's
tentative input support.

Use a private text input client bridge to complete Cocoa
NSTextInputClient and support GTK pre-edit callbacks without changing
the public API or existing class ABI.

Inline composition is now the default on GTK and Cocoa, existing code
may call SetIMEInteraction(wxSTC_IME_WINDOWED) to retain the previous
behaviour.

While composition is active under wxGTK, the IM context is given first
access to key events, as keys such as Enter and Backspace confirm or
edit the pre-edit text and must not be handled as normal key events.

Rolling the pre-edit text back relies on tentative undo actions being
recorded, so windowed interaction is used while undo collection is
disabled.

Document platform defaults and add regression tests for composition,
UTF-16 ranges, replacement ranges, virtual space, undo, and mode
switching.

Closes #26228.

Closes #26757.
2026-10-04 14:35:59 +02:00
Quin Gillespie 839735b1f9 Document wxIcon::GetHICON()
This wxMSW-specific method was public but not documented.

Closes #17221.
2026-10-03 19:26:02 -06:00
Vadim Zeitlin cbc51e8fd4 Simplify and fix wxMiniFrame documentation
Don't claim contradictory things in consecutive lines.

See #27139.
2026-10-01 16:55:04 +02:00
Richard e690b71577 Document that STC marker line numbers are 0-based
Clarify that wxStyledTextCtrl marker methods use zero-based line
numbers.

Fixes #13581.

Closes #27132.
2026-10-01 16:10:17 +02:00
Richard 58f05eca0c Document wxStaticText Wrap markup behaviour
Clarify that wxStaticText::Wrap() operates on the plain text label and
strips formatting previously set with wxControl::SetLabelMarkup().

See #13389.

Closes #27131.
2026-10-01 16:08:38 +02:00
Richard 7043a8e704 Document wxActiveXEventNativeMSW
Add interface documentation for wxActiveXEventNativeMSW, including the native
IDispatch::Invoke() fields exposed by wxActiveXEvent::GetNativeParameters()
and the lifetime of the returned event parameters.

Fixes #12410.

Closes #27129.
2026-10-01 16:04:34 +02:00
PB 801b332ece Fix typos in the docs
Discovered by an LLM as the result of "a targeted scan for common
misspellings, duplicated words, and nearby wording errors".

Reviewed and confirmed by a human.

Closes #27122.
2026-09-29 14:32:54 +02:00
Maarten Bent da04529805 Update 3rd party libraries submodules
Add new files to the build system and regenerate it.

Closes #27020.

Closes #27074.
2026-09-29 01:50:48 +02:00
Vadim Zeitlin de2186195c Merge branch 'accel-key-event'
Allow customizing priority of accelerators compared to normal key
events.

See #27106.

Closes #22625, #22630.
2026-09-28 16:36:27 +02:00
Quin Gillespie 787dcd2de0 Add wxWindow::SetAccessibleName()
The new function allows to set the name used by screen readers for any
window, e.g. for buttons showing only a bitmap or text controls without
a label before them.

Implement it for wxMSW and wxOSX and add documentation and a MSW-only
unit test.

Closes #27056.
2026-09-27 21:24:26 +02:00
Randalphwa 7ed229adcd Switch to using wxBitmapBundle instead of wxImage in wxHTML
Using wxBitmapBundle means SVG files can now be used, multi-resolution
bitmap bundles can be used, scaling for high DPI now uses scaling code
for bitmap bundles which generally provides better scaling results.

Also add support for loading SVG images from wxInputStream and use to
implement support for compressed .svgz files.

Closes #26474.
2026-09-27 16:07:27 +02:00
Vadim Zeitlin 82f0bc1824 Add labels to improve wxRibbonGallery items accessibility
Gallery items have just a bitmap, an ID and the application's client
data, so there is nothing a screen reader can announce for them and they
are read as "list item 3 of 39", which is useless.

Add Append(bitmap, id, label) and Set/GetItemLabel() and use the label
as the accessible name of the item. The label is not drawn, as the items
of a gallery are bitmaps by design, it only exists to be announced. It
could also be used for tooltips later, which the items don't have
either.

The ribbon sample already knows the names of the colours it puts in its
galleries, so it passes them as the labels now, which also makes them a
useful test case.

Closes #27100.
2026-09-27 01:48:55 +02:00
Quin Gillespie 00ee56c01d Allow opening wxSearchCtrl menu from keyboard with Alt-Down
The search menu could only be opened by clicking the button showing it,
which doesn't accept focus from the keyboard on purpose, so keyboard and
screen reader users couldn't use it at all.

Handle Alt-Down in the text part of the control and show the menu from
there, as suggested in the comments of the original ticket.

Fixes #18457.

Closes #27093.
2026-09-27 01:48:55 +02:00
Blake-Madden d54b211e26 Remove legacy functions from docs that were removed
These functions don't exist any more, so it's not just useless but
actively harmful to document them as if they still did.

Closes #27092.
2026-09-27 01:48:55 +02:00
Vadim Zeitlin 4cb7aaffa9 Merge branch 'LunaSVGDocs' of github.com:Blake-Madden/wxWidgets
Fix docs and CMake for wxUSE_LUNASVG option.

See #27089.
2026-09-27 01:48:55 +02:00
Vadim Zeitlin 38227a3f4a Merge branch 'RibbonReader2' of github.com:Blake-Madden/wxWidgets
Add screen reader support to the ribbon under MSW.

See #27075.
2026-09-27 01:48:55 +02:00
Richard 04f24ff2b3 Document grid table notification order
Clarify that wxGridTableMessage notifications describe table changes
that have already happened and should be sent only after the custom
table updates its own data model.

Add an InsertRows() example showing the correct order and clarify that
insert/delete positions are the positions at which rows or columns
change.

Fixes #16508.

Closes #27081.
2026-09-27 00:58:39 +02:00
Vadim Zeitlin 5ca0f8aa73 Implement configurable accelerators support for wxOSX
Use the new API, i.e. call ClaimsKeyBeforeAccelerator() and send
wxEVT_ACCELERATOR_KEY, in wxOSX too, whenever possible, i.e. not for
Cmd-Letter used by the menu items as we never get key events for them at
all.

This probably could be worked around by overriding performKeyEquivalent:
but for now leave it like this because hopefully there should be no
conflict between menu accelerators and standard text editing keys as
Cmd+C etc act on the focused window anyhow by default, so the behaviour
should be already correct anyhow.
2026-09-26 23:57:58 +02:00
Vadim Zeitlin 1043551376 Allow customizing priority of accelerators and normal key events
When deciding whether a key press should trigger an accelerator or be
handled by the currently focused window different ports behaved
differently, with wxGTK always prioritizing the focused window and the
other ports giving priority to the accelerator, and neither of them
allowed customizing this.

Change this now by introducing 2 ways to do it: first, a window can
override new ClaimsKeyBeforeAccelerator() virtual function to specify
which keys it wants to handle itself, even if they correspond to an
accelerator. And second, send wxEVT_ACCELERATOR_KEY event which can be
handled by the application, typically centrally in its wxFrame-derived
class, to decide if it wants some accelerator that it defines to not
steal the key from the window or, on the contrary, to always do it, even
if the window overrides ClaimsKeyBeforeAccelerator() as wxTextCtrl does.

Note that while ClaimsKeyBeforeAccelerator() replaces some uses of
wxMSW-specific MSWShouldPreProcessMessage(), but it's still needed to
prevent the key getting eaten by IsDialogMessage().

This is not a backwards-compatible change as it changes the default
wxGTK behaviour, but it is now compatible with the other ports and can
be easily customized if necessary.

This commit only implements this for wxMSW and wxGTK, other ports will
be updated too soon.
2026-09-26 23:57:58 +02:00
Vadim Zeitlin 833dcf56f9 Add const wxWindow::GetAcceleratorTable() overload
This will allow const member functions to call GetAcceleratorTable()
without const_casts.
2026-09-25 18:21:23 +02:00
Blake-Madden ab4f0e8850 Fix docs and CMake for wxUSE_LUNASVG option
`ON` is not valid for `wxUSE_LUNASVG` because it goes through `wx_add_thirdparty_library`. This requires: `builtin sys OFF`. In the build script, using `ON` will fail before it reaches lunasvg.cmake. So `builtin` is the only correct option.
2026-09-25 07:44:26 -04:00
Vadim Zeitlin fb1258f87d Extract existing code into wxAcceleratorEntry::MatchesEvent()
Add the new function checking if a (key) event and wxAcceleratorEntry
correspond to the same key combination.

This was already used in the generic wxAccelerator implementation and
wxOSX and will be used in the other ports too soon, so move this code
into common function.

It can also be useful for the applications, so document it as well.
2026-09-25 03:20:14 +02:00
Vadim Zeitlin 8f82bf6edf Merge branch 'ime-control'
Provide some control over IME and use it to fix wxGrid when using IME.

See #27026.
2026-09-25 00:05:20 +02:00
Vadim Zeitlin 1afd6fba71 Merge branch 'msw-non-bmp-keys'
Add support for handling characters outside of BMP to wxMSW.

See #27016.
2026-09-25 00:04:20 +02:00
Vadim Zeitlin 3f60ae43c0 Document that MDI windows don't appear correctly in dark mode
Not only they don't have the expected dark appearance, but the child MDI
frame buttons don't appear at all, making them unusable.

See #27077.
2026-09-24 23:52:15 +02:00
Blake-Madden 4100a81057 Add screen reader (MSW) support to the ribbon 2026-09-23 18:31:15 -04:00
Quin Gillespie f91f5ae270 Allow giving focus to read-only wxTextCtrl from keyboard in wxMSW
In wxMSW, single line read-only wxTextCtrl doesn't accept focus from
keyboard, so keyboard and screen reader users can't Tab to it and read
its contents.

Add wxWindow::EnableFocusFromKeyboard(), the counterpart of the existing
DisableFocusFromKeyboard(), to let the application allow this.

Update the documentation and add a wxMSW-only unit test.

Fixes #10760.

Closes #27054.
2026-09-22 23:07:25 +02:00
Vadim Zeitlin a16da69037 Merge branch 'generic-treectrl-getbestclientwidth'
Fix best size computation in wxGenericTreeCtrl and several bugs
discovered while working on this.

See #27043.
2026-09-22 23:03:06 +02:00
Vadim Zeitlin 621ee93962 Merge branch 'RibbonReader' of github.com:Blake-Madden/wxWidgets
Add keyboard navigation to Ribbon.

See #27046.
2026-09-21 23:14:42 +02:00
Richard cecc7ee4fd Document wxToolTip::Enable() platform limits
Clarify that wxToolTip::Enable() only affects tooltips set with
wxWindow::SetToolTip() under wxMSW, is not implemented in wxOSX or
wxQt, and is ineffective with GTK 3.10 and later.

Closes #27029.
2026-09-21 18:05:06 +02:00
Blake-Madden 2ab4d013d5 Document ribbon keyboard navigation 2026-09-21 11:47:01 -04:00
Vadim Zeitlin f387863363 Use GetScrollbarSize() instead of wxSYS_HSCROLL_[XY]
When determining the size of a window, GetScrollbarSize() should be used
instead of using the metrics values because the function takes into
account the case of overlay scrollbars, which are used by default with
GTK 3, unlike the metric value.

Also update the documentation to recommend doing this.
2026-09-21 16:46:55 +02:00
Vadim Zeitlin 81ea3c8854 Handle characters outside of BMP in wxRichTextCtrl under MSW
Change wxRichTextEvent::m_char to be of type wxUniChar and not wxChar.
This is mildly backwards-incompatible but the break is arguably worth
not adding some new GetUnicodeCharacter().
2026-09-20 22:17:37 +02:00
Vadim Zeitlin 6b4a5fd64c Add support for non-BMP characters in wxKeyEvent in wxMSW
Recombine the 2 WM_CHAR messages we receive for high and low surrogate
pair into a single Unicode character which can be retrieved using the
new wxKeyEvent::GetUnicodeChar() member function.

Update documentation and comments to recommend using the new function
instead of GetUnicodeKey().

Also update the keyboard sample to use it to be able to show events for
supplementary characters under MSW.

Closes #25135.
2026-09-20 21:46:44 +02:00
Vadim Zeitlin eb685ad058 Disable IME when the current wxGrid cell doesn't support text input
Some cells may be editable but not accept text input, e.g.
wxGridCellBoolEditor handles some keys but only to set/clear/toggle the
checkbox it shows, and the IME should not be shown for them.

Avoid adding a new wxGridCellEditor::AcceptsTextInput() virtual function
by reusing the existing IsAcceptedKey() to probe for text input support:
we decide that if "a" is a valid key, then any text can be entered.

If this hack turns out to be too limiting or surprising, we can always
add AcceptsTextInput() later.

See #24558.
2026-09-20 21:24:12 +02:00
Vadim Zeitlin 068588b2f7 Provide a way to position IME window
Add wxWindow::UpdateInputMethodCursorRect() which can be used to let the
IME know where to place its window and use it in wxGrid to show it near
the cell being edited.

See #24558.
2026-09-20 02:49:35 +02:00
Vadim Zeitlin cc43fa9e22 Add wxWindow::EnableInputMethod() for disabling IME
Implement it in wxMSW, wxGTK and wxOSX.

This will be used to prevent IME window from appearing for windows that
currently don't accept keyboard input even if they accept focus.
2026-09-20 02:32:07 +02:00
Vadim Zeitlin b01632cf3b Implement wxAnimation::Get{FrameCount,Delat,Frame}() in wxGTK
Iterate over the animation manually to find the frame we need.

Update the sample to allow showing individual animation frames.

Closes #27009.

Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>
2026-09-19 12:57:54 +02:00
Vadim Zeitlin 3cdb10d42d Save DPI in wxPersistentTLW to handle DPI change correctly
Add support at wxPersistentWindow level for saving the DPI at which the
window coordinates were saved to allow rescaling the values by the ratio
of this DPI to the current one if the DPI has changed between saving and
restoring.

This allows keeping the same proportional size of the window after DPI
change on the platforms not using DPI-independent pixels (such as wxMSW)
too by just using the new {Save,Restore}Coord() functions instead of
{Save,Restore}Value() for any quantities that need to be scaled.

Do this for wxPersistentTLW to update the window size to remain
proportionally the same after DPI change.
2026-09-14 02:39:45 +02:00
Vadim Zeitlin ac9827014f Flush file data to disk in wxTemp{F,}File::Commit()
The danger of losing data seems to outweigh any performance
considerations here, so do call fsync() before renaming the file to
ensure that the data is really on disk before overwriting the original
file.

See #25088.
2026-09-11 17:36:13 +02:00
Vadim Zeitlin 793883bf19 Add wxFFile::FlushAndSync() calling fsync() too
The existing Flush() only called fflush() but this is not enough to
really flush the file to the disk.

We can't start calling fsync() from Flush() as this may significantly
slow down the existing code. We could add a separate Sync() but as it
almost always makes sense to flush the file before syncing it, add a new
function doing both at once instead.
2026-09-11 17:36:13 +02:00
Vadim Zeitlin e88fd128cd Add wxGetFileDescriptor()
This function already existed internally, make it public as it can be
useful and will be used by wxFFile itself in the upcoming commit.
2026-09-11 17:36:13 +02:00
Vadim Zeitlin f85b357fbf Improve wxRenameFile() documentation
Don't claim that it supports "renaming" to a directory because it does
not and never did, under any platform.

Also document the parameters to repeat that "newpath" must be a file.
2026-09-11 03:05:00 +02:00
Vadim Zeitlin b8896d9f7f Make wxRenameFile() really atomic under MSW
Use MoveFileEx() as just about everybody else (Boost, Python etc) does
because this is the closest equivalent to POSIX rename().

This is a behaviour change compared to earlier 3.3.x series as
ReplaceFile() used until now (see #25089) preserved file attributes but
now we don't do it any longer -- but we provided CopyAttributesFrom()
which can be used in the application if it needs it.

Closes #26713.
2026-09-11 02:55:11 +02:00
Vadim Zeitlin f47de7bfd8 Add wxFileName::CopyAttributesFrom() and use it in wxTemp{F,}File
Copy the target attributes that are easy to copy and make sense to
preserve under Windows too instead of only doing it under Unix in
wxTemp{F,}File and do it in a new wxFileName::CopyAttributesFrom()
function instead of duplicating the same code in both classes.

The new function can be potentially useful on its own, so make it public
and document it.

Add a unit test verifying that the attributes are preserved after
overwriting the file with wxTemp{F,}File.
2026-09-11 02:28:00 +02:00
Vadim Zeitlin ab3f5e7299 Merge branch 'aui-button-event'
Restore generation of wxEVT_AUINOTEBOOK_BUTTON events.

See #26978.
2026-09-10 17:58:22 +02:00
Vadim Zeitlin dcfc167163 Merge branch 'aui-wayland-drag'
Implement dragging AUI panes under Wayland.

See #26969.
2026-09-10 17:56:55 +02:00