Commit Graph

65613 Commits

Author SHA1 Message Date
Vadim Zeitlin
61b2136bee Prettify instructions for adding a new wxUSE_XXX constant
Improve translation of the file from plain text to (GitHub-flavoured)
Markdown.
2019-01-10 03:46:12 +01:00
Vadim Zeitlin
e90c6e83dd Remove stray closing brace from Connect() documentation 2019-01-08 22:59:46 +01:00
Graham Dawes
fbbdcc058a Fix client size for wxFrame under wxQt
Avoid implicitly creating the menu bar by calling menuBar() and use
menuWidget() instead which just returns NULL if there is no menu bar,
allowing to calculate correct client size for frames without menus.

Closes https://github.com/wxWidgets/wxWidgets/pull/1120
2019-01-08 00:41:34 +01:00
Vadim Zeitlin
5ff49cb2e2 Merge branch 'qt_fix_unitialised_fields' of https://github.com/GeoTeric/wxWidgets
Add missing field initialization to a number of wxQt controls.

See https://github.com/wxWidgets/wxWidgets/pull/1092
2019-01-08 00:38:53 +01:00
Vadim Zeitlin
7935dab2e8 Merge branch 'qt_fix_missing_rtti' of https://github.com/GeoTeric/wxWidgets
Add missing wx RTTI macros to many classes in wxQt.

See https://github.com/wxWidgets/wxWidgets/pull/1095
2019-01-08 00:34:30 +01:00
Jens Göpfert
a8d89b9ced fixed memory leak 2019-01-08 00:12:51 +01:00
jensgoe
14ca16ffaf example for DataView with wxDV_VARIABLE_LINE_HEIGHT flag 2019-01-08 00:12:47 +01:00
Jens Göpfert
8c64209df1 ensure m_rowHeightCache is not NULL before accessing it 2019-01-08 00:12:26 +01:00
Graham Dawes
45fc60b549 wxBitmapToggleButton's reported base class is wxControl 2019-01-07 11:51:05 +00:00
Graham Dawes
95b3486dc0 Fix crash in wxAuiNotebook::DoGetBestSize 2019-01-07 10:38:16 +00:00
Graham Dawes
00030b56cb Fix implementation details being used as base class for RTTI in wxQT 2019-01-07 09:18:50 +00:00
Vadim Zeitlin
9ab3acee18 Don't allow using "-" for unsigned entries in propgrid
The changes of 36f6f8ad49 allowed using
"-" (and also "+") characters even for the unsigned properties, which
hadn't been the case before and doesn't seem desirable, so undo this
part of the changes.

See #1093.
2019-01-07 04:29:45 +01:00
Vadim Zeitlin
cfe4a10995 Add manually created MSVS 201x solutions files for wxrc
As with the tests, we don't have any way to generate these files for
now, but we should allow wxWidgets users to build wxrc for themselves
without using nmake, when using modern MSVS versions, so create the
required files manually -- this is not ideal, but better than nothing.
2019-01-07 04:26:34 +01:00
ali kettab
36f6f8ad49 wxTextValidator improvements
Improve char inclusion/exclusion support; update the sample to show more
features of this class and add a unit test for it.

Closes https://github.com/wxWidgets/wxWidgets/pull/1093
2019-01-05 23:33:35 +01:00
Vadim Zeitlin
697125dc03 Merge branch 'clang-warnings'
Fix some harmless but annoying clang warnings.

See https://github.com/wxWidgets/wxWidgets/pull/1115
2019-01-05 23:12:58 +01:00
Vadim Zeitlin
28342d7882 Fix building with wxUSE_STD_CONTAINERS=1 in C++17 mode
Don't use std::bind2nd() which doesn't exist in C++17 any longer.

Replace it with a lambda when using C++11 which is simpler and more
clear and also replace the use of functors in std::sort() calls with
lambdas.

Closes #18319.
2019-01-05 23:12:30 +01:00
Vadim Zeitlin
1d72f6af7e Fix wxMSW build in non-Unicode mode
Convert WCHAR to TCHAR explicitly in this case.

