Commit Graph

2524 Commits

Author SHA1 Message Date
Vadim Zeitlin
549e0a59b1 Fix handling of single letter shares in UNC paths in wxFileName
This comes at the price of breaking compatibility and returning
"\\share" rather than just "share" from wxFileName::GetVolume() for the
UNC paths. This breakage seems justified because it is required in order
to allow application code to distinguish between paths "x:\foo" and
"\\x\foo", which was previously impossible as GetVolume() returned just
"x" in both cases.

Document this change, adjust the existing checks for the new GetVolume()
semantics and add a new test which passes now, but didn't pass before.

Closes #19255.

This commit is best viewed ignoring whitespace-only changes.
2021-09-15 01:51:35 +01:00
Vadim Zeitlin
0f79f69d88 Return empty bitmaps from wxButton if not explicitly set in wxMSW
Do this for consistency with the other ports and because this seems more
useful anyhow.

Update the documentation to make this behaviour more clear and document
this change as a (minor) incompatibility in wxMSW.

Also add more unit tests to check for this behaviour. Note this also
fixes the problem with the unit test added in the grandparent commit
under MSW.
2021-09-03 21:22:05 +02:00
Dimitri Schoolwerth
0b9176874e Fix wxOSX build with Xcode 10 and later
Update target architectures to support building with the whole range of
supported Xcode versions by not targeting i386 by default, as well as
adding an arm64 target. Targeting i386 results in a deprecation
error starting with Xcode 10:

error: The i386 architecture is deprecated. You should update your ARCHS
build setting to remove the i386 architecture.
2021-08-23 00:51:19 +02:00
Vadim Zeitlin
ef21046c2c Document more incompatibilities between PCRE and old wxRegEx
Also try to make the reference to this documentation in the change log
more clear.
2021-08-04 01:36:46 +02:00
Vadim Zeitlin
62c776c17c Merge branch 'regex-pcre'
Implement wxRegEx using PCRE2.

See https://github.com/wxWidgets/wxWidgets/pull/2438
2021-07-27 17:47:31 +02:00
Vadim Zeitlin
27d0e7804c Replace DoGetBorderSize() with GetWindowBorderSize()
We accidentally ended up with two functions doing the same thing, since
DoGetBorderSize() was added in 743b426605 (Added DoGetClientBestSize()
and use it for a couple of controls in wxMSW., 2009-06-22), as we
already had GetWindowBorderSize() added even earlier in 333d70525c
(added wxWindow::GetWindowBorderSize(), 2006-11-25), so remove the
redundant non-public function and use GetWindowBorderSize() everywhere.

This does change the behaviour of GetWindowBorderSize() in wxMSW, wxGTK
and wxUniv, as it now does what DoGetBorderSize() used to do, but this
should be an improvement, as DoGetBorderSize() implementation was more
precise.
2021-07-24 21:18:45 +02:00
Vadim Zeitlin
3d8438619d Use PCRE as built-in regex library
Replace the use of Henry Spencer's regex library with PCRE at the build
level and enable wxUSE_PCRE in wxRegEx code to switch to PCRE-based
implementation there.

Note that this has to be done unconditionally because there is no simple
way to select between the previously used regex library and PCRE at the
makefiles level.

We could still keep the possibility to use the system regex library
under Unix, but this doesn't seem to be worth doing, as we don't support
Unicode REs properly when using it (and never did), so drop support for
this too.
2021-07-24 19:17:59 +02:00
Vadim Zeitlin
1d6c740f3b Disable sizer flag checks if WXSUPPRESS_SIZER_FLAGS_CHECK is set
This provides a less intrusive, and also usable by the end users rather
than only by the developers, way of doing the same thing as the just
added wxSizerFlags::DisableConsistencyChecks() does.
2021-05-20 13:27:08 +01:00
Vadim Zeitlin
2e289d7231 Add wxSizerFlags::DisableConsistencyChecks()
This allows to (hopefully temporarily) disable size flag check asserts.
2021-05-20 13:27:06 +01:00
Vadim Zeitlin
99f2d0ee2b Update the minimum required MSVS version to 2005 2021-04-26 16:28:55 +02:00
Vadim Zeitlin
8fc2d44004 Don't generate events from wxMSW wxSpinCtrl::SetValue(wxString)
The function was documented to not generate the events, but actually
did generate wxEVT_TEXT ones, even if it didn't generate wxEVT_SPINCTRL.

