Commit Graph

69021 Commits

Author SHA1 Message Date
Vadim Zeitlin
1bf5e536e9 Merge branch 'generic-treectrl-cleanup'
Improve wxGenericTreeCtrl code handling system colours/theme changes.

See #18823.
2020-07-15 14:26:55 +02:00
Vadim Zeitlin
c14053c211 Merge branch 'osx-11'
Adaptations for macOS 11.0.

See https://github.com/wxWidgets/wxWidgets/pull/1940
2020-07-15 14:26:05 +02:00
Vadim Zeitlin
33e8684356 Merge branch 'ios-menu'
Add support for wxMenu under iOS.

See https://github.com/wxWidgets/wxWidgets/pull/1965
2020-07-15 14:25:30 +02:00
Jouk
dd444cc943 OpenVMS : add wxUSE_MENUBAR definition + fix for building wxMOTIF 2020-07-15 08:34:59 +02:00
Jouk
0615f02d6a OpenVMS : add wxUSE_MENUBAR definition + fix for building wxMOTIF 2020-07-15 08:34:13 +02:00
Vadim Zeitlin
d57c688d89 Return non-zero height from GetMultiLineTextExtent("") in wxMSW
This restores the previous behaviour inadvertently changed by bfeae1922d
(Minor optimizations in GetMultiLineTextExtent(), 2020-06-10) and makes
it official by documenting it and adding tests checking for it.

It wasn't completely obviously if this was intentional or accidental
before, but at least wxStaticText itself relied on the old behaviour,
and chances are that so did some code outside the library, so make this
part of the API now.

See #18825.
2020-07-15 02:10:49 +02:00
Vadim Zeitlin
46d6866c9f Make wxGCDC::GetTextExtent("") return (0, 0)
This seems more logical and is compatible with wxDC in wxMSW and wxGTK2,
as well as other kinds of DC, e.g. wxPostScriptDC.

It also looks like the current behaviour was unintentional as it
happened only because wxGCDCImpl::DoGetTextExtent() always passed all
non-null parameters to wxGraphicsContext::GetTextExtent(), even if it
didn't need the values for all of them, and thus bypassed the special
case for the empty string which was already present in the latter
function.

Fix this, making DoGetTextExtent() more efficient as a side effect (we
now avoid unnecessary calls to pango_layout_iter_get_baseline() in the
most common case), and also add another test for empty string to
wxGraphicsContext itself, for non-GTK case.

Also document this behaviour and add a test checking for it.
2020-07-15 02:10:34 +02:00
Vadim Zeitlin
a52a27ad90 Display wxSize less confusingly if any tests fail
Using "x" as separator between the components created confusion with
hexadecimal notation, resulting in confusing messages like "0x17==0x0"
that seemed to describe comparison of 2 numbers and not 2 wxSize
objects.

Using "*" is also more consistent with wxRect output format.
2020-07-15 02:09:42 +02:00
Vadim Zeitlin
844ec191f0 Use CallGetTextExtent() directly in GetMultiLineTextExtent()
There is no need to pass by GetTextExtent() now that we already make
sure width/height are non-null in this function, so just construct the
MeasuringGuard slightly earlier and call CallGetTextExtent() directly.

No real changes.
2020-07-15 01:23:23 +02:00
Vadim Zeitlin
55c71fdac9 Ensure that pointers in GetMultiLineTextExtent() are always valid
Do the same thing as in GetTextExtent() to simplify the code a little
and also avoid temporary variables.

No real changes.
2020-07-15 01:21:14 +02:00
Vadim Zeitlin
2280e43fe9 Factor out wxTextMeasureBase::GetEmptyLineHeight()
No real changes, just refactor to extract a trivial helper function.
2020-07-15 01:16:23 +02:00
Vadim Zeitlin
db556fc388 Remove CppUnit boilerplate from wxDC::GetTextExtent() unit tests
Drop the test case class and use CATCH macros.
2020-07-14 23:36:23 +02:00
Vadim Zeitlin
093c3067e8 Don't use windres --use-temp-file option
According to the manual, it should only be needed for Win9x systems not
supported since a long time anyhow and this option is apparently buggy
in recent MinGW binutils as it results in build errors when used, see
https://github.com/msys2/MINGW-packages/issues/6558

Closes https://github.com/wxWidgets/wxWidgets/pull/1961
2020-07-14 22:10:58 +02:00
PB
88a6c8c905 Fix building wxMSW using GCC 10.1 with C++20 standard
Add comparison operator overloads using NativeFormat to wxDataFormat
to prevent ambiguous operator overload errors.

