Commit Graph

72662 Commits

Author SHA1 Message Date
Paul Cornett
0ac60175b0 Use wxINVERT for drawing generic wxCaret when possible
This now works after recent fixes, although wxINVERT does not
work with wxGraphicsContext-based wxDC. So this is mainly for GTK2,
only about 20 years late.
2022-03-31 08:11:27 -07:00
Paul Cornett
d51f274e1c Avoid drawing generic wxCaret outside of its bounds
Outline caret rectangle needs to be inset so that its outer
edge is the same as the solid caret when window is scaled.
2022-03-31 07:46:28 -07:00
Jouk
5536f0196f OnOpenVMS langinfo.h is too old 2022-03-31 08:36:00 +02:00
Paul Cornett
228bbbf93a Create generic wxCaret backing bitmap with correct scale
Fixes degraded appearance of scaled window contents under caret
2022-03-30 09:04:19 -07:00
Tobias Fleischer
e8872b335c Allow using multiple lines in single line wxTextCtrl under Mac
Add new OSX specific OSXEnableNewLineReplacement(bool enable) function
to control if new lines should be replaced with spaces (which is still
done by default) in a single-line wxTextCtrl.

Closes #22245.
2022-03-30 17:59:49 +02:00
Vadim Zeitlin
c63de862c4 Actually use WX_HTML_OUTPUT_DIR in Doxyfile
This should have been part of efa1c59141 (Allow setting
WX_HTML_OUTPUT_DIR to override default location, 2022-03-28) but was
forgotten there.
2022-03-30 16:35:45 +02:00
utelle
9bb2a02232 Simplify accessing localized names
Add a helper function allowing to make the code shorter and hopefully
more clear.

Closes #22246.
2022-03-30 14:32:07 +02:00
Paul Cornett
3985e195cb Don't include <winsock2.h> when wxUSE_SOCKETS==0 2022-03-29 16:44:52 -07:00
Daniel Kulp
842314af4e Fix generating right click menu events for wxComboBox in wxOSX
These events were never generated for the comboboxes, so forward them to
the window from the text editor used for the comboboxes, just as we
already do for the key events.

Do it for the mouse up events too for consistency.

Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>

Closes #22179.
2022-03-30 01:13:32 +02:00
Vadim Zeitlin
ce1d350f41 Add logging of context menu events to the widgets sample
Show when (and if) they are generated.
2022-03-30 01:07:38 +02:00
Vadim Zeitlin
e9aaca50c2 Fix the name of the test excluded in the CI builds using Wine
The apparently innocuous a0d1379a57 (Split wxDC::GetTextExtent() test
case in 3 pieces, 2022-03-29) has broken the CI builds because it moved
the code failing under Wine (apparently due to problems in metafile
support implementation) into a differently named test.

Fix this now by excluding the right test.
2022-03-30 00:55:17 +02:00
Vadim Zeitlin
3dd26ca674 Merge branch 'ci-fixes'
Fix httpbin-related CI failures after latest Python ecosystem changes
and use ccache in another CI build.

See #22243.
2022-03-29 23:59:49 +02:00
Vadim Zeitlin
7084f7c51a Merge branch 'memdc-setfont-null'
Fix recently broken wxMemoryDC::SetFont(wxNullFont) in wxMSW.

See #22241.
2022-03-29 22:59:14 +01:00
Vadim Zeitlin
0dac661468 Fix wxDC::SetFont() documentation
Don't say that passing wxNullFont to it is allowed because it isn't
neither in wxGTK nor in wxOSX and also remove the part about destroying
the previous font because we hadn't had to destroy the fonts explicitly
since 25 years.

Still document that setting an invalid font works in wxMSW, but explain
that doing this is not a good idea.
2022-03-29 22:57:45 +01:00
Vadim Zeitlin
ecbcbdc945 Use ccache in MSW cross build CI workflows too
This should hopefully help to speed up this build as well.

Unfortunately we can't easily use ccache for the Mac builds because this
requires having brew installed and we don't have it currently.

We probably can use it for CMake workflow but this probably requires
some arcane way of configuring CMake to use ccache that I'm not aware
about and would need to be done by someone else.
2022-03-29 21:00:57 +02:00
Vadim Zeitlin
54f3264886 Use latest version of ccache action in GitHub CI workflow
It has a number of fixes and it makes sense to standardize on this
version before starting to use it in the other workflows too.
2022-03-29 21:00:57 +02:00
Vadim Zeitlin
1aab9e7ebb Try to fix problems with running httpbin in the CI builds
Fix the last known working Flask version, the latest one results in the
errors like the following

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 185, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.8/runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "/home/runner/.local/lib/python3.8/site-packages/httpbin/__init__.py", line 3, in <module>
    from .core import *
  File "/home/runner/.local/lib/python3.8/site-packages/httpbin/core.py", line 22, in <module>
    from werkzeug.wrappers import BaseResponse