This was inconsistent with wxGTK and generic wxSpinCtrlDouble used under
MSW, so change this to avoid the unwanted events.
2021-04-23 22:30:59 +01:00
Vadim Zeitlin
35fa1f93bc Reset wxSpinCtrl value to GetMin() if text string is invalid
Previously, wxSpinCtrl (using native control) and wxSpinCtrlDouble
(using the generic implementation) behaved differently in this case,
with the former changing its value but the latter keeping the last valid
value instead.

Make them behave the same by resetting the value in both cases and
document this behaviour.
2021-04-23 22:27:28 +01:00
Vadim Zeitlin
bf5235e01c Merge branch 'explicit-image-from-xpm'
Make wxImage ctor from XPM data explicit to avoid surprising behaviour.

See https://github.com/wxWidgets/wxWidgets/pull/2332

Closes #19149.
2021-04-20 00:21:16 +01:00
Vadim Zeitlin
6fb2b9b676 Add 3.1.6 change log section 2021-04-14 16:28:27 +02:00
Vadim Zeitlin
c64a908472 Transfer git notes since 3.1.4 to the actual change log
Also fix the release date.
2021-04-11 17:28:15 +02:00
Paul Cornett
30637ad3b6 Make wxGridEvent methods GetRow() and GetCol() const and not virtual
See #19085
2021-03-05 07:38:32 -08:00
Vadim Zeitlin
b53f7ac904 Restore support for using faster dotted pens in wxMSW
Changes of d245dc9e1f (Fix drawing of dotted lines with wxDC in wxMSW,
2020-03-27) improved the appearance of dotted and dashed lines in wxMSW
but at the expense of significant (up to a factor of 300) slowdown.

Allow the applications for which the drawing performance is important to
explicitly request the old behaviour, with uglier, but faster, pens by
choosing to use low quality pens.

Update the graphics benchmark to allow specifying the pen quality and
verify that the performance when using it is the same as before 3.1.4.

See https://github.com/wxWidgets/wxWidgets/pull/2218

See #7097.

Closes #18875.
2021-02-22 00:04:07 +01:00
Vadim Zeitlin
4a7b6d7e8f Document that index must be valid in wxChoice::GetString()
This is now the case in all ports, and not just in wxOSX, so document
this behaviour and also document that it has changed compared to 3.0.
2021-01-17 00:41:26 +01:00
Vadim Zeitlin
bc4f78598d Improve instructions about using git notes
Notable record the commands that can be used to recover from a conflict
with the server version of the notes (merging notes is more involved and
usually not worth it, they can just be re-added after resetting).
2021-01-16 16:08:32 +01:00
Václav Slavík
2388f5d33f Don't crash if WXPREFIX env. variable is set
Change wxGetInstallPrefix() to return a string instead of const
wxChar*. The latter was incorrectly obtained from a temporary string if
WXPREFIX was set. While it's possible to fix in a backward compatible
manner without changing the function's signature, it's not worth the
effort for something pretty obscure and used mostly internally.
2020-10-08 18:50:56 +02:00
Vadim Zeitlin
637fc7aeea Add 3.1.5 section to the change log
For now it's empty and just contains the instructions for updating Git
notes.
2020-07-23 16:27:49 +02:00
Vadim Zeitlin
96b7345abd Transfer git notes since 3.1.3 to the actual change log
Fix a couple of typos in the notes while doing it.

Closes #18843.
2020-07-22 01:01:26 +02:00
Vadim Zeitlin
379e718a33 Remove recently added GetOpenGLScaleFactor()
It has become unnecessary after the previous commit, as now the generic
GetContentScaleFactor() can be used instead of it on all platforms, so
revert the changes of f6cc8ff52c (Add GetOpenGLScaleFactor() to abstract
OpenGL coordinates scaling, 2020-07-10).

See https://github.com/wxWidgets/wxWidgets/pull/1944

See #17391.
2020-07-18 23:51:05 +02:00
Vadim Zeitlin
46d6866c9f Make wxGCDC::GetTextExtent("") return (0, 0)
This seems more logical and is compatible with wxDC in wxMSW and wxGTK2,
as well as other kinds of DC, e.g. wxPostScriptDC.

It also looks like the current behaviour was unintentional as it
happened only because wxGCDCImpl::DoGetTextExtent() always passed all
non-null parameters to wxGraphicsContext::GetTextExtent(), even if it
didn't need the values for all of them, and thus bypassed the special
case for the empty string which was already present in the latter
function.

