Commit graph

4828 commits

Author SHA1 Message Date
Blake-Madden
2c1cdf9c02 Fix typos and repeated words in comments and documentation
Closes #24085.
2023-11-30 02:21:34 +01:00
Blake-Madden
49ddc51007 Add bullet number and style support to MSW wxTextCtrl
Make bullet style-related functions in wxTextAttr work for the native
(rich) text controls too.

Closes #24069.
2023-11-30 01:53:50 +01:00
taler21
7a1c8d39f8 Fix references to wxEventLoop::YieldFor() in the documentation
It was incorrectly called wxAppConsole::YieldFor() but the function was
moved from wxAppConsole to wxEventLoopBase back in dde19c2180 (second
part of #10320: move wxApp event handling functions to wxEventLoopBase
(in particular move Yield() functions); add backward compatible
redirections to wxApp; update docs; remove global lists wxPendingEvents
and wxPendingEventsLocker, 2009-02-15).

Closes #24095.
2023-11-29 22:16:03 +01:00
Vadim Zeitlin
dede4b9326 Use "= default" for all trivial default ctors and dtors
Replace user-specified empty constructors and destructors with the
compiler-generated versions, which has a number of advantages for code
generation, in addition to being more clear.

Closes #22965.

Closes #24058.
2023-11-17 01:33:32 +01:00
Martin Corino
e64118658d Add documentation for wxSizerFlags::HorzBorder()
Closes #24059.
2023-11-17 01:22:53 +01:00
Blake-Madden
1d7f2becd4 Add line spacing support to MSW wxTextCtrl
Also expand and improve wxTextAttr documentation by mentioning where is
each attribute supported.

Closes #24046.
2023-11-17 01:11:14 +01:00
Vadim Zeitlin
7a73044fd2 Merge branch 'tree-search'
Don't find hidden items when using incremental tree search.

See #24041.
2023-11-17 01:08:19 +01:00
Vadim Zeitlin
ba9fe3481d Merge branch 'gtk-dpi-changed'
Generate DPI changed event in wxGTK too.

See #24040.
2023-11-17 01:06:54 +01:00
Vadim Zeitlin
ef4fecc186 Merge branches 'tree-state-bmpbundle' and 'imglist-scalefactor'
Refactor wxImageList and convert it to use physical pixels and
add support for high DPI state images wxTreeCtrl using the new
wxImageList.

See #24000, #24033.
2023-11-17 01:03:27 +01:00
Paul Cornett
56303c6236 Document wxDisplay::GetDepth()
Should have been part of
24b5e256df (Add wxDisplay::GetDepth() and use it for wxDisplayDepth(), 2018-10-06)
2023-11-16 10:06:57 -08:00
Paul Cornett
2d07dd25b4 Improve desktop environment detection
Add code that works for Wayland, and any DE
2023-11-10 11:23:24 -08:00
Vadim Zeitlin
88a39aa6f8 Implement wxEVT_DPI_CHANGED generation for wxGTK
Just check if the scale factor has changed when getting a "configure"
event for a TLW as we're guaranteed to get one when the scale factor
does change, according to GTK documentation (and it does seem to work).

Closes #19290.
2023-11-07 20:57:31 +01:00
Vadim Zeitlin
163d310369 Use wxTimer::StartOnce() instead of wxTIMER_ONE_SHOT
This is more readable and shorter, so encourage using this form.

No real changes.
2023-11-07 19:01:38 +01:00
Vadim Zeitlin
1761bc3a88 Update documentation of wxTaskBarIcon limitations
Don't mention thoroughly outdated desktop environments such as Gnome 1
and don't make this X-specific as the situation is not at all better
with Wayland.

Do mention IsAvailable().

See #18081.

Closes #24028.
2023-11-07 02:32:20 +01:00
Vadim Zeitlin
53b4f4ddf2 Use physical size in wxImageList
This seems to be the only way to fix using this class, which is
fundamentally incompatible with high DPI support, with bitmaps of
different logical but identical physical sizes.

By using physical size we ensure that the code chopping up the provided
bitmap in multiple images doesn't do it with the bitmap having the same
physical size but a different logical size from all the other bitmaps.
And, conceptually, logical size of the bitmaps in it really shouldn't
matter to the image list as it doesn't have a scaling factor and so
can't do anything useful with the logical size.

Moreover, we can't add wxImageList::SetScaleFactor() neither because
this class is, by design, supposed to be shareable between different
controls which may use different scale factors, so it doesn't make sense
to speak of the scale factor of the image list itself.

This undoes the changes made in the generic implementation back in
c374eefd34 (Fold wxOSX-specific wxImageList into generic version,
2018-10-30) and also eb52e86553 (Take into account scale factor of
images added to wxImageList, 2021-04-03).

Also update a couple of places where wxImageList is still used to use
physical sizes. Unfortunately some others can't be easily fixed, e.g.
global wxFileIconsTable would have to be completely rewritten.