Closes https://github.com/wxWidgets/wxWidgets/pull/1962
2020-07-14 22:09:47 +02:00
Hertatijanto Hartono
7f617d97a5 Add word 'be' for consistency of error message
No real change, just a typo fix after f1f27bc37c (Checks for 3rdparty
libraries availability in configure, 2020-07-13).

Closes https://github.com/wxWidgets/wxWidgets/pull/1969
2020-07-14 22:08:27 +02:00
Vadim Zeitlin
c073995352 Merge branch 'aui-dark-mode'
Fixes for AUI in dark mode, especially, but not only, under macOS.

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

Closes #18812.
2020-07-14 20:26:52 +02:00
Vadim Zeitlin
5bf7db419a Show whether generated setup.h files changed or not
Don't output "ok" for all files when running update-setup-h, this was
not very informative and possibly misleading. Only show "ok" for the
actually updated files and "unchanged" otherwise.
2020-07-14 20:24:52 +02:00
Vadim Zeitlin
e95ff829ef Remove extra quotes from --with-cxx error message
No real changes, just a cosmetic improvement to the error message given
if the value of --with-cxx=NN option is not recognized.
2020-07-14 20:21:00 +02:00
Vadim Zeitlin
33038a2ce7 Remove the now unnecessary empty wxMessageDialog dtor
No real changes, just some minor cleanup after 220dfe17ea (Replace
deprecated API usage for window modal dialogs, 2020-07-09).
2020-07-14 20:16:03 +02:00
Stefan Csomor
ab858b5805 Produce NFD in wxConvFileName::FromWChar() on macOS
This ensures that fn_str() returns the string in the expected,
decomposed, format.

Also simplify the code by removing workarounds for old systems which are
not supported any more and make explicit the fact that under macOS
ToWChar() always produced NFC.
2020-07-14 20:15:04 +02:00
Stefan Csomor
47cc0b8946 Replace deprecated NSDate dateWithString 2020-07-14 20:10:51 +02:00
Stefan Csomor
add925e359 Modernize accessibility API usage 2020-07-14 20:10:47 +02:00
Stefan Csomor
065f2a283f Stop using deprecated API for assert output handler 2020-07-14 20:10:46 +02:00
Stefan Csomor
74bc9b5f71 Avoid infinite recursion between wxStockGDI and wxSystemSettions
There was a possible recursion from wxStockGDI::GetFont to
wxSystemSettings::GetFont and back, resolve by using direct font
creation, adding fixed system font.
2020-07-14 20:10:46 +02:00
Stefan Csomor
7be80a858d Replace deprecated LSGetApplicationForInfo() 2020-07-14 20:10:46 +02:00
Stefan Csomor
c53e9d913b Removing unused file-related functions
This should be done back in 5ba67c67e4 (Remove wxOSX/Carbon support.,
2016-01-22).
2020-07-14 20:10:46 +02:00
Stefan Csomor
220dfe17ea Replace deprecated API usage for window modal dialogs
Remove the delegate objects that are not used any longer.

