Commit Graph

61478 Commits

Author SHA1 Message Date
Iwbnwif Yiw
1765794015 Fix wxRegEx example in the documentation
Fix typos and make the code actually compile.

Closes #17475.
2016-04-02 18:52:23 +02:00
Vadim Zeitlin
8baaa652ef Merge branch 'dvc': miscellaneous wxDataViewCtrl-related fixes 2016-04-02 01:09:06 +02:00
Steve Browne
ceaa840d7b Restore cwd even if wxFileDialog is cancelled in wxMSW
Sometimes the file dialog changes the current directory even if it is
cancelled, so restore it in any case, not only after successful return.

Closes https://github.com/wxWidgets/wxWidgets/pull/263
2016-04-01 03:37:13 +02:00
Artur Wieczorek
cb14859d10 Fixed drawing on wxMemoryDC with Cairo (wxMSW).
When Cairo surface is created from 32bpp wxBitmap then there is necessary to provide a location of its bit values to cairo_image_surface_create_for_data function and hence bitmap selected into wxMemoryDC has to be converted to DIB, if it is not a DIB already.
Moreover, if 32bpp bitmap doesn't contain real transparency data (is 0RGB bitmap) then its alpha values have to be corrected and set to wxALPHA_OPAQUE value (255).

Closes #17469.
2016-03-31 19:40:08 +02:00
İsmail Dönmez
467dc72fc2 Check for C/POSIX locale just after we truncate language string
This way we can correctly detect C.UTF-8 as C locale.

Closes https://github.com/wxWidgets/wxWidgets/pull/262
2016-03-30 15:38:13 +02:00
Jouk
ab0a64f0fb Update OpenVMS setup 2016-03-30 12:01:39 +02:00
Václav Slavík
7c709be652 Silence VC14 warning in d2d1helper.h system header 2016-03-29 18:54:58 +02:00
Václav Slavík
c57bde7092 Compilation fix for !wxUSE_PRINTING_ARCHITECTURE 2016-03-29 18:54:10 +02:00
Artur Wieczorek
95e63ed062 Pass D2D1_ALPHA_MODE value instead of Boolean flag to wxD2DContext.
Using non-Boolean argument should be more clear.

See #17465.
2016-03-28 21:47:09 +02:00
Vadim Zeitlin
4e4286f0e2 Merge branch 'utf8-stdstring-interop' of https://github.com/minoki/wxWidgets
Make it easier to interoperate with the code using UTF-8-encoded std::strings.

Closes #17461.
2016-03-28 21:44:54 +02:00
Vadim Zeitlin
d3cb252c96 Document that wxScreenDC corresponds to the entire virtual screen
And not just the primary monitor.

See #13279.
2016-03-28 21:41:10 +02:00
Iwbnwif Yiw
00526cefb6 Return full virtual screen size from wxScreenDC::GetSize() in wxMSW
Return the size of the entire virtual screen, possibly composed from multiple
monitors, rather than just the size of the primary monitor.

This makes this method consistent with wxScreenDC actually representing the
entire virtual screen and not just the primary monitor and also with wxGTK.

Closes #13279.
2016-03-28 21:37:55 +02:00
Vadim Zeitlin
2567f4222d Don't characterize GTK+ 2.18 as being "recent" in the documentation
2009 was quite some a long time ago.

See #17464.
2016-03-28 21:30:57 +02:00
pb101
e806647e7f Document that wxInfoBar close button is not used with custom ones
Don't say that wxInfoBar always has a close button because this is not the
case if any custom buttons are present.

Closes #17464.
2016-03-28 21:29:09 +02:00
ARATA Mizuki
01046f4790 Use wxWidgets conversions to/from UTF-8 in Scintilla code
Scintilla conversions use UTF-16, as indicated by their names, while wxString
uses UTF-32 under Unix, so they don't work correctly for the characters
outside of BMP.

Simply use our own UTF-8 conversions, it doesn't seem possible to get invalid
UTF-8 sequences here anyhow, so the comment saying that Scintilla functions
are used to avoid asserts doesn't seem to be relevant.

Closes #15621.
2016-03-28 21:25:56 +02:00
Iwbnwif Yiw
5e4aacd3b7 Don't document wxDropFilesEvent as being MSW-only
This is not the case any more since 2.8.10.

Closes #17463.
2016-03-28 21:25:56 +02:00
ARATA Mizuki
cf000e7e02 Fix GetPartialTextExtents() to handle non-BMP chars under OS X
On OS X, wxString operates on UTF-32 code units, but CoreText API use UTF-16
code units. So we need to take care of surrogate pairs.

