Commit Graph

61344 Commits

Author SHA1 Message Date
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
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
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
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
Vadim Zeitlin
608cee6965 Fix C++11 check when --with-cxx=11 is used
AX_CXX_COMPILE_STDCXX() macro does not define HAVE_CXX11 when C++11 is
required (and not optional, as with --enable-cxx11), so the build was broken
when --with-cxx=11 was used under OS X as -stdlib=libc++ was not used.

Fix this and also leave only a single AX_CXX_COMPILE_STDCXX() check for C++11,
this saves us ~1000 lines in configure.
2016-03-20 16:56:50 +01:00
Andreas Falkenhahn
0777bf6b92 Fix wrong TLW size with horizontal decorations in wxGTK
Compare min/max width with m_width, not m_height, in GTKUpdateDecorSize() for
the logic to work as expected.

Closes #17455.
2016-03-20 15:50:13 +01:00
Vadim Zeitlin
dae0bd5441 Increment the version in the MSW readme automatically too
Update the version in the download link in docs/msw/install.txt in the
inc_release script.
2016-03-18 22:19:22 +01:00
Vadim Zeitlin
c5fad075d3 Replace SourceForge download link with a GitHub one
And remove ftp.wxwidgets.org which is not used any longer.
2016-03-18 22:17:16 +01:00
Vadim Zeitlin
ce1cc2cea5 Remove hard TABs in wxHTML introduced by recent commit
Reformat the code added in d96a25be12.

See https://github.com/wxWidgets/wxWidgets/pull/244
2016-03-17 22:11:30 +01:00
Vadim Zeitlin
df101cab76 Regenerate wx/msw/setup0.h after merging MinGW changes
The merge db70be1a7c accidentally reverted the
changes of d053a90486, restore them.
2016-03-17 22:04:48 +01:00
Artur Wieczorek
e7a9916878 Fixed calculating widths in wxCairoContext::GetPartialTextExtents (wxMSW).
Widths from the beginning of text to the corresponding character should be calculated instead of widths of individual characters.
2016-03-17 21:06:26 +01:00
Artur Wieczorek
e26e8f38b9 Fixed wxCairoContext ctor (wxMSW).
Variable referencing Cairo surface has to be initialized to NULL because otherwise crash can happen in dtor while attempting to destroy the surface.
2016-03-17 20:52:12 +01:00
Artur Wieczorek
494c2e3a6a Display graphics renderer info in the drawing sample.
Display on the status bar a description (name and version) of currently used graphics renderer.
2016-03-16 21:43:09 +01:00
Artur Wieczorek
3bf30d14fd Implemented GetPartialTextExtents for Cairo context (wxMSW).
This implementation should work fine not only for wxMSW port.
2016-03-16 21:42:37 +01:00
Artur Wieczorek
b8e82accbe Allow creating wxCairoContext from native window (wxMSW).
Implemented new wxCairoContext ctor to allow creating Cairo context in wxCairoRenderer::CreateContextFromNativeWindow.
2016-03-16 21:42:06 +01:00
Artur Wieczorek
1fa4efc47e Implemented measuring context for Cairo renderer (wxMSW). 2016-03-16 21:41:20 +01:00
X-L0rd
d96a25be12 Support backslashes in topics of HTML help files
HTML help file is a Microsoft format and it makes sense to support backslashes
in the file names used in it.

Closes https://github.com/wxWidgets/wxWidgets/pull/244
2016-03-16 02:23:29 +01:00
Vadim Zeitlin
db70be1a7c Merge branch 'stackwalk-mingw'
Support wxStackWalker when using MinGW54 or TDM-GCC.
2016-03-16 02:20:15 +01:00
zhivko
6e5a2b630a Fix crash when updating art provider of a ribbon with scroll buttons
Don't leave the scroll buttons with the old, possibly soon to be deleted, art
provider pointer.

Closes #17441.
2016-03-15 20:22:30 +01:00
Vadim Zeitlin
e405bf1607 Initialize CONTEXT ourselves in wxMSW wxStackWalker::Walk()
As we do it for MinGW now, do it also for MSVC in a similar way: this is more
straightforward and less annoying than raising an exception (which can be
caught by a debugger and, at least, is logged by it) and ensures we use
similar code for MinGW and MSVC which should hopefully minimizing the risk of
breaking one or the other without noticing in the future.

Normally there should be no changes in behaviour.
2016-03-15 20:11:12 +01:00
Vadim Zeitlin
ccac9d0557 Enable wxStackWalker in MinGW64 builds
This class can be used even without SEH, provided debug help API is available,
so just make wxUSE_STACKWALKER dependent on wxUSE_DBGHELP instead of
unconditionally disabling it if SEH support is not available.
2016-03-15 20:11:10 +01:00
Vadim Zeitlin
07dcfc52bf Use depth argument in wxMSW wxStackWalker::Walk()
There doesn't seem to be any reason to not pass it to WalkFrom(), it was
probably just an oversight.
2016-03-15 20:11:09 +01:00
Vadim Zeitlin
423b631dff Use 0 instead of NULL for a non-pointer SymEnumSymbols() argument
The base DLL address passed to this function is not a pointer, so don't use
NULL here to avoid warnings from gcc.
2016-03-15 20:11:08 +01:00
Vadim Zeitlin
841af56084 Allow using debug help API with non-MSVC compilers
MinGW64 and TDM-GCC come with imagehlp.h and can compile the code using debug
help API too, so enable wxUSE_DBGHELP when using these compilers by default
and also allow enabling it via a configure option.
2016-03-15 20:11:07 +01:00
Vadim Zeitlin
f62d6bf6fd Don't check MSW-specific configure options unless targeting MSW
This doesn't really change much as these options are not used anyhow, but
seems tidier.
2016-03-15 20:11:06 +01:00