Commit Graph

6594 Commits

Author SHA1 Message Date
Vadim Zeitlin
559ea66e55 Use DPI aware manifests for MSVS 2022 too 2021-12-18 13:22:59 +01:00
Vadim Zeitlin
e4ff06ebdd Also remove mentions of amd64_dpi_aware_pmv2.manifest from the manually maintained MSVS projects 2021-12-17 22:00:42 +01:00
Vadim Zeitlin
5d6b2f6704 Rebake after parent commit changes 2021-12-17 21:29:49 +01:00
Vadim Zeitlin
c834c0b8b7 Add GetUpdatedAscendingSortIndicator() helper function
It seems like this function will need to be used in every implementation
of EVT_LIST_COL_CLICK handler when using sorting, so it makes sense to
provide it in the library itself.
2021-12-14 14:22:08 +00:00
Vadim Zeitlin
52649cc566 Remove wxListCtrl::EnableSortIndicator()
The old API seems unnecessarily complex, it is simpler to just let the
application call ShowSortIndicator() itself from its
wxEVT_LIST_COL_CLICK handler, which needs to be defined anyhow in order
to actually sort the items, rather than require it to enable sort
indicator, explicitly set it initially and then remember to not set it
any longer in response to the column clicks.

Also make RemoveSortIndicator() non-virtual and implement it simply as
ShowSortIndicator(-1) because this actually simplifies the code too.
2021-12-14 14:09:23 +00:00
Vadim Zeitlin
6156bb1b84 Merge branch 'wxlistctrl-sort' of https://github.com/MaartenBent/wxWidgets
Add sort indicators support to wxListCtrl.

See https://github.com/wxWidgets/wxWidgets/pull/2598
2021-12-09 21:29:39 +01:00
Vadim Zeitlin
933ac7afbb Merge branch 'dvc-null-values'
Improve handling of null values in wxDataViewCtrl to be more compatible
with the earlier versions.

See https://github.com/wxWidgets/wxWidgets/pull/2602

See #18934.

Closes #19333.
2021-12-09 20:00:50 +01:00
Maarten Bent
366e3addf7 Demonstrate sort indicators in wxListCtrl sample 2021-12-09 17:32:08 +01:00
Vadim Zeitlin
419a97a791 Merge branch 'svg-file'
Add wxBitmapBundle::FromSVGFile() helper.

See https://github.com/wxWidgets/wxWidgets/pull/2600
2021-12-01 23:27:33 +01:00
Scott Talbert
82735e8612 Use wxSpinCtrl best size in wxGenericCalendarCtrl::DoGetBestSize
This fixes the wxGenericCalendarCtrl on wxGTK3 where the SpinCtrl is
much wider than on other platforms and should also ensure that the
control is always big enough in all locales under Mac.

Closes https://github.com/wxWidgets/wxWidgets/pull/2604

Closes #11444.
2021-12-01 23:23:34 +01:00
Vadim Zeitlin
0c944ff5be Test returning invalid value from GetValue() in dataview sample
Add an item with unspecified year and update the custom model GetValue()
to not return anything in this case to check, and confirm, that all
implementations handle this properly by simply not showing anything in
the cell in this case.
2021-12-01 01:43:52 +00:00
Vadim Zeitlin
2435ceb2bb Add a possibility to show SVG images to the image sample too
This is useful at least for demonstrating wx SVG support.
2021-11-29 12:55:22 +00:00
utelle
1a4a0eee48 Update German translation of internat sample
See https://github.com/wxWidgets/wxWidgets/pull/2594
2021-11-27 17:44:20 +01:00
Stefan Csomor
8cae66a897 adding bundle identifiers, needed for newer systems 2021-11-22 18:49:18 +01:00
Stefan Csomor
b4c028ec82 adding workspaces 2021-11-22 18:13:03 +01:00
Artur Wieczorek
fb5be73f6f Change accelerator key for "toggle layout" menu item
Current Ctrl-L is already used by another menu item.
2021-11-22 10:54:41 +01:00
Artur Wieczorek
acab1ec756 Add option to change layout direction to render sample 2021-11-22 10:41:40 +01:00
Artur Wieczorek
838a1a7640 Add option to change layout direction in dataview sample
See #19325.
2021-11-22 10:40:37 +01:00
Vadim Zeitlin
7a03d5fe9b Merge branch 'mediaplayer_sample'
Add wxMC_NO_AUTORESIZE and use it in mediaplayer sample to fix it
layout.