Closes https://github.com/wxWidgets/wxWidgets/pull/261
2016-03-28 21:25:56 +02:00
Lauri Nurmi
55d77f271e Don't call different variants of wxString methods overloads
The function such as fn_str(), wc_str(), and ToAscii() have
configuration-dependent return types, yet different variants were claimed to
be member function overloads. This is incorrect, as a member function cannot
be overloaded only by its return type and, for any given platform/build
variant only one of them is available.

Closes https://github.com/wxWidgets/wxWidgets/pull/260
2016-03-28 21:25:56 +02:00
Artur Wieczorek
e07aa294a4 Fixed drawing on wxMemoryDC with Direct2DRenderer.
32bpp wxBitmaps selected into wxMemoryDC can represent either 0RGB or ARGB bitmaps and hence there is necessary to instruct renderer how to interpret 32bpp contents while creating a wxGraphicsContext. wxBitmap::HasAlpha() flag is used for these purposes and its value is passed to wxD2DContext ctor (wxD2DContext is used internally as a backend D2D component) and next used to configure physical renderer created with ID2D1Factory::CreateDCRenderTarget.

Closes #17465.
2016-03-28 21:22:06 +02:00
Vadim Zeitlin
7c4145490e Compilation fix for wxCairoRenderer with Cairo < 1.12
cairo_surface_create_similar_image() introduced by the changes of
d6afb66388 is only available in 1.12 and later,
check for it being available and fall back to cairo_surface_create_similar()
with older versions.

This should fix Travis CI builds.
2016-03-28 17:51:16 +02:00
Václav Slavík
d8a90b4606 Don't mirror wxStyleTextCtrl under RTL locales
Not onlu has Scintilla no support for RTL languages, it is rendered into
a mirrored DC on Windows and so guaranteed unreadable and unsable. Fix
it by explicitly setting the window's layout direction to LTR.
2016-03-28 17:39:26 +02:00
Artur Wieczorek
16f111d007 Modified drawing sample to use wxGraphicsContext::GetTextExtent function.
Use GetTextExtent function to centrally align a bitmap to the text label (on Graphics screen).
2016-03-25 23:14:17 +01:00
Artur Wieczorek
f38485afa5 Modified drawing sample to demonstrate drawing graphics bitmaps.
Draw graphics bitmap and sub-bitmap (on Graphics screen) to present wxGraphicsBitmap support.
2016-03-25 23:12:40 +01:00
ARATA Mizuki
1809ade5ad Test the conversion of wxString from/to UTF-8 std::string in StdStringTestCase::StdConversion 2016-03-25 16:39:21 +09:00
ARATA Mizuki
70ddab243e Add wxMBConv parameter to wxString::ToStdString
See #17461.
2016-03-25 16:23:47 +09:00
ARATA Mizuki
81e6638585 Add overloads of wxString::FromUTF8/FromUTF8Unchecked taking a std::string
See #17461.
2016-03-25 16:23:47 +09:00
Artur Wieczorek
ab891932cd Added additional check if source bitmap is valid in wxCairoRenderer::CreateSubBitmap.
Check if source bitmap contains Cairo surface.
2016-03-24 23:00:08 +01:00
Artur Wieczorek
cce6f4edaa Fixed minor typo in the drawing sample. 2016-03-24 22:24:58 +01:00
Artur Wieczorek
8e1c85109c Use wxMax instead of std::max.
Use wxMax for the sake of uniformity and maintainability - it is used everywhere else in the code base.
2016-03-24 22:24:56 +01:00
Artur Wieczorek
9c83dd8d3e Added checking parameters of wxGDIPlusRenderer::CreateSubBitmap method.
Check if source bitmap is valid and whether sub-bitmap is entirely within it.
2016-03-24 22:24:55 +01:00
Artur Wieczorek
5ea0a0f5f9 Fixed creating Cairo bitmap from wxBitmap (wxMSW).
Fixed creating wxCairoBitmapData from 32bpp wxBitmap (with and without alpha channel). This also fixes wxCairoRenderer::CreateBitmap method.
1. 32bpp bitmap can represent under MSW either ARGB or RGB bitmap so there is necessary to examine its real contents with wxBitmap::HasAlpha function.
2. ARGB bitmaps are premultiplied and there is not necessary to premultiply them again.
2016-03-24 22:24:54 +01:00
Artur Wieczorek
d6afb66388 Implemented wxCairoRenderer::CreateSubBitmap method. 2016-03-24 22:24:53 +01:00
Vadim Zeitlin
6beaeedf58 Correct tests for wxUSE_GENERICDATAVIEWCTRL in wxOSX code
We must include wx/dataview.h, where this symbol is defined, before testing
for it.
2016-03-24 16:31:15 +01:00
Václav Slavík
e37f1a84ce Disable warnings in the standard shlobj.h header with MSVC14
There is nothing we can do about these (harmless) warnings, so just
disable them. Also make sure that the header is included via
wx/msw/wrapshl.h  everywhere.
2016-03-23 14:46:59 +01:00
Vadim Zeitlin
b7e0625b90 Don't indent the expander column in list wxDataViewCtrl in wxOSX
Indenting the column contents to leave enough space for the expanders is
unnecessary in this case, so just don't do it.

