Commit Graph

71647 Commits

Author SHA1 Message Date
Vadim Zeitlin
d14e035580 Fix uses of wxDEPRECATED in WXWIN_COMPATIBILITY_2_8-only code
wxDEPRECATED must be used for the entire declaration to really work,
but this wasn't the case for a few functions (and one typedef) guarded
by WXWIN_COMPATIBILITY_2_8, resulting in gcc -Wattributes warning about
the attribute being ignored and the declaration not being really marked
as deprecated.

Fix this by applying the deprecation macro to the entire declaration,
which works well for gcc and should hopefully work for MSVC too.
2021-11-28 21:42:06 +01:00
Artur Wieczorek
9febbe2b30 Explicitly cast AutoHRGN to HRGN to unify types in the statement
This seems to be required by MinGW compiler.
2021-11-28 19:32:02 +01:00
Paul Cornett
03706e9fef Fix build with WXWIN_COMPATIBILITY_2_8==1
Use wxBitmapBundle to avoid wxToolBar::AddTool() ambiguity
2021-11-28 08:48:50 -08:00
Paul Cornett
9a40669aad Fix build with WXWIN_COMPATIBILITY_2_8==1
Reverts what seems to be an unintentional change from
5ae30d2fbe (Use wxBitmapBundle() instead of wxNullBitmap as default value, 2021-11-12)
2021-11-28 08:44:13 -08:00
Artur Wieczorek
fc6bfbc0bf Add tests of clipping regions with wxDC with RTL layout enabled 2021-11-28 17:05:34 +01:00
Artur Wieczorek
288b208a0a Fix setting clipping region for wxDC with RTL enabled (wxMSW)
It turns out that region being added to DC with enabled RTL layout needs
to be defined using mirrored device x-coordinates.
So if we have DC with RTL layout we need to create a temporary mirrored
region and pass it to the DC instead of the original one.

Closes #19325.
2021-11-28 17:04:26 +01:00
Paul Cornett
b04c1ace47 Avoid integer overflow when computing image data size in wxImage::Create()
See #19326