See https://github.com/wxWidgets/wxWidgets/pull/2562
2021-11-20 21:46:29 +01:00
Artur Wieczorek
87394856f5 Use wxBitmapBundle in wxPropertyGrid 2021-11-19 17:52:56 +01:00
Vadim Zeitlin
94f10eba4e Merge branch 'extra_accels' of https://github.com/vadz/wxWidgets
Allow defining additional accelerators for the menu items.

See https://github.com/wxWidgets/wxWidgets/pull/2588
2021-11-18 15:29:56 +01:00
Artur Wieczorek
6b7712bc14 Use empty wxBitmapBundle instead of wxNullBitmap as an argument
Pass explicitly wxBitmapBundle instead of wxBitmap to
wxPropertyGridManager::AddPage to avoid implicit conversion from wxBitmap
to wxBitmapBundle.
2021-11-17 22:54:54 +01:00
Vadim Zeitlin
a7803a752d Merge branch 'imagelist-bundle'
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
2021-11-16 17:32:47 +01:00
Vadim Zeitlin
63f83c096c Merge branch 'webview_runscript_improvements' of https://github.com/TcT2k/wxWidgets
Add WebView::RunScriptAsync() for running scripts asynchronously.

See https://github.com/wxWidgets/wxWidgets/pull/2316
2021-11-16 17:30:55 +01:00
Alexander Koshelev
0cd898975c Allow to add extra accelerators to wxMenuItem
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>
2021-11-16 17:26:39 +01:00
Scott Talbert
9d69bb55ef Fix some sizing issues with mediaplayer sample
Switch to the newly added wxMC_NO_AUTORESIZE mode, make the entire window
larger and let the sliders use their natural size.
2021-11-15 20:04:57 -05:00
Vadim Zeitlin
37dbf9f03a Merge branch 'threadname' of https://github.com/lanurmi/wxWidgets
Add wxThread::SetName for naming threads for debugging purposes.

See https://github.com/wxWidgets/wxWidgets/pull/2572
2021-11-12 17:05:12 +01:00
Vadim Zeitlin
aca0c74e60 Add wxListCtrl::Set{Normal,Small}Images()
These new functions allow to use wxBitmapBundle for the images in this
control instead of wxImageList.

Update the sample to use the new API.
2021-11-11 01:20:35 +00:00
Vadim Zeitlin
ced845f006 Update wxTreeCtrl and its sample to work with wxBitmapBundle
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.
2021-11-07 21:46:42 +00:00
Vadim Zeitlin
e293a3a6e3 Remove unnecessary wxBusyCursor from the treectrl sample
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.
2021-11-07 21:15:02 +00:00
Vadim Zeitlin
34a730f89c Small cleanup of wxGenericTreeCtrl-specific parts of the sample
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.
2021-11-07 16:36:43 +00:00
Lauri Nurmi
fc756d06a6 Add wxThread::SetName for naming threads for debugging purposes
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>
2021-11-05 16:11:55 +02:00
Tobias Taschner
d31f1dc400 Add wxWebViewEvent::IsError() 2021-11-03 13:35:24 +01:00
Tobias Taschner
47833a6d24 Add RunScriptAsync() to webview sample 2021-11-03 11:19:09 +01:00
Dominique Martinet
61d835d8b3 wxKeyCode: add WXK_LAUNCH_[0-9A-F] for gtk bindings
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
2021-11-02 10:18:02 +09:00
Vadim Zeitlin
b0d9465921 Add wxWithImages::SetImages() and update wxMSW wxNotebook for it
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.
2021-10-31 20:54:58 +01:00
Vadim Zeitlin
0df49f0a54 Add wxWithImages::GetImageCount() and HasImages() helpers
These functions allow avoiding using wxImageList explicitly in a couple
of places.

