Commit Graph

67142 Commits

Author SHA1 Message Date
Vadim Zeitlin
fc711f869f Remove obsolete wxUSE_IOSTREAMH option
This is always 0 for any still supported compiler, so remove the option
and configure checks for it.

Still define it as 0 for compatibility, just in case it's used outside
of the library.
2019-10-21 20:46:21 +02:00
Vadim Zeitlin
416fc8582d Remove unused code inside MSVC 6 version checks
We don't support MSVC 6 (__VISUALC__ == 1200) or eVC (1201) since more
than 5 years (see f4b80e5337), so it's
useless to keep code compiled only when this compiler is used.
2019-10-21 20:36:08 +02:00
Ian McInerney
f867b04571 Recognize macOS 10.15 in wxGetOsDescription()
Closes https://github.com/wxWidgets/wxWidgets/pull/1613
2019-10-21 17:16:17 +02:00
Vadim Zeitlin
8949f441fd Also include build/msw/wx_setup.props with MSVC "Dev" binaries
This file is a dependency of wxwidgets.props and must be present.

Closes #18510.
2019-10-21 01:27:51 +02:00
Artur Wieczorek
6c1c621888 Add reference to the widgets sample in the documentation
Add reference to the description of the widgets sample wherever this
sample is mentioned in the documentation.
2019-10-20 21:37:44 +02:00
PB
9d4e116e8a Improve wxVariantDataSafeArray documentation
Improve the class description.

Mention that one needs to call wxAutomationObject::SetConvertVariantFlags()
with wxOleConvertVariant_ReturnSafeArrays to actually receive a
wxVariant with SAFEARRAY (if possible).

Make better use of now-documented wxSafeArray in the code examples.

Closes https://github.com/wxWidgets/wxWidgets/pull/1611
2019-10-20 18:37:57 +02:00
Vadim Zeitlin
f8289ffad5 Include wxwidgets.props into MSVS binaries distribution
Add wxMSVC_VERSION_ABI_COMPAT definition to the version of the file
included in the binary distribution to make it compatible with the
actual DLL names.

Closes #18510.
2019-10-20 17:06:07 +02:00
PB
51d2284da3 Add documentation for wxSafeArray
This wxMSW-only class was introduced in 3.0 but was not documented.

Closes https://github.com/wxWidgets/wxWidgets/pull/1610
2019-10-20 15:44:24 +02:00
Vadim Zeitlin
128608dc25 Fix mistake in wxDateTime::Tm struct documentation
yday field values starts from 0 and mday starts from 1, contrary to what
was actually written.

Closes #18534.
2019-10-20 15:37:13 +02:00
Artur Wieczorek
5925893eed Fix various doxygen issues in the documentation 2019-10-20 11:53:49 +02:00
Vadim Zeitlin
8d962b0121 Add a diagnostic message to wxDateTime::UNow() unit test
Try to understand what's going in Travis CI builds.
2019-10-19 23:05:32 +02:00
Vadim Zeitlin
248d4a8631 Fix size of the last column after the previous commit
The loop computing "colswidth" (the sum of widths including last column)
actually incorrectly computed "lastColX" (the sum of widths until the
last column), fix this.

See #18295.
2019-10-19 23:00:58 +02:00
Vadim Zeitlin
6af316b537 Auto size last visible column in generic wxDataViewCtrl
Resize the last visible column and not just the last column, which might
be hidden, to fill up all the available space.

See #18295.
2019-10-19 22:02:20 +02:00
Vadim Zeitlin
c6d2f6d9fe Really fix the standard button size in high DPI under MSW
Use "relative pixels" (known as DIPs in wx) instead of dialog units, as
the latter ones don't scale correctly due to rounding errors when using
high DPI.

Also take into account the fact that the 1px invisible border around the
visible part of the buttons is not scaled by the standard control, so
don't apply scaling to this part when determining the best size neither.

Closes #18528.
2019-10-19 21:41:18 +02:00
Vadim Zeitlin
20a8b04655 Don't increase the button height in wxMSWButton::GetFittingSize()
This results in buttons being forced to be too tall when using high DPI
and is useless anyhow, as all callers of this function deal with the
height by increasing it to the minimum acceptable value already (or
discard it entirely in wxMessageDialog::AdjustButtonLabels()).

See #18528.
2019-10-19 21:41:19 +02:00
Vadim Zeitlin
4fac71fc29 Merge branch 'per-monitor-dpi-aware-controls-3' of https://github.com/MaartenBent/wxWidgets
Add, or improve, per-monitor DPI awareness to/for more controls.

