Commit Graph

69199 Commits

Author SHA1 Message Date
Stefan Csomor
552dbbe26e Removing const for first version 2020-09-17 22:46:18 +02:00
Stefan Csomor
92ea83f00b First implementation 2020-09-17 22:35:22 +02:00
Paul Cornett
dcdcbbe078 Fix wxDataViewCheckIconTextRenderer icon size with GTK3 2020-09-17 09:29:30 -07:00
Artur Wieczorek
32cc9317f2 Use dedicated CRT function to round the value with MSVC 2020-09-17 13:46:53 +02:00
Artur Wieczorek
4b491c19a2 Implement wxRound() with dedicated C++11 standard library function 2020-09-17 13:45:57 +02:00
Artur Wieczorek
864034bddc Get rid of redundant return statement 2020-09-17 13:44:30 +02:00
Artur Wieczorek
4b10b4f5e2 Use dedicated function to round values 2020-09-17 13:44:15 +02:00
Jouk
5274d2d647 Add src/gtk/image_gtk.cpp for compilation in OpenVMS makefile 2020-09-17 09:37:12 +02:00
Paul Cornett
b376d1402b Add support for HiDPI bitmaps to wxDataViewBitmapRenderer with GTK3 2020-09-16 11:33:13 -07:00
Paul Cornett
85d63c3150 Add a class derived from GtkImage to support HiDPI bitmaps
And use it to get HiDPI support wherever we use GtkImage. This extends and
consolidates support for custom drawing of images which has already been added
somewhat redundantly in several places.
2020-09-15 11:52:03 -07:00
Ian McInerney
cb04c35365 OSX: Fixes for readonly text fields (#2049) 2020-09-15 08:21:47 +02:00
Ian McInerney
932b9ca62f Hide tooltips when style wxAUI_TB_NO_TOOLTIPS is provided 2020-09-14 21:49:43 +01:00
Ian McInerney
d33a393ed8 Docs: Remove wxTB_FLAT from the default style
This style was removed from the default previously,
so this was just a remnant in the documentation.

Fixes #17542
2020-09-14 21:46:41 +01:00
Ian McInerney
5e73cf3612 Document styles for the AUI toolbar 2020-09-14 21:41:56 +01:00
Artur Wieczorek
e88f248e3a Fix calculating bounding box
We should use platform-specific functions to convert coordinates to take
into account all transformations applied to wxDC (also with transform
matrix).

Closes #18916.
2020-09-13 23:54:16 +02:00
Artur Wieczorek
014bd2ae54 Implement platform-specific coordinate conversion functions
Generic wxDC::DeviceToLogical{X|Y}() and wxDC::LogicalToDevice{X|Y}()
functions don't take into account transformations applied with
wxDC::SetTransformMatrix() so conversion results are invalid if wxDC is
transformed with both e.g. wxDC::SetUserScale() and
wxDC::SetTransformMatrix().
We need to implement functions in wxDCImpl and its platform-specific
derivates to do this conversion with taking into account all applied
transformations.

See #18916.
2020-09-13 23:47:26 +02:00
Paul Cornett
4ebfe0059a Pre-include another header for Cygwin
Avoid -Wpedantic warning for extra ';'
2020-09-13 08:27:45 -07:00
Scott Talbert
35f2fd4be7 Fix linking issues with wxGLCanvasEGL for cmake
1) Link with EGL and wayland-egl libraries (with check for GDK Wayland).
2) Provide a way to force disable the EGL backend.
2020-09-12 15:54:15 -07:00
Scott Talbert
c315359c72 Fix linking issues with wxGLCanvasEGL for autoconf
1) Link with the wayland-egl library, but do so only if we determine that we
have Wayland support in the GDK backend with a compile test.
2) Provide a way to force disable the EGL backend.
2020-09-12 15:54:15 -07:00
Stefan Csomor
bc9e7b71e7 macOS wxNativeFontInfo changes (#2045)
* adding native font descriptor serialization = v2

* remove common xml prefix from serialized string

* Update src/osx/carbon/font.cpp

Co-authored-by: VZ <vz-github@zeitlins.org>

* Update src/osx/carbon/font.cpp

Co-authored-by: VZ <vz-github@zeitlins.org>

* static string via accessor

* striping off xml preamble unconditionally

if we use a different format in the future, we will have to increase our version number

* applying italic directly to the font descriptor

thus preserving attributes in the native font descriptor which we don’t store explicitly yet

* Adding support for preserving font width

Although we don’t express this in the public API yet, we try to preserve eg condensed, when changing the font width

* Adding reference, bug fix

double checked the font weight constants,

Co-authored-by: VZ <vz-github@zeitlins.org>
2020-09-12 19:29:26 +02:00
Robin Dunn
16ab09208f Add missing dock art Clone methods 2020-09-10 12:39:05 -07:00
Ian McInerney
b4a50b1ea7 Document return types in wxAuiToolBarItem better
These functions return only specific flags inside an integer,
so in order to use the functions we need to know the flags.

Fixes #14972
2020-09-04 18:25:41 +01:00
Ian McInerney
55f80941bf Mention that wxFD_OVERWRITE_PROMPT is always enabled on OSX
This style is ignored on OSX because there is no way to disable
the overwrite prompt from showing.

Fixes #13541
2020-09-04 18:25:41 +01:00
Vadim Zeitlin
c2b1dbda83 Call GDK functions from main thread in wxGStreamerMediaBackend
This fixes another problem similar to the one fixed in be1854c617 (Avoid
UI functions in non-main thread in wxGStreamerMediaBackend, 2020-09-02)
and does it in a similar way: SetupXOverlay(), which calls gdk_flush(),
was called from gst_bus_sync_callback() which is executed in the worker
thread, so use CallAfter() to call it from the main thread later.
2020-09-02 23:24:05 +02:00
Vadim Zeitlin
e4333fdeac Fix recurrent typo in "usable"
This word has a single "e".
2020-09-02 20:49:39 +02:00
Vadim Zeitlin
bf71a70a12 Merge branch 'updateui-ischeckable'
Add a flag to wxUpdateUIEvent to tell if the item supports the check
action.

See https://github.com/wxWidgets/wxWidgets/pull/2027
2020-09-02 19:34:05 +02:00
Vadim Zeitlin
7be693212c Improve documentation of wxUpdateUIEvent::IsCheckable()
Explain when this method can be useful.
2020-09-02 19:33:39 +02:00
Vadim Zeitlin
1db3751235 Merge branch 'macos11-preferences' of https://github.com/vslavik/wxWidgets
Update wxPreferencesEditor to add support for macOS 11.

See https://github.com/wxWidgets/wxWidgets/pull/2040
2020-09-02 19:26:41 +02:00
Vadim Zeitlin
eb8c48a481 Merge branch 'macos11-fix-ui-fonts-handling' of https://github.com/vslavik/wxWidgets
Fix system UI font handling on macOS 11.

See https://github.com/wxWidgets/wxWidgets/pull/2034
2020-09-02 19:24:26 +02:00
Scott Talbert
be1854c617 Avoid UI functions in non-main thread in wxGStreamerMediaBackend
In aa2cd42206 (Report video size changes to the media backend,
2016-02-22), a couple of calls to NotifyMovieSizeChanged() were added,
presumably for a good reason.  Unfortunately, NotifySizeChanged() makes
UI calls on wxGTK, so this resulted in UI calls happening on a non-main
thread because many of GStreamer's callbacks occur on arbitrary threads.
This is bad because it caused random X11 crashes.

Fix this by calling NotifyMovieSizeChanged() with CallAfter().

Closes https://github.com/wxWidgets/wxWidgets/pull/2042
2020-09-02 19:22:46 +02:00
Jouk
1ce2ab5d49 Add definition of wxUSE_GLCANVAS_EGL 2020-09-02 07:46:25 +02:00
Paul Cornett
05a134d985 Build fix for GDK_WINDOWING_WAYLAND not defined
Add some missing GDK_WINDOWING_WAYLAND wrappers.
Also some minor changes to includes.
2020-09-01 08:14:58 -07:00
Vadim Zeitlin
5dd3b733bd Test building without 3.0 compatibility on Travis CI too
This will test errors like the one fixed by the previous commit by
testing that samples and tests still build without 3.0 API.
2020-09-01 15:07:31 +02:00
Vadim Zeitlin
0a053580c0 Use wxEVT_GRID_RANGE_SELECTED instead of deprecated SELECT
Fix building the tests with WXWIN_COMPATIBILITY_3_0 disabled.
2020-09-01 15:04:39 +02:00
Scott Talbert
7cd12a2bd6 Add EGL-based backend for wxGLCanvas
Among other things, this enables wxGLCanvas to be used natively on
Wayland.

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

Closes #17702.
2020-09-01 15:03:30 +02:00
Vadim Zeitlin
ed4b9e5f97 Merge branch 'mac-native-focus-ring' of https://github.com/vslavik/wxWidgets
Draw wxTextCtrl focus ring natively on Mac.

Add wxWindow::EnableVisibleFocus() to explicitly control the focus ring
visibility if necessary.

See https://github.com/wxWidgets/wxWidgets/pull/2037
2020-09-01 14:59:42 +02:00
Rob McKay
94e8129f3f Explicitly specify application class in wxiOS
Although @"UIApplication" is supposed to be used by default anyhow,
passing "nil" is reported to result in an assertion failure in
'_UIApplicationGetPrincipalClass' when running under the iOS 13.1
simulator, so pass this string explicitly.

Closes https://github.com/wxWidgets/wxWidgets/pull/2035
2020-09-01 14:57:29 +02:00
Vadim Zeitlin
b9f946fcd3 Merge branch 'check-headers-max-warn'
Check compilation of all wx headers with all gcc warnings enabled.

This should make it impossible to introduce problems that only appear
when -Wpedantic or -Wany-other-not-completely-unreasonable-warning is
enabled when building user code including wx headers again.

See https://github.com/wxWidgets/wxWidgets/pull/2033
2020-08-31 15:10:16 +02:00
Arrigo Marchiori
629c4aac97 Add EXEEXT to the wxrc versioned executable
Fix name of wxrc executable when cross-compiling from Unix.

Note that the Makefile hasn't been rebaked after the changes of
f3bd129568 (Append WX_FLAVOUR to the name of wxrc executable,
2020-08-06), so this commit reflects the changes to wxrc.bkl from both
that commit and this one.

Closes https://github.com/wxWidgets/wxWidgets/pull/2041
2020-08-31 14:59:39 +02:00
Vadim Zeitlin
be2a61519b Merge branch 'grid-selected'
Split the wxGrid RANGE_SELECT event into separate SELECTING and SELECTED
events.

See https://github.com/wxWidgets/wxWidgets/pull/2028
2020-08-31 14:55:56 +02:00
Vadim Zeitlin
d41539ef05 Merge branch 'fix-grid-resizing'
Fix bugs in wxGrid mouse handling and simplify the code.

See https://github.com/wxWidgets/wxWidgets/pull/2018
2020-08-31 14:53:37 +02:00
Vadim Zeitlin
82f7cb6e9b Merge branch 'art-ids-literals'
Revert art ids changes and make them `char*` literals again.

See https://github.com/wxWidgets/wxWidgets/pull/2031
2020-08-31 14:51:52 +02:00
Ian McInerney
7f7a0bfa81 Fix documentation for wxSYS_COLOUR_INACTIVECAPTIONTEXT
Just s/active/inactive/ in the description.

Closes https://github.com/wxWidgets/wxWidgets/pull/2039
2020-08-31 14:49:45 +02:00
Václav Slavík
8efc6fb003 Add wxWindow::WXAdjustFontToOwnPPI()
Avoid calling GeTDPI() in font.WXAdjustToPPI(GetDPI()); invocations in
common code on platforms that don't need any adjustment (i.e. anything
other than MSW).