Closes #17409.
2016-03-22 21:44:38 +01:00
Vadim Zeitlin
716dace3d6 Make wxDataViewCtrl::Expand() expand ancestors in native ports too
Expand() called ExpandAncestors() in the generic wxDataViewCtrl implementation
but not in the native ones, resulting in observable difference in the
behaviour: for example, the wxDataViewTreeCtrl in the dataview sample appeared
initially expanded under MSW, using the generic version, but collapsed under
GTK and OSX.

Harmonize this among all ports. This also has a nice side effect of making
Expand() less horribly inefficient as it is not recursively called by
ExpandAncestors() which it itself used to call: now ExpandAncestors() only
calls DoExpand() which is a simple function that only expands the item passed
to it and does nothing else.

Closes #14803.
2016-03-22 21:22:36 +01:00
Vadim Zeitlin
aa9e7d3326 Don't make wxDataViewCtrl::ExpandAncestors() virtual
This method has a common implementation and is not supposed to be overridden.
2016-03-22 21:14:10 +01:00
Vadim Zeitlin
d324bd2469 Don't crash if overridden wxDataViewModel::GetValue() throws
Don't let any exceptions propagate to GTK+ code as this results in an
immediate crash there, at least with GTK+ 3.14.5.
2016-03-22 19:32:06 +01:00
Vadim Zeitlin
1bbc44daff Support background colour in wxDataViewItemAttr in wxGTK
The code handling background colour was commented out for some reason, simply
enable it as it seems to be working just fine -- and update the sample to show
that it does.
2016-03-22 17:49:49 +01:00
Paul Cornett
4793e5b0a4 Avoid unresizable windows on HiDPI displays when using SetSizeHints()
see #17456
2016-03-21 09:46:46 -07:00
Vadim Zeitlin
7238f25b83 Merge branch 'osx.11'
Minor fixes and improvements for building under OS X 10.11 (El Capitan).
2016-03-21 01:08:54 +01:00
Vadim Zeitlin
19819085f7 Correct configure check for debug help API availability
The check added in 841af56084 was not good
enough, some MinGW versions do have imagehlp.h, but don't define all the API
functions we need in it. Luckily, we can check for this simply by verifying
that API_VERSION_NUMBER is big enough.

Closes #17451.
2016-03-21 01:07:35 +01:00
Vadim Zeitlin
12d77bd1dc Don't check for Metrowerks compiler in configure under OS X
This is just a waste of time, this compiler doesn't exist since many years and
has never been used under OS X.
2016-03-21 00:59:04 +01:00
Vadim Zeitlin
bc4798c7df Avoid warnings about incompatible pointers with Xcode 7
Use __kindof NSView instead of id when __kindof is supported to avoid warnings
about casting between incompatible point types.
2016-03-20 19:26:14 +01:00
Vadim Zeitlin
5300caf385 No significant changes, just get rid of hard TABs
Replace TABs with spaces, get rid of trailing whitespace.
2016-03-20 19:18:46 +01:00
Vadim Zeitlin
e4c6385824 Get rid of pre-Leopard (10.5) compatibility code in wxOSX
Just use NSComparisonResult directly, we don't care about anything < 10.7.
2016-03-20 19:17:08 +01:00
Vadim Zeitlin
cd57de43dd Add missing wxOVERRIDE to OS X wxNotificationMessage::AddAction()
Thanks clang for a -Winconsistent-missing-override warning.
2016-03-20 19:06:48 +01:00
Vadim Zeitlin
1d5694429f Only create wxOSX/Cocoa tags in makeosxtags script
There is no need to handle Carbon port any more, so simplify the script and
just append the Cocoa-specific tags to the main tags file instead of creating
another one.
2016-03-20 19:06:01 +01:00
Vadim Zeitlin
f973ebe2d5 Also disable deprecation warnings in Obj-C++ code under OS X
Extend the changes of 2ad61b03a8 to Obj-C++
code, the intention was always to suppress all of them.
2016-03-20 17:02:06 +01:00
Vadim Zeitlin
2392423f39 Fix wrong calls to wxWindow::Refresh() in OS X wxRenderer
Refresh(&rect) was used instead of Refresh(true, &rect) mistakenly, thanks to
clang for warning about always-true-conversion-to-bool here.

Fix this by using less error-prone and more clear RefreshRect().
2016-03-20 16:59:09 +01:00