See https://github.com/wxWidgets/wxWidgets/pull/1589
2019-10-19 20:10:05 +02:00
Danny Scott
0a8cb849b5 Update to reflect use of vc14x binary in place of vc14[012]
Closes https://github.com/wxWidgets/wxWidgets/pull/1608
2019-10-19 20:08:01 +02:00
Vadim Zeitlin
c4e914784a Guard against Now() and UNow() returning different second values
Avoid spurious error in the unit test by calling Now() and UNow() a few
times in a row until they return the same second, as we may be unlucky
enough for this not to be the case when we call them just once.
2019-10-19 20:02:42 +02:00
Artur Wieczorek
b2ad5aa1d9 Get rid of unnecessary cast
Parameter is already of HDC type so this cast is unnecessary and can be removed.
2019-10-18 19:23:52 +02:00
Artur Wieczorek
3873a78f61 Fix building benchmarks with wxUSE_LIBTIFF == 0 2019-10-18 19:22:45 +02:00
Artur Wieczorek
2b331a9463 Optimize drawing owner-drawn button
We have an optimized function to draw horizontal/vertical lines on DC with a non-rotated coordinate system so we can use it for drawing button frames.
2019-10-18 18:06:12 +02:00
Artur Wieczorek
147fc16f1e Optimize drawing cross hair
We have an optimized function to draw horizontal/vertical lines on DC with a non-rotated coordinate system so we can use it for drawing cross hair.
2019-10-18 18:06:12 +02:00
Artur Wieczorek
bae8bb4c45 Optimize drawing horizontal/vertical lines
On DC with a non-rotated coordinate system drawing a filled rectangle with ExtTextOut() Win API is faster than drawing a line with MoveTo()/LineTo() so on such DCs we can use ExtTextOut() to draw horizontal/vertical lines with solid colors and square ends instead of calling MoveTo()/LineTo().

See #18517.
2019-10-18 18:06:12 +02:00
Vadim Zeitlin
8064d9420f Fix the just added wxDataViewCtrl::DeleteAllItems() test
Using GetTopItem() was wrong, we actually need to use the invalid item,
which corresponds to the "virtual root" of wxDataViewTreeStore.
2019-10-17 22:26:37 +02:00
dos
5413f68c61 Build vc14x libraries in official binaries build script
Replace vc140,vc141,vc142 builds using VS2015,VS2017,VS2019
with a single set of libraries using vc14x toolset built with VS2015.

Closes https://github.com/wxWidgets/wxWidgets/pull/1607
2019-10-17 17:02:07 +02:00
Vadim Zeitlin
7a980c455e Fix crash in wxDataViewTreeCtrl::DeleteAllItems() in wxGTK
Restore the checks for the model stamp, reverting the changes of
18594afe76: we still need to ignore the
calls to at least iter_children() and iter_nth_child() model methods
that can be called from inside gtk_tree_view_set_model() when we reset
the model, as running these methods crashes when trying to use the
pointers to already deleted items.

For consistency and robustness, add checks for the model stamp to all
the methods and not just those two, just in case other ones end up being
called later in some way.

Also add a unit test checking that DeleteAllItems() doesn't crash and
does delete all items.

Closes #18533.
2019-10-17 14:57:04 +02:00
Thomas Klausner
a3212b35f6 Fix udata type in wxFileSystemWatcher code under NetBSD 10
The previous fix in 5442edbbe9 corrected
the type for the older NetBSD versions, but not NetBSD 10, which now
uses "void*", as all the other platforms, so restrict the original fix
to NetBSD versions < 10 only.

See #18199.
2019-10-16 23:23:31 +02:00
Vadim Zeitlin
29be54d76e Define all stock colours using their fixed RGB values
For some reason, names were used for cyan and light grey, even though
all the other ones used RGB values since refactoring the stock objects
to be created on demand in f516d98637.

Use RGB values for these two as well now.

Closes #18530.
2019-10-15 23:13:04 +02:00
Vadim Zeitlin
ad7fb7f4aa Merge branch 'warnings' of https://github.com/catalinr/wxWidgets
Fix MSVS analyzer warnings about int multiplication overflow and
uninitialized member variables.

