Commit Graph

3932 Commits

Author SHA1 Message Date
Lauri Nurmi
b74702543b Rename wxPlatformInfo::*Arch* to *Bitness*, deprecate old names 2020-11-21 19:16:21 +02:00
Lauri Nurmi
68ea3c59f1 Explain in wxPlatformInfo docs that it means bitness when it says architecture
In the context of wxPlatformInfo, 'architecture' means either '32 bit' or
'64 bit'. Anywhere outside the context of wxPlatformInfo, this concept is
known as 'bitness'.

For the rest of the world, 'architecture' generally refers to the CPU
instruction set architecture, i.e. something like x86, x86_64, arm64, whereas
'operating system architecture' refers to the design of separating kernel
space, user space, etc.
2020-11-21 18:17:18 +02:00
Lauri Nurmi
493cc3571e Add wxGetCpuArchitectureName() for finding out CPU architecture
The returned value is OS-dependent and can be something
like: "x86_64", "x86", "arm64".

Closes https://github.com/wxWidgets/wxWidgets/pull/2121
2020-11-19 23:32:34 +01:00
Vadim Zeitlin
4bd0cd40f4 Merge branch 'persistent-combobox'
Add wxPersistentComboBox class and fix persistent classes compilation
when wxString implicit conversions are disabled.

See https://github.com/wxWidgets/wxWidgets/pull/2123
2020-11-19 23:30:51 +01:00
Vadim Zeitlin
4b375971b1 Add version information to wxPersistentComboBox documentation
Just add the previously forgotten "@since" tag.
2020-11-19 23:30:13 +01:00
Vadim Zeitlin
712c2d4004 Add possibility to create "Close" bitmap button from XRC
This requires refactoring NewCloseButton() in order to extract
CreateCloseButton() from it, as XRC relies on being able to use two-step
creation which was previously impossible for this kind of buttons.

CreateCloseButton() is rather unusual, as it has to be declared in the
derived, platform-specific class, in order to be able to call its
Create(), but is defined only once in common, platform-independent,
code. However the only alternative seems to be to have a static
function, e.g. InitCloseButton(), which wouldn't be very pretty neither.

Closes https://github.com/wxWidgets/wxWidgets/pull/2118
2020-11-19 15:44:54 +01:00
Vadim Zeitlin
7f5d45b9b4 Add wxPersistentComboBox for saving and restoring combobox items
This allows to preserve the history of user input.
2020-11-19 13:06:37 +01:00
Vadim Zeitlin
516066939a Add trivial wxVectorContains() helper
This is nicer than using std::find() when only a test for presence is
required.
2020-11-16 16:48:47 +01:00
Vadim Zeitlin
a8b7802d38 Merge branch 'listctrl-extend-rules-and-zebra'
Allow extending rules and zebra background in wxListCtrl to the whole
window.

See https://github.com/wxWidgets/wxWidgets/pull/2112
2020-11-10 14:08:23 +01:00
Vadim Zeitlin
7fe7ebd5e4 Fix problems with GetSelection() documentation
Move wxListBox-specific part to wxListBox documentation, it doesn't
apply to the other controls, such as wxRadioBox.

Also improve the documentation of wxRadioBox::GetSelection() to mention
that it always returns a valid value.

Closes #18968.
2020-11-10 13:12:37 +01:00
Vadim Zeitlin
5ae2a8ebb8 Simplify API for extending wxListCtrl background display
Replace SetListRulesAlternateColourOnBlank() taking 2 arguments, with
the second of them being used only when the first one is true, with a
simpler but still sufficient ExtendRulesAndAlternateColour(bool).

Make the new method virtual and define it as doing nothing in
wxListCtrlBase class, so that it's still available, even if currently
not implemented, in wxMSW.

Also simplify the implementation, fix style problems and other minor
improvements.
2020-11-09 00:37:55 +01:00
Marcos
584d1ae47d Allow showing rules and background on entire wxListCtrl window
Previously they were both limited to the part occupied by the items
only, add a new method allowing to extend them to the whole client
window area.

See https://github.com/wxWidgets/wxWidgets/pull/2106
2020-11-09 00:07:53 +01:00
Vadim Zeitlin
1cf7c47934 Add more wxRound() compatibility overloads and improve docs
Make the overloads added for compatibility available only when
WXWIN_COMPATIBILITY_3_0 is on and add two more of them, to cover all the
interer types (except char but, honestly, who rounds those?).

Also improve the documentation and make it clear that this function is
not needed at all in the new code.

Closes https://github.com/wxWidgets/wxWidgets/pull/2111
2020-11-08 23:19:28 +01:00
Tobias Taschner
46d123b953
WebViewEdge: Allow edge webview2 installation during runtime
Check if edge webview runtime is available in the call to
wxWebView::IsBackendAvailable() instead of only doing it during
process initialization. This allows an application to install
the Edge WebView2 Runtime during runtime and use the edge webview
afterwards without restarting the process.
2020-11-06 09:19:17 +01:00
Vadim Zeitlin
8d4b6ac8b8 Merge branch 'date-picker-blank'
Allow customizing text displayed in wxDatePickerCtrl without valid
value, notably not displaying anything in it in this case.