Closes #18320.
2019-01-05 00:01:09 +01:00
Vadim Zeitlin
fee0decbb0 Apply g++ 4.7 workaround in hash set macros to this compiler only
This workaround was already disabled for MSVC, as it resulted in a
warning there, but it also gives a similar warning with clang and it
seems better to restrict this workaround to gcc only rather than
excluding another compiler.
2019-01-04 23:51:31 +01:00
Vadim Zeitlin
dcee3ce899 Suppress some harmless clang warnings in the test suite
Use wxCLANG_WARNING_SUPPRESS() to avoid multiple warnings in CATCH
headers as well as in some of our own tests.
2019-01-04 23:51:31 +01:00
Artur Wieczorek
3cfec773c9 Replace wxArrayPtrVoid with wxVector<void*> 2019-01-04 21:37:27 +01:00
Artur Wieczorek
b235987a69 Use dedicated functions to covert between physical and logical coordinates of the scrolled wxPropertyGrid 2019-01-04 21:32:08 +01:00
Artur Wieczorek
42b1cca8f2 Fix repositioning editors for horizontally scrolled grid
New method of calculating of the new position/size of the editor (introduced in 95461c566d) doesn't work well in all cases so we have to go back to the (modified) old method. To get the correct position of the editor cell from the absolute position of the splitter 0 we have to shift it by the origin of the scrolled view area.

See #18313.
2019-01-04 21:31:39 +01:00
Artur Wieczorek
066c422c81 Take into account scrolling while obtaining absolute mouse pointer position
See #18313.
2019-01-04 21:30:32 +01:00
Pavel Kalugin
659ab78c6d Add support for editing dates (without time) to wxGrid
Add wxGridCellDateRenderer and wxGridCellDateRenderer which can be used
for the grid cells containing only dates, without times.

Also add wxGrid::SetColFormatDate() convenience function.

Refactor wxGridCellDateTimeRenderer slightly to reuse its code.

Closes https://github.com/wxWidgets/wxWidgets/pull/1101
2019-01-04 14:14:01 +01:00
Vadim Zeitlin
ee352d79c8 Merge branch 'ipc-dde-fixes'
wxIPC fixes when using DDE

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

Closes #17900.
2019-01-04 14:12:53 +01:00
Vadim Zeitlin
22c18a107e Invalidate wxDisplay cache under MSW when the displays change
The cache added in 990c8bfd73 was not
invalidated properly, meaning that wrong information was returned when
displays were [dis]connected after the application startup.

Fix this at least for MSW by invalidating the cache on receiving
WM_DISPLAYCHANGE (which means that sometimes we will do it
unnecessarily, as the change in resolution of an existing display
doesn't require cache invalidation, but this shouldn't be a big problem
in practice as the speed with which the user can change the display
resolution is not very high).

Closes https://github.com/wxWidgets/wxWidgets/pull/1090
2019-01-04 14:09:56 +01:00
Vadim Zeitlin
7f63adde95 Merge branch 'select-after-delete'
Harmonize behaviour of wxItemContainer::Delete() for all controls and
ports when using single selection.

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

Closes #18267.
2019-01-04 14:01:02 +01:00
Cătălin Răceanu
5885b2f142 Test that selecting 'single' radio button does not reset others
Add a unit test for the expected behaviour.

Closes https://github.com/wxWidgets/wxWidgets/pull/1102
2019-01-04 13:59:06 +01:00
dghart
2cf0fcb4fd Allow setting wxTimePickerCtrlGeneric from numpad keys too
Previously the generic wxTimePickerCtrl ignored numerical numpad keypresses.
2019-01-03 22:58:14 -08:00
Vadim Zeitlin
9f270c05ff Micro optimization in wxInternetFSHandler::OpenFile()
Avoid copying the content type string unnecessarily and avoid even
calling GetContentType() in the first place in case of an error.
2019-01-03 23:15:54 +01:00
Vadim Zeitlin
e287344b78 Create wxFSFile with correct MIME type in wxInternetFSHandler
Using the entire contents of "Content-Type" header as the MIME type is
wrong, the header may have optional parameters in it as well.
2019-01-03 23:10:09 +01:00
Stefan Csomor
61c413928a iOS fixes 2019-01-03 20:04:50 +01:00
Stefan Csomor
e5e6ee7e77 macOS wxWidgetImpl constructor with flags
replacing bools with int flag
2019-01-03 20:02:24 +01:00
Stefan Csomor
66a9e55f3b macOS 10.14 adaption for launch-opening files
The previous way to stop the event loop for wx-like OnInit processing was too early for 10.14, opening files during launch was not possible, see #18305
2019-01-03 17:49:20 +01:00
Stefan Csomor
142234d009 macOS fix
otherwise CreateNewDocument is called twice
2019-01-03 17:04:13 +01:00
Stefan Csomor
5581e5079f separate non-native mouse handling from IsUserPane
NSOpenGLView is needed under 10.14 as native view, in order to reuse wx touch and mouse handling we trigger this separately from IsUserPane being true
2019-01-03 16:28:19 +01:00
Stefan Csomor
a29ea16ccd separate non-native key handling from IsUserPane
NSOpenGLView is needed under 10.14 as a native view, but it doesn’t have its own native key handling, therefore use the same code we have for non-native custom views.
2019-01-03 13:26:50 +01:00
chris2oph
155a19a1a2 Improve checks for dates range in wxQt wxCalendarCtrl
Account for the minimum and maximum dates supported by QDatePicker, both
in the code and in the test suite, which shouldn't rely on not having
any range restrictions in wxQt.

