All OLE-related classes and enums were described
in interface header msw/ole/automatn.h which led
to incorrectly listed include files in the generated
documentation for those classes and enum that
were actually declared in different include header files.
The documentation in the interface files has now been
split into files with names matching the actual include files.
Closes#18536
Shaped windows have the size defined by the shape and it's not really
clear what calling SetSize() on them should do -- so just document that
it's not supposed to work.
Closes#9794.
Instead of doing basically nothing, this call completely mislaid out the
control as -1 were used used literally instead of meaning "use the
current geometry", as they're supposed to. Fix this by handling
arguments with the value of -1 specially.
Such call was done by wxCompositeWindow::SetLayoutDirection() used by
the widgets sample and explained why the slider couldn't be seen when
switching to its page in this sample.
Closes#18442.
No real changes, just add a simple helper function instead of
duplicating it in 2 different places.
This also provides a unique place to write the comment explaining why
PMPrinterGetID() is being used instead of PMPrinterGetName().
See #16774.
Apparently, the user-readable name retrieved by PMPrinterGetName() is
not necessarily unique when multiple printers are available, so use
PMPrinterGetID() which is guaranteed to return a unique string.
Closes#16774.
This implementation suffers at least from 2 problems:
1. It doesn't support icons at all.
2. It toggles the checkbox when clicking on the text and not just on the
checkbox itself, as would be expected.
but it's still better than the current version which simply doesn't work
at all, i.e. can't be toggled in any way (and also doesn't draw itself
correctly when using dark mode under macOS 10.14+), so use it for now.
A better solution would be to fix the problem with ActivateCell() not
working at all (see #17746) and update the code to respect drawing in
dark mode.
Closes#17473.
Closes https://github.com/wxWidgets/wxWidgets/pull/904
Retain the graphics context for the helper overlay window as otherwise
it gets released leaving us with a dangling pointer.
Unfortunately this still doesn't make the existing code actually work.
See #18399.
Fixes to wxUIActionSimulator allowing the tests using it to work for
wxGrid in wxGTK.
And some improvements and bug fixes to wxGrid itself.
Closes https://github.com/wxWidgets/wxWidgets/pull/1609
Improve the class description.
Mention that one needs to call wxAutomationObject::SetConvertVariantFlags()
with wxOleConvertVariant_ReturnSafeArrays to actually receive a
wxVariant with SAFEARRAY (if possible).
Make better use of now-documented wxSafeArray in the code examples.
Closes https://github.com/wxWidgets/wxWidgets/pull/1611
Add wxMSVC_VERSION_ABI_COMPAT definition to the version of the file
included in the binary distribution to make it compatible with the
actual DLL names.
Closes#18510.
The loop computing "colswidth" (the sum of widths including last column)
actually incorrectly computed "lastColX" (the sum of widths until the
last column), fix this.
See #18295.
Use "relative pixels" (known as DIPs in wx) instead of dialog units, as
the latter ones don't scale correctly due to rounding errors when using
high DPI.
Also take into account the fact that the 1px invisible border around the
visible part of the buttons is not scaled by the standard control, so
don't apply scaling to this part when determining the best size neither.
Closes#18528.
This results in buttons being forced to be too tall when using high DPI
and is useless anyhow, as all callers of this function deal with the
height by increasing it to the minimum acceptable value already (or
discard it entirely in wxMessageDialog::AdjustButtonLabels()).
See #18528.
Avoid spurious error in the unit test by calling Now() and UNow() a few
times in a row until they return the same second, as we may be unlucky
enough for this not to be the case when we call them just once.
Fix autosizing broken in 3c72396a36 and
not fully fixed by f7e335c031.
Simplify the code to make it more obviously correct, by separating the
computation of the extent suitable for the label and determining the
size to use taking into account the extents of both the column data and
the its column.
Also add the unit test checking that auto-sizing works correctly in all
the different cases.
Closes https://github.com/wxWidgets/wxWidgets/pull/1600
Co-Authored-By: Ilya Sinitsyn <the_siv@mail.ru>
On DC with a non-rotated coordinate system drawing a filled rectangle with ExtTextOut() Win API is faster than drawing a line with MoveTo()/LineTo() so on such DCs we can use ExtTextOut() to draw horizontal/vertical lines with solid colors and square ends instead of calling MoveTo()/LineTo().
See #18517.
This method is supposed to be overridden in the sub-windows of a
composite control (and is indeed correctly implemented in
wxGridSubwindow), but it doesn't make any sense to implement it in the
parent window itself.
This method was probably never executed (which is how the problem went
unnoticed for 10+ years since 760be3f7cb),
but it's still wrong to define it here, so remove it.
This is unnecessary as TAB navigation is not supposed to work between
wxGrid children and actually harmful as this resulted in SetFocus()
doing nothing, instead of setting focus to wxGridWindow, if the focus
was on wxGrid itself for some reason (this happened at least in the grid
unit tests and resulted in failures because the in-place editor didn't
appear as expected).
Somehow, mouse release events generated immediately after the mouse
press ones are sometimes (not always, but often enough to reliably
prevent the test suite from passing) simply lost, i.e. not received by
the GTK event loop.
The only workaround seems to be to introduce an artificial delay, which
does avoid the problem, at the price of making the tests run longer and,
worse, not really solving the underlying problem, whatever it is. But
it's still better than nothing.
Unbind the event handler referencing a local variable, as leaving it
bound could result in a crash later if another paint event was generated
for the window for whatever reason.
Doing it like this requires using 2 different objects, but the
complexity can be still hidden inside WaitForPaint class, with the 2nd
object being just a member of it, and, in fact, makes the code using it
simpler as it doesn't need to use a boolean variable with it.
Restore the checks for the model stamp, reverting the changes of
18594afe76: we still need to ignore the
calls to at least iter_children() and iter_nth_child() model methods
that can be called from inside gtk_tree_view_set_model() when we reset
the model, as running these methods crashes when trying to use the
pointers to already deleted items.
For consistency and robustness, add checks for the model stamp to all
the methods and not just those two, just in case other ones end up being
called later in some way.
Also add a unit test checking that DeleteAllItems() doesn't crash and
does delete all items.
Closes#18533.
The previous fix in 5442edbbe9 corrected
the type for the older NetBSD versions, but not NetBSD 10, which now
uses "void*", as all the other platforms, so restrict the original fix
to NetBSD versions < 10 only.
See #18199.
For some reason, names were used for cyan and light grey, even though
all the other ones used RGB values since refactoring the stock objects
to be created on demand in f516d98637.
Use RGB values for these two as well now.
Closes#18530.