This fixes wxOSX crashes when GetFont() is called too early during
window creation, but is the right thing to do regardless.

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

Closes #18903.
2020-08-31 14:45:02 +02:00
Vadim Zeitlin
2a17eef2ed Pre-include even more standard headers with MinGW/Cygwin
Avoid -Wredundant-decls when including them later by pre-including them
before enabling this warning.
2020-08-31 12:40:50 +02:00
Vadim Zeitlin
8b7ddbd0ac Use wxOVERRIDE for wxStackWalker and wxStackFrame in wxMSW
Thanks gcc for -Wsuggest-override.
2020-08-31 12:40:50 +02:00
Vadim Zeitlin
03bc49de2d Include <windows.h> before enabling all the warnings
This avoids tons of -Wredundant-decls and -Wnon-virtual-dtor (given for
all OLE interfaces).
2020-08-31 12:40:50 +02:00
Vadim Zeitlin
6f9390306d Disable -Wsuggest-final-xxx in the headers for now
We don't use "final" in our code, as very few classes in wx code have
virtual functions but are not meant to be derived from in the user code.

Ideal would be to check the existing warnings and maybe apply "final" if
it's relevant and disable it otherwise, as these warnings can be useful
to build the application code with, but for now just disable them in the
test suite.
2020-08-31 12:40:50 +02:00
Vadim Zeitlin
3fc5d134a3 Suppress strange -Wunsafe-loop-optimizations in wxString code
The error message

wx/string.h:558:47: error: missed loop optimization, the loop counter may overflow
                    [-Werror=unsafe-loop-optimizations]
       for ( Cache::Element *c = cacheBegin; c != cacheEnd; c++ )
                                             ~~^~~~~~~~~~~

doesn't seem to really make much sense, as it shouldn't overflow here.
2020-08-31 12:40:50 +02:00
Vadim Zeitlin
a535d2c64d Suppress -Wnull-dereference in wxString::GetCacheElement()
It doesn't seem to be really possible here.
2020-08-31 12:40:50 +02:00