Commit graph

4769 commits

Author SHA1 Message Date
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
Maarten Bent
70c2ddeba3 Add support for wxBG_STYLE_TRANSPARENT to wxMSW
Allow using transparent background style under Windows by mapping it to
WS_EX_TRANSPARENT.

Closes #23412, #23498.
2023-05-11 22:42:13 +01:00
Vadim Zeitlin
5fd6be2f64 Add wxRect::MakeCenteredIn() modifying the rectangle in place
This can be more convenient than calling CenterIn().
2023-05-10 00:09:41 +01:00
Vadim Zeitlin
540d2c2d39 Improve generic implementation of wxDisplay::GetFromRect()
Account for the special case of partly visible rectangle whose center is
off screen, as in this case GetFromRect() would still be expected to
return a valid display and not wxNOT_FOUND.

Also mention this case in the documentation.
2023-05-09 21:59:46 +01:00
Vadim Zeitlin
0da3f1c11f Add wxDisplay::GetFromRect()
For now this is just the same thing as GetFromPoint(center-of-rectangle)
but it's already more convenient to use and it will also be changed in
the upcoming commits.
2023-05-08 22:47:04 +01:00
Ivan Sorokin
8a01942f1a Add WXK_NUMPAD_CENTER to refer to numpad "5" in portable code
This key produces events with different key codes in wxMSW (WXK_CLEAR)
and the other ports (WXK_NUMPAD_BEGIN), so add a new constant to allow
to refer to it under the same name everywhere.

Also generate a key event for it in wxOSX where it previously wasn't
generated at all.

Closes #23478.

Closes #23491.
2023-05-06 21:57:47 +01:00
Lauri Nurmi
9f94f4069c Support wxDP_DROPDOWN mode for native date pickers on macOS
According to Apple's documentation, the presentsCalendarOverlay property
is supported in macOS 10.15.4 and later.

Closes #23520.
2023-05-05 15:19:49 +02:00
Vadim Zeitlin
b2bb68dc36 Add wxDPIChangedEvent::Scale() overloads for wxPoint and wxRect
Allow scaling positions, in addition to the sizes, and, also, entire
rectangles.
2023-05-01 17:21:03 +01:00
Vadim Zeitlin
2acf999f39 Merge branch 'xrc-getposition-win'
Add windowToUse argument to wxXRC GetPosition() too.

See #23507.
2023-04-30 01:18:01 +02:00
PB
c5dc85f398 Remove mentions of no longer supported MSVS versions
The oldest supported MSVS version for wxWidgets 3.3 is 2015,
so remove mentions of limitations of older MSVS versions.

