Commit Graph

62081 Commits

Author SHA1 Message Date
ARATA Mizuki
affbcfa6c4 Remove HAVE_PARTIAL_SPECIALIZATION and HAVE_TEMPLATE_OVERLOAD_RESOLUTION macros
See #17655.
2016-09-14 18:45:12 +09:00
ARATA Mizuki
32666e8d4f Remove feature test for HAVE_EXPLICIT 2016-09-14 18:45:12 +09:00
ARATA Mizuki
8cfc74491a Replace wxEXPLICIT with the 'explicit' keyword
See #17655.
2016-09-14 18:45:12 +09:00
ARATA Mizuki
1e6251d592 Replace wx_static_cast/wx_const_cast/wx_reinterpret_cast with the function-style casts
See #17655.
2016-09-14 18:45:12 +09:00
New Pagodi
b99d28bb46 Add wxStyledTextEvent::GetListCompletionMethod()
Provide access to Scintilla "listCompletionMethod" field of SCR_AUTOCSELECTION
event.

Closes #17648.
2016-09-13 13:05:25 +02:00
Kolya Kosenko
b05ea5f8f4 Improve build instructions for wxGTK/MSW
Extract the patch that needs to be applied from the documentation and move it
to a separate file.

Closes #17659.
2016-09-13 12:59:46 +02:00
Scott Talbert
de1aff4117 Document wxHLB_XXX constants for wxHtmlListBox styles
Add missing #define's to htmllbox interface header.

Closes https://github.com/wxWidgets/wxWidgets/pull/323
2016-09-09 23:44:10 +02:00
Pete Bannister
61083f4871 Fix rendering of owner-drawn multi-column menus in wxMSW
Compute the item rectangle bounds correctly for the items in non-first column.

Closes #17072.
2016-09-09 23:39:20 +02:00
Artur Wieczorek
f68dad69cc Implement Flush() method for Cairo graphics context
wxCairoContext implementation for wxMSW and wxQT use internally helper surface so there is a need to flush it on demand.
2016-09-08 19:34:46 +02:00
Artur Wieczorek
83527e93d1 Extend affine transformation matrix tests
Add tests of affine transformation matrix for wxGCDC with various renderers.
2016-09-08 19:34:44 +02:00
Artur Wieczorek
49000defcf Add support for affine transformation matrix in wxGCDC
Graphics renderers (exposed through wxGraphicsContext) support arbitrary affine transformations so it is possible to add support for affine transformations in wxGCDC by implementing all wxGCDC::*TransformMatrix() functions with calls to respective wxGraphicsContext functions.
Additionally, this implementation adds support for affine transformations in wxDC under wxGTK3 because in this port wxDC is equivalent to wxGCDC.
2016-09-08 19:34:43 +02:00
Paul Cornett
0bf38e11a3 Cleanup of ad84d9f (r77846)
Remove the unnecessary 'CodePair' struct from a header, make the huge
keySymTab array const, and don't compile it for platforms that don't
use it, it's only used by wxX11
2016-09-07 22:02:05 -07:00
Paul Cornett
a18fe083cc avoid implicit conversion to bool 2016-09-07 21:38:28 -07:00
Vadim Zeitlin
9f9c09e24a Compilation fix for wxGTK with GTK+ 3.4 after recent changes
Fix the build after 1033fb048d.

See https://github.com/wxWidgets/wxWidgets/pull/320
2016-09-08 01:29:20 +02:00
HasheeLeo
ef85c41d0c Pass wxFont by const reference to wxStyledTextCtrl::StyleSetFont()
Since wxStyledTextCtrl::StyleSetFont does not change its 'font' parameter, it
should be a constant reference so we can pass in temporary wxFont objects.

Closes https://github.com/wxWidgets/wxWidgets/pull/321
2016-09-08 01:13:39 +02:00
Scott Talbert
1033fb048d Fix wxGetKeyState() on non-X11 wxGTK backends (e.g., Wayland)
wxGetKeyState() does not currently work on non-X11 GTK backends, and in some
cases it has been reported to crash.  It seems that the most likely use case
for wxGetKeyState() is to query the modifier keys, so on non-X11 backends, use
GTK+ calls to retrieve the modifier key state.

Non-modifier keys are not currently implemented, update the documentation to
mention this.

Closes https://github.com/wxWidgets/wxWidgets/pull/320
2016-09-08 01:06:43 +02:00
Kolya Kosenko
897ffb58b0 Use native MIME and display classes in wxGTK/Win32 build
Use Windows file associations when running under this OS, even when using
wxGTK, because this is the right thing to do.

Also use native wxDisplay implementation because it works better than the GTK+
one under this platform.

