Commit graph

4796 commits

Author SHA1 Message Date
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
Vadim Zeitlin
cc5f5f90b0 Show high resolution bitmaps in wxBusyInfo if available
Instead of always scaling the single bitmap passed to it, allow passing
wxBitmapBundle and select the bitmap most appropriate for the current
resolution from it.

Closes #23813.
2023-08-25 20:32:07 +02:00
PB
547d49f68b Fix typo in wxColourDialog documentation
The code example in wxColourDialog documentation used
a wrong type to create wxColourDialog instance.

Closes #23793.

Closes #23794.
2023-08-24 02:42:39 +02:00
PB
af453674b6 Improve wxFileSystem::AddHandler() documentation
The note in the method description incorrectly stated that
"...the handlers are deleted in wxFileSystem's destructor so
that you don't have to care about it." However, unless a
handler is removed by calling wxFileSystem::RemoveHandler()
(or undocumented wxFileSystem::CleanUpHandlers()), it is deleted
only when wxWidgets shuts down in wxFileSystemModule::OnExit().

Update the method documentation that it is correct (and similar to
that of wxImage::AddHandler()).

Closes #23789.
2023-08-24 02:38:51 +02:00
PB
ecd01698e7 Document more MSW dark mode limitations
Add that anything using task dialog does not support dark mode.

Mention that most common dialogs do not support dark mode.

Mention that calling wxMenu::Break() will turn the menu light.

Closes #23769.
2023-08-23 23:08:15 +02:00
Lauri Nurmi
3e4946fc31 Minor documentation syntax and orthography fixes
Closes #23759.
2023-08-22 19:20:33 +02:00
Vadim Zeitlin
a4dec24c6d Mention behaviour change of wxDC::GetContentScaleFactor()
Complete changes of 5e7b08f9ea (Correct wxDC::GetContentScaleFactor()
documentation, 2023-04-13) to add the information about the version in
which the behaviour of this function changed, as it was already done in
the version of this commit cherry picked to 3.2 branch, i.e. 8094ed5795
(Correct wxDC::GetContentScaleFactor() documentation, 2023-04-13).

Closes #23748.
2023-08-02 04:08:13 +02:00
Vadim Zeitlin
f03ea82be8 Merge branch 'im/stringview' of https://github.com/imciner2/wxWidgets
Add std::string_view constructors to wxString.

Also improve C++17 standard headers detection for MSVS.

See #23711.
2023-07-24 18:16:39 +02:00
Ian McInerney
b8d3b37c9e Add new macro for standard library header inclusion
Newer standard library headers should only be included when the compiler
is targetting that standard, otherwise some compilers (like MSVC) will
warn that you are using a newer C++ include on an older version.
2023-07-24 16:54:14 +01:00
Ian McInerney
3dfb2a5ac1 Add std::string_view constructors to wxString 2023-07-20 19:59:01 +01:00
Martin Corino
4d76a87015 Make wxSearchCtrl inherit from wxTextEntry in all ports
Previously it only inherited from wxTextEntryBase in the generic
implementation (used e.g. in wxMSW).

Update the code, documentation and add new unit tests checking that
wxSearchCtrl member functions inherited from wxTextEntry behave
correctly.

Closes #23686.

Closes #23697.
2023-07-20 14:46:41 +02:00
Stefan Hansson
b84b45161a Implement wxRB_SINGLE support in wxGTK
Create hidden radio button in wxGTK when using wxRB_SINGLE, as
this lets us deactivate the shown button by activating the hidden one.
GTK does not allow deactivating radio buttons by calling them with
gtk_toggle_button_set_active( ..., FALSE), so we need to work around
it like this.

Also update the documentation to mention that this works in wxGTK now.

See #17022.

Closes #23652.

Closes #23677.
2023-07-03 20:14:32 +02:00
Konstantin Bolshakov
691adc8241 Document wxDataViewCheckIconText
This will make wrapping it in wxPython easier.

Closes #23668.

Closes #23669.
2023-06-27 23:41:46 +02:00
Ian McInerney
7669a7e1bd Document already existing wxPrintPreview::GetZoom function
This base function was added over 16 years ago but never documented.

Closes #23667.
2023-06-27 19:21:39 +02:00
Vadim Zeitlin
b9fd9c7c8e Merge branch 'about-dialog-compat'
Restore compatibility with the existing code using custom controls in
the "About" dialog.

See #23658.
2023-06-20 22:15:17 +02:00
Vadim Zeitlin
d5ef9d4387 Add wxGenericAboutDialog::GetCustomControlParent()
This function should be used to get the parent for the custom controls
instead of relying on them being reparented under it by the code added
in the last commit.

Change the type of m_contents to be wxWindow and not wxPanel as it
doesn't really matter, but wxPanel is not fully declared in this header
while wxWindow is.
2023-06-20 19:19:49 +02:00
Vadim Zeitlin
b93de740c8 Document that wxRB_SINGLE only works in wxMSW
In the other ports it can't be turned off, making it useless.

