Commit Graph

61813 Commits

Author SHA1 Message Date
Vadim Zeitlin
6a2a4ef38b Use "int" instead of "long" for TLW geometry storage
For some reason, "long" was used for window coordinates even though they're
really "int", and implicitly converting from the former to the latter resulted
in warnings in user code including this header with e.g. Apple clang.

Just use int to avoid conversions.
2016-05-15 20:23:01 +02:00
Paul Cornett
8809cb68cf remove disabling comment accidentally committed in 5819b9c 2016-05-15 09:17:46 -07:00
Paul Cornett
5819b9cbc5 Avoid resetting global cursor if no global cursor is set
see #17503
2016-05-15 09:06:09 -07:00
Paul Cornett
4c6dddec21 Fix single line wxTextCtrl selection colors when foreground or background color is set with GTK3
see #17527
2016-05-14 11:38:36 -07:00
Eric Raijmakers
5d671d8136 Fix keyboard navigation crash in single column generic wxDataViewCtrl
Selecting a leaf node in a wxDataViewCtrl and then pressing the right arrow
key resulted in using an out-of-bounds index for accessing the columns list.

Fix this by setting the current column to the first one, and not to the second
one which might not exist.

Closes #17537.
2016-05-14 16:18:14 +02:00
lcrees
311b4d1b14 Fix wxOSX build on case-sensitive filesystem
Use the correct case for AppKit.h to fix the problem with not finding the file
when using a case-sensitive filesystem for the build.

Closes https://github.com/wxWidgets/wxWidgets/pull/284
2016-05-14 15:46:09 +02:00
Benjamin Drung
bc41cbeb25 Define wxIsNaN() as std::isnan() in C++11 mode
std::isnan() is always available when using C++11, so just use it.

Also pout the test for C++11 implementations of both wxIsNaN() and wxFinite()
first, eventually the rest of the checks will become obsolete and will be
removed.

Closes https://github.com/wxWidgets/wxWidgets/pull/283
2016-05-14 00:13:47 +02:00
Vadim Zeitlin
a5d2f53f41 Inherit wxGauge from wxGaugeBase in wxGTK
Ensure the proper class hierarchy in wxGTK, this notably allows to override
SetValue() in classes derived from wxGauge, which didn't work in wxGTK (but
did in wxMSW and wxOSX) before.

Also remove the now unnecessary IsVertical().
2016-05-13 22:32:16 +02:00
Vadim Zeitlin
189e4c5024 Null-terminate arrays returned from wxCmdLineArgsArray
This is required for compatibility with the real argv array that this class is
supposed to emulate.

Closes #17531.
2016-05-13 15:40:22 +02:00
Jonathan Dagresta
306597c4fa Ensure wxGenericListCtrl item selected from keyboard is visible
When using the keyboard to select an item by typing the first characters of
its name, we need to make the item visible in addition to selecting it.

Closes #16336.
2016-05-13 15:30:13 +02:00
Artur Wieczorek
360416dfed Check if path geometry contents was successfully transferred while cloning wxD2DPathData.
Since only geometry with closed sink (immutable) can be transferred to another geometry object with ID2D1PathGeometry::Stream() so we have to check if actual transfer succeeded and return NULL if not.
2016-05-12 21:34:53 +02:00
Artur Wieczorek
bd55ce4d37 Fixed closing sub-path of wxGraphicsPath with Direct2D renderer.
To ensure compatibility with Cairo renderer the new sub-path should be started at the joined endpoint of the current (just closed) sub-path.

Closes #17532
2016-05-12 21:33:50 +02:00
Artur Wieczorek
4014000a98 Fixed wxGraphicsPath concatenation (with AddPath) for Direct2D renderer.
Because only ID2D1PathGeometry with closed sink (in the immutable state) can be transferred to another geometry object with ID2D1PathGeometry::Stream() so appending one wxGraphicsPath to another has to be done with source path geometry in the non-writable state and closing this geometry has to be done prior to any other operation.
But we want source wxGraphicsPath to stay in the writable state after appending it to another path so we have to prepare a writable copy of the source ID2D1PathGeometry and assign it to the source wxGraphicPath after the appending.

See #17532
2016-05-12 21:32:20 +02:00
Artur Wieczorek
43be7073cd Make closing sub-path of wxGraphicsPath with GDI+ renderer compatible with Cairo renderer.
Cairo renderer places MOVE_TO element into the path immediately after after the CLOSE_PATH element so to ensure that GDI+ will behave in the same way the new sub-path should be started at the joined endpoint of the current just closed sub-path.

See #17532
2016-05-12 21:26:25 +02:00
Artur Wieczorek
49a634e63f Fixed closing sub-path of wxGraphicsPath with GDI+ renderer.
Add additional point to the sub-path being closed only if this sub-path is empty (its native current point is not set).
2016-05-12 21:18:24 +02:00
Artur Wieczorek
5ffbc7c175 Fixed applying transformation to wxGraphicsPath with GDI+ renderer.
Auxiliary points as well as the native path points have to be the subject of the transformation.
2016-05-12 21:16:51 +02:00
Artur Wieczorek
08cb54c4c1 Fixed wxGraphicsPath concatenation with GDI+ renderer.
Since resulting wxGraphicPath should have the same state as appended path so we have to grab in wxGraphicsPath::AddPath also auxiliary data from appended wxGraphicsPath.

