This ctor was previously present only in wxMSW, make it available in all
ports to allow the same code to compile everywhere.
In most of them wxDC argument is simply ignored, but in wxGTK and wxOSX
it is used to assign the appropriate scale factor for the new bitmap.
Enable previously wxMSW-only unit test checking for this.
This is similar to db6d565fad (Handle wxDC scale factor in wxBitmap ctor
taking wxDC in wxMSW, 2022-04-10), but for the constructor taking
wxImage and wxDC -- it should also use the DC scale factor, even if it
is not used for scaling the bitmap size in this case.
Add a unit test checking for this.
This is similar to 7382e99bbb (Create bitmaps even when given a wxDC
without an HDC in wxMSW, 2022-04-10) and does the same change to
wxBitmap ctor from wxImage and wxDC -- and also extends the unit test to
check for this under wxMSW, which is the only port in which this ctor is
currently available.
When using wxBitmap ctor taking wxDC, the bitmap should inherit the
scale factor of the DC, both because it's already the case in the other
ports and because it makes sense to do it.
Add a unit test checking that this is the case in all ports now.
It seems wrong to just fail to create the bitmap entirely if a not
wxMSWDCImpl-derived wxDC is provided to wxBitmap::Create(size, wxDC)
overload, especially because no check is done to see if the associated
HDC is non-null for wxMSWDCImpl-derived classes.
Instead, simply create a DIB-based bitmap with the specified size, as
this seems more useful and less surprising and was already the behaviour
in the other ports.
Add a test ensuring that this remains the case in the future.
Previously this ctor was only available in wxMSW and wxOSX, which was
especially strange as the equivalent Create() overload, taking wxDC, was
already available in all ports.
No real changes, just don't redeclare the classes already forward
declared in wx/bitmap.h in the files included (only) from it and don't
include redundant headers.
Also forward declare wxCursor and wxPixelDataBase in wx/bitmap.h itself
for consistency, as many (even though not all) headers use them.
Do not forward declare wxControl in wx/{msw,osx}/bitmap.h, however,
there is no reason to do it in this header.
Changes of 3719ab3725 (Add support for rearranging wxGrid rows order
interactively, 2022-04-02) broke TabularGridFrame in the sample, fix it
by removing the duplicate call to wxSizer::Add().
See #22260.
Closes#22296.
The number of columns has to be changed after updating the m_colAt and
m_colWidths arrays, as the native header uses them.
This extends the changes of a2d65663a0 (Fix assert when adding columns
to wxGrid using native header., 2013-05-31) to inserting and deleting
the columns too.
See #15225.
Closes#22294.
Both implementations don't add any additional features to the base
functions and therefore are not needed. wxPropertyGrid and other wxPG
controls are children of wxPropertyGridManager and DoFreeze/DoThaw calls
are forwarded directly to them in wxWindowBase::Freeze()/Thaw().
Closes#22269.
This fixes a regression introduced in d311c705d7 (Make native dialogs
application-modal in wxMSW, 2022-04-01) which resulted in a focus loss
after showing a modal dialog, as the parent window was still disabled
when the native modal dialog was closed and so focus couldn't be set to
any of its children and was simply lost as the result.
Fix this by not disabling the dialog parent ourselves, but leaving
handling the parent status to the native modal dialog, which already
takes care of disabling the parent it uses when it is shown and
re-enabling it when it is dismissed. Still use wxWindowDisabler to
disable all the other top level windows, if any, to ensure that the
modal dialogs are truly app-modal and not just window-modal, i.e. ensure
that #11887 still remains fixed.
Closes#22285.
This is not implemented yet, but this commit changes DoDisable() to
disable all windows except those in the list of the windows not to be
disabled instead of explicitly checking for just a single window to
skip.
Rename m_winDisabled to m_windowsToSkip to better describe its purpose
and also because it's a vector, and so should use plural form in its
name.
Finally note that AfterDisable() is called with NULL argument from the
ctor not taking the window to skip for compatibility with the old code,
but it's not clear if it's really the right thing to do and perhaps this
shouldn't be done.
No real changes yet.
Simplify the code translating from screen to client coordinates and make
it correct by using ScreenToClient() directly instead of emulating it
manually, which doesn't work quite right, at least in wxGTK.
Closes#22289.
Add a placeholder for the changes in the next release, restoring the
text removed in d8ec020109 (Copy the changes in 3.1.6 from Git notes to
the change log, 2022-04-04).
Use m_sign[XY] to determine if axes are inverted, as the full device transformation
may have negative scale for things like text rotation. Broken by
eafa248117 (Avoid mirroring text when wxDC axes are inverted with GTK3, 2022-02-13)
See #22278
Remove the instructions for applying the cherry-picked commit on
docs.wxwidgets.org as it's not used any more.
These instructions are probably insufficiently detailed, but we'll
probably switch to using GitHub Actions for updating the documentation
soon, so they won't be necessary for much longer anyhow and it's not
worth expanding them.
This ensures that we use correct font sizes with the DCs and, in
particular, fixes the font size in wxAutoBufferedPaintDC when using DPI
scaling different from 100% after the changes of e3557b8c0a (Respect
bitmap content scale factor in wxMSW wxMemoryDC, 2022-03-26).
See #22234.