Closes https://github.com/wxWidgets/wxWidgets/pull/1088
2019-01-03 00:18:37 +01:00
Cătălin Răceanu
2a9462a260 Honor text alignment for spin controls in wxQt
Add support for wxALIGN_CENTRE_HORIZONTAL and wxALIGN_RIGHT flags.

Closes https://github.com/wxWidgets/wxWidgets/pull/1108
2019-01-03 00:15:23 +01:00
PB
0e0bf07888 Fix broken URL in wxICON_QUESTION documentation
The content on MSDN has moved, so the URL needs to be updated.

Closes https://github.com/wxWidgets/wxWidgets/pull/1107
2019-01-03 00:12:37 +01:00
Paul Cornett
942362063d Avoid blocking paint events from long-running mouse event handlers
If a mouse event handler calls Refresh(), increase the likelyhood that a
paint event can be issued before the next mouse event occurs, by requesting
more mouse events from the the end of the handler rather than the start.
See #18314
2018-12-31 10:45:44 -08:00
Vadim Zeitlin
974c75272c Don't invalidate best size unnecessarily in wxControl::SetFont()
There is no reason to do it if the font didn't change at all.
2018-12-31 15:35:36 +01:00
Vadim Zeitlin
6f0c5f65b6 Add "aui" project to MSVS 2017 unit tests solution file too
This should have been done in e9cbbede00
which updated the solution files for all the other MSVS versions, but
somehow forgot this one.

See https://github.com/wxWidgets/wxWidgets/pull/1085
2018-12-30 16:02:09 +01:00
Vadim Zeitlin
c9b240e893 Try to better explain what wxFIXED_MINSIZE does
Don't mention the non-existent GetAdjustedBestSize() function and do
explain what setting wxFIXED_MINSIZE achieves and how it can be done
without it.

Closes #18315.
2018-12-30 15:40:00 +01:00
Vadim Zeitlin
9a8ef599d2 Remove apparently never used wxMSWDCImpl::m_canvas
This member field doesn't seem referenced anywhere (even not to
initialize it), so it can't possibly be useful for anything and can be
just removed.
2018-12-29 03:48:15 +01:00
Artur Wieczorek
a6570433b6 Change wxPGProperty::OnCustomPaint measure item call signature
Because horizontally scrolled wxPGProperty can have x-coordinate < 0 so there is a need to change measure item call signature from rect.x < 0 condition to something more specific to avoid misinterpretation of the calls.
2018-12-28 14:02:05 +01:00
Artur Wieczorek
e13382f400 Remove unnecessary check whether x-coordinate >= 0
Several lines before there is a block terminating the function if rect.x < 0 (measure item call) so there is no need to check after this block whether rect.x >= 0.
2018-12-28 14:02:05 +01:00
Artur Wieczorek
b569a429a2 Remove unnecessary position check
Horizontally scrolled item can have a negative x-position.
2018-12-28 14:02:04 +01:00
Artur Wieczorek
4eef8d9658 Use row height value stored already in another variable
No reason to calculate it twice.
2018-12-28 14:02:03 +01:00
Artur Wieczorek
99c53ca4bb Don't retrieve unused x-coordinate of the view 2018-12-28 14:02:03 +01:00