No real changes, this just prepares for adding new API not based on
wxImageList.
2021-10-31 17:34:44 +01:00
Vadim Zeitlin
5341bf5b60 Remove unnecessary win32-res tags from samples bakefiles
Don't specify sample.rc as the resource file for the samples, it is used
by default anyhow, so this is unnecessary.
2021-10-20 17:47:47 +02:00
Vadim Zeitlin
16f2c7bb89 Remove unused samples resource files
These resource files didn't appear in the .bkl ones and so were not used
at all and were not worth being used anyhow, as they didn't differ
significantly from sample.rc.
2021-10-20 16:34:38 +01:00
Vadim Zeitlin
aa2780b472 Set wxUSE_DPI_AWARE_MANIFEST=2 for all samples, not just toolbar
This is required for high resolution bitmaps support and it will be
needed in other samples too, so use it for all of them.

This probably will result in some problems due to remaining bugs with
high DPI support, but it should make them more noticeable and so should
help with finding and fixing them.
2021-10-20 16:19:41 +01:00
Vadim Zeitlin
b20552116c Allow wxBitmapBundle to specify its preferred bitmap size
Using bitmaps of preferred size avoids scaling and results in much
better appearance, so add methods allowing querying the bundle about the
bitmaps it supports and implement them in the various implementations.

This is not actually used anywhere yet, but will be soon.
2021-10-19 02:20:26 +01:00
Vadim Zeitlin
4e5d2d97e2 Allow using wxBitmapBundle for wxButton bitmaps
Take wxBitmapBundle in wxButton::SetBitmapLabel() and related functions
in order to be able to associate several bitmaps to be used in different
resolutions with the button, instead of just a single bitmap.
2021-10-18 11:50:10 +02:00
Vadim Zeitlin
e8a15050d2 Add missing references to wxSize parameters in wxBitmapBundle
Pass wxSize by const reference instead of "const" value.

Note that passing wxSize by value might be not such a bad thing,
actually, but we use const reference for it everywhere else, so do it
here as well for consistency (and the original intention was to do it
like this, missing "&" was just a typo subsequently propagated through
copy-pasting).

No real changes.
2021-10-16 15:56:40 +02:00
Vadim Zeitlin
fb4e188cea Add wxHAS_SVG feature test macro
This is more clear and future-proof than using wxHAS_RAW_BITMAP for
checking for SVG availability.
2021-10-05 16:12:01 +01:00
Vadim Zeitlin
0216654272 Make wxBitmapBundleImpl public and show how to use it
Show how a custom implementation of wxBitmapBundleImpl can be defined in
the toolbar sample.
2021-10-05 16:06:43 +01:00
Vadim Zeitlin
ab619010bd Add FromSVG() overload taking const data
Passing non-const data is inconvenient and error-prone, as data can't be
used again after it was modified by Nano SVG, which resulted in the
button using SVG bitmap not working any longer in the toolbar sample
after recreating the toolbar.

So make it easier to do the right thing, while still keeping the
overload taking non-const data for the situations when avoiding an extra
copy is worth it.
2021-10-05 16:06:43 +01:00
Vadim Zeitlin
ac02ae877f Add simple wxBitmapBundle::FromSVG() implementation using NanoSVG
Add nanosvg submodule and use it in the generic implementation of this
function.

This is incomplete yet and, notably, doesn't cache the rasterized
images, but already shows that using SVG images works (at least in the
toolbar sample).
2021-10-05 16:06:43 +01:00
Vadim Zeitlin
043461077e Use wxBitmapBundle::GetDefaultSize() in the toolbar sample
This actually reverts the sample to the version in master, which used
wxBitmap::Get{Width,Height}(), but just replaces "w" and "h" variables
with a single "sizeBitmap" one.
2021-10-05 15:49:44 +01:00
Vadim Zeitlin
15e35a5e7c Document that FromDIP() is not needed with SetToolBitmapSize()
wxMSW wxToolBar adjusts the bitmap size to DPI automatically.
2021-10-05 15:49:44 +01:00
Vadim Zeitlin
24df75a27f Simplify frame construction in the toolbar sample
Also stop hard-coding (100, 100) position for it, there is no real need
for it and it's better to let the window be positioned automatically.

No real changes.
2021-10-05 15:49:44 +01:00