Finally, add a unit test checking that things work as expected now:
previously the size of 24x24 bitmap in the image list containing
(scaled) 32x32 bitmaps would be 21x21 due to sub-bitmap extraction
kicking in.

Closes #23994.
2023-11-06 21:18:34 +01:00
Vadim Zeitlin
f9a22962e0 Add wxTreeCtrl::GetStateImageCount() and HasStateImages()
Add these functions for consistency with SetStateImages() and to avoid
using GetStateImageList() in the treectrl sample, which can now use
GetStateImageCount() instead.
2023-11-03 00:53:40 +01:00
Vadim Zeitlin
308e902102 Add wxTreeCtrl::SetStateImages()
Unlike the existing SetStateImageList() function, the new one allows to
provide the high-resolution versions of the state images too.

Update the treectrl sample to use the new API.

Closes #23993.
2023-11-03 00:53:40 +01:00
Blake-Madden
9bae94022c Fixes for wxTextProofOptions documentation
Fix missing semicolons causing help parsing to break.

Document Language().

Fix typo.

Closes #24026.
2023-11-03 00:52:12 +01:00
Martin Corino
8fc73d45ce Document wxPGSelectPropertyFlags enum
This enum is used in the public API and so needs to be documented.

Closes #23980.
2023-10-29 02:54:03 +02:00
PB
4ddea5658d Cover default button in wxDialog::CreateStdDialogButtonSizer docs
Add a note explaining that when creating a button sizer with this
method, one of the buttons will be usually made the default.

See #23992.

Closes #24001.
2023-10-25 23:54:22 +02:00
Martin Corino
5d30f84125 Document wxItemContainer::IsSorted()
This method is needed to determine the sorted state of a control derived
from wxItemContainer without knowing the actual derived control class.

Closes #23971.
2023-10-22 01:31:38 +02:00
Martin Corino
8f12280af4 Add missing API docs for wxRichTextCtrl-related classes
Document functions used in RichText sample code.

Closes #23970.
2023-10-22 01:29:54 +02:00
Vadim Zeitlin
e43f913313 Remove all blank "Modified by:" lines from top comment blocks
Having this line is not useful at all as it doesn't contain any
information and shouldn't be filled in the future as git-shortlog can
provide the information about people who changed the given file more
more reliably than consulting the comments in any case.

Keep the non-blank lines for historical purposes.
2023-10-22 01:22:48 +02:00
ali kettab
7e360dcf1e Fix testing wxSpinCtrl[Double] unsupported features under wxQt
Backwards ranges are not supported under wxQt and setting empty string
in the control automatically displays minVal.
2023-10-15 00:10:02 +01:00
Blake-Madden
4235a018be Document that wxGetSingleChoice() geometry parameters are ignored
Also make it clear that wxCHOICE_{HEIGHT,WIDTH} constants are not really
used for anything.

Closes #23949.

Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>
2023-10-07 18:58:58 +02:00
Vadim Zeitlin
543fd3fabc Document that wxLogInterposerTemp shouldn't be used
Mark it as deprecated in the documentation without deprecating it
formally in the code, as it seems to be used in some existing code and
there is no urgency to remove it, but using it in new code still doesn't
make any sense.

Closes #23945.
2023-10-06 18:48:49 +02:00
Vadim Zeitlin
80e8dc3692 Merge branch 'msw-add-def-catalog'
Fix AddStdCatalog() under MSW and add functions without msg ID fallback.

See #23930.
2023-10-06 01:03:25 +02:00
Vadim Zeitlin
64476dd3e7 Deprecate wxLocale::AddCatalog() overload taking msgIdCharset
This parameter is never used any more, so it should be simply removed
from the application code using this function.
2023-10-02 19:21:48 +02:00
Vadim Zeitlin
94b1a17aeb Add AddAvailableCatalog() and use it in AddStdCatalog()
The new function only returns true if the catalog could be really
loaded and not if it is considered not to be needed because the message
ID language (which is typically "en-US") happens to be present in the
preferred UI languages list (which seems to always include "en-US" in at
least Western European MSW).

This allows to distinguish, albeit in a rather awkward (but
backwards-compatible) way between having a translation for the given
language and not needed such translation.