See https://github.com/wxWidgets/wxWidgets/pull/2109
2020-11-05 16:27:13 +01:00
Vadim Zeitlin
02f1ee3987 Add wxDateTimePickerCtrl::SetNullText()
This allows to customize the string shown when there is no valid date
under MSW (only, for now) and can be notably used to suppress the
unused date completely, which can be useful to lighten up the display
when there are many controls.

Add UI elements to the widgets sample allowing to test the new function.
2020-11-05 14:22:05 +01:00
Vadim Zeitlin
9311dc8ffb Remove redundant wxGridCellDateTimeRenderer::SetParameters() docs
This function is inherited from wxGridCellDateRenderer since the changes
of 659ab78c6d (Add support for editing dates (without time) to wxGrid,
2018-09-06), so there is no need to document it separately.
2020-11-03 03:14:43 +01:00
Vadim Zeitlin
705006615f Add support for date format to wxGridCellDateEditor too
This is needed to allow editing the cells using wxGridCellDateRenderer
with a custom format, otherwise the editor might parse the contents of
the cell differently from what is actually shown.

In particular, this ensures that using "date:%d.%m.%y" (or any other
custom format) as "cell type" works correctly, which wasn't the case
before.
2020-11-03 02:57:22 +01:00
Vadim Zeitlin
2b0dd6dfe3 Don't claim that Enter sends wxEVT_SPINCTRLDOUBLE in wxSpinCtrl
This isn't actually true and doesn't seem to make much sense, so simply
remove the fragment claiming this from the documentation.

Closes #18900.
2020-11-02 00:40:15 +01:00
Gary Allen
095d1e317c Add wxGridSelectNone selection mode
In this mode the user can't select any cells at all in wxGrid.
2020-10-31 17:01:36 +01:00
Tobias Taschner
038782a684
Update WebView Edge min required version to 1.0.622.22
While technically it still builds with older versions,
version 1.0.622.22 ist the first non preview release which should
make the included webview loader DLL the most compatible for the
forseable future.
2020-10-20 15:12:09 +02:00
Ilya Sinitsyn
f7c4677cb2 Fix list contents memory leak in wxAny unit test
Also document the need for using WX_CLEAR_LIST() when converting a
list-valued wxVariant to wxAny.

Note that we intentionally don't fix the problem by clearing the list
automatically, even if it could be done, because this would silently
break the existing code which does already clear the list -- and now
would attempt to clear it twice, with fatal consequences. Instead
document the existing behaviour and explain how to avoid memory leaks.
2020-10-19 13:54:19 +02:00
Vadim Zeitlin
27ca075d4c Document return values of various close-related docview functions
Make it explicit that they all return true if the view or document was
effectively closed or false if closing it was vetoed.
2020-10-16 02:07:10 +02:00
Vadim Zeitlin
b6cff426ce Merge branch 'remove-bcc-support'
Remove support for Borland C++ compiler, it wasn't tested since a long
time and probably didn't work anyhow and there was no interest in
keeping support for it since many years.

See https://github.com/wxWidgets/wxWidgets/pull/2087
2020-10-16 01:58:13 +02:00
PB
caab5dda00 Resolve removal of the rest of BCC-affected
Make changes based on feedback provided by vadz.
2020-10-14 20:11:58 +02:00
Vadim Zeitlin
8a67a78195 Merge branch 'mac-dvc-setselections-performance' of https://github.com/vslavik/wxWidgets
Speed up wxDataViewCtrl::SetSelections() on macOS.

See https://github.com/wxWidgets/wxWidgets/pull/2084
2020-10-13 01:59:57 +02:00
Scott Talbert
ab65087e93 Document that wxGraphicsContext::DrawText angles are in radians
This resolves confusion reported by a wxPython user:
https://github.com/wxWidgets/Phoenix/issues/1815
2020-10-12 13:50:27 -04:00
Vadim Zeitlin
1f40a7e4e3 Document that wxDataViewCtrl::SetSelections() skips invalid items
Also add the unit test checking for this.
2020-10-12 18:32:11 +02:00
Vadim Zeitlin
e21f8ba1a3 Merge branch 'convauto_getencoding' of https://github.com/pavel-t/wxWidgets
Add wxConvAuto::GetEncoding(), other improvements and bug fixes.

See https://github.com/wxWidgets/wxWidgets/pull/2072
2020-10-10 18:09:29 +02:00
Pavel Tyunin
4832565e10
Rename IsFallbackEncoding() to IsUsingFallbackEncoding() 2020-10-05 15:32:07 +03:00
Vadim Zeitlin
4f90d31274 Harmonize wxXmlDoctype ctor parameter names
Make the names more clear and similar to the names of member variables
to which they correspond and also use them consistently in the
documentation.