Move wxGetAvailableDrives() to Objective-C code file dirdlg.mm to allow
for Cocoa implementation.
2020-07-14 20:10:46 +02:00
Stefan Csomor
be9216b6b1 Show all other supported window modal dialogs in the sample too 2020-07-14 20:10:46 +02:00
Stefan Csomor
f585878136 Show using window-modal file open dialog in the sample 2020-07-14 20:10:04 +02:00
Stefan Csomor
dd0033d817 Removing unused obsolete code from wxFileDialog
We don't need workaround for macOS earlier than 10.6 any longer.
2020-07-14 19:49:21 +02:00
Stefan Csomor
19b875830b Stop using deprecated CFAbsoluteTimeAddGregorianUnits()
since we are still working in seconds, the replacement is rather simple
2020-07-14 19:47:19 +02:00
Stefan Csomor
582876f616 Stop using obsolete AbsoluteToNanoseconds() 2020-07-14 19:46:20 +02:00
Vadim Zeitlin
5735e7227b Add checks for wxUSE_MENUBAR to wx/chkconf.h
Check that it's defined in the first place and also check that
wxUSE_MENUS is on if wxUSE_MENUBAR is.
2020-07-14 18:16:59 +02:00
Stefan Csomor
6833b0e934 adding combined macOS iOS version guards 2020-07-14 18:16:59 +02:00
Stefan Csomor
7812657cbf Implement minimal wxMenu support for iOS
A separate change later will add features using iOS 14 specific API and
iOS 13 (and earlier) fallback for them.
2020-07-14 18:16:59 +02:00
Vadim Zeitlin
ff24484952 Add wxUSE_MENUBAR to CMake too
For now there is no dependency on wxUSE_MENUS when using CMake.
2020-07-14 18:16:59 +02:00
Vadim Zeitlin
62c168ac21 Add --enable-menubar corresponding to wxUSE_MENUBAR to configure
This is required in order to define wxUSE_MENUBAR for configure builds.
2020-07-14 18:16:59 +02:00
Stefan Csomor
68ee7ffa2a Add wxUSE_MENUBAR build option, off by default in wxiOS
Allow building without wxMenuBar (but with wxMenu), as this class
doesn't exist and can't be reasonably implemented under iOS (but
wxMenu can and should be, as it's widely used in iOS 14 UI).
2020-07-14 18:16:59 +02:00
Stefan Csomor
49f6370890 shared schemes, distinct naming, removing old source files 2020-07-14 17:41:16 +02:00
Vadim Zeitlin
9cd3ab5ebd Improve wxGenericTreeCtrl colours/fonts updating on theme change
Don't override user-specified colours neither, previously we only did it
for the font for some reason.

Also do override the colours and the font when the theme changes, which
didn't happen after the previous commit because calling SetOwnXXX()
changes m_hasXXX to true, so we need to explicitly reset it back.
2020-07-14 17:34:24 +02:00
mimi89999
c63eefded1 Adjust disabled closed bitmap colour to better fit Linux themes
Change the lightness of INACTIVECAPTIONTEXT to make it stand out better.
2020-07-14 16:14:38 +02:00
mimi89999
b0f82d41a3 Use WINDOW/GRAYTEXT system colours for AUI tab art
Those are more appropriate than the previously used CAPTIONTEXT and
INACTIVECAPTIONTEXT under Linux and don't change anything under Mac,
where they map to the same colours anyhow.
2020-07-14 16:13:28 +02:00
Vadim Zeitlin
8535cde836 Remove apparently unnecessary m_hasExplicitFont
Just use wxWindow::m_hasFont instead.
2020-07-14 15:47:35 +02:00
Vadim Zeitlin
0d7ab26e7d Factor out wxGenericTreeCtrl::InitVisualAttributes()
No real changes, just avoid calling an event handler directly.
2020-07-14 15:46:05 +02:00
Vadim Zeitlin
1ec7ae9a6f Use wxBrush objects instead of pointers in wxGenericTreeCtrl
There is no need for double indirection, wxBrush object is already
pointer-like internally.

No real changes, just simplify/optimize the code a little.
2020-07-14 15:43:23 +02:00
Ian McInerney
b256aa6956 Replace wxEVT_GRID_HIDE_EDITOR usage with CallAfter
This simplifies the code by removing the need for a special event,
and also means the combox popup handler is no longer needed to reset
the inSetFocus flag for the closing handler.
2020-07-14 12:28:13 +01:00
Artur Wieczorek
cde033df8d Save initial wxPropertyGridManager extra style
Extra style bits used while initializing wxPropertyGridManager are
not saved and therefore cannot be returned by GetExtraStyle(). We need
to save them in a standard way to make them accessible for this function.

See #18813.
2020-07-14 12:21:35 +02:00
Paul Cornett
5325ccfda6 Update generic wxTreeCtrl appearance when theme changes
See #18823
2020-07-13 20:26:59 -07:00
Hertatijanto Hartono
f1f27bc37c Checks for 3rdparty libraries availability in configure
Abort configure run with an error if a 3rd party library doesn't seem to
be present, when it's supposed to be used during the build, as this is
better than postponing the error until make runs into it much later and
also allows us to give a hopefully helpful message telling people that
they might be missing the relevant submodules.

Also add --disable-tests configure option to allow skipping building
tests entirely. In particular, this allows to avoid cloning any
submodules at all when using system libraries on a Unix system.

Closes https://github.com/wxWidgets/wxWidgets/pull/1954
2020-07-13 23:36:31 +02:00
Vadim Zeitlin
3ec166f960 Merge branch 'dos_BuildTools' of https://github.com/doscott/wxWidgets
Official build/packaging scripts fixes: specify TARGET_CPU explicitly
for 32 bit builds (and also document it); don't bother modifying
wxwidgets.props as it now works out of the box.

See https://github.com/wxWidgets/wxWidgets/pull/1960
2020-07-13 20:54:27 +02:00