It is still not clear if it is really correct to return "en-US" from the
list of preferred languages even if the user has never intentionally
configured the OS to indicate that English is acceptable, but at least
now we can work around this issue and use AddAvailableCatalog() in
AddStdCatalog() to make sure we only skip loading unversioned wxstd.mo
if the versioned wxstd-x.y.mo file is really found instead of never
doing it, as was the case until now (see #23886).

Also add GetBestAvailableTranslation() helper which seems more useful
than the existing GetBestTranslation() one and is similarly related to
it.

See #18227.
2023-10-02 19:21:48 +02:00
Vadim Zeitlin
4ffad5074f Add WXSUPPRESS_GTK_DIAGNOSTICS environment variable
This allows to suppress some or all GTK diagnostics even for the
programs not calling GTKSuppressDiagnostics() nor even
GTKAllowDiagnosticsControl() themselves.
2023-10-01 17:36:54 +02:00
Vadim Zeitlin
fd29d33489 Use "@overload" instead of duplicating GetBestTranslation() docs
No real changes, but avoid duplicating ~20 lines of documentation
unnecessarily.
2023-09-30 20:05:29 +02:00
Vadim Zeitlin
562079f589 Correct documentation of wxLocale::AddCatalog() taking charset
There is no corresponding wxTranslations::AddCatalog() overload any
longer, so don't mention it and don't document it neither, but do say
that the charset parameter is simply unused.
2023-09-30 20:05:00 +02:00
Maarten Bent
f68bb391ce
Update documentation of wxListCtrl IsItemChecked and CheckItem 2023-09-30 17:43:41 +02:00
Artur Wieczorek
2cdca2d744 Deprecate wxPGPropertyFlags that are intended for internal use 2023-09-22 23:39:53 +02:00
Artur Wieczorek
11582b4082 Refactor wxFlagsProperty to simplify initialization 2023-09-22 23:39:53 +02:00
Artur Wieczorek
5a87cbdf3d Use enum class to represent wxPGKeyboardActions 2023-09-22 23:39:53 +02:00
Artur Wieczorek
9cb4d8fbbe Save keyboard actions as std::pair in wxPropertyGrid
Store two possible action codes in std::pair instead of packing them
into one int value with bitmasks. This reduces level of indirection
in accessing keyboard actions and make the code more maintainable.
2023-09-22 23:39:52 +02:00
PB
081b7c430b Document more macOS-only wxTextCtrl methods
Document previously undocumented macOS methods
enabling/disabling automatic character substitutions.

This should have been part of 90e1769 (Add API to control
OS X wxTextCtrl’s smart behavior, 2016-10-16).

Closes #23889.
2023-09-21 22:59:06 +02:00
Vadim Zeitlin
0fd6cf99a3 Implement wxWebView::SetProxy() for Edge backend
Currently it can only be called before Create() because it has to be
passed via the additional browser arguments and can't be changed later.
2023-09-07 15:33:39 +02:00
Vadim Zeitlin
7c5d30fb32 Add wxWebView::SetProxy() and implement it for WebKit2 backend
Update the sample to allow specifying the proxy in it.
2023-09-07 15:33:39 +02:00
Vadim Zeitlin
aec49d9c9d Use dl_iterate_phdr() in wxDynamicLibrary::ListLoaded()
This has the advantage of returning libraries in their load order, which
is more useful than the unspecified order that was used before.

It also means that this function now has a chance of working under other
systems such as FreeBSD, which also provides dl_iterate_phdr().
2023-09-06 00:40:11 +02:00
Martin Corino
a64004970c Fix wxHyperlinkCtrl::{Get,Set}Visited() signature in the docs
Don't document these functions as being pure virtual because they are
not.

Closes #23838.
2023-08-30 15:43:19 +02:00
Vadim Zeitlin
7f1e2de126 Document what wxWindow::WarpPointer() doesn't work with Wayland
There is nothing we can do about it, but we can at least document it.

See #23778.
2023-08-30 15:17:50 +02:00
Vadim Zeitlin
00366cbaae Merge branch 'animation-hidpi'
Add support for specifying multiple animations to allow automatically
showing a higher resolution version when using high DPI, just as it was
already possible with the bitmaps.

See #23817.
2023-08-29 01:53:36 +02:00
Blake-Madden
e4388d4f87 Add accessors for underling wxTextCtrl GTK widgets
Allow retrieving GtkTextBuffer or GtkEditable used for multi- and
single-line controls respectively.

Closes #23829.
2023-08-29 01:52:51 +02:00
Vadim Zeitlin
69c1d19a8d Fix typo in wxKeyEvent documentation for Ctrl-letter events 2023-08-26 17:20:31 +02:00
Vadim Zeitlin
b284ede300 Merge branch 'memstream-peek'
Return 1 from LastRead() after successful wxMemoryInputStream::Peek()
call.

See #23758.
2023-08-26 12:27:28 +02:00
Vadim Zeitlin
7758388e9a Document that wxStream::Peek() affects LastRead() as expected
This is the case for all streams now after the changes of the previous
commit.
2023-08-26 01:51:57 +02:00
Vadim Zeitlin
27e80f81b4 Add high DPI support to generic wxAnimationCtrl
Allow specifying multiple animation versions, for different resolutions,
when setting the animation to use via wxAnimationBundle class which is a
much simpler version of wxBitmapBundle used elsewhere.

This is not implemented for the native GTK version yet.

Update the sample, even though the difference in it is not really
noticeable as the "high DPI" throbber is just a scaled up version of the
existing standard DPI animation produced using gifsicle.
2023-08-25 20:51:21 +02:00
Vadim Zeitlin
15f19d5d0f Add wxSize::IsAtLeast() helper
This function is trivial but still useful and it doesn't cost much to
have it.
2023-08-25 20:37:58 +02:00