Commit Graph

3953 Commits

Author SHA1 Message Date
Vadim Zeitlin
717e6590bd Merge branch 'macos_wkwebview' of https://github.com/TcT2k/wxWidgets
Use WKWebView for wxWebView Implementation under Apple systems.

See https://github.com/wxWidgets/wxWidgets/pull/2113
2021-01-16 16:20:58 +01:00
Vadim Zeitlin
1065e61ab7 Merge branch 'log-ms'
Use milliseconds in wxLog timestamps.

See https://github.com/wxWidgets/wxWidgets/pull/2164
2021-01-16 16:00:57 +01:00
Vadim Zeitlin
e6cedf6649 Really support milliseconds in wxLog
Although this was supposed to work, specifying "%l" in wxLog time stamp
format actually didn't because wxLog timestamps were stored as seconds.

Fix this by storing them as milliseconds and add a simple test (not
executed by default) showing that "%l" works correctly now.

Still keep the old wxLogRecordInfo::timestamp field for compatibility,
as it was documented.

See #13059.
2021-01-15 14:55:06 +01:00
Dominic Letz
156045b73b Use consistent event names in wxNotificationMessage documentation
Follow the convention of using the event macro names (rather than the
event type) names in @event documentation in wxNotificationMessage
documentation too, e.g. use EVT_NOTIFICATION_MESSAGE_CLICK rather than
wxEVT_NOTIFICATION_MESSAGE_CLICK.

Closes https://github.com/wxWidgets/wxWidgets/pull/2166
2021-01-14 18:25:56 +01:00
Robin Dunn
0df1d81acd Add missing wxDF_PNG to the interface docs 2021-01-11 12:27:30 -08:00
Gary Allen
027c1b8304 Update wxRibbonToolBar docs 2021-01-10 20:18:42 +02:00
Vadim Zeitlin
b58ee58a7b Update copyright years to 2021
Just run misc/scripts/inc_year and commit the results.

See #18690.
2021-01-03 18:12:37 +01:00
Artur Wieczorek
e09c35efb5 Implement wxImageDataObject
Using this object we can put an wxImage on or retrieve it from the clipboard. wxImage is stored internally as a blob with either a PNG file (wxMSW, wxGTK) or a TIFF file (wxOSX) and therefore some its metadata (like resolution) is stored on the clipboard too (what is not the case for wxBitmap stored with wxBitmapDataObject). wxImages stored with wxImageDataObject can be used by native applications.

Closes #17631.
2020-12-31 12:49:06 +01:00
Artur Wieczorek
a27a7656ea Provide support for storing PNG files on the clipboard (wxMSW)
PNG is a custom clipboard format but images stored in this format are supported by e.g. MS Excel, MS PowerPoint, GIMP (including image transparency).

See #17631.
2020-12-31 12:14:08 +01:00
Vadim Zeitlin
87d94819a1 Merge branch 'add-ribbonBar-coord-functions' of https://github.com/STgithub64/wxWidgets
Add wxRibbonToolBar GetToolByPos() and GetToolRect().

See https://github.com/wxWidgets/wxWidgets/pull/2152
2020-12-29 17:13:58 +01:00
VZ
9160181bcc Minor simplifications and code style fixes
No real changes.
2020-12-29 17:00:08 +01:00
Vadim Zeitlin
23c7805742 Document that wxTE_READONLY can't be used with wxTextEntryDialog
This style doesn't make any sense here, but using it is confusing
because it has the same value as wxCANCEL and is interpreted as it,
rather than as expected by users.

We can't do much about this, but at least document that this flag
doesn't work to prevent people from wasting time trying to use it.
2020-12-27 18:32:10 +01:00
Gary Allen
ae9a62d5a2 Add wxRibbonToolBar GetToolPos and GetToolRect coord functions 2020-12-23 20:08:39 +02:00
Tobias Taschner
10398b8f72 macOS: Document missing wxWebView features and don't test for them 2020-12-14 13:40:32 +01:00
Tobias Taschner
4df334cec4 macOS/iOS: Use WKWebView for wxWebView Implementation
WKWebView replaces
WebView on macOS (available since 10.10, deprecated since 10.14) and
UIWebView on iOS (available since 8.0 deprecated since 10.0).
Using WKWebView ensures future compatiblity and unifies the interface
used for iOS and macOS.
2020-12-14 10:18:01 +01:00
Tobias Taschner
6d7f35090d Removed macOS only wxWebKitCtrl
This macOS only class duplicated functionality and code of wxWebView.
2020-12-14 10:17:35 +01:00
Vadim Zeitlin
15c3ce6710 Add wxPlatformInfo::GetCpuArchitectureName()
This provides the same information as wxGetCpuArchitectureName(), but is
consistent with the other wxPlatformInfo accessors, which also
correspond to the existing wxGetXXX() functions, and makes it more
convenient to use this information in the application code as now
everything is available via wxPlatformInfo instead of having to use
different functions for different pieces.
2020-12-12 15:23:17 +01:00
Vadim Zeitlin
5c4461a154 Return "" and not "Unknown" from wxMSW wxGetCpuArchitectureName()
This is more consistent with the Unix version, and easier to test for
in the application code.
2020-12-12 15:18:29 +01:00
Satya Das
86a3578a11 Fix syntax error in interface headers
Although these headers are not supposed to be compiled, it's still
better to avoid at least the obvious typos in them.

Closes https://github.com/wxWidgets/wxWidgets/pull/2140
2020-12-10 22:53:11 +01:00
Vadim Zeitlin
b4e1da1d6a Add wxWindow::GetAutoLayout() documentation
This function is not really useful for the application developers, but
should still be documented.

Closes #18917.
2020-12-08 18:47:38 +01:00
Vadim Zeitlin
d47fa718cd Add wxDataViewCtrl::ExpandChildren()
This convenient method allows to expand all children of the item
recursively.

This is directly supported by both native implementations, so it makes
sense to have this in wxDataViewCtrl itself, even if it could be also
(less efficiently) implemented in the user code.
2020-12-05 16:37:13 +01:00
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