Closes #23508.
2023-04-30 01:17:28 +02:00
Vadim Zeitlin
454c7e0fb9 Add "windowToUse" to wxXmlResourceHandler::GetPosition() too
There doesn't seem to be any reason to have it in GetSize() and
GetDimension(), where they were added by 0c00c86faf (fixed dialog units
in toplevel windows (bug #1170234), 2005-03-28), but not in this
function, so add it here as well.
2023-04-28 18:14:40 +01:00
Vadim Zeitlin
83805407bf Use "nullptr" instead of "0" in wxXmlResourceHandler docs
No real changes, just use nullptr for the default pointers values.
2023-04-28 16:56:07 +01:00
Vadim Zeitlin
5d2639d1cf Merge branch 'std-iostream-fixes'
Restore wxDocument::{Save,Load}Object() compatibility with the old
non-STL build.

See #23481.
2023-04-28 15:26:54 +02:00
Vadim Zeitlin
2bb3525723 Improve wxDocument::{Save,Load}Object() documentation
Clarify when each of the overloads is available and also document that
std::istream must not be in failed state for LoadObject() to be
considered successful.

Closes #23479.
2023-04-28 15:26:46 +02:00
Vadim Zeitlin
20b3c887f5 Improve wxUSE_STD_IOSTREAM documentation
Clarify that it is 1 by default in the documentation, instead of
implying that it's off by default and needs to be enabled.

Improve the description of this option in setup.h files.

And also document this compilation option in the summary page.
2023-04-28 15:26:46 +02:00
Blake-Madden
bbf499959b Fix typo and formatting in wxWebResponse docs
Fix typo, missing semicolon, missing commas, and stray colon; use
consistent formatting.

Closes #23501.
2023-04-28 14:49:47 +02:00
mcorino
acf8956a4c Fix typo in wxGrid::EnableRowResize() documentation.
Replace 'l' by ';' (fixing corrupted doxygen output).

Closes #23492.

Closes #23493.
2023-04-28 14:48:47 +02:00
Vadim Zeitlin
7465d8297e Add wxString::wc_string() for consistency
We have utf8_str() and utf8_string(), but no similar equivalent for
wc_str(), so add one too, it seems nicer to use than ToStdWstring().

Closes #23463.
2023-04-20 15:20:13 +02:00
Blake Madden
2b8c409824 Fix wxWebResponse::GetMimeType() always returning empty string
Return the actual MIME type extracted from the Content-Type header from
the existing function and also add new wxWebResponse::GetContentType()
returning the full value of this header.

Closes #23461.
2023-04-20 15:15:54 +02:00
Blake-Madden
691c9e4352 Fix comment about wxWebResponse::IsOk()'s return type
wxWebResponse::IsOk() returns a boolean, not a pointer.

Closes #23460.
2023-04-18 14:39:19 +02:00
Vadim Zeitlin
ae13d70ddc Merge branch 'use-std-hash'
Use std::unordered_foo instead of wx hash maps.

See #23462.
2023-04-18 14:38:12 +02:00
utelle
a20aa4de75 Improve generated process for the language database files
Fix some issues and streamline regeneration process:

- A few glitches (like duplicate language symbols, wrong Windows
  language ids etc) were fixed.
- Scripts were added to allow to regenerate the list of supported
  locales from the list of known Windows locales.
- Version info when language symbols became available was added to the
  documentation of the language symbol enum.
- Synonyms are no longer hard-coded in the script genlang.py.

See #23453.

Closes #23437.
2023-04-18 14:27:28 +02:00
Vadim Zeitlin
8a8fee442f Make wxEnvVariableHashMap just a std::unordered_map<>
Use the standard container directly instead of using a wx synonym for
it, this is more clear.

Use the same hack here as in e13dbd4278 (Use std::unordered_map<> in
wxMsgCatalog and related classes, 2023-04-12) to allow the existing code
including this header keep using the functions from wx/wxcrt.h without
including it explicitly.
2023-04-18 00:44:12 +02:00
Vadim Zeitlin
7824391f64 Merge branch 'use-std-containers'
Remove avoidable uses of legacy container classes by replacing them with
the standard containers.

See #23440.
2023-04-17 17:02:27 +02:00
Vadim Zeitlin
889845fbc4 Add support for wxNO_IMPLICIT_WXSTRING_CONV_TO_PTR to wxString
This symbol is similar to the existing wxNO_IMPLICIT_WXSTRING_ENCODING
and can be defined when building the application (as opposed to when
building the library) to disable implicit wxString conversions to
pointer types, i.e. char*, wchat_t* and void*.

This makes the just added wxUSE_CHAR_CONV_IN_WXSTRING library build
option unnecessary, so remove it.
2023-04-16 01:16:56 +02:00
Vadim Zeitlin
5119d35d3b Document that wxString::Clone() is obsolete
It's useless now that we never use ref-counted implementation any
longer.
2023-04-16 00:43:05 +02:00
Vadim Zeitlin
330303e078 Update wxString overview and documentation
Avoid overlap between the two pages.

Remove obsolete information.

Document wxNO_IMPLICIT_WXSTRING_ENCODING.

Don't mention wxUSE_STL any longer.
2023-04-15 20:34:24 +02:00
Vadim Zeitlin
4c8bf1e9e7 Don't mention wxString::GetWriteBuf() in the documentation
This function doesn't exist any longer since 5e2da5a106 (Get rid of v2.8
code, 2022-08-01).

Remove documentation of this function and its UngetWriteBuf()
counterpart and don't refer to them in wxStringBuffer[Length]
documentation.
2023-04-15 15:08:37 +01:00