ImportError: cannot import name 'BaseResponse' from 'werkzeug.wrappers' (/home/runner/.local/lib/python3.8/site-packages/werkzeug/wrappers/__init__.py)
2022-03-29 21:00:57 +02:00
Paul Cornett
c1259ad3c7 Fix rendering HiDPI bitmaps with wxDataViewIconTextRenderer on GTK3
Update code to use wxBitmapBundle
2022-03-29 08:45:30 -07:00
Vadim Zeitlin
0138fcfa32 Use function, not class, in GetTextExtent() unit tests
Simplify the code by more or less reverting c7619cf139 (Replace a
template function with template class to fix VC6 build., 2012-11-12)
which shouldn't be necessary any longer as VC6 is not supported since a
long time.

No real changes.

This commit is best viewed ignoring whitespace-only changes.
2022-03-29 14:11:14 +01:00
Vadim Zeitlin
b390c487f7 Fix wxMemoryDC::SetFont(wxNullFont) broken by recent changes
Fix crash in this function introduced by 9e5c8a8027 (Respect bitmap
content scale factor in wxMSW wxMemoryDC, 2022-03-26).

Also add a unit test ensuring that this doesn't get broken again under
MSW, which seems to be the only place where it works.

Closes #22240.
2022-03-29 14:10:34 +01:00
Vadim Zeitlin
4979457f4d Add wxMemoryDC::GetTextExtent() unit test
Test this wxDC kind too.
2022-03-29 13:45:40 +01:00
Vadim Zeitlin
a0d1379a57 Split wxDC::GetTextExtent() test case in 3 pieces
No real changes, just don't test all the different wxDC kinds in one
test, when they are completely separate.
2022-03-29 13:43:21 +01:00
Paul Cornett
ffdaec88ee Fix wxDataViewIconTextRenderer background on GTK
Background attribute needs to be set on the icon renderer as well.
See #19301
2022-03-28 21:28:10 -07:00
Vadim Zeitlin
9bb3945778 Fix spurious assert in GetLocalizedName() under Unix
Add a missing "break" forgotten in 6d6e5cde21 (Enhance wxUILocale and
wxLocaleIdent, 2022-03-28).

See #2615.
2022-03-28 18:10:55 +02:00
Vadim Zeitlin
efa1c59141 Allow setting WX_HTML_OUTPUT_DIR to override default location
This allows to avoid making custom changes when generating the docs on
docs.wxwidgets.org and can be more generally useful too.
2022-03-28 15:43:32 +02:00
Vadim Zeitlin
cd4d9011b7 Fix appearance of search results when using server-based search
Use fixed Doxygen PHP search functions to work around Doxygen bug
https://github.com/doxygen/doxygen/issues/7892 which affected our docs
too.

Closes #19276.
2022-03-28 15:29:50 +02:00
Vadim Zeitlin
263b1844dc Show only the updated files when uploading the docs
Don't use rsync "--verbose" option as it's too verbose, show just the
names of the files being uploaded.
2022-03-28 11:44:48 +02:00
Vadim Zeitlin
dfb4a3bd02 Run docs update workflow for pull requests too
Also run it only if any documentation-related files were modified.
2022-03-28 11:37:34 +02:00
Vadim Zeitlin
f26d25fcb6 Suppress ssh messages about adding known host in docs workflow
This is useless and contains the host IP and port which we don't want
want to show.
2022-03-28 11:33:25 +02:00
Vadim Zeitlin
6678c93eae Merge branch 'docs-workflow'
Fix the documentation update GitHub Action workflow.
2022-03-28 11:25:28 +02:00
Vadim Zeitlin
4179d13dab Fail the documentation build if there are any Doxygen warnings
Check for Doxygen warnings, that are, for the most part, actually
errors, to ensure that they don't creep back in after they were recently
fixed.
2022-03-28 11:16:53 +02:00
Vadim Zeitlin
fe944dec68 Only deploy the documentation from master
Don't do it for pull requests.

This check also seems to render the check for the repository owner
unnecessary, so drop it instead of keeping both.
2022-03-28 11:16:53 +02:00
Vadim Zeitlin
20b8ba1773 Add extra script to the docs created in GitHub Actions workflow
This was done by the cron job running in docs.wxwidgets.org before, so
keep doing it here.
2022-03-28 11:16:53 +02:00
Vadim Zeitlin
15ea25448f Fix accidentally wrapped line in the docs workflow 2022-03-28 11:16:53 +02:00
Vadim Zeitlin
79f6a2a158 Fix wxUILocale documentation formatting
Fix a few problems:

- Don't indent lists, as this makes them appear as code.
- Prefer using inline `...` to @code ... @endcode.
- Escape '<' and '>' characters.
2022-03-28 11:10:31 +02:00
Vadim Zeitlin
70e119140c Merge branch 'win-transparency'
Improve shaped sample and its documentation.

See #22230.
2022-03-28 00:16:31 +01:00
utelle
6d6e5cde21 Enhance wxUILocale and wxLocaleIdent
Many improvements and fixes to wxUILocale:

- Add wxUILocale method for retrieving wxLocaleIdent identifier,
  localized names, layout direction.
- Add wxLocaleIdent attributes, getter, and setter for
  platform-dependent tags under Windows: extension, sort order.