See #17532
2016-05-12 21:15:19 +02:00
Vadim Zeitlin
4eababc004 Don't document non-public wxEvtHandler::SearchEventTable()
This method is not part of public wxWidgets API, so don't document it.
2016-05-09 18:58:39 +02:00
Artur Wieczorek
66e3a3f724 Fixed adding a Bezier curve to wxGraphicsPath with Direct2D renderer.
When current point is not set before the call to wxGraphicsPath::AddCurveToPoint() then it should be set at first control point prior to adding a curve (function should behave as if preceded by MoveToPoint).

Closes #17526
2016-05-09 18:41:16 +02:00
Artur Wieczorek
22c520e3e8 Fixed adding a Bezier curve to wxGraphicsPath with GDI+ renderer.
When current point is not set before the call to wxGraphicsPath::AddCurveToPoint() then it should be set at first control point prior to adding a curve (function should behave as if preceded by MoveToPoint).

See #17526
2016-05-09 18:40:10 +02:00
Jouk
d3e57a1dcf define != operator for WatcherWithUserData needed for find on OpenVMS AXP 2016-05-09 10:21:13 +02:00
Artur Wieczorek
43ba49285b Fixed closing sub-path of wxGraphicsPath with Direct2D renderer.
Ensure that sub-path being closed contains at least one point.

Closes #17525
2016-05-08 21:54:11 +02:00
Artur Wieczorek
fa5f3818b9 Fixed adding a line to wxGraphicsPath with Direct2D renderer.
When current point is not yet set then wxGraphicsPath::AddLineToPoint() should behave as MoveToPoint(). We have to determine whether current point is set or not using additional flag because native renderer doesn't provide any support regarding this matter.

See #17525
2016-05-08 21:53:15 +02:00
Artur Wieczorek
24dfd62fc0 Fixed closing sub-path of wxGraphicsPath with GDI+ renderer.
Ensure that sub-path being closed contains at least one point.

See #17525.
2016-05-08 21:52:04 +02:00
Artur Wieczorek
17e24fec73 Fixed adding a line to wxGraphicsPath with GDI+ renderer.
When current point is not yet set then wxGraphicsPath::AddLineToPoint() should behave as MoveToPoint().

See #17525
2016-05-08 21:51:01 +02:00
Eric Jensen
e7a526604c Implement auto complete in generic wxSearchCtrl
Just forward the relevant methods to the embedded wxTextCtrl.

Closes #17519.
2016-05-07 01:49:22 +02:00
Vadim Zeitlin
e85b8f1a4b Define CFE_AUTOBACKCOLOR ourselves if necessary
Older MinGW cross-compiler versions don't have this symbol in their headers.
2016-05-06 18:55:41 +02:00
Vadim Zeitlin
8677b7eb0a Move our own CFM_BACKCOLOR definition to src/msw/textctrl.cpp
It is only needed/used in this source file, no need to have it in the global
header.
2016-05-06 18:54:40 +02:00
Artur Wieczorek
fab6d0e757 Fixed closing sub-path of wxGraphicsPath with GDI+ renderer.
Close sub-path only if it is really open.
2016-05-06 18:51:01 +02:00
Artur Wieczorek
a6d97acc31 Update documentation regarding wxGraphicsPath::AddRoundedRectangle(). 2016-05-06 18:50:04 +02:00
Artur Wieczorek
dc75ae2bf7 Fixed appending a curve to wxGraphicsPath with Direct2D renderer.
If there is necessary to start a new D2D figure prior to appending a curve to the path then this new figure should be started at the current point and not always at (0,0).

Closes #17521
2016-05-06 18:49:05 +02:00
Artur Wieczorek
984e54ffdd Fixed closing sub-paths of wxGraphicsPath with GDI+ renderer.
When sub-path is closed with CloseSubpath() then current point should be moved to the joined endpoint of the sub-path (what is equivalent of moving it to the starting point of the sub-path). Native CloseFigure() doesn't move the native current point to the starting point of the figure so we need to maintain it on our own in this case.
To implement this behaviour we need to store the starting point of the figure in a dedicate data member and use it to update the current point when the figure is closed.
But native GDI+ renderer doesn't offer any support for updating directly the current point (only explicit drawing operations update its value) so we need also to remember our "logical" current point (being the result of calling CloseSubPath, MoveToPoint, etc.) in a dedicated data member and use it instead of the native current point in the next operation which requires current point location.

Closes #17520
2016-05-05 13:52:12 +02:00
Artur Wieczorek
329aee5660 Fixed closing sub-path of wxGraphicsPath with Direct2D renderer.
When sub-path is closed with CloseSubpath() then current point should be moved to the joined endpoint of the sub-path (what is equivalent of moving it to the starting point of the sub-path). To implement this behaviour we need to store on our own the starting point of the figure in a dedicate data member because native D2D renderer apparently doesn't offer any support for retrieving it.