Closes #17651.
2016-09-08 00:48:41 +02:00
Vadim Zeitlin
9cb762dbd2 Rebake to get rid of whitespace-only changes in generated files
This just commits insignificant changes after rebaking everything to make sure
they don't get mixed up with significant ones at some later time.
2016-09-08 00:48:06 +02:00
Artur Wieczorek
dafc865d49 Optimize wxDCImpl::DoSetClippingRegion
Do intersection operations directly on the final wxRect containing clip box.
2016-09-01 21:43:27 +02:00
Artur Wieczorek
588425a9d4 Add caching of clipping box values for Direct2D graphics context
Since retrieving actual clipping box is an expensive operation so to improve performance of wxD2DContext::GetClipBox() we need to store just retrieved clipping box data in the cache. These stored data will be then used in the forthcoming requests for clipping box values. Cached clipping box data are invalidated whenever clipping region is explicitly set using Clip()/ResetClip() or whenever transformation matrix is changed (to take into account new coordinates). If there is a call for clipping box (with GetClipBox) and cached data are marked as invalid then clipping box is retrieved/recalculated and stored in the cache.
2016-09-01 21:42:27 +02:00
Artur Wieczorek
ba4b8d5670 Fix retrieving clipping box after changing wxDC coordinates (GTK)
Member data containing clipping box have to be updated not only when the clipping region is explicitly changed by SetClippingRegion()/DestroyClippingRegion() but also when wxDC coordinates are transformed with SetDeviceOrigin(), SetLogicalOrigin(), SetUserScale(), SetLogicalScale(), SetTransformMatrix() or ResetTransformMatrix().
When any of these functions is called then clipping box data are marked as invalid and updated by recalculating extents of the clipping region in new coordinates at nearest call to GetClippingBox().

Closes #17646.
2016-09-01 21:42:13 +02:00
Artur Wieczorek
98714ea452 Fix retrieving clipping box after changing wxGCDC coordinates (MSW, GTK)
Member data containing clipping box have to be updated not only when the clipping region is explicitly changed by SetClippingRegion()/DestroyClippingRegion() but also when existing wxGraphicsContext is associated with wxGCDC using SetGraphicsContext() or when wxGCDC coordinates are transformed with SetDeviceOrigin(), SetLogicalOrigin(), SetUserScale() or SetLogicalScale().
When any of these functions is called then clipping box data are marked as invalid and retrieved from underlying graphics context using wxGraphicsContext::GetClipBox() at nearest call to GetClippingBox().

See #17646.
2016-09-01 21:41:18 +02:00
Artur Wieczorek
dfc966bf1e Fix retrieving clipping box after changing wxDC coordinates (MSW)
Member data containing clipping box have to be updated not only when the clipping region is explicitly changed by SetClippingRegion()/DestroyClippingRegion() but also when existing HDC is associated with wxDC using SetHDC() or when wxDC coordinates are transformed with SetDeviceOrigin(), SetLogicalOrigin(), SetUserScale(), SetLogicalScale(), SetTransformMatrix() or ResetTransformMatrix().
When any of these functions is called then clipping box data are marked as invalid and updated using GetClipBox() Win API at nearest call to GetClippingBox().

See #17646.
2016-09-01 21:39:48 +02:00
Artur Wieczorek
a37ed9a2b5 Add tests of setting clipping region and retrieving clipping box
These new tests are about setting clipping region and retrieving clipping box for wxDC and wxGCDC with applied transformations.

See #17646
2016-09-01 20:35:09 +02:00
Paul Cornett
378aa9dc39 fix building/running with GTK+ 2.6 2016-08-31 10:22:52 -07:00
Paul Cornett
7986ccf039 Remove incorrect g_object_ref on wxMenuBar
Should probably have been removed as part of 9ff9d30 (r55288)
2016-08-31 10:12:49 -07:00
Paul Cornett
5d04f41d47 Save and restore GtkStyleContext in a few places that were not doing it
Does not fix any known problem, but seems prudent
2016-08-31 10:01:27 -07:00
Paul Cornett
1ba59a410f Remove run-time dependencies on GTK3 backends for Wayland, Mir, Broadway
This allows running with a GTK+ library that was built with different backends
than the one wxWidgets was built with. Since GTK3 provides no way to determine
the backends available at run-time, avoid referencing symbols in the backends
by checking the type name of the GdkDisplay, on the assumption that they are
unlikely to ever be changed. The X11 backend is still required at run-time if
it was available at build-time, although this dependency could also be removed.
2016-08-31 09:39:25 -07:00
Vadim Zeitlin
7f26deb13e Don't hard-code position and size for "Hello World" frame
This is not good practice and we shouldn't encourage people to do this.
2016-08-27 18:40:48 +02:00
Vadim Zeitlin
f259565123 Improve description of wxIMPLEMENT_APP() on the "Hello world" page
Also add the missing semicolon after it, so that if anybody copies and pastes
this line from the documentation, it actually would compile.
2016-08-27 18:32:54 +02:00
Lauri Nurmi
84969ba00d Prevent assignment to wxString::const_iterator from compiling
Make const_reference const and dereference const_iterator into a
const_reference to ensure that the code trying to assign to a (dereferenced)
const_iterator doesn't compile.