This reverts the changes to this interface header done in 5925893eed
(Fix various doxygen issues in the documentation, 2019-10-20).
2020-10-04 16:00:34 +02:00
Pavel Tyunin
28823424e9
Add wxConvAuto::GetEncoding() 2020-10-03 19:10:17 +03:00
Pavel Tyunin
2b8fd103b7
Add wxConvAuto::IsFallbackEncoding() 2020-10-03 19:10:17 +03:00
Stefan Brüns
03e6ca87db Revert client_data parameter name to clientData
Commit 5925893eed ("Fix various doxygen issues in the documentation")
changed the name to client_data.

This does not fit the naming scheme, and breaks some code in Phoenix
which assumes the param is called clientData (to be able to use a
binding specific type for it).
2020-10-03 16:19:06 +02:00
Stefan Brüns
d47b857b09 Change data and shortHelpString to adhere to naming convention
Rename data to clientData in the inlined overloads. This change is
transparent for any users.

Rename shortHelpString to shortHelp (dito for longHelp). Although this
change is in general visible for any users, Phoenix already mangles the
the parameter names to strip the 'String' suffix.
2020-10-03 16:12:04 +02:00
Stefan Brüns
d18e7718fd Fix wxWindowId parameter type and name in wxHtmlHelpWindow
The type obviously should be wxWindowID, not int.

Rename the parameter, as it is the only instance where the id is not
named 'id', the implementation already uses 'id', and for Phoenix naming
it id is also preferred, as the name is used for mangling.

The naming change causes no further breakage for Phoenix, as the generator
is currently broken anyway for this case.

Closes https://github.com/wxWidgets/wxWidgets/pull/2069
2020-10-02 15:02:03 +02:00
Stefan Brüns
204d8a4536 Add missing wxRibbonMSWArtProvider::GetButtonBarButtonTextWidth interface
The missing override in the interface makes the inherited classes abstract
from the Phoenix SIP generators view.
2020-10-01 05:01:53 +02:00
Artur Wieczorek
2f679396fd Fix typo in documentation 2020-09-27 13:58:01 +02:00
Artur Wieczorek
7153eaf6ec Implement new coordinates conversion functions in wxDC
Current DeviceToLogical{X|Y}(), LogicalToDevice{X|Y}(),
DeviceToLogicalRel{X|Y}(), LogicalToDeviceRel{X|Y}() functions
don't take into account transformations applied with
SetTransformMatrix() so conversion results are invalid if coordinate
system is e.g. rotated.
We need to implement new conversion functions that take into account all
applied transformations and also convert x,y coordinates in one call
because in general case x,y coordinates are coupled and cannot be
converted independently on each other.

Closes #18923.
2020-09-27 11:45:19 +02:00
Artur Wieczorek
6fac6c0b35 Add unit tests of coordinates conversion functions 2020-09-26 01:43:20 +02:00
PB
08599d894f Fix displaying Flush() in wxClipboard docs note
Just remove the '@' which was probably there by accident but
made the function name disappear.
2020-09-25 21:29:20 +02:00
Vadim Zeitlin
451ed78dcd Mark wxImageAlphaBlendMode as being new since 3.1.5
It doesn't matter much, but it, and the corresponding parameter, will be
available in this version and not (only) in 3.2.0.
2020-09-25 01:12:24 +02:00
Eric Raijmakers
6e8da8641c Add alpha blending for wxImage::Paste
Add test cases for wxImage::Paste.

Closes #12458.

Co-Authored-By: Rachel Mark <kramdar@gmail.com>
2020-09-25 01:04:49 +02:00
PB
8ae9987a29 Improve code examples in wxDataViewModel documentation
Fix variable name for the model.

Make the code using wxObjectDataPtr have the same flow as the
code using a raw pointer.

Format the code to be in accordance with the official guidelines.

Closes #18924.
2020-09-24 00:12:37 +02:00
Vadim Zeitlin
1f1a9d52d6 Merge branch 'expose-radiogroup'
Add public functions for navigating in radio button groups.

Also introduce wxRadioButtonBase defining wxRadioButton API for all
ports.

See https://github.com/wxWidgets/wxWidgets/pull/2052
2020-09-24 00:11:15 +02:00
Vadim Zeitlin
9e51389676 Improve radio button navigation functions documentation
Correct the previously wrong described behaviour for wxRB_SINGLE buttons
and also mention that Get{First,Last}InGroup() never return NULL.
2020-09-21 16:02:40 +02:00
Vadim Zeitlin
1a4f628e40 Make radio button navigation functions const
This requires adding a couple of const_cast<>s in their implementation
in order to still allow them returning non-const wxRadioButton pointers,
but this seems preferable to not being able to call them on a const
wxRadioButton in the first place.
2020-09-21 15:36:41 +02:00
Vadim Zeitlin
3ccbee2e1c Mark radio button group navigation functions as new in 3.1.5
Just add the missing "@since" lines.
2020-09-21 15:05:35 +02:00
Vadim Zeitlin
dfd1638f39 Improve radio button groups documentation
Explain the role of wxRB_SINGLE better, it's useful not only for
avoiding wxMSW bugs (which, besides, shouldn't exist any more).
2020-09-21 15:02:47 +02:00
Stefan Csomor
7bf00e1161 Added info about wxRB_SINGLE 2020-09-21 09:02:06 +02:00