Co-Authored-By: David Costanzo <david_costanzo@yahoo.com>
2021-11-27 17:14:28 -08:00
utelle
deef116a09 Update language database and move support for it to wxUILocale
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
2021-11-27 17:44:20 +01: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
e765756555
OSX file dialog extensions (#2592)
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>
2021-11-26 22:26:49 +01:00
Vadim Zeitlin
c5f023a829 Fix wxGTK1 build after wxBitmapBundle changes in wxStaticBitmap
This should have been done in 3abec9254f (Take wxBitmapBundle in
wxStaticBitmap::SetBitmap(), 2021-10-21) but was forgotten there.
2021-11-26 18:31:19 +01:00
Vadim Zeitlin
7ba71ecaa2 Merge branch 'size-div-double'
Add operator/(wxSize, double) and cleanup some wxSize and related tests.

See https://github.com/wxWidgets/wxWidgets/pull/2593
2021-11-25 15:16:53 +01:00
Simon Rozman
e3535d6481 Mark MSVS *.vcxproj.filters files as using CR LF as well
For consistency with *.vcxproj and *.sln and for making
check_mixed_eol.sh happy.

Signed-off-by: Simon Rozman <simon@rozman.si>
2021-11-24 12:13:12 +01:00
Stefan Csomor
f9234531a2 initial commit of newly generated xcode project files 2021-11-22 19:41:56 +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
Stefan Csomor
1643887948 updating gitignore, adding workspace to wxcocoa_in 2021-11-22 18:03:06 +01:00
Stefan Csomor
5377d45d48 adding workspace template files 2021-11-22 18:01:32 +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
Stefan Csomor
18bbfd8c38 fixing xcode scheme templates 2021-11-22 10:25:12 +01:00
Stefan Csomor
c88d5da678 making schemes shared in template already 2021-11-22 10:04:30 +01:00
Stefan Csomor
bdbece5d66 switching to python3 for creating Xcode project files from bakefile
moving fix_xcode_ids to python 3 and make it importable,
the current AppleScript dictionary from Xcode makes it impossible to use it for our purpose
2021-11-22 08:15:16 +01:00
Vadim Zeitlin
2bbe126dca Add operator/(wxSize, double)
For some reason, while both operator*(wxSize, double) and
wxSize::operator/=(double) existed, this one did not, which was
unexpected, so add it too.
2021-11-20 22:06:28 +01:00
Vadim Zeitlin
9941531efc Simplify wxSize unit test further by comparing wxSizes directly
This is shorter and more clear than comparing width and height
independently and results in just as informative messages in case of
test failure if asserthelper.h is included.
2021-11-20 22:01:31 +01:00
Vadim Zeitlin
a18e00379e Get rid of CppUnit boilerplate in wxPoint and wxRealPoint tests
Similar to the previous commit, this doesn't really change anything, but
simplifies things.
2021-11-20 21:57:35 +01:00
Vadim Zeitlin
227b5dba0a Get rid of CppUnit boilerplate in wxSize unit test
No real changes.
2021-11-20 21:52:59 +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
Vadim Zeitlin
080a236a01 Keep toolbar bitmap size in logical, not physical, pixels
As SetToolBitmapSize() takes logical pixels, GetToolBitmapSize() should
also return them for consistency.

Closes #19323.
2021-11-20 21:46:29 +01:00
Vadim Zeitlin
cffb866edf Minor additions to wxMC_NO_AUTORESIZE documentation
Mention that this flag is new in 3.1.6 and also point to it in ctor and
Create() documentation.
2021-11-20 21:41:28 +01:00
Stefan Csomor
0e4edc4f5f fixing include type
#0cd8989 was using angle includes
2021-11-20 15:26:38 +01:00
Artur Wieczorek
7fef360b0d Set proper bitmap scale for default icons in wxPropertyGridManager tool bar 2021-11-19 17:54:04 +01:00
Artur Wieczorek
87394856f5 Use wxBitmapBundle in wxPropertyGrid 2021-11-19 17:52:56 +01:00
Vadim Zeitlin
17c1bfc0f4 Suppress "Unix" spelling warnings in the samples overview
There doesn't seem to be any good way to avoid codespell warnings about
"unx", so just add the lines containing it to the exceptions file.
2021-11-18 15:47:28 +01:00
David Costanzo
0985996d01 Fix loading of RLE bitmaps in wxBMPHandler
- Fix handling of delta encoding that change vertical position
- Fix handling of end-of-line encodings that are given mid-line
- Removed unnecessary computation for linepos

Add regression tests for the bitmaps using RLE and loading which
previously didn't work correctly.

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

Closes #19318.
2021-11-18 15:37:03 +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
Vadim Zeitlin
e6686373ec Add instructions for building the samples
Document various ways of building the samples.
2021-11-18 15:28:32 +01:00
Artur Wieczorek
f989b1b875 Rephrase descriptions of some parameters of wxPGManager functions 2021-11-17 23:06:23 +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
c36cc54d74 Simplify checking for menu events in the unit test
This should make the explicit casts such as added in 8db55e9653
(Explicitly cast enum to int inside CHECK(), 2019-09-30) and the
previous commit unnecessary, result in better messages if a test fails
and allow the other tests to still run after the failing tests, as we
use CHECK() instead of CPPUNIT_ASSERT(), which maps to REQUIRE(), now.
2021-11-16 20:34:19 +01:00
Vadim Zeitlin
5f5d61f759 Apply workaround for ancient MinGW to the menu unit test
Do the same thing for the just added tests as was already done in
8db55e9653 (Explicitly cast enum to int inside CHECK(), 2019-09-30) for
the other ones.
2021-11-16 20:21:51 +01:00
Vadim Zeitlin
d156058d41 Avoid warnings in tif_print.c by excluding it from build
This is a rather drastic solution, but warnings given when
cross-compiling this file with MinGW are annoying, really fixing them is
not completely trivial and risks conflicting with the upstream changes
later, and we don't need the TIFFPrintDirectory() function defined in
this file anyhow, so just exclude it from the build.

Closes https://github.com/wxWidgets/wxWidgets/pull/2587
2021-11-16 17:34:32 +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
Vadim Zeitlin
e729791222 Allow creating GtkAccel from an existing wxAcceleratorEntry
Refactor the existing code to allow using an already existing
accelerator instead of always extracting it from wxMenuItem.

This is not used yet, but will be in the next commit.
2021-11-16 03:20:13 +01:00
Vadim Zeitlin
4f5f309d1b Add GtkAccel helper abstracting operations with GTK accelerators
This simple struct combines both the accelerator code and flags and is
simpler to work with than two different variables.

It will also allow reusing this functionality in the upcoming changes
more easily.

No real changes yet.
2021-11-16 03:20:04 +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
Scott Talbert
149f3804a8 Add style for manually resizing wxMediaCtrl
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.
2021-11-15 20:00:17 -05:00