Closes https://github.com/wxWidgets/wxWidgets/pull/316
2016-08-27 17:51:37 +02:00
arata, mizuki
23527a5f81 Fix wxCHECK_VISUALC_VERSION macro to correctly detect VC14 2016-08-27 17:45:12 +02:00
Lauri Nurmi
394ce5f631 Add C++11-style cbegin, cend, etc. to wxString's iterator interface
These c-prefixed functions always return a const_iterator.
The full list of functions added: cbegin(), cend(), crbegin(), crend().

Closes https://github.com/wxWidgets/wxWidgets/pull/314
2016-08-25 18:54:05 +02:00
Artur Wieczorek
e68bd5a319 Fix compilation breakage due to missing FLT_MAX, FLT_MIN
Include <float.h> header file unconditionally.
2016-08-22 21:04:38 +02:00
samurajj
a93dcc531c Fix error reporting for wxCopyFile() under Unix
Check if copying file actually succeeded, any IO errors that could happen in
it were previously just completely ignored.

Closes #17638.
2016-08-22 14:17:43 +02:00
Artur Wieczorek
1222a9d769 Fix for PCH-less build for wxGDIPlusContext
Including <float.h> header is required for FLT_MAX, FLT_MIN.
2016-08-22 00:03:28 +02:00
Artur Wieczorek
92557dad1c Define REAL_MIN, REAL_MAX if GDI+ headers don't do it
This should fix compilation with MinGW.
2016-08-21 23:44:59 +02:00
Artur Wieczorek
d66ff48fb4 Add new tests to check clipping region with rotated wxDC/wxGCDC
See #17636.
2016-08-21 21:23:01 +02:00
Artur Wieczorek
acc57fccc7 Fix wxDC::Clear
When complex transformation (including e.g. rotation) is applied to DC then coordinates of the clip box return by GetClipBox() API can be inaccurate due to the rounding errors.
To compensate these errors we need to fill rectangle which is slightly larger then just retrieved clip box.

Closes #17636.
2016-08-21 21:22:05 +02:00
Artur Wieczorek
12eaa61930 Fix wxGCDC::Clear
If underlying graphics context is rotated then drawing a rectangle with origin at (0,0) doesn't cover all the drawing area. To draw over entire area we need to get extents of the actual clipping region (with applied all transformations) and use it as coordinates of the drawn rectangle.

See #17636.
2016-08-21 21:03:17 +02:00
Artur Wieczorek
78f00da98a Fix wxGraphicsMatrix::TransformDistance for Direct2D implementation
Current transformation matrix without translation component should be used in calculations.
2016-08-21 21:01:52 +02:00
Artur Wieczorek
6ca5c894cd Add tests of setting clipping regions with wxGraphicsContext
The scope of tests corresponds to the scope of existing wxDC/wxGCDC tests. Additionally, newly introduced wxGraphicsContext::GetClipBox() function is tested too.
2016-08-21 21:00:13 +02:00
Artur Wieczorek
a29e6922cf Implement wxGraphicsContext::GetClipBox for Core Graphics 2016-08-21 20:58:56 +02:00
Artur Wieczorek
480a003c00 Add wxGraphicsContext::GetClipBox() function
This method returns bounding box of the current clipping region.
Added declaration, documentation and implemented for GDI+, Direct2D, Cairo renderers.
2016-08-21 20:57:40 +02:00
Gideon van Melle
1927a2f8a0 Update Dutch translations
Closes https://github.com/wxWidgets/wxWidgets/pull/313
2016-08-21 18:08:11 +02:00
Vadim Zeitlin
f9740e8180 Fix wxBitmap ctor from XBM in wxGTK
Width and height were exchanged in the loops, so the conversion code didn't
work correctly and overflowed the pixel buffer (due to extra padding in the
row stride) for non-square bitmaps. It also resulted in a completely wrong
bitmap appearance, but somehow this managed to go unnoticed, unlike the memory
errors.

Closes #17633.
2016-08-21 14:46:16 +02:00
Kolya Kosenko
3fe7be374d Fix wxSecretStore compilation in wxMSW UTF-8 build
We need to explicitly cast wxScopedWCharBuffer to TCHAR* before casting away
constness from it in this case, unfortunately.

Closes #17634.
2016-08-21 14:43:00 +02:00
Vadim Zeitlin
ec8d0c6e78 Fix recent compilation breakage by not using INT32_MAX
Apparently stdint.h doesn't define it on all platforms, even in 2016, so just
hardcode 2147483647 instead.

See #17629.
2016-08-20 00:12:06 +02:00
David Hart
34d39c9dfb Fix use of dangling reference in wxFileSystemWatcher Unix code
Don't reference the "watch" object after possibly destroying it when handling
IN_DELETE_SELF inotify notification.

Closes #17122.
2016-08-19 23:19:14 +02:00
David Hart
6537356236 Make failure to remove an inotify watch a warning
Apparently this can happen when a directory is deleted just before the watch
is removed and it is impossible to avoid it, so just send a warning message so
that the program could react to this, if necessary, but don't annoy the user
with an error in this case.

See #17122.
2016-08-19 23:15:53 +02:00