See https://github.com/wxWidgets/wxWidgets/pull/1606
2019-10-15 22:50:17 +02:00
catalinr
67dd28619f Cast more int vars to double to avoid overflow warning 2019-10-14 22:20:37 +03:00
catalinr
62981e1561 Move member initialization in default ctor 2019-10-14 21:34:00 +03:00
Paul Cornett
cfdcc3c29d Remove unreachable code 2019-10-14 09:32:40 -07:00
Paul Cornett
29e0da97d1 Remove invalid flag from HDITEM mask
HDF_LEFT is zero, so it had no effect, but it doesn't belong there
2019-10-14 09:27:50 -07:00
Paul Cornett
2ece977ed7 Add copy ctor for wxUniCharRef
It just does the default, but C++11 deprecates having copy assignment operator
without copy ctor. Eliminates many GCC -Wdeprecated-copy warnings.
2019-10-14 09:08:13 -07:00
Paul Cornett
a3598ba33f Remove unnecessary copy ctors/copy assignment operators
C++11 deprecates having one without the other.
Eliminates many, many GCC -Wdeprecated-copy warnings.
2019-10-14 09:07:21 -07:00
Paul Cornett
764c01832d Use C++11 member-delete in NO_COPY_CLASS/NO_ASSIGN_CLASS macros 2019-10-14 09:06:48 -07:00
catalinr
0508764973 Initialize isLSB to avoid warning 2019-10-14 08:10:41 +03:00
catalinr
2fc569f0c2 Initialize member variables to avoid warnings 2019-10-14 08:09:47 +03:00
catalinr
c150ece20f Cast int to double to avoid arithmetic overflow warning 2019-10-14 07:49:28 +03:00
Maarten Bent
05e0fad687 Resolve some recently introduced warnings 2019-10-13 08:34:30 -07:00
Paul Cornett
127ec4dd7f Build fixes for various wxUSE_* macros ==0 2019-10-12 09:22:02 -07:00
Paul Cornett
0cced058d8 Fix linking when wxUSE_VALIDATORS==0
The changes from 25e9be6873 don't work, at least with GCC 9, as the compiler
seems to be removing the definition of the wxDefaultValidator variable.
2019-10-12 09:18:19 -07:00
Vadim Zeitlin
5e3ba81bbf Revert accidentally committed wxGrid changes
These changes were included in 18e05aeeee
accidentally, revert them for now (they will be recommitted later with a
proper commit message).

See https://github.com/wxWidgets/wxWidgets/pull/1601
2019-10-12 16:08:24 +02:00
Maarten Bent
591136c7bc Improve button heights at high DPI on wxMSW
Don't use FromDIP together with ConvertDialogToPixels, because the font height
is already adjusted to the DPI.
Also limit the button height at higher DPI. Because the height determined by
ConvertDialogToPixels is higher than standard buttons use on Windows.

Closes #18528
2019-10-11 22:30:34 +02:00
Vadim Zeitlin
9e2ff111a4 Restore, but deprecate, default ctor of wxTimerEvent
Apparently some existing code still used it, even though it only created
an object that could never be used for anything, so undo its removal in
bd09b4132d and deprecate it instead.

Unfortunately, this also requires changing wxTimerEvent::m_timer type
back to pointer, even though it should be a reference.
2019-10-11 19:22:55 +02:00
Artur Wieczorek
92cab3d20a Use proper macros to translate logical to device y-coordinates
Fortunately these macros do nothing but invalid names here could be misleading.
2019-10-11 19:02:15 +02:00
Vadim Zeitlin
a668db8b64 Do nothing in wxListCtrl::SetDoubleBuffered() in wxMSW
Setting WS_EX_COMPOSITED, as the base class version does, just results
in visual artefacts and is useless, as we turn on LVS_EX_DOUBLEBUFFER
already, if it's supported, anyhow.

So don't break the display if people call SetDoubleBuffered() in the
mistaken belief that it does something useful in this case.
2019-10-11 15:34:49 +02:00
Olly Betts
18e05aeeee Remove no-op uses of wxNO_FULL_REPAINT_ON_RESIZE
This behaviour has been the default and this constant 0 since
e441e1f4e8 which was over 16 years ago.

Closes https://github.com/wxWidgets/wxWidgets/pull/1601
2019-10-11 14:12:43 +02:00
Artur Wieczorek
bf4640f1d8 Fix drawing cross hair on wxDC
There is no need to draw cross hair lines within the entire viewport because only the part inside the current clipping region will be actually drawn. This way we can also avoid working with huge numeric values of coordinates (VIEWPORT_EXTENT = 2^27-1) which apparently are not handled properly by LineTo() API.

Closes #18526.
2019-10-10 20:34:17 +02:00
Maarten Bent
a0359a23ff Fix wxSTC compilation without precompilead headers
Get and release the HDC, instead of using WindowHDC. Because stc.cpp is used on
all platforms, don't include wxMSW specific wx/msw/private.h.

Also use const int for the variables.
2019-10-10 20:28:44 +02:00