See #17022, #23652.
2023-06-19 18:58:36 +02:00
Vadim Zeitlin
58c49d06fa Minor updates to wxUIActionSimulator documentation
Don't say that it's experimental in configure but do mention that it
doesn't work under Wayland.

Closes #23619.
2023-06-08 01:26:16 +02:00
Vadim Zeitlin
a3e925df0a Merge branch 'mac-uilocale-script-fix'
Locale-related fixes for macOS and new calendar names localization
functions.

Closes #23209.

See #23556.
2023-06-03 21:07:40 +02:00
Vadim Zeitlin
3080b6b04a Merge branch 'com-init-filedlg'
Fix hang in wxMSW wxFileDialog when using multi-thread COM.

See #23583.
2023-06-02 19:13:01 +02:00
Vadim Zeitlin
3d13e77b01 Merge branch 'env-wxlog-time-format'
Add support for WXLOG_TIME_FORMAT and docs improvements.

See #23576.
2023-06-02 19:07:55 +02:00
Vadim Zeitlin
fb30d563a5 Turn wxCAPTION on automatically if it's required by other styles
The documentation used to warn that wxXXX_BOX styles were ignored unless
wxCAPTION was also specified, but this was actually wrong, at least for
wxOSX, which instead enabled wxCAPTION too if any of the BOX flags was
given.

And this behaviour seems more useful, as it's not really obvious why the
boxes are not shown otherwise, so make wxMSW behave like this too and
update the documentation.
2023-06-02 19:05:53 +02:00
Vadim Zeitlin
6c4bee846c Fix hang in wxMSW wxFileDialog when using multi-thread COM
Fall back to old style file dialogs in this case, as IFileDialog just
doesn't seem to support this COM threading model, as hinted at in
SHBrowseForFolder() documentation.

Also document this limitation.

Closes #23578.
2023-05-31 19:39:53 +01:00
utelle
5b424ea181 Add wxUILocale methods for getting month and day names
Implement wxUILocale::GetMonthName() and wxUILocale::GetWeekDayName() in
wxMSW, wxGTK, and wxOSX.

Also extend the existing wxDateTime methods to support a 3rd month and
weekday name representation (Name_Shortest) and a usage context
(Context_Formatting and Context_Standalone).

These changes make wxDateTime methods for getting the localized date and
month names use the current UI locale, as set by wxUILocale, instead of
the current C locale set by the standard C library function, which is a
change in behaviour but a desired one and notably fixes the display of
the months in generic calendar control in wxOSX where the current C
locale is not changed when the UI locale is set.

Replaces #23551.

Closes #23191.
2023-05-31 18:53:45 +02:00
Vadim Zeitlin
674592719f Allow customizing wxLog timestamp format via environment variable
Call wxLog::SetTimestamp() with WXLOG_TIME_FORMAT value if it's defined.
2023-05-28 22:35:34 +02:00
Vadim Zeitlin
03c09d703f Document default timestamp in wxLog::GetTimestamp() documentation
It seems like this would be useful to know.
2023-05-28 22:22:38 +02:00
Vadim Zeitlin
726aedd5a4 Improve wxLogDebug() and wxLogTrace() documentation
Refer to the debugging overview instead of outdated documentation
speaking about debug and release build modes.
2023-05-28 22:17:50 +02:00
Vadim Zeitlin
f2f2868de5 Add support for dark mode colours to XRC
Allow specifying a different colour to use in the dark mode in XRC
colour properties.

Closes #23571.
2023-05-27 21:51:51 +02:00
Vadim Zeitlin
cc07a0fd9b Add trivial wxSocketInitializer helper
This can and will be used instead of calling wxSocketBase::Initialize()
manually.
2023-05-18 00:04:59 +02:00
Vadim Zeitlin
0188fd95ac Fix a recently introduced typo in wxWizard documentation
This was mistyped in d12c3d0805 (Document that wxWizard can and usually
will be allocated on stack, 2023-05-15).
2023-05-16 00:02:42 +01:00
Vadim Zeitlin
d12c3d0805 Document that wxWizard can and usually will be allocated on stack
Also make it clear that calling Destroy() is only necessary for
heap-allocated objects.
2023-05-15 23:48:05 +01:00
Vadim Zeitlin
cd28031b4d Document that wxMSW wxHyperlinkCtrl hover colour can't be changed
This isn't supported by the native control, and it doesn't seem worth to
make an extra effort to support it, so just document it and stop
checking that it works in the unit test.
2023-05-15 21:39:13 +01:00
Blake-Madden
c27b711379 Explain how to specify download paths when using wxWebRequest
Add an overview paragraph explaining how to use wxWebRequest's and
wxWebEvent's IDs together to specify a request's download path before
starting it. The sample shows how to interactively prompt for local
paths once a file downloads, but not how to download a file to a
specific location without user prompting, so document how to do it.

See #22986.

Closes #23504.
2023-05-11 22:48:30 +01:00