Update the language database from the canonical sources:
- It now includes most locales supported by Windows 10.
- It now also has the following attributes for each entry:
- BCP 47-like locale tag.
- Reference to canonical name for generic language entries.
- Language name in this language itself.
- Also add data file with list of language script identifiers and
aliases based on ISO 15924.
- And update genlang.py to handle all the new attributes and data.
Also move database-related methods of wxLocale to wxUILocale and
just redirect wxLocale methods to the new wxUILocale ones (they are
still preserved for compatibility).
Closes https://github.com/wxWidgets/wxWidgets/pull/2594
Re-introduce OpenSavePanelDelegate for filtering when wildcard is provided (Spotlight search field was not working correctly, if extension was not known)
(and on macOS 10.11 allow programmatically showing the extra panel)
see http://www.github.com/wxWidgets/wxWidgets/pull/2592 and https://trac.wxwidgets.org/ticket/19324
co-authered-by: Jeff Young <jeff at rokeby dot ie>
Allow using vectors of bitmap bundles instead of wxImageList in the most
common controls using the latter: wxBookCtrl-derived classes (including
wxNotebook), wxListCtrl and wxTreeCtrl.
Also update more parts of wxAUI to use wxBitmapBundle.
See https://github.com/wxWidgets/wxWidgets/pull/2574
These accelerators are not shown in wxMenuItem label, but still will
work.
Implement support for them in all major ports and XRC.
Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
Previously, wxMediaCtrl would always automatically resize itself
whenever a video was loaded. If a wide video was loaded, this could
cause wxMediaCtrl to take up the entire space, hiding any other
widget(s) that might exist within the same sizer. Allow avoiding this
behavior by adding a new style, wxMC_NO_AUTORESIZE, which disables this
automatic resize behavior and allows handling the resize behavior
manually.
Take wxBitmapBundle instead of just wxBitmap in various public functions
and select the bitmap appropriate for the current DPI scaling when we
need to use it.
Note that this removes wxAuiScaleBitmap() which used custom scaling
logic that might be better than the generic approach used by
wxBitmapBundle, and so could result in a temporary regression in the
icons appearance in high DPI, but they will hopefully be replaced with
SVG versions soon, so that this shouldn't matter.
We need a valid window pointer to use the correct DPI scaling factor for
anything sizing-related, but this function didn't have any, so add one
to it now.
Unfortunately we need to have a default value for the new parameter for
backwards-compatibility purposes, but document that this parameter is
not really optional and must always be specified.
Also add wxWindow parameter to wxAuiTabContainer::SetRect(), which needs
it in order to pass it to this function.
Currently this window is only used for converting logical pixels to
physical ones, but it will also be used for selecting the correct bitmap
size in the upcoming commits.
This is required to be able to implement an object delegating actual
images display to another one, as e.g. wx{List,Tree}book do with
wx{List,Tree}Ctrl.
Using the default-constructed wxBitmapBundle object makes more sense
(and might be marginally more efficient) for the default value of a
wxBitmapBundle parameter.
No real changes.
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.
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.
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.
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.
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.
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().
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>
No real changes, but don't complicate the constants definitions
needlessly just to avoid changing the numeric value of WXK_LAUNCH_APP
constants as nobody should rely on them anyhow.
Not doing it simplifies things and allows to condense the mapping from
GDK keys to wx ones.
X11 defines Xf86Launch[0-9a-f], which are then also defined as
GDK_KEY_Launch[0-9A-F].
Unfortunately, keys which are not mapped are just plain ignored and the
application is then not able to receive these keyboard events at all.
The original PR https://github.com/wxWidgets/wxWidgets/pull/157 mapped
only LaunchA/B to WXK_LAUNCH_APP1/2, this patch adds the whole range of
keys and keeps LAUNCH_A/B as aliases for WXK_LAUNCH_APP1/2
This new function will allow selecting the bitmap of the most suitable
size and automatically react to DPI scale changes (although this hasn't
been implemented yet) in all controls using image lists.
For now, only wxNotebook in wxMSW has been updated to work with it, the
other classes and ports will be updated to override OnImagesChanged()
instead of SetImageList() later.
Also update the notebook sample to use SetImages() rather than
SetImageList() -- which means that it doesn't show the icons any longer
in non-MSW ports, which haven't been updated yet.