Commit Graph

65469 Commits

Author SHA1 Message Date
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
Artur Wieczorek
76ff4ab2b6 Use dedicated method to move rectangle 2018-12-28 14:02:02 +01:00
Artur Wieczorek
18e03af068 Use conditional operator instead of conditional statement 2018-12-28 14:02:01 +01:00
Artur Wieczorek
9d2fbef751 Only render columns that are within update region 2018-12-28 14:02:01 +01:00
Artur Wieczorek
95461c566d Fix repositioning editors for horizontally scrolled grid
Closes #18313.
2018-12-28 14:01:34 +01:00
Artur Wieczorek
9b7c281e6b Move repeating code to the dedicated template wxVector function 2018-12-27 14:25:00 +01:00
Artur Wieczorek
7d43ed0fb6 Iterate over all items of wxVector with column proportions with iterator 2018-12-27 14:23:54 +01:00
Artur Wieczorek
831a81fb90 Fix positioning property editor
Account scrolled horizontal position.

See #18313.
2018-12-27 14:22:18 +01:00
Artur Wieczorek
de6469610a Fix determining width of the entire row
See #18313.
2018-12-27 14:20:13 +01:00
Artur Wieczorek
9ad19622fd Fix drawing horizontal lines between the rows of the grid
See #18313.
2018-12-27 14:18:04 +01:00
Artur Wieczorek
2f918abf3a Clear empty space beyond the right edge of the grid
See #18313.
2018-12-27 14:15:44 +01:00
Artur Wieczorek
48c71a5f04 Fix calculating width of the first cell
See #18313.
2018-12-27 14:14:19 +01:00
Artur Wieczorek
73b5d3420e Fix determining shift of the drawn scrolled contents
Position of the visible portion of the window should be taken as a drawing offset.

See #18313.
2018-12-27 14:12:32 +01:00
Artur Wieczorek
cc32ebc979 Adjust scroll bar and refresh the grid after changing virtual width 2018-12-27 13:18:06 +01:00
Artur Wieczorek
8dbe6ec69d Add to propgrid sample an option to change virtual width of the grid 2018-12-27 13:16:41 +01:00
Vadim Zeitlin
20cb47c1c4 Send Unicode data as UTF-8 text when using DDE-based IPC
This is a more hackish but more compatible solution to the problem of
data sent using wxIPC_UTF8TEXT format being simply lost when using DDE
for IPC classes. We must use CF_TEXT for the DDE to pass our data, but
we can try to decode it as UTF-8 in the client and assume it was sent in
this format if it worked. This obviously suffers from false positives as
any ASCII string will still be assumed to be UTF-8, but there shouldn't
be any real harm coming from this.

This change also makes sending data in wxIPC_UTF{16,32}TEXT formats work
as well by converting it to UTF-8.

Update the sample to call Advise() with both wxIPC_UTF{8,16}TEXT formats
and remove the now unnecessary wxDDEConnection::m_dataType member.

Closes #17900.
2018-12-27 00:26:29 +01:00
Vadim Zeitlin
09bf235a59 Revert "Fix passing Unicode strings via wxIPC when using DDE"
This reverts commit c657fd3d61 because
changing the format of DDE advise requests/replies is not a good idea:
other applications (those using previous versions of wxWidgets or even
not using wxWidgets at all) may rely on getting data in real CF_TEXT
format rather than in one of text formats preceded by the extra byte
containing the actual format and the previous commit would have silently
broken this.

Another fix for #17900 will be implemented instead.
2018-12-26 23:20:52 +01:00
Artur Wieczorek
311e5e8414 Use conditional operator instead of conditional statement 2018-12-26 11:38:52 +01:00
Artur Wieczorek
a57aacd5af Calculate splitter positions once
Column widths are the same for all rows so there is no need to calculate splitters positions for each drawn row.
2018-12-26 11:38:10 +01:00
Artur Wieczorek
c112c20d5f Optimize calculating position of the right edge of the last cell
Cell widths are invariant during the drawing so calculation can be done once, not on every loop.
2018-12-26 11:37:31 +01:00