wxIMPLEMENT_DYNAMIC/ABSTRACT_CLASS* is documented to be used with a
semicolon, though it is not mandatory.
Not touching headers yet, to avoid -pedantic warnings in user code.
See https://github.com/wxWidgets/wxWidgets/pull/2584
`AC_HELP_STRING` and `AC_CANONICAL_SYSTEM` are deprecated past autoconf
2.70+. A quick runthrough with `autoupdate` brings `wxwin.m4` in line
with this.
Closes https://github.com/wxWidgets/wxWidgets/pull/2585
Change from old `m_statusItem` API to new `[m_statusItem button]` API
because the former is now deprecated and the new one does automatic
image scaling.
Closes https://github.com/wxWidgets/wxWidgets/pull/2573
It may not be obvious how to build the tests, so add a section
explaining this to the existing file containing the instructions about
writing the tests and add a README to the tests directory itself to
increase chances that this file will be found -- hopefully anybody
interested in the tests will look at the README in the directory
containing them.
Use GetBitmapBundle(), via a helper GetPageBitmapBundle() function which
is going to be useful elsewhere too, rather than GetImageList(), as the
latter only works if the images were set using SetImageList(), while the
new version does the right thing both in this case and when the images
were set using SetImages().
Return the image list set via {Set,Assign}ImageList() if SetImages()
hadn't been called to make this function return the correct image list
in any case, both when using the old wxImageList API and the new one
using wxBitmapBundle.
This commit is best viewed ignoring whitespace-only changes.
It should be possible to call this function on wxWithImages objects
contained in derived classes too.
This commit is best viewed with --color-moved git option.
Still no real changes, but this makes the code simpler and more robust
and prepares the way for adding wxListCtrl methods taking vectors of
bitmap bundles.
This replaces the previously added UpdateImageListIfNecessary() as we
almost always needed the image list after calling that function anyhow,
so it makes more sense to return the image list from it -- which also
required renaming it.
No real changes.
Put the code common to all wxListCtrl implementations in the common base
class instead of duplicating it in wxMSW, wxQt and generic versions.
No real changes yet, this is a pure refactoring which prepares for the
upcoming changes.
Not sure if this is actually that useful, as this commit didn't modify
any of the still existing lines anyhow, but it seems logical to exclude
this commit, as it didn't make any real changes, but touched almost all
files.
Just use wxWithImages::GetBitmapBundle() directly with wxGtkImage
without passing by wxImageList -- this suffices to have working high DPI
support for notebook page icons.
This function can be used in the ports that don't require wxImageList
(i.e. anything but wxMSW) to use wxBitmapBundle if it's available,
rather than passing by wxImageList.
The size must be specified in logical, and not physical, pixels and the
failure to do use the correct units results in a silent (!) failure to
add any bitmaps to the wxImageList later.
Override OnImagesChanged() to call UpdateImageListIfNecessary() even in
wxGenericTreeCtrl for now, although in the future it would really make
sense to stop using wxImageList in its implementation and just use
wxBitmapBundle directly instead.
wxMSW is the only one which really needs an image list, as it's required
by the native control.
Also update the sample, even though it doesn't look very nice because
its icons are only available in a single size, so we have to always
scale them.
Categories of properties can be nested so we need to search on all category
levels for the the category wxPGProperty belongs to.
And wxPGProperty removed from the alphabetical list can be a subproperty
of another property so it's parent doesn't have to be the root of the list
and we don't have to check this with assertion.
Closed#19310.
This was added way back in 618a5e382a (Applied Greg's patch to tree
control and related., 2001-08-18) for some reason, but probably was
never needed and definitely isn't any more.
This function is not really wxBookCtrl-specific and can be used with
other classes as well, so allow reusing it in them.
No real changes, this is just a refactoring.
If given wxPGProperty is a subproperty of another property (its parent
is neither root nor category) it shouldn't be added directly
to the alphabetical list. It should be just added as a child property.
Replace direct use of wxImageList with the use of wxWithImages, which
will make adding support for using wxBitmapBundle later simpler.
In fact, this already somewhat simplifies the code by removing the need
to manually take care of m_ownsImageListXXX flags.
Use HAS_GENERIC_TREECTRL for testing whether we're actually using it or
not instead of checking for USE_GENERIC_TREECTRL and then port names
with a native control, which was done inconsistently, as it included
wxQt in one place, but not the other one.
Also avoid repeating CreateButtonsImageList() declaration twice, as this
resulted in having unbalanced curly braces in this file, which was just
unpleasant.
No real changes.
Just pretend that the images themselves have changed, this should be
enough to recreate wxImageList from the bundle using the new scale
factor in UpdateImageListIfNecessary().
Stop throwing std::bad_alloc when BMP has large/negative biClrUsed by
checking that biClrUsed has a reasonable value before attempting to
allocate however much memory it indicates.
Add unit tests showing the loading such invalid bitmaps now correctly
returns an error rather than throwing an exception.
Closes https://github.com/wxWidgets/wxWidgets/pull/2583Closes#19295.
Mention that wxTE_RICH2 should be used instead of wxTE_RICH and that it
can now be turned out automatically if the initial text is too long.
See #19303.
Such thread names can be shown by some debuggers, and depending on
the OS and compiler versions used, they can be visible in process
lists and crash dumps.
Co-authored-by: PB <PBforDev@gmail.com>