Fix this, making DoGetTextExtent() more efficient as a side effect (we
now avoid unnecessary calls to pango_layout_iter_get_baseline() in the
most common case), and also add another test for empty string to
wxGraphicsContext itself, for non-GTK case.

Also document this behaviour and add a test checking for it.
2020-07-15 02:10:34 +02:00
tm
f6cc8ff52c Add GetOpenGLScaleFactor() to abstract OpenGL coordinates scaling
The fix for OpenGL coordinates when using high DPI in b134589cbb (Fix
OpenGL samples when using HiDPI displays, 2019-08-06) did fix it for GTK
3 and macOS, but broke it for MSW and other platforms not using pixel
scaling, as window coordinates are the same as OpenGL ones there, while
GetContentScaleFactor() can still return values > 1 even on these
platforms.

Provide new GetOpenGLScaleFactor() function abstracting this platform
difference and use it in all OpenGL samples to make them work correctly
in high DPI under all platforms.

Closes https://github.com/wxWidgets/wxWidgets/pull/1944

Closes #17391.
2020-07-12 22:28:29 +02:00
Stefan Csomor
baeda25a67
Update docs/changes.txt
Co-authored-by: VZ <vz-github@zeitlins.org>
2020-07-05 17:26:32 +02:00
Stefan Csomor
6cab9052b8 updating docs for min system 2020-07-04 21:28:13 +02:00
Vadim Zeitlin
d7c6dc6235 Default to building wxOSX, not wxiOS, under Apple ARM platforms
Now that desktop Macs using ARM exist, we should default to building the
normal, macOS-targeting, port on them and not wxiOS any more.

This is a backwards incompatible change, but it shouldn't affect many
people, so should hopefully be fine.
2020-07-01 18:33:48 +02:00
Ian McInerney
4ac648901d Don't allow using GetPath/GetFilename() with wxFD_MULTIPLE
GetPaths/GetFilenames() must be used instead when more than one file
could be selected: document this and assert if the wrong functions are
called.

Closes https://github.com/wxWidgets/wxWidgets/pull/1883
2020-06-22 14:04:10 +02:00
Vadim Zeitlin
de2fba540b Document wxSizer::RecalcSizes() and RepositionChildren() better
Mention that RecalcSizes() shouldn't be called any more, after the
changes of 622deec262 (Replace wxSizer::RecalcSizes() with
RepositionChildren(), 2015-10-11), and that RepositionChildren()
replacing it shouldn't be directly called neither.
2020-06-08 13:26:59 +02:00
Maarten Bent
a416044479 CMake: document the library name changes as incompatible change 2020-05-19 02:00:08 +02:00
Vadim Zeitlin
7c6da45663 Document change in wxGTK wxTextCtrl creation behaviour
It now doesn't send any events, which is correct, but different from the
behaviour in the previous wx versions.
2020-04-02 09:10:36 -07:00
Vadim Zeitlin
2ccc990ee4 Document change of wxAuiMDIChildFrame base class
This should have been done in c1bcf16eb9.
2020-03-12 13:54:54 +01:00
Kvaz1r
acff8466a7 Hide page removed from wxAuiNotebook
It doesn't make sense to leave the page shown, and overlapping the
remaining pages, after removing it.

Closes https://github.com/wxWidgets/wxWidgets/pull/1742
2020-02-29 15:38:50 +01:00
Vadim Zeitlin
8fcf46f65c Forbid creation of wxPaintEvent objects from user code
This doesn't work anyhow, so it's better to prevent the code doing this
from compiling instead of getting run-time asserts or worse.

Also simplify construction of these events inside wxWidgets by passing
the window itself to the ctor instead of passing just its ID and calling
SetEventObject() separately later.

For consistency, do the same thing for wxNcPaintEvent too.
2020-02-10 23:03:01 +01:00
Kvaz1r
5663157674 Fix link between flags and buttons in wxAuiManager
Don't store the buttons used by a pane separately, but take them
directly from the flags, as this ensures that updating the pane flags,
e.g. by calling CloseButton(false), really removes the corresponding
button.

This also makes wxAuiPaneButton helper completely unnecessary, so just
remove it to simplify the code.

Closes https://github.com/wxWidgets/wxWidgets/pull/1723

