Commit graph

4748 commits

Author SHA1 Message Date
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
Vadim Zeitlin
fb17a5ac38 Merge branch 'use-std-cont-1'
Set wxUSE_STD_CONTAINERS=1 by default.

See #23439.
2023-04-15 15:46:08 +02:00
Vadim Zeitlin
5e7b08f9ea Correct wxDC::GetContentScaleFactor() documentation
Document that it returns the same value as GetDPIScaleFactor() wxWindow
method and _not_ the wxWindow method with the same name.

This is very confusing, but there doesn't seem to be anything to be done
about it by now.

See #23441.
2023-04-13 15:07:32 +02:00
Vadim Zeitlin
4a294caacd Stop using macro-based wxList in wxArtProvider code
Use std::list<> instead.

Also use std::unique_ptr<> instead of managing memory manually. As this
makes wxArtProvidersList non-copyable, don't export it from the DLL any
longer, as DLL-exported classes apparently must have a copy ctor, or at
least MSVS (all versions up to 2022) try to generate it even if it's
explicitly deleted in the class declaration and fail, due to the base
class being non-copyable. And because there was never any reason to
export neither this class nor wxArtProviderCache from the DLL, stop
exporting the latter one too.

Note that this implies that the only way to delete a wxArtProvider
registered in the global provider list is by removing it from it,
instead of deleting it directly, which was apparently allowed before,
even though it shouldn't have ever been actually done -- but make this
even more clear in the documentation now.
2023-04-12 18:15:44 +01:00
Vadim Zeitlin
edfa69faf0 Stop using object array for wxRibbonPageTabInfoArray
Replace it with a simple wxBaseArray of wxRibbonPageTabInfo.
2023-04-12 18:09:48 +01:00
Vadim Zeitlin
78ae3f0b16 Stop using object array for wxDynamicLibraryDetailsArray
Use a simple wxBaseArray of wxDynamicLibraryDetails objects.

Also document this container.
2023-04-12 18:09:48 +01:00
Vadim Zeitlin
16842b2b2f Stop using object array for wxArrayVideoModes
This can be just a simple wxBaseArray.

Also document this container, as it is returned from the public
wxDisplay::GetModes().
2023-04-12 18:09:48 +01:00
Vadim Zeitlin
bceace12b5 Use wxBaseArray instead of object arrays for wxAuiNotebook arrays
These classes can also be potentially used in the user code, as they are
used for the protected members of wxAuiTabContainer, so don't replace
them with just std::vector, but do, at least, use wxBaseArray template
for them instead of the macro-based object arrays.

Note that this required the check for the button presence in m_buttons
in wxAuiTabContainer::TabHitTest() as wxBaseArray::Index() relies on
object comparison, whereas the original version relied on object address
comparison, so keep it like this, even though we probably could compare
the buttons IDs instead (and, possibly, not compare anything at all but
just return the result of the button we found from ButtonHitTest()
directly).

Also document these container classes.
2023-04-12 18:09:48 +01:00
Vadim Zeitlin
bc23b1f4f0 Use wxBaseArray instead of object array for wxAuiToolBarItemArray
This class is part of the public API, as it is used by the public
wxAuiToolBar functions, so we can't make it just a vector, but we can
still make it a wxBaseArray instead of using the old macro-based object
array for it.

Also document it.
2023-04-12 18:09:48 +01:00
Vadim Zeitlin
338751756f Use std::vector<wxImage> instead of wxImageArray
Preserve the old dynamic array name but just define it as a thin class
deriving from std::vector and accept just vector in SaveAnimation().
2023-04-12 18:09:47 +01:00
Vadim Zeitlin
bc3acf429e Fix formatting in wxDisplay::GetPPI() documentation
Avoid putting wxSize(0,0) on two lines.
2023-04-12 17:02:07 +02:00
Vadim Zeitlin
89e4f51f62 Update documentation after setting wxUSE_STD_CONTAINERS=1
Explain that the legacy container classes now inherit from the standard
classes by default and also how to update the existing code to compile
when using standard library-based implementations.
2023-04-10 20:39:50 +01:00
Vadim Zeitlin
3335be1362 Document WX_DECLARE_LIST and WX_DEFINE_LIST macros
Even though they're deprecated, they should still be documented, just as
similar WX_DECLARE_OBJARRAY and WX_DEFINE_OBJARRAY are.
2023-04-10 20:31:47 +01:00
Vadim Zeitlin
61f2fb078b Merge branch 'remove-wxT-from-docs'
Remove most occurrences of wxT() from the docs.

See #23436.
2023-04-10 16:22:42 +02:00
Vadim Zeitlin
15936efed9 Merge branch 'use-stl-tweaks'
Minor changes related to wxUSE_STL.

See #23435.
2023-04-10 16:21:36 +02:00
Vadim Zeitlin
58a7b7b31b Merge branch 'arrstr-from-vector'
Improve interoperability between wxArrayString and std::vector.

See #23434, #23036.
2023-04-10 16:20:16 +02:00
Vadim Zeitlin
60dacae204 Make it more clear that wxT_2() is obsolete
Say it explicitly and remove example of its use which shouldn't needed
any longer.
2023-04-10 14:25:27 +02:00
Vadim Zeitlin
41d0313f52 Update wxT() documentation after ASCII build removal
Explain that this macro always expands into a wide-string now.
2023-04-10 14:25:02 +02:00
PB
d378444010 Remove most occurrences of wxT() from the docs
wxT() macro rarely needed now, so do not use it in the docs
unless it is required.
2023-04-09 20:35:49 +02:00
Vadim Zeitlin
bf3d6374d6 Recommend against using wxList in the new code
Make it clear that it's yet another legacy class.
2023-04-09 02:33:22 +02:00
Vadim Zeitlin
e9527ee5a2 Define wxArchiveIterator in all builds, not just STL one
Doing this doesn't introduce any backwards compatibility problems, so do
it always, and not only when wxUSE_STL==1.
2023-04-09 02:33:22 +02:00
Vadim Zeitlin
e832ebbacc Add wxArrayString::AsVector() too
This provides the conversion in the other direction, which is needed
less often but it's still arguably better to have it than not to.
2023-04-08 22:45:11 +01:00