See #17520
2016-05-05 13:51:27 +02:00
Artur Wieczorek
6879311b98 Fixed appending a line to wxGraphicsPath with GDI+ renderer.
New line appended to the path should be started explicitly at the current point.

See #17520
2016-05-05 13:50:52 +02:00
Artur Wieczorek
a28f1b7f44 Fixed appending a line to wxGraphicsPath with Direct2D renderer.
If there is necessary to start a new D2D figure prior to appending the line to the path it should be started at the current point and not always at (0,0).

See #17520
2016-05-05 13:50:09 +02:00
Artur Wieczorek
008a162241 Fixed appending circle/ellipse to wxGraphicsPath with Direct2D renderer.
Circle/ellipse should be appended as a closed sub-path and the current point after the operation should be moved to "the rightmost point" of the figure ((x+r,y) and (x+w,y+h/2) respectively).

See #17520
2016-05-05 13:49:36 +02:00
Vadim Zeitlin
e2b13a7b8e Fix background colour returned by wxTextCtrl::GetStyle() in wxMSW
Don't return the background colour unless it's really set, otherwise we
returned black background even if it was never changed.
2016-05-05 03:05:45 +02:00
Paul Kulchenko
25520cbb80 Don't use wxWindowBase in the interface headers
This class is an implementation detail, only wxWindow is public and there are
never objects of wxWindowBase (but not wxWindow) class in wxWidgets programs.

Closes https://github.com/wxWidgets/wxWidgets/pull/279
2016-05-05 02:59:43 +02:00
Jouk
426b11036f Ignore compile warnings on OpenVMS 2016-05-04 10:22:15 +02:00
Vadim Zeitlin
e41a59ee07 Fix Unicode conversions in Scintilla code in ANSI build
Don't just use wxWX2MBbuf which is just a "const char*" in ANSI build and can
become a dangling pointer if the string it was constructed from was temporary,
as it happens with the string returned by wxStyledTextEvent::GetString().

Closes #17517.
2016-05-03 16:09:11 +02:00
Dimitri Schoolwerth
c5a18a3407 Revert "Create native buttons without any label in wxOSX/Cocoa"
This change is not any longer needed since the fix in
98f5315405.

This reverts commit ef1db7acda.
2016-05-01 22:20:16 +04:00
Maarten Bent
7c16c93807 Fix for PCH-less build for wxD2DContext.
It is required for FLT_MAX in Direct2D graphics context.

Closes https://github.com/wxWidgets/wxWidgets/pull/276
2016-05-01 19:03:58 +02:00
Artur Wieczorek
1e6cf64a2a Fixed creating wxGraphicsPath with Direct2D renderer.
When current endpoint is moved to a new position with MoveToPoint() then current sub-path should be ended without closing the figure (no line from the current point to the beginning of the sub-path should be added).

Closes #17516
2016-05-01 19:02:58 +02:00
Václav Slavík
98f5315405 Don't set initial label in wxNativeWindow on OS X
Differentiate between setting the label from SetLabel() and from
SetPeer() (i.e. initially), because some native controls shouldn't have
an empty string set as their intitial value.

Override SetInitialSize() to be empty for wxNativeWindow in order to
prevent label-setting issues when an unknown, caller-controlled native
widget is attached. Reverts db9baf9aa5,
which was the previous attempt to fix this, but was causing too many
problems elsewhere.
2016-04-29 17:26:02 +02:00
Vadim Zeitlin
77939b4b62 Update the version in MSVS binaries helper script
Take care of the just added getversion.bat in the inc_release script.

See #17510.
2016-04-28 23:30:29 +02:00
Danny Scott
e6b8e14cfd Add improves scripts for building official MSVS binaries
Use a single script for all compiler versions, another simple script just
defining wxWidgets version and, finally, a script building all the binaries
for all the compilers.

Closes #17510.
2016-04-28 23:30:07 +02:00
Troels Knakkergaard
db62698720 Fix for DLL build after wxItemAttr addition
Don't forward declare this class as being DLL-exported, it isn't.

Closes #17508.
2016-04-25 12:08:28 +02:00
Vadim Zeitlin
875a40be13 Fix wxString::ToStdString(wxMBConv) to compile in ANSI build
70ddab243e broke compilation without Unicode as
mb_str() doesn't return a buffer in this case.

See #17461.
2016-04-24 18:12:31 +02:00
Maarten Bent
5266f4785c Fix PCH-less build after CustomDraw addition
Include "wx/msw/private.h" for wxColourToRGB().

See https://github.com/wxWidgets/wxWidgets/pull/276
2016-04-24 18:03:49 +02:00
Maarten Bent
82ed51d167 Add virtual dtor to wxMSW CustomDraw class
This class is used polymorphically and needs a virtual dtor.

See https://github.com/wxWidgets/wxWidgets/pull/276
2016-04-24 18:02:58 +02:00