Commit Graph

72330 Commits

Author SHA1 Message Date
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
Vadim Zeitlin
f8438dc4be Remove Doxygen options obsolete in 1.9.1
We don't use any of these options anyhow, so just remove them to avoid
warnings about them being obsolete now.
2022-03-28 00:22:40 +02:00
Vadim Zeitlin
6bc00ecc5d Remove top level directories from the paths in Doxygen log
Removing "docs/doxygen" and "interface" was both ambiguous (because it
wasn't immediately clear which file the message was referring to) and
insufficient because there are now Markdown files in the other other
directories used as Doxygen input too, and they still appeared with the
full paths.

Fix both problems by removing just the top level directory from all
paths and keeping all the rest.
2022-03-28 00:20:44 +02:00
Vadim Zeitlin
05612989f0 Fix escaping of new lines in wxRegEx documentation
There doesn't seem to be any way to use backslashes with @c: with a
single backslash, it's interpreted as a command, but a double backslash
appears in the output. So use `\b` instead of @c \b and also use `...`
elsewhere for consistency.

Also fix wxRE_NEWLINE description formatting.
2022-03-28 00:19:05 +02:00
Vadim Zeitlin
c6b5070083 Don't use non-existent "@this" command in wxUILocale docs
Just use `this` instead.
2022-03-28 00:18:39 +02:00
Vadim Zeitlin
19d477aabf Consistently escape "@" in wxRichTextCtrl documentation
The first occurrence of it was escaped, but the second one in each line
was not, resulting in warnings about "unknown command @:".
2022-03-28 00:18:02 +02:00
Vadim Zeitlin
7a269df2bf Document all parameters of wxImage::Paste()
As long as one parameter of a function is documented, all the other ones
should be documented too, as otherwise Doxygen complains about it not
being the case.
2022-03-28 00:17:26 +02:00
Vadim Zeitlin
a406e2a7dc Quote paths using backslashes in Doxygen input
Otherwise Doxygen interprets each path component as its command and
complains about "unknown \msw command" in "build\msw" path, for example.
2022-03-28 00:16:29 +02:00
Paul Cornett
9af728caea Minor simplification in generic wxCaret
Only create wxMemoryDC if it's actually needed.
2022-03-27 13:54:46 -07:00
Paul Cornett
03bf61be3c Fix drawing caret on GTK3 with GDK_SCALE=2
Don't use pen when drawing solid rectangle, avoids partial outline left on window.
2022-03-27 13:49:00 -07:00
Paul Cornett
0993d4f18e Make wxCaret init functions private
Init functions are not supposed to be called by derived classes,
they have already been called by the base ctors.
2022-03-27 13:07:37 -07:00
Gerhard Gruber
9dc7248b1d Add conversion to signed/unsigned int to wxString
Add wxString::ToInt() and ToUInt() for convenience and consistency with
the existing ToLong() and ToULong().

Closes #22068.
2022-03-26 00:46:58 +01:00
Paul Cornett
c10a70be67 Fix GTK version check 2022-03-25 12:01:12 -07:00
Paul Cornett
b3b43ad15b Fix drawing of TLW with wxBG_STYLE_TRANSPARENT on GTK
Default drawing of the background has to be disabled.
See #18592
2022-03-25 12:00:07 -07:00
Vadim Zeitlin
80a056a58b Improve "shaped" sample documentation
Also link to it from the functions shown in this sample.
2022-03-25 01:54:11 +01:00
Vadim Zeitlin
fffe5af903 Document SetTransparent() limitation under wxGTK
The first call to this function must happen before showing the window.
2022-03-25 01:48:16 +01:00
Vadim Zeitlin
279af795ed Make transparency window in the shaped sample work under MSW
Still show transparent window even if IsTransparentBackgroundSupported()
returns false, just don't make their background transparent and only use
SetTransparent() in this case. In fact, don't try to use transparent
background style at all by default and add a separate menu item to do it
if wanted.

Also add a slider to allow changing opacity of the window.

Finally, make the window big enough in high DPI under MSW by using
FromDIP().
2022-03-25 01:46:24 +01:00
Vadim Zeitlin
58800c09e4 Merge branch 'misc-dpi'
A couple of high DPI-related fixes.

See #22229.
2022-03-25 00:49:24 +01:00
Vadim Zeitlin
16d8e61d28 Render "Close" bitmap button correctly in high DPI
Define a custom wxBitmapBundle to represent this bitmap in order to be
able to draw it at any required size instead of scaling up the bitmap in
high DPI.

See #18822.
2022-03-24 21:40:44 +01:00
Vadim Zeitlin
debd3f338b Use high DPI icons in wxInfoBarGeneric if appropriate
Just switch to using wxArtProvider::GetBitmapBundle() instead of
GetBitmap() which returned standard-sized bitmap that was upscaled
later.

See #18822.
2022-03-24 21:40:44 +01:00
Vadim Zeitlin
49de73c10d Add example of wxEVT_DPI_CHANGED handler to the display sample
Just to allow testing that this event is received as expected.

See #19130.
2022-03-24 21:40:44 +01:00
Vadim Zeitlin
a48859e20c Merge branch 'uilocale-fixes'
wxUILocale-related fixes.

See #22222.
2022-03-24 21:39:34 +01:00
Vadim Zeitlin
387981e373 Merge branch 'generic-dvc-fixes'
Fixes to generic wxDataViewCtrl under GTK.

See #22220.
2022-03-24 21:39:09 +01:00
Vadim Zeitlin
66c52326d5 Merge branch 'dvc-add-item-error' of https://github.com/thesiv/wxWidgets
Fix adding items to collapsed nodes of wxDataViewCtrl in wxGTK too.

See #22228.
2022-03-24 21:37:15 +01:00
Vadim Zeitlin
886f8e58f0 Merge branch 'artprov-sizehint-dips'
wxArtProvider::GetSizeHints() improvements: use DIPs and get rid of
"bool platform_dependent = false".

Closes #22224.
2022-03-24 21:36:20 +01:00
Vadim Zeitlin
cacfcb1e61 Allow ignoring revisions when viewing blame on GitHub
Rename the existing file with the revisions to ignore to the name used
by GitHub in order to allow using it there too.
2022-03-24 21:35:39 +01:00
Vadim Zeitlin
108108e54e Add wxArtProvider::Get[Native]DIPSizeHint()
Also add "wxWindow* win = NULL" argument to the existing functions to
convert from DIPs using the given window instead of the default DPI
scaling factor.

Closes #22022.
2022-03-24 21:35:26 +01:00
Ilya Sinitsyn
946ad457e9 Fix items adding to a collapsed node of DVC under GTK
Note that `wxDataViewCtrlInternal_FindNode()` was removed to access
protected `wxDataViewCtrlInternal::BuildBranch()`.
2022-03-25 02:43:45 +07:00
Paul Cornett
a1a883b8e8 Fix SetTransparent() with GTK3
An RGBA visual is required for it to work, which may not be the default.
See #18592
2022-03-24 12:09:00 -07:00
Ilya Sinitsyn
7966eaf268 Fix nodes duplication in the generic DVC implementation
Don't create a subtree in `FindNode()` and just return as the subtree
will be realized when a parent node will be expanded.
2022-03-25 01:05:09 +07:00
Ilya Sinitsyn
861313f0e9 Handle the nodes duplication error in the DVC test 2022-03-25 00:55:37 +07:00
Vadim Zeitlin
506f292be2 Deprecate wxArtProvider::GetSizeHint(bool) overload
This was confusing and completely unnecessary as the version with the
non-default value of the bool argument was just equivalent to calling
GetNativeSizeHint() directly, so why even bother having it.
2022-03-24 00:10:08 +01:00
Vadim Zeitlin
4e4b80760b Move wxArtProvider::DoGetSizeHint() out of line and simplify it
This function has no need to be inline and it can be written in a more
clear way by just calling GetNativeSizeHint() directly instead of
passing by GetSizeHint(true).
2022-03-24 00:05:01 +01:00