Closes #18223.
2020-02-05 16:02:51 +01:00
Vadim Zeitlin
325408f062 Make wxGridCellAttr ctor taking a single argument explicit
There doesn't seem to be any reason for allowing to implicitly convert
wxGridCellAttr pointer to wxGridCellAttr object.
2020-01-11 14:05:09 +01:00
Igor Korot
b8d689422f Check item index in wxListCtrl::GetItemState() in wxMSW too
This was already the case in the generic version, but wxMSW one just
silently returned 0 for invalid item index.

Make it consistent with the other platforms and SetItemState() by
checking the index in it too.

Closes https://github.com/wxWidgets/wxWidgets/pull/1702
2020-01-10 16:36:12 +01:00
Vadim Zeitlin
7ecd55f02b Mention that changelog shouldn't be modified directly
Explain that the changes are stored in git notes and the changelog is
only updated before a release now.
2019-12-09 22:45:06 +01:00
Vadim Zeitlin
b842f2afa2 Merge branch 'im/menu' of https://github.com/imciner2/wxWidgets
Make wxEVT_MENU_HIGHLIGHT generation when there is no highlighted item
consistent across all the major ports: use wxID_NONE instead of wxID_ANY
in wxGTK and send these events, which were previously not sent at all in
this case, in wxOSX.

See https://github.com/wxWidgets/wxWidgets/pull/1637
2019-11-05 20:09:14 +01:00
Ian McInerney
11f8d9d478 Document unhighlight event changes 2019-11-05 12:09:51 +00:00
Vadim Zeitlin
0a02f4c190 Increment version number to 3.1.4
Done by running misc/scripts/inc_release, manually updating version.bkl,
rebaking and rerunning autoconf.

Also a header for the next version to the change log.
2019-10-28 14:11:00 +01:00
Vadim Zeitlin
57f3a20d39 Update change log for 3.1.3 release
Add all the changes from "git notes --ref=changelog" and a few more.
2019-10-27 17:53:26 +01:00
Vadim Zeitlin
9102da27ec Document that wxGLCanvas now uses physical pixels
Instruct people to use GetContentScaleFactor() to convert between
logical coordinates used by wxWindow and physical ones used by
wxGLCanvas.

See https://github.com/wxWidgets/wxWidgets/pull/1485
2019-10-08 02:23:15 +02:00
Robin Dunn
41b444e011
Merge pull request #1455 from wxWidgets/gradient-pen
Add support for gradients in wxGraphicsPen
2019-09-11 20:17:34 -07:00
Vadim Zeitlin
84f29ce472 Don't send EVT_TEXT_ENTER to controls without wxTE_PROCESS_ENTER
wxMSW always sent this event to multiline text controls, even when they
didn't have wxTE_PROCESS_ENTER style, contrary to what was documented.

Avoid sending this event unless wxTE_PROCESS_ENTER is used and add unit
tests checking that multiline text controls don't get it without this
style (but still do get it with it).
2019-09-10 18:48:20 +02:00
Robin Dunn
a8a19e25ee Various typo and coding style fixes 2019-09-05 13:33:15 -07:00
Robin Dunn
699f019c76 Add notes about gradient pens and gradient transforms to changes.txt 2019-09-04 14:21:30 -07:00
Vadim Zeitlin
ffd424debb Merge branch 'mswdc-draw-point-checkbox' of https://github.com/MaartenBent/wxWidgets
Draw the same shape in wxDC::DrawCheckMark() under all platforms and
provide wxRenderer::DrawCheckMark() for drawing the platform-specific
shape.

Also fix wxGCDC::DrawPoint() to use the default one point wide pen.

See https://github.com/wxWidgets/wxWidgets/pull/1471
2019-08-20 13:25:28 +02:00
Artur Wieczorek
b06a9d227f Replace wxPG_FILE_DIALOG_TITLE and wxPG_DIR_DIALOG_MESSAGE attributes with wxPG_DIALOG_TITLE
Current wxPG_FILE_DIALOG_TITLE and wxPG_DIR_DIALOG_MESSAGE attributes can be used to customize editor dialog titles only for wxFileProperty and wxDirProperty, respectively. New wxPG_DIALOG_TITLE property is applicable to all properties derived from wxEditorDialogProperty so not only editor dialog titles for wxFileProperty and wxDirProperty can be set but also for wxFontProperty, wxLongStringProperty, etc.
wxPG_FILE_DIALOG_TITLE and wxPG_DIR_DIALOG_MESSAGE attributes are marked obsolete.
2019-08-04 20:20:19 +02:00