- Modify method wxLocaleIdent::FromTag to support not only BCP 47-like
  tags, but also platform-dependent syntax.
- Modify method wxLocaleIdent::GetTag to allow specifying the tag type.
- Update internat sample to better show using wxUILocale.
- Update German and French message catalogs for internat sample (German
  fully translated, French msgIds only).
- Introduced wxUILocaleImplStdC under Windows, because locale "en-US" is
  not equivalent to the C locale.
- Adjust wxLocale class to restore previous wxUILocale in the
  destructor.
- Implement wxLocale::GetInfo method through wxUILocale methods.
- Removed LCID dependency in wxLocale.
- Move the implementation of some static wxUILocale methods from
  intl.cpp to uilocale.cpp.

Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>

Closes #2615.
2022-03-28 01:11:40 +02:00
Vadim Zeitlin
891cbb1e0e Provide more details in the error message from wxwidgets.props
Give the full path of the directory where we failed to find the
libraries, as this can be useful to show what exactly are we looking
for.
2022-03-28 00:03:46 +01:00
Vadim Zeitlin
9e5c8a8027 Respect bitmap content scale factor in wxMSW wxMemoryDC
Apply it manually because MSW doesn't do it automatically for us and
also adjust the font size in wxMemoryDC as the base class version only
does it for the device contexts associated with a window, but we also
need to do it when using a wxMemoryDC for a bitmap using scale factor
different from that of the main display.

As the result of these changes, contents drawn on wxMemoryDC, both
directly via its own methods, or via wxGraphicsContext (using either
GDI+ or Direct2D) created from it, it appears the same as in wxWindowDC
(e.g. wxPaintDC) created for a window using the same scale.

Closes #22130.

Closes #22234.
2022-03-28 01:03:07 +02:00
Vadim Zeitlin
74fa410b81 Merge branch 'generic-dialogs-cleanup'
Simplify generic dialogs code and make them more consistent with each
other.
2022-03-28 00:58:44 +02:00
Vadim Zeitlin
f280bcdb58 Improve error reporting in wxDateTime unit tests
Simply use INFO() to give all the information we want to see in case of
failure once instead of doing it in multiple WX_ASSERT_MESSAGE() in a
more ugly way with extra parentheses.

Also use FAIL_CHECK() to keep running the test after the first failure.
2022-03-28 00:56:19 +02:00
Vadim Zeitlin
762c80b809 Handle --with-cxx=20 configure option too
Although wxWidgets doesn't use any C++20 features yet, still allow
compiling it in C++ 20 mode if wanted.

Update the helper macro for detecting available C++ version support from
https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
with just a minor change to de-TAB-ify it to pass our code style check
forbidding indenting with TABs.

Closes #22238.
2022-03-28 00:55:54 +02:00
Vadim Zeitlin
d47119680f Create bigger windows on high DPI screens in wxMSW by default
When using 200% DPI scaling, 400*250 windows are too small as almost
nothing fits into them, so use 800*500 size for them instead.

This is still completely arbitrary, but clearly better.

Closes #22235.
2022-03-28 00:55:54 +02:00
Andriy Byelikov
30e1ca49ae Update Catalan translations
Closes #22237.
2022-03-28 00:55:54 +02:00
Vadim Zeitlin
0390951677 Fix forwarding of menu commands in the richtext sample
Fall back on the main rich text control if there is no currently focused
window, as the control itself never has focus when a menu is opened with
wxGTK/Wayland, i.e. none of the menu commands, such as wxID_COPY/CUT,
worked for it in this case.

Closes #22121.
2022-03-28 00:55:54 +02:00
Vadim Zeitlin
7e45373e16 Add a simple workflow for updating HTML docs online
Run doxygen and copy the generated files to docs.wxwidgets.org.

Ignore the new workflow in all the existing CI ones, as changes to it
shouldn't require rerunning them.

See #19126.
2022-03-28 00:54:46 +02:00
Vadim Zeitlin
7769894304 Merge branch 'doxygen-fixes'
Fix several problems in Doxygen markup and update the required Doxygen
version to 1.8.17.

Closes #19126.
2022-03-28 00:47:28 +02:00
Vadim Zeitlin
c1ee60395a Change supported Doxygen version to 1.8.17
This is the version available in Ubuntu 20.04 which is currently used
both on docs.wxwidgets.org and in GitHub Actions Ubuntu environment, so
it looks like a reasonable choice, even though the latest version is
1.9.3.

Note that the versions earlier than 1.8.14 can't be used any longer
since the changes in the previous commit because "^^" in the aliases
definition don't work in them and result in garbled output.
2022-03-28 00:43:05 +02:00
Vadim Zeitlin
398af094cf Use "^^" instead of "\n" in Doxygen aliases
This is required with any version after 1.8.14.

Closes #2068.
2022-03-28 00:24:44 +02:00
Vadim Zeitlin
326077d574 Increase DOT_GRAPH_MAX_NODES Doxygen option for wxObject
There are more than 50 nodes in wxObject inheritance graph, so increase
this option value to allow generating it and avoid a warning about it.
2